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

Fixes: 15835 : Sign-in issues for users imported via CSV. #16227

Merged

Conversation

Siddhanttimeline
Copy link
Contributor

@Siddhanttimeline Siddhanttimeline commented May 10, 2024

Describe your changes:

Fixes : 15835

I worked on ... because ...
The users imported via CSV were unable to sign in, instead, they were redirected to the sign-up page. This occurred because the users imported via CSV lacked validation for their names and emails, leading to a mismatch between the name and email. This discrepancy is affecting user sign-in.

To resolve this :

  • I have added validation while importing Users through CSV to prevent any mismatches between name and email.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Siddhanttimeline and others added 2 commits May 11, 2024 00:10
…rough CSV to prevent any mismatch between name and email. Removed preferred_username and sub from JWT principal claims.
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@mohityadav766 mohityadav766 added the safe to test Add this label to run secure Github workflows on PRs label May 10, 2024
Copy link

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@@ -174,7 +174,7 @@ authenticationConfiguration:
authority: ${AUTHENTICATION_AUTHORITY:-https://accounts.google.com}
clientId: ${AUTHENTICATION_CLIENT_ID:-""}
callbackUrl: ${AUTHENTICATION_CALLBACK_URL:-""}
jwtPrincipalClaims: ${AUTHENTICATION_JWT_PRINCIPAL_CLAIMS:-[email,preferred_username,sub]}
jwtPrincipalClaims: ${AUTHENTICATION_JWT_PRINCIPAL_CLAIMS:-[email]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we changing this?

@harshach
Copy link
Collaborator

@mohityadav766 @Siddhanttimeline the goal here is to make sure that preferred_username matches the user's email.
This is during the import if someone is changing their username from the email we should throw validation error. Not to remove the subjects we are reading from JWT Token

@mohityadav766 mohityadav766 added the e2e This will trigger e2e test workflows label May 14, 2024
Copy link

sonarcloud bot commented May 14, 2024

Quality Gate Passed Quality Gate passed for 'open-metadata-ingestion'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@mohityadav766 mohityadav766 merged commit e1bfdf5 into open-metadata:main May 14, 2024
9 of 13 checks passed
@Siddhanttimeline Siddhanttimeline deleted the improvement-user-signin branch May 16, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Cypress devops e2e This will trigger e2e test workflows safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants