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

Security token encryption support in SFDC connector #2718

Closed
wants to merge 8 commits into from

Conversation

mvachhani
Copy link
Contributor

@mvachhani mvachhani commented Aug 20, 2019

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    Security token encryption support in SFDC connector so as not to have security token as plain text. This change will decrypt the security token of the encrypt flag is set.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@codecov-io
Copy link

codecov-io commented Aug 20, 2019

Codecov Report

Merging #2718 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2718      +/-   ##
============================================
+ Coverage     45.07%   45.08%   +0.01%     
- Complexity     8743     8744       +1     
============================================
  Files          1880     1880              
  Lines         70169    70170       +1     
  Branches       7700     7700              
============================================
+ Hits          31627    31636       +9     
+ Misses        35616    35611       -5     
+ Partials       2926     2923       -3
Impacted Files Coverage Δ Complexity Δ
...apache/gobblin/salesforce/SalesforceConnector.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../org/apache/gobblin/cluster/GobblinTaskRunner.java 64.78% <0%> (-0.94%) 29% <0%> (ø)
...lin/elasticsearch/writer/FutureCallbackHolder.java 62.85% <0%> (+1.42%) 4% <0%> (ø) ⬇️
...in/java/org/apache/gobblin/cluster/HelixUtils.java 39.25% <0%> (+3.73%) 13% <0%> (+1%) ⬆️
...lin/util/filesystem/FileSystemInstrumentation.java 92.85% <0%> (+7.14%) 3% <0%> (ø) ⬇️
.../org/apache/gobblin/metrics/RootMetricContext.java 79.68% <0%> (+7.81%) 16% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59f3bee...7e2cc55. Read the comment docs.

@@ -83,6 +83,10 @@ public HttpEntity getAuthentication() throws RestApiConnectionException {
String password = PasswordManager.getInstance(this.state)
.readPassword(this.state.getProp(ConfigurationKeys.SOURCE_CONN_PASSWORD));
String securityToken = this.state.getProp(ConfigurationKeys.SOURCE_CONN_SECURITY_TOKEN);
if (this.state.getPropAsBoolean(ConfigurationKeys.SOURCE_CONN_DECRYPT_SECURITY_TOKEN, false)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why have the option? The password manager will pass the password through if it is not encoded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed it's not required. Fixed it.

Copy link
Contributor

@htran1 htran1 left a comment

Choose a reason for hiding this comment

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

+1

@asfgit asfgit closed this in bd4a09a Aug 21, 2019
jhsenjaliya pushed a commit to jhsenjaliya/incubator-gobblin that referenced this pull request Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants