Skip to content

[server] FIx missing User.fullName attribute for SSO users – EXP-365 #18445

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

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Aug 7, 2023

Git config prefers User.fullName for git config user.name, see

gitSpec.setUsername(user.fullName || identity.authName);

This PR should re-add this values.

Users would have to re-login to get this updated.

Description

Summary generated by Copilot

🤖 Generated by Copilot at 8e2b967

This pull request enhances the integration of OpenID Connect identity providers by improving the documentation of the OIDCCreateSessionPayload interface and updating the user's full name from the claims.

Related Issue(s)

Fixes EXP-365

How to test

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Git config prefers `User.fullName` for `git config user.name`, see https://github.com/gitpod-io/gitpod/blob/24f7b609bf79b247d72d1841282639726bcd5891/components/server/src/workspace/workspace-starter.ts#L550

This PR should re-add this values.

Users would have to re-login to get this updated.
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as advertised. I'm not sure what could be other consequences though. Where else this name is used?

/hold

please unhold if you think it is safe.

@AlexTugarev
Copy link
Member Author

Thanks for being mindful about implications, @akosyakov.

I'm not sure what could be other consequences though. Where else this name is used?

This PR aligns usage of User.fullName with how it's treaded for SCM based accounts. The mentioned git config setup expects a value at User.fullName, and falls back to Identity.authName. Because this expectation isn't met, i.e. the attribute is not set, we see the auth name for git config user.name.

That said, if fullName would be used in other places preferably as well, this would also be a fix in other locations.

I believe it's questionable, if not bogus, that User.fullName and User.name coexist without a good reason. See the added commends from OIDC spec, where the name claim's description is actually what we'd map to User.fullName. 🤷🏻‍♂️ this has potential to be misleading.

@AlexTugarev
Copy link
Member Author

/unhold

Quickly checked, that re-login does work with no issues.

@roboquat roboquat merged commit 2ad311a into main Aug 7, 2023
@roboquat roboquat deleted the at/sso-fullName branch August 7, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants