-
Notifications
You must be signed in to change notification settings - Fork 43
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
Introduce new admin scopes in order to access IAM API endpoints #562
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- if the API is accessed with a token, a check on the scope should be considered - if the API is accessed through the web interface, access is based on the IAM role
Kudos, SonarCloud Quality Gate passed! |
In particular: - if admin/gm accesses the API with a token, a check on a new scope, account:write, should be considered - if admin/gm accesses the API through dashboard, access is based on their roles
regarding admin accessing SCIM API through dashboard
and also tests
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
- add admin:read scope for read-only access - add admin:write scope for write/delete access These scopes are taken into account when admin/group manager accesses the APIs with a token.
and change their name from admin:read/write to iam:admin:read/write.
Kudos, SonarCloud Quality Gate passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR avoids that token created by IAM admin have full access to IAM API (issue #543). In fact, the authorisation at IAM API endpoints is based on user's ROLE. The identity of the user is evaluated from browser session or from token sub value. This means that scopes are ignored. This fix introduces the fact that authorisation is based on the user's identity only if it's a browser session, otherwise only scopes count. Two new scopes have been added:
iam:admin.read
: it gives the same read privileges of an administrator;iam:admin.write
: it gives the same read & write privileges of an administrator.