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

Support simple domain based filtering for role/group principals. #2628

Open
havetisyan opened this issue May 24, 2024 · 0 comments
Open

Support simple domain based filtering for role/group principals. #2628

havetisyan opened this issue May 24, 2024 · 0 comments

Comments

@havetisyan
Copy link
Collaborator

Currently Athenz allows any valid principal to be added a role and/or group and relies on the administrator to make the right decision who to add to the role.

However, it is desirable to have a simple domain name based filter for role/group members. For example, I have a self-serve role and I want only users to be added to the role. So it'll be great to have a filter to say only principals from domain "user" are allowed in this domain. Similar use case would I want to allow all principals except home domains - these should never be used as members in a given role.

Added a new meta field for roles and groups called principalDomainFilter.

The value of the filter is a comma separated list of domain names - e.g. sports,+weather,-weather.north

If the domain name has no prefix - all principals from this domain will be allowed - e.g. sports.api is valid, sports.nhl.api is not
If the domain has + then domain + all subdomains are allowed - e.g. weather.api is valid, weather.losangeles.api is valid
if the domain has - then principals from this domain + all subdomains are not allowed - e.g. weather.north.api is not valid

Some use cases:

I want the role/group only contain human users: principalDomainFilter: user
I don't want any home domain principals in the role/group: principalDomainFilter: -home

@havetisyan havetisyan changed the title Support simple domain based filtering for user/group principals. Support simple domain based filtering for role/group principals. May 26, 2024
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

1 participant