Skip to content

Support admin/external/required groups for OIDC

What does this MR do and why?

Adds support for admin/external/required groups for OpenID Connect providers.

This feature requires documentation which is added in !114473 (merged).

Related to #209898 (closed).

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Download keycloak
  2. Extract the zip and run
./bin/kc.sh start-dev --db postgres
  1. Update gdk.yml and run gdk reconfigure
omniauth:
  openid_connect:
    enabled: true
    uid_field: 'preferred_username'
    issuer: 'https://dev-07689727.okta.com'
    args:
      response_type: 'code'
      uid_field: 'preferred_username'
      issuer: 'http://localhost:8080/realms/master'
      client_options:
        port: 8080
        scheme: 'http'
        identifier: 'gdk'
        host: 'localhost'
        secret: 'secret'
        authorization_endpoint: 'http://localhost:8080/realms/master/protocol/openid-connect/auth'
        token_endpoint: 'http://localhost:8080/realms/master/protocol/openid-connect/token'
        userinfo_endpoint: 'http://localhost:8080/realms/master/protocol/openid-connect/userinfo'
        jwks_uri: 'http://localhost:8080/realms/master/protocol/openid-connect/certs'
        redirect_uri: 'https://gdk.test:3000/users/auth/openid_connect/callback'
        gitlab: 
            groups_attribute: "groups" # defaults to `groups` when not set
            required_groups: ["Developer"]
            external_groups: ["Freelancer"]
            admin_groups:    ["Admin"]

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Imre Farkas

Merge request reports