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

Allow the use of "Expression Policy" for use with Authentik permissions/RBAC #12714

Open
Anderen2 opened this issue Jan 16, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Anderen2
Copy link

Anderen2 commented Jan 16, 2025

Is your feature request related to a problem? Please describe.
Currently the permissions in Authentik is RBAC only, with no way of defining time-based, attribute-based, or other forms of access control.

Describe the solution you'd like
To enable more advanced RBAC permission scenarios, it would be useful to be able to define these with a Python expression. One such example would be to only allow changes within working hours, or to disallow self-elevation of access.

Not sure if this is best implemented at a "global" level, where the expression must be created in a generic fashion, or if it should be scoped down per object or action type.

As a uninformed mockup example for a "global" expression:

if object_type in ["group", "role", "entitlement"] and action == add_member:
    if request.user == context.member_to_add:
        return False
        
return True

Describe alternatives you've considered
N/A

Additional context
N/A

@Anderen2 Anderen2 added the enhancement New feature or request label Jan 16, 2025
@Anderen2 Anderen2 changed the title Allow the use of "Expression Policy" for use with Authentic permissions/RBAC Allow the use of "Expression Policy" for use with Authentik permissions/RBAC Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant