Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Scopes handling #127

@nsklikas

Description

@nsklikas

I will use this issue to try to describe how I think we should handle scopes. When we agree to something I will go forward and open a PR.

Right now we have scope_supported which is used to define the scopes that are advertised in the well-known endpoint as well as the scopes that we allow. This can be overridden per client with the allowed_scopes parameter.
If someone wants to override the scopes mapping then he must use the custom_scopes add on.

We would like to be able not to advertise all the scopes that are supported. Also I think that it would be nice to have a scopes mapping per client.
So I propose that remove the existing scopes configuration and introduce the following:

  • scopes_mapping (maybe simply scopes is a better name?): A dict defining the scopes that are allowed to be used per client and the claims they map to (defaults to the scopes mapping described in the spec). If we want to define a scope that doesn't map to claims (e.g. offline_access) then we simply map it to an empty list. E.g.:
{
  "scope_a": ["claim1", "claim2"],
  "scope_b": []
}
  • scopes_supported (maybe allowed_scopes is better?): A list with the scopes that are allowed to be used (defaults to the keys in scopes_mapping).
  • advertised_scopes: A list with the scopes that will be advertised in the well-known endpoint (defaults to scopes_supported).

In addition to those configuration options we should also have the corresponding per client ones for scopes_supported and scopes_mapping.

@rohe @peppelinux what do you think? Should I go ahead and implement this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions