Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Add alias for user's OSO url to /api/token?for=<alias> #334

Closed
alexeykazakov opened this issue Feb 15, 2018 · 0 comments
Closed

Add alias for user's OSO url to /api/token?for=<alias> #334

alexeykazakov opened this issue Feb 15, 2018 · 0 comments
Assignees
Milestone

Comments

@alexeykazakov
Copy link
Contributor

alexeykazakov commented Feb 15, 2018

Currently /api/token?for=<cluster_url> requires loading the cluster URL from user's profile via /api/user to construct a proper request (for example /api/token?for=https://api.starter-us-east-2.openshift.com).

We can add a special alias for the user's cluster URL, something like /api/token?for=openshift. Auth service will look up for the cluster URL where the user is provisioned to and will return the token for that cluster. Plus we can add provider_api_url claim to the result:

{
  "access_token": "asdd123213hsd",
  "scope": "user:full",
  "token_type": "Bearer",
  "username": "johnsmith",
  "provider_api_url": "https://api.starter-us-east-2.openshift.com"
}

We also could return the same payload but without the token for /api/token/status:

200 OK
{
  "username": "johnsmith",
  "provider_api_url": "https://api.starter-us-east-2.openshift.com"
}
@alexeykazakov alexeykazakov added this to the Sprint 145-1 milestone Feb 16, 2018
@alexeykazakov alexeykazakov self-assigned this Feb 16, 2018
sbose78 pushed a commit that referenced this issue Feb 20, 2018
* Add alias for user's OSO/github url to GET /api/token?for=<alias>
* Add alias for user's OSO/github url to POST /api/token/link?for=<alias>
* Add alias for user's OSO/github url to DELETE /api/token?for=<alias>

fixes #334
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant