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

I can confirm this works with kanidm #12

Closed
ieugen opened this issue Oct 16, 2024 · 3 comments
Closed

I can confirm this works with kanidm #12

ieugen opened this issue Oct 16, 2024 · 3 comments

Comments

@ieugen
Copy link
Contributor

ieugen commented Oct 16, 2024

Hello,

I tried this plugin with kanidm 1.3.3 https://github.com/kanidm/kanidm

I've tested it with the docker compose test setup of traefik-oidc-auth .

# Configure oauth2 app for https://github.com/sevensolutions/traefik-oidc-auth.git

kanidm system oauth2 create my-app "My Awesome app" https://app.example.com

kanidm system oauth2 add-redirect-url my-app https://app.example.com
kanidm system oauth2 add-redirect-url my-app http://localhost:8080
kanidm system oauth2 add-redirect-url my-app http://localhost:9080

# Create group for app access
kanidm group create my_app_users --name idm_admin
kanidm group add-members my_app_users bob --name idm_admin
kanidm group add-members my_app_users alice --name idm_admin

kanidm system oauth2 update-scope-map my-app my_app_users openid email profile

kanidm system oauth2 show-basic-secret my-app

PROVIDER_URL=https://idm.example.com/oauth2/openid/my-app
CLIENT_ID=my-app
CLIENT_SECRET=____REDACTED___
@sevensolutions
Copy link
Owner

Hi @ieugen
great to hear that and thanks for sharing this information. 👍

@ieugen
Copy link
Contributor Author

ieugen commented Oct 17, 2024

Using this middleware config:

    my-oidc:
      plugin:
        traefik-oidc-auth:
          Provider:
            UrlEnv: "PROVIDER_URL"
            ClientIdEnv: "CLIENT_ID"
            ClientSecretEnv: "CLIENT_SECRET"
            UsePkce: true 
          Scopes: ["openid", "profile", "email"]
          Headers:
            MapClaims:
              - Claim: "preferred_username"
                Header: "X-Oidc-Username"
              - Claim: "sub"
                Header: "X-Oidc-Subject"

@sevensolutions
Copy link
Owner

Does anyone want to create a PR to document the use of kanidm on the website?

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

2 participants