opentdf / platform

OpenTDF Platform monorepo enabling the development and integration of _forever control_ of data into new and existing applications. The concept of forever control stems from an increasingly common concept known as zero trust.
BSD 3-Clause Clear License
15 stars 4 forks source link

ability to map multiple claims to internal platform roles #1031

Open strantalis opened 3 days ago

strantalis commented 3 days ago

Currently, our authentication interceptor configuration allows us to specify only a single claim to map to an internal role. This setup works fine with Keycloak, but as we expand to use other identity providers, we will need the capability to map multiple claims to a given role.

You can refer to the example configuration in the OpenTDF platform.

https://github.com/opentdf/platform/blob/c3828d088a3483b78079cd257b4237291cf7b6f0/opentdf-dev.yaml#L46-L59

Example Configuration:

policy:
  ## Default policy for all requests
  default: #"role:standard"
  ## Dot notation is used to access nested claims (i.e., realm_access.roles)
  claims:
    - realm_access.roles
    - client_id
    - cid
  map:
    standard:
      - opentdf-client
      - engineering-group