Local User Login

Logging in to DC/OS as a local user

Login using the DC/OS CLI

Prerequisite:

Using the DC/OS CLI one can log in as local DC/OS user by specifying the dcos-users login provider.

  1. To log in via the DC/OS CLI, replace uid and password in the following auth login command:
dcos auth login --provider=dcos-users --username=<uid> --password=<password>
  1. Display the DC/OS authentication token by executing the following command:
dcos config show core.dcos_acs_token
  1. Export the DC/OS Authentication token into environment for using it in other commands:
export TOKEN=$(dcos config show core.dcos_acs_token)

Login using the IAM API

Local users can log in using Identity and Access Management (IAM) API.

  1. To log in local user accounts supply <uid> and <password> in the following command before executing it:
curl -X POST http://<host-ip>/acs/api/v1/auth/login -d '{"uid": "<uid>", "password": "<password>"}' -H 'Content-Type: application/json'
  1. A DC/OS Authentication token will be returned in the HTTP response body similar to the one below:
{
  "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJib290c3RyYXB1c2VyIiwiZXhwIjoxNDgyNjE1NDU2fQ.j3_31keWvK15shfh_BII7w_10MgAj4ay700Rub5cfNHyIBrWOXbedxdKYZN6ILW9vLt3t5uCAExOOFWJkYcsI0sVFcM1HSV6oIBvJ6UHAmS9XPqfZoGh0PIqXjE0kg0h0V5jjaeX15hk-LQkp7HXSJ-V7d2dXdF6HZy3GgwFmg0Ayhbz3tf9OWMsXgvy_ikqZEKbmPpYO41VaBXCwWPmnP0PryTtwaNHvCJo90ra85vV85C02NEdRHB7sqe4lKH_rnpz980UCmXdJrpO4eTEV7FsWGlFBuF5GAy7_kbAfi_1vY6b3ufSuwiuOKKunMpas9_NfDe7UysfPVHlAxJJgg"
}