logstash-plugins / logstash-input-salesforce

Logstash input for pulling objects from salesforce
Apache License 2.0
16 stars 29 forks source link

Add settings to connect to Salesforce MyDomain url #28

Closed mkreth closed 2 years ago

mkreth commented 3 years ago

Which use case is this pull request trying to solve

We are operating in an environment where we need to explicitly put Salesforce IPs into an allow-list to be able to connect. We are pushed to limit the number of IPs that we are requesting. For us it would hence be helpful to narrow down the number of IPs that we need to connect to. For this we would like more control over which Salesforce endpoint is used by the Salesforce input plugin for authentication and for further API requests. The latter would usually go to the instance url which is returned by the login request. The login request would always go to either login.salesforce.com or test.salesforce.com (depending on the value of the use_test_sandbox setting).

What does this pull request do

This pull request introduces a new configuration setting of the Salesforce input plugin which allows to provide the Salesforce instance url to connect to (already) for authentication and further API requests. The configuration parameter is named sfdc_instance_url and takes a string value of the form <mydomain>.my.salesforce.com, e.g. the hostname part of the instance url without protocol or path. If a sfdc_instance_url is given, it takes precedence over the use_test_sandbox setting and controls the endpoint to which the login request is sent. If sfdc_instance_url is not set, then the use_test_sandbox setting will control which endpoint is used.

mkreth commented 2 years ago

Fixes #16

robbavey commented 2 years ago

This plugin has been released as version 3.1.0. Thanks again!

mkreth commented 2 years ago

Hi @karenzone, @robbavey, Thank you for your support in getting this merged! It was a great experience working with you!