授予访问“密钥”选项卡的权限

授予访问“密钥”选项卡的权限

您可以授予用户访问密钥选项卡的权限。新用户默认没有权限。

注意:此过程可授予访问密钥选项卡的全部用户权限。如果您希望配置更加细分的用户访问权限,请参阅 文档.

前提条件:

  • 不具有 . 的 DC/OS 用户账户。
  1. 以具有 superuser 权限的用户身份登录 DC/OS UI。

    图 1. DC/OS UI 登录

  2. 权限选项卡上,单击添加权限

  3. 单击插入权限字符串以切换对话框。

    添加权限

    图 3. 插入权限字符串

    禁用

    1. dcos:adminrouter:secrets full
    2. dcos:secrets:list:default:/ read

    严格

前提条件:

  • 必须 安装 DC/OS CLI 并以超级用户登户身份登录。
  • 您必须 ,才能发布此部分的 curl 命令。

提示:

  • 服务资源通常包括 / 必须在 curl 请求中以 %252F 替换的字符,如下例所示。
  • 使用 API 管理权限时,您必须在授予之前先创建权限。如果权限已存在,API 将返回提示信息,您可以继续分配权限。

宽容

  1. 创建权限。

    1. curl -X PUT --cacert dcos-ca.crt \
    2. -H 'Content-Type: application/json' \
    3. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:secrets \
    4. -d '{"description":"Grants access to the contents of the Secrets tab"}'
  2. 向用户授予以下特权 uid.

注意:要向组而不是向用户授予权限,应将 /users/"uid" 替换为 /groups/"gid".

  1. 创建权限。

    1. -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    2. -H 'Content-Type: application/json' \
    3. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:secrets \
    4. -d '{"description":"Grants access to the contents of the Secrets tab"}'

注意:要向组而不是向用户授予权限,应将 /users/"uid" 替换为 .