Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET /platforms/:platform/roles/:role #44

Open
davidraker opened this issue Mar 7, 2022 · 1 comment
Open

GET /platforms/:platform/roles/:role #44

davidraker opened this issue Mar 7, 2022 · 1 comment

Comments

@davidraker
Copy link
Contributor

Retrieve the capabilities assigned to a role on the specified platform.

Request:

  • Authorization: BEARER <jwt_token>

Response:

  • With valid BEARER token on success: 200 OK
    • Content Type: application/json
    • Body:
          [
              <capability>,
              <capability>,
              ...
          ]
      
  • With valid BEARER token on failure: 400 Bad Request
    • Content Type: application/json
    • Body:
      {
          "error": "<Error Message>"
      }
      
  • With invalid BEARER token: 401 Unauthorized
@davidraker
Copy link
Contributor Author

davidraker commented Mar 13, 2022

For this we need to use the auth service RPC method called "auth_file.read".
We can then extract just the one role we want (from the appropriate entry in the roles key) and return its capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants