Skip to content

Support restricting client access to claims and scopes #39

@vladimir-mencl-eresearch

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_claims and allowed_scopes are unspecified (or empty), all claims and scopes are permitted, unless they're listed in denied_scopes / denied_claims
  • If either allowed_claims or allowed_scopes are specified, only those listed are permitted - and only if not listed in denied_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions