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

package requires security token even when API doesn't #97

Open
ckoppelman opened this issue Jan 14, 2021 · 0 comments
Open

package requires security token even when API doesn't #97

ckoppelman opened this issue Jan 14, 2021 · 0 comments

Comments

@ckoppelman
Copy link

ckoppelman commented Jan 14, 2021

In salesforce_bulk.py#login_to_salesforce, line 125, this package requires a security token in order to attempt authentication. Instead, this package should let the API reject the auth call.

I am currently allowlisting the IP address my requests are coming from, so I do not need to pass in my security token as far as the Salesforce API is concerned. I would prefer to not keep a security token on the server these requests are coming from.

My current workaround is this, which now works just fine, but is odd:

    passwd = SALESFORCE_PASSWORD
    token = SALESFORCE_SECURITY_TOKEN
    if not len(token):
        passwd, token = passwd[:-5], passwd[-5:]

    bulk = SalesforceBulk(
        username=SALESFORCE_USERNAME,
        password=passwd,
        security_token=token,
        sandbox=SALESFORCE_IS_SANDBOX,
        client_id=SALESFORCE_CLIENT_ID,
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant