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

Proposal: Default-Roles configurable via property #2345

Open
thoniTUB opened this issue Feb 12, 2024 · 2 comments
Open

Proposal: Default-Roles configurable via property #2345

thoniTUB opened this issue Feb 12, 2024 · 2 comments

Comments

@thoniTUB
Copy link

Current Behavior

When Webapi is setup with e.g. OIDC and a new User signs in, it defaults to the public role. Without any preparation on the database, an admin has to set the actual roles afterwards. It would be more comfortable if the default roles could be configurable, similar to the User-Import from AD via the property security.ad.default.import.group.

The default role is hardcoded here:

Proposal

Define a new property security.default.roles, that sets the default roles:

// in AtlasSecurity.java
@Value("${security.default.roles}#{T(java.util.Set).of('public')}")
protected Set<String> defaultRoles;

This would apply to all authentications.

Alternative for OIDC

Allow to define a roles claim in the access token. By default Keycloak already sets this claim and pac4j parses it.
May add a property in webapi, that switches interpreting of the supplied roles. The huge advantage here is, that authorization can be managed by the IDP/Keycloak.

@konstjar
Copy link
Contributor

As alternative, you can give public role all needed permissions.

@thoniTUB
Copy link
Author

thoniTUB commented Feb 12, 2024

Thats a good hint, and I'll probably do temporarly. Thank you!

> 360 Permissions with 2 Datasets configured 👀

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