【问题标题】:Why PUT method not working to create a new collection even if ACL allow it?为什么即使 ACL 允许 PUT 方法也无法创建新集合?
【发布时间】:2021-05-27 17:59:46
【问题描述】:

我有一个拥有此权限的角色:

path-prefix[/mydb] and (method[PUT] or method[POST] or method[GET])

我正在尝试按照以下文档在此数据库中创建一个集合:https://restheart.org/docs/mgmt/dbs-collections/

所以,我用邮递员写了这个:

方法:PUT 网址:https://myhost.mydomain/mydb/newcollection

用户名和密码都可以。用户具有此角色。 GET 工作。

但是 PUT 返回 403(不是 401、403)。

RestHeart (v6)。

有什么技巧可以解决这个问题吗?

【问题讨论】:

    标签: acl restheart


    【解决方案1】:

    解决了。

    第 6 版在安全性方面有所改变。现在必须明确设置一些权限,在这种情况下,以允许管理请求:

    "mongo": {
            "allowWriteMode": false,
            "allowManagementRequests": true,
            "allowBulkPatch": false,
            "allowBulkDelete": false
        }
    

    更多内容:https://restheart.org/docs/upgrade-to-v6/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-13
      相关资源
      最近更新 更多