Skip to content

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

@ckoppelman

Description

@ckoppelman

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,
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions