Authentication
Returns a map of Dex client IDs to their secrets. Use the value for key kubernetes as the client_secret in the next step.
Prerequisite: You must first obtain a Keystone token. See the Keystone Authentication page for details.
Keystone token obtained from /keystone/v3/auth/tokens.
eyJhbGci...your-keystone-tokenMap of client ID to client secret.
Map of Dex client ID to client secret. Each key is a client_id; the corresponding value is its client_secret.
Missing or invalid Keystone token.
GET /resmgr/v2/dexclients HTTP/1.1
Host: pcd-r1.example.com
x-auth-token: eyJhbGci...your-keystone-token
Accept: */*
{
"kubernetes": "your-client-secret"
}Exchange your username/password and the Dex client_secret (from the previous step) for a short-lived Dex JWT.
The id_token in the response is the Bearer token required for all PCD-K Cluster API calls:
Authorization: Bearer <id_token>A refresh_token is also returned. Use it with grant_type=refresh_token to renew your id_token without re-entering your password.
password for initial login; refresh_token to renew using a previously issued refresh token.
passwordPossible values: Always kubernetes.
kubernetesThe client_secret for the kubernetes client from /resmgr/v2/dexclients.
your-client-secretSpace-separated OIDC scopes. Use openid offline_access groups email profile to receive a refresh token and group claims.
openid offline_access groups email profilePCD-V / Keystone username (email). Required for password grant.
user@example.comPCD-V / Keystone password. Required for password grant.
your-passwordDex connector to authenticate against. Use default for the standard Keystone connector.
defaultThe refresh token from a previous response. Required for refresh_token grant.
eyJhbGci...your-refresh-tokenToken issued. Use id_token as the Authorization: Bearer value on Cluster API calls.
OAuth 2.0 access token (not used directly by the Cluster API).
type of token. eg. 'bearer'
OIDC ID token (JWT). This is the value to pass as Authorization: Bearer <id_token> on all PCD-K Cluster API requests.
Long-lived refresh token. Store securely and use with grant_type=refresh_token to renew the id_token without re-entering your password. Only returned when offline_access scope is requested.
Lifetime of the id_token in seconds (typically 86399 — ~24 hours).
86399Invalid request — wrong grant type, missing fields, or bad credentials.
Invalid client credentials (client_id / client_secret mismatch).
POST /dex/token HTTP/1.1
Host: pcd-r1.example.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 222
"grant_type='password'&client_id='kubernetes'&client_secret='your-client-secret'&scope='openid offline_access groups email profile'&username='user@example.com'&password='your-password'&connector_id='default'"{
"access_token": "eyJhbGci...your-jwt-token",
"id_token": "eyJhbGci...your-jwt-token",
"refresh_token": "eyJhbGci...your-refresh-token",
"expires_in": 86399
}Last updated
Was this helpful?
