Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC: No distinction between a user's ID and their name #3936

Open
makkes opened this issue Aug 10, 2023 · 5 comments
Open

OIDC: No distinction between a user's ID and their name #3936

makkes opened this issue Aug 10, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@makkes
Copy link
Member

makkes commented Aug 10, 2023

Describe the bug

When logging in at Weave GitOps with Azure AD configured as OIDC provider, then the sub claim which is the recommended way to identify users in Azure AD is also used as the user's name:

screenshot-69ab

Environment

  • Weave-Gitops Version: 0.29.0
  • Flux Version: 2.0.1
  • Kubernetes version: 1.27.1

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Weave GitOps.
  2. Create a Secret oidc-auth in the Weave GitOps Namespace configured for Azure AD with the claimUsername set to sub.
  3. Log into Weave GitOps.
  4. Click on the upper-right icon to open the drop-down menu.

Expected behavior

The menu says "Hello, Max Jonas Werner"

Actual Behavior

The menu says "Hello, tRbZ..."

Additional Context (screenshots, logs, etc)

Weave GitOps should hit up the UserInfo endpoint and fetch the user's actual name. Alternatively it could see if it finds that information in the ID token but that's not a given depending on the OIDC provider's configuration.

@makkes makkes added the bug Something isn't working label Aug 10, 2023
@bigkevmcd
Copy link
Contributor

@makkes We previously used the Userinfo endpoint, but we had an issue opened because we were hammering the userinfo endpoint.

@bigkevmcd
Copy link
Contributor

But, I definitely think we should make this better.

https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.5.1

We could allow you to optionally configure a "display name" claim (defaulting to "name" perhaps).

@Cajga
Copy link

Cajga commented Sep 19, 2023

@bigkevmcd, we run into the same issue. The proposed solution sounds great and flexible.

@absolutemikex
Copy link

@makkes - Do you have any documentation on how to wire flux to Azure AD (App Registrations etc)? I'm not sure what to put in the oidc-auth secret ( I have client id, client secret, issuer with tenant id, etc)

@makkes
Copy link
Member Author

makkes commented Oct 4, 2023

@absolutemikex I've been working on a guide for this but haven't gotten to move it to a mergeable state. You can see the current draft version here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants