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

[Salesforce] Alternative authentication flow #2023

Merged
merged 16 commits into from May 21, 2024

Conversation

nick-Ag
Copy link
Member

@nick-Ag nick-Ag commented May 2, 2024

This PR adds authentication using username & password to Salesforce. This was requested by a customer and the functionality will be locked to that customer. See the ticket for more info: https://segment.atlassian.net/browse/STRATCONN-3682

Prior to creating the Salesforce client we will request an authentication token from Salesforce using the username + password if they are defined in the settings. This token will be used for all requests made from the request client.

Related PR: https://github.com/segmentio/app/pull/20349

Testing

Tested successfully in staging, the username+password flow is used correctly and events are delivered.

In event tester the access token request using username + password can be seen by the user:
Screenshot 2024-05-02 at 11 29 35 AM

Subsequent requests using that token succeed:
Screenshot 2024-05-02 at 11 29 50 AM

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [Segmenters] Tested in the staging environment

… uses security_token field to construct password sent to salesforce, updates descriptions
@nick-Ag nick-Ag changed the title [wip don't review] [Salesforce] username password flow [Salesforce] Alternative authentication flow May 6, 2024
@nick-Ag nick-Ag marked this pull request as ready for review May 6, 2024 22:18
@nick-Ag nick-Ag requested review from a team as code owners May 6, 2024 22:18
@nick-Ag nick-Ag requested a review from marinhero May 6, 2024 23:52
Copy link
Contributor

@marinhero marinhero left a comment

Choose a reason for hiding this comment

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

Revoking approve until the flagon issue is fixed

@nick-Ag
Copy link
Member Author

nick-Ag commented May 16, 2024

@varadarajan-tw or @joe-ayoub-segment To whoever deploys this, I will handle the push operation when I'm ready to release this

@joe-ayoub-segment
Copy link
Contributor

@nick-Ag said this is OK to deploy

@joe-ayoub-segment joe-ayoub-segment merged commit 17d9395 into main May 21, 2024
11 checks passed
@joe-ayoub-segment joe-ayoub-segment deleted the salesforce/username-password-flow branch May 21, 2024 17:05
@joe-ayoub-segment
Copy link
Contributor

hi @nick-Ag PR deployed! Not pushed as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants