Skip to content

[BUG] Unable to save configuration when logged in as admin via GitLab OIDC #2202

@alexNMD

Description

@alexNMD

Environment

Self-Hosted (Docker)

System

Debian GNU/Linux 12 (bookworm) | Docker version 29.2.1

Version

4.3.1

Describe the problem

We had set up OIDC auth through GitLab as below:

    enableOidc: true
    oidc:
      clientId: xxxxxxxxxxxxxxxxxx
      endpoint: https://xxxxxxxxxxxxxxx
      scope: openid profile email
      adminGroup: cinego

After successful login, the browser console shows:

Authenticated as alexandre (admin)
{"groups":["cinego","cinego/devops","cinego/devops/ansible","cinego/distri","cinego/stock","cinego/tools","cinego/cinepeer","cinego/ententes"],"roles":[]}

And when i try to save the configuration, i got this error :

POST https://xxxxxxxxxxxxxx/config-manager/save 403 (Forbidden)

Potential Root Cause

When decoding the idToken the claim containing the groups is named 'groups_direct' instead of 'groups' :

  "groups_direct": [
    "cinego"
  ]

This mismatch could cause the admin verification to fail, resulting in the 403 error.

Additional info

No response

Please tick the boxes

Metadata

Metadata

Assignees

Labels

✅ Fixed[ISSUE] Auto-Assigned to Tickets whose fix has been deployed🐛 Bug[ISSUE] Ticket describing something that isn't working🛩️ Released 4.3.3Included in release v4.3.3

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions