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

Conda-store permissions v2 + load roles from keycloak #2531

Merged
merged 17 commits into from
Jul 2, 2024

Conversation

aktech
Copy link
Member

@aktech aktech commented Jun 21, 2024

Reference Issues or PRs

Fixes #2433 #2490

Docs: nebari-dev/nebari-docs#480
Rendered link: https://deploy-preview-480--nebari-docs.netlify.app/docs/how-tos/fine-grained-permissions

This achieves the following two things:

  • Uses conda-store's v2 of RBACAuthorizationBackend
  • Parses and loads conda-store roles from keycloak

This PR basically lets you assign conda-store roles to users/groups from keycloak:

The following role when applied to a group or user will give the users in group /user "viewer" access to namespace "aktech":

Screenshot 2024-06-24 at 2 31 48 pm

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

@aktech aktech marked this pull request as ready for review June 24, 2024 12:35
@aktech aktech requested a review from krassowski June 24, 2024 13:30
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

aktech added 2 commits July 2, 2024 13:08
- specificy log format via c.CondaStoreServer.log_format
- Fix capitalization in KeyCloakCondaStoreRoleScopes
- more readable log message for role validation
- use internal urls for accessing keycloak
@aktech aktech requested a review from Adam-D-Lewis July 2, 2024 12:50
@aktech aktech modified the milestones: Permission RBAC, 2024.7.1 Jul 2, 2024
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aktech aktech merged commit c42a104 into develop Jul 2, 2024
28 checks passed
@aktech aktech deleted the conda-store-permissions branch July 2, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[ENH] - Parse and load keycloak roles into conda-store
2 participants