Repository navigation
OIDC with Kanidm #1649
|
Hello, just configured OIDC with kanidm, it works fine but I had to disable PKCE which is flagged as insecure. Did I miss something, or is it a missing feature for auth worflow ? |
Replies: 2 comments 2 replies
|
This is missing from CWA's current generic-OIDC setup: For a local test patch, add this after the generic-provider blueprint_params.update(
use_pkce=True,
code_challenge_method="S256",
)These are blueprint options, not extra authorization URL parameters. Flask-Dance needs to retain the verifier and send it during the token exchange, not just add a challenge parameter to the initial URL. I tested Flask-Dance 7.1.0, within CWA's dependency range, using CWA's actual |
|
you didn't miss anything, CWA's generic OIDC just doesn't do PKCE right now. in it's still a confidential client using the client secret on the token call, so it's not wide open, you just lose the extra PKCE check. Flask-Dance has supported |
you didn't miss anything, CWA's generic OIDC just doesn't do PKCE right now. in
cps/oauth_bb.pythe generic provider is a Flask-DanceOAuth2ConsumerBlueprintbuilt withoutuse_pkce, so nocode_challengeever gets sent and kanidm refuses it. sokanidm system oauth2 warning-insecure-client-disable-pkce <client>is the only way for now.it's still a confidential client using the client secret on the token call, so it's not wide open, you just lose the extra PKCE check.
Flask-Dance has supported
use_pkce=Truesince 7.0, and CWA already allows that version, so it should be a pretty small change. worth opening a feature request for it