Skip to content

Removing Master password for Oauth/SSO/LDAP users.#1944

Merged
maidul98 merged 8 commits intoInfisical:mainfrom
akhilmhdh:feat/srp-handover
Jun 19, 2024
Merged

Removing Master password for Oauth/SSO/LDAP users.#1944
maidul98 merged 8 commits intoInfisical:mainfrom
akhilmhdh:feat/srp-handover

Conversation

@akhilmhdh
Copy link
Member

Description 📣

First step in moving away from our SRP system to a more proficient automation platform. With SRP we will send password also and we save the password with bcrypt hashing in db.

To avoid asking for master password, we just fetch the private key on login. For oauth user we do a handoff that is the provider token act as password to get the access token for infisical.

This also means no more book keeping master password for third part authorized users like LDAP, Google Oauth etc.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@akhilmhdh akhilmhdh added the 🚀 feature request New feature or request label Jun 10, 2024
@akhilmhdh akhilmhdh requested review from dangtony98 and maidul98 June 10, 2024 19:12
@akhilmhdh akhilmhdh self-assigned this Jun 10, 2024
@akhilmhdh akhilmhdh force-pushed the feat/srp-handover branch from a975c9c to 19049e5 Compare June 10, 2024 19:27
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

Backend logic looks good to me. Also reviewed the frontend and most of it makes sense to me. Left comments where more context would be helpful. In terms of testing here is what I did:

  • Successfully created a new account using Google SSO (this process works well). I understand that we generate a password specifically for SSO-only signups. How does this interact with the password reset process? I followed the entire flow for the new account created via Google SSO and set a new password. However, it appears that the auto-generated password wasn't replaced since I couldn't log in with the email and new password.
  • Account created with username and password and then linked with both Google and Github SSO. Works well, no password step needed.
  • @dangtony98 Can you please try SCIM/LDAP for testing?
  • Haven't yet tested password reset for account created with username/password yet

@akhilmhdh akhilmhdh force-pushed the feat/srp-handover branch from 1d690d0 to 93d5180 Compare June 12, 2024 13:55
dangtony98
dangtony98 previously approved these changes Jun 12, 2024
}

return { authMethod: decodedToken.authMethod, orgId: null };
return { authMethod: decodedToken.authMethod, orgId: null, userName: decodedToken.username };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we return userName: decodedToken.username here? It doesn't seem to be used anywhere else.

@maidul98 maidul98 merged commit c19f883 into Infisical:main Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants