warpgate/warpgate-sso/Cargo.toml
Skyler Mansfield 916d51a4e8
Add support for role mappings on custom SSO providers. (#920)
This is done using the `role_mappings` property.
Roles to be mapped are gotten from the 'warp_groups` oidc claim:
```sso_providers: 
  - 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](https://youtu.be/XCYSGGCgk9Q) demonstrates the
functionality

---------

Co-authored-by: Eugene <inbox@null.page>
2024-03-23 12:05:12 +01:00

18 lines
429 B
TOML

[package]
edition = "2021"
license = "Apache-2.0"
name = "warpgate-sso"
version = "0.9.1"
[dependencies]
bytes = "1.3"
thiserror = "1.0"
tokio = { version = "1.20", features = ["tracing", "macros"] }
tracing = "0.1"
openidconnect = { version = "2.4", features = ["reqwest", "rustls-tls", "accept-string-booleans"] }
serde = "1.0"
serde_json = "1.0"
once_cell = "1.17"
jsonwebtoken = "8"
data-encoding = "2.3"
futures = "0.3.30"