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

Add support for role mappings on custom SSO providers. #920

Merged
merged 8 commits into from
Mar 23, 2024

Conversation

Skyler84
Copy link
Contributor

@Skyler84 Skyler84 commented Nov 10, 2023

This is done using the role_mappings property.
Roles to be mapped are gotten from the 'warp_groups` oidc claim:

  - name: custom_sso
    label: Custom SSO
    provider:
      type: custom
      client_id: <client_id>
      client_secret: <client_secret>
      issuer_url: <issuer_url>
      scopes: ["email", "profile", "openid", "warp_groups"] #warp_groups is scope name to request for my demo case, which adds a "warpgate_groups" claim to the userinfo
      role_mappings: 
        - ["warpgate:admin", "warpgate:admin"]

This maps the warpgate:admin group from OIDC to the warpgate:admin role.

This video on YouTube demonstrates the functionality

This is done using the `role_mappings` property.
Roles to be mapped are gotten from the 'warp_groups` oidc claim:
```
role_mappings:
- ["warpgate:admin", "warpgate:admin"]
```
This maps the `warpgate:admin` group from OIDC to the `warpgate:admin` role.
@Skyler84 Skyler84 marked this pull request as draft November 10, 2023 12:52
@linhxhust
Copy link

I'm looking forward to seeing this PR has been merged.

@Eugeny
Copy link
Member

Eugeny commented Jan 23, 2024

@Skyler84 I have no idea how I've missed this PR, sorry! Refactored the login out into warpgate-core, will test and merge soon

@Skyler84
Copy link
Contributor Author

thanks! sorry my rust isn't too great yet.

@Eugeny Eugeny merged commit 916d51a into warp-tech:main Mar 23, 2024
6 of 7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants