-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Hi,
I'm running a SATOSA instance with OIDC front-end and SAML backend as a bridge for connecting OIDC RPs to our SAML federation.
I'm lacking a way of configuring attribute access for individual RPs/clients. So far, any client can request any scope or claim - and if it's configured in SATOSA, the client gets it. I have configured attributes available in the SAML federation as claims available via OIDC, and bundled them together into scopes (using extra_scopes in OIDC front-end configuration).
I think I have not missed anything and this is just not supported with SATOSA / pyop.
I have thought about possible options and I can imagine supporting additional keys in the client database, where each client could have:
allowed_claims: [list]
allowed_scopes: [list]
denied_claims: [list]
denied_scopes: [list]
I envision the following semantics:
- If none of these are specified, all claims and scopes are permitted (keeping status quo).
- If
allowed_claimsandallowed_scopesare unspecified (or empty), all claims and scopes are permitted, unless they're listed indenied_scopes/denied_claims - If either
allowed_claimsorallowed_scopesare specified, only those listed are permitted - and only if not listed indenied_scopes/denied_claims
For the mapping of claims and scopes, pyop gets the extra_scopes passed from SATOSA OpenIDConnectFrontend, so any references to scopes would be unfolded to lists of claims.
I can imagine hooking this filtering into handle_userinfo_request and authorize in pyop/src/provider.py.
I'm happy to implement this and send a PR - just creating an issue first to see whether I'm heading in the right direction and whether this approach would be appropriate for the project.
Your thoughts, @c00kiemon5ter ?
Cheers,
Vlad