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

feat: provision from SSO preferred_username #5347

Conversation

HugoCasa
Copy link
Contributor

@HugoCasa HugoCasa commented Feb 21, 2025

Important

Add preferred_username field to LoginUserInfo in users.rs for SSO provisioning support.

  • Models:
    • Add preferred_username field to LoginUserInfo struct in users.rs to support SSO provisioning.
  • Misc:
    • Update ee-repo-ref.txt to a new commit hash.

This description was created by Ellipsis for 90c383f. It will automatically update as commits are pushed.

Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: c888e66
Status: ✅  Deploy successful!
Preview URL: https://1775e897.windmill.pages.dev
Branch Preview URL: https://hugo-win-773-provision-usern.windmill.pages.dev

View logs

Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90c383f
Status:⚡️  Build in progress...

View logs

Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90c383f
Status: ✅  Deploy successful!
Preview URL: https://345819fc.windmill.pages.dev
Branch Preview URL: https://hugo-win-773-provision-usern.windmill.pages.dev

View logs

@HugoCasa HugoCasa marked this pull request as ready for review February 21, 2025 10:46
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 90c383f in 1 minute and 46 seconds

More details
  • Looked at 21 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. backend/windmill-api/src/users.rs:2047
  • Draft comment:
    New field preferred_username added. Ensure its semantics and naming are consistent with other fields. Consider if displayName should be renamed to display_name for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
2. backend/windmill-api/src/users.rs:2044
  • Draft comment:
    New field 'preferred_username' is added for SSO provisioning. Ensure that this value is validated (e.g. using the VALID_USERNAME regex) and normalized (e.g. lowercased) if needed. Also, consider consistent naming (using snake_case) or apply serde renaming for fields like 'displayName'.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
    Let me analyze this step by step:
  1. The comment makes multiple suggestions but they are speculative - it says "if needed" and doesn't demonstrate why validation/normalization would be required
  2. The struct is used for OAuth login info, so the preferred_username likely comes from the OAuth provider and may not need additional validation
  3. The naming inconsistency point is valid but not critical since this is just a data transfer struct
  4. The comment is asking the author to "ensure" and "consider" things rather than pointing out definite issues
  5. The comment is mixing multiple concerns into one comment
    The comment raises some potentially valid points about validation and naming consistency. The code does show evidence of username validation being used elsewhere.
    However, this is an OAuth data struct where the fields likely come directly from external providers. Making assumptions about validation needs without understanding the OAuth flow could lead to unnecessary complexity.
    The comment should be deleted as it makes speculative suggestions without clear evidence of actual issues, and asks the author to "ensure" things rather than pointing out concrete problems.
3. backend/windmill-api/src/users.rs:1160
  • Draft comment:
    Typo: 'Usermame' should be corrected to 'Username' in the error message when the username does not match the expected pattern.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. backend/windmill-api/src/users.rs:2244
  • Draft comment:
    Typo: Replace 'Usermame' with 'Username' in the error message that verifies the new username format in the rename_user function.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_yzPDG7yxCLIcLBg0


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@rubenfiszel rubenfiszel merged commit 19d33bd into main Feb 21, 2025
7 checks passed
@rubenfiszel rubenfiszel deleted the hugo/win-773-provision-username-from-ads-username-when-possible branch February 21, 2025 15:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants