Granting Access to the Jobs Tab

ENTERPRISE

Granting access to the Jobs tab

You can grant users access to the Jobs tab. By default, new users have no permissions.

NOTE: This procedure grants full user access to the Jobs tab and all the jobs inside of it. If you want to configure fine-grained user access, see the documentation.

Granting Access using the UI

Prerequisites:

  • A DC/OS user account without the dcos:superuser permission.
  1. Log in to the DC/OS UI as a user with the superuser permission.

    Login

    Figure 1. Log in to UI

  2. Select Organization and choose Users or Groups.

  3. Select the name of the user or group to grant the permission to.

    Add permission cory

    Figure 2. Select user or group to grant permissions to

  1. From the Permissions tab, click ADD PERMISSION.

  2. Click INSERT PERMISSION STRING to toggle the dialog.

    Add permission

    Figure 3. Add permission

  3. Copy and paste the permission in the Permissions Strings field. Choose the permission strings based on your security mode and click ADD PERMISSIONS and then Close.

Permissive

DC/OS Jobs tab

  1. dcos:adminrouter:service:metronome full
  2. dcos:service:metronome:metronome:jobs full

DC/OS jobs task and details

  1. dcos:adminrouter:ops:mesos full
  2. dcos:adminrouter:ops:slave full

Strict

DC/OS Jobs tab

  1. dcos:adminrouter:service:metronome full
  2. dcos:service:metronome:metronome:jobs full

DC/OS jobs task and details

  1. dcos:adminrouter:ops:mesos full
  2. dcos:adminrouter:ops:slave full
  3. dcos:mesos:master:framework:role:* read
  4. dcos:mesos:master:executor:app_id read
  5. dcos:mesos:master:task:app_id read
  6. dcos:mesos:agent:framework:role:* read
  7. dcos:mesos:agent:executor:app_id read
  8. dcos:mesos:agent:task:app_id read
  9. dcos:mesos:agent:sandbox:app_id read

Granting Access using the API

Prerequisites:

Notes

  • Service resources often include / characters that must be replaced with %252F in curl requests, as shown in the examples below.
  • When using the API to manage permissions, you must create the permission before granting it. If the permission already exists, the API will return an informative message and you can continue to assign the permission.

Permissive

DC/OS Jobs tab

  1. Create the permission.

    1. curl -X PUT --cacert dcos-ca.crt -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:service:metronome \
    4. -d '{"description":"Grants access to the Jobs tab"}'
    5. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    6. -H 'Content-Type: application/json' \
    7. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:service:metronome:metronome:jobs \
    8. -d '{"description":"Grants access to all jobs"}'
  2. Grant the following privileges to the user uid.

    1. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    2. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:service:metronome/users/<uid>/full
    3. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    4. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:service:metronome:metronome:jobs/users/<uid>/full

NOTE: To grant this permission to a group instead of a user, replace /users/"uid" with /groups/"gid".

DC/OS jobs task and details

  1. Create the permission.

    1. curl -X PUT --cacert dcos-ca.crt -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:ops:mesos \
    4. -d '{"description":"Grants access to the Mesos master API/UI and task details"}'
    5. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    6. -H 'Content-Type: application/json' \
    7. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:slave \
    8. -d '{"description":"Grants access to the Mesos agent API/UI and task details such as logs"}'
  2. Grant the following privileges to the user uid.

    1. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    2. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:mesos/users/<uid>/full
    3. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    4. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:slave/users/<uid>/full

NOTE: To grant this permission to a group instead of a user, replace /users/"uid" with /groups/"gid".

Strict

DC/OS Jobs tab

  1. Create the permission.

    1. curl -X PUT --cacert dcos-ca.crt -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:service:metronome \
    4. -d '{"description":"Grants access to the Jobs tab"}'
    5. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    6. -H 'Content-Type: application/json' \
    7. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:service:metronome:metronome:jobs \
    8. -d '{"description":"Grants access to all jobs"}'
  2. Grant the following privileges to the user uid.

    1. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    2. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:service:metronome/users/<uid>/full
    3. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    4. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:service:metronome:metronome:jobs/users/<uid>/full

NOTE: To grant this permission to a group instead of a user, replace /users/"uid" with /groups/"gid".

DC/OS jobs task and details

  1. Create the permission.

    1. curl -X PUT --cacert dcos-ca.crt -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:ops:mesos \
    4. -d '{"description":"Grants access to the Mesos master API/UI and task details"}'
    5. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    6. -H 'Content-Type: application/json' \
    7. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:slave \
    8. -d '{"description":"Grants access to the Mesos agent API/UI and task details such as logs"}'
    9. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    10. -H 'Content-Type: application/json' \
    11. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:framework:role:* \
    12. -d '{"description":"Grants access to register as or view Mesos master information about frameworks registered with the Mesos default role"}'
    13. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    14. -H 'Content-Type: application/json' \
    15. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:executor:app_id \
    16. -d '{"description":"Grants access to all executors on the Mesos master"}'
    17. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    18. -H 'Content-Type: application/json' \
    19. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:task:app_id \
    20. -d '{"description":"Grants access to all tasks on the Mesos master"}'
    21. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    22. -H 'Content-Type: application/json' \
    23. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:framework:role:* \
    24. -d '{"description":"Grants access to view Mesos agent information about frameworks registered with the Mesos default role"}'
    25. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    26. -H 'Content-Type: application/json' \
    27. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:executor:app_id \
    28. -d '{"description":"Grants access to all executors running on the Mesos agent"}'
    29. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    30. -H 'Content-Type: application/json' \
    31. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:task:app_id \
    32. -d '{"description":"Grants access to all tasks running on the Mesos agent"}'
    33. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    34. -H 'Content-Type: application/json' \
    35. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:sandbox:app_id \
    36. -d '{"description":"Grants access to the sandboxes on the Mesos agent"}'
  2. Grant the following privileges to the user uid.

    1. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    2. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:mesos/users/<uid>/full
    3. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    4. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:adminrouter:ops:slave/users/<uid>/full
    5. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    6. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:framework:role:*/users/<uid>/read
    7. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    8. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:executor:app_id/users/<uid>/read
    9. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    10. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:master:task:app_id/users/<uid>/read
    11. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    12. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:framework:role:*/users/<uid>/read
    13. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    14. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:executor:app_id/users/<uid>/read
    15. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    16. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:task:app_id/users/<uid>/read
    17. curl -X PUT --cacert dcos-ca.crt -H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
    18. $(dcos config show core.dcos_url)/acs/api/v1/acls/dcos:mesos:agent:sandbox:app_id/users/<uid>/read

NOTE: To grant this permission to a group instead of a user, replace /users/"uid" with /groups/"gid".