Skip to content

Commit

Permalink
Add Documentation For Configuring Salesforce Credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
cwarden committed Jan 15, 2024
1 parent d82fb1f commit 8951aec
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/docs/deploy/credentials/credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ For instructions on how to create a service account and set credentials in Rill
- [Amazon Athena](./athena.md)
- [BigQuery](./bigquery.md)
- [Snowflake](./snowflake.md)
- [Salesforce](./salesforce.md)
50 changes: 50 additions & 0 deletions docs/docs/deploy/credentials/salesforce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Salesforce
description: Connect to data in a Salesforce org using the Bulk API
sidebar_label: Salesforce
sidebar_position: 80
---

<!-- WARNING: There are links to this page in source code. If you move it, find and replace the links and consider adding a redirect in docusaurus.config.js. -->

## How to configure credentials in Rill

Rill utilizes a Salesforce username along with a password (and token, depending
on org configuration) to authenticate against a Salesforce org.

### Configure credentials for local development

When working on a local project, you have the option to specify credentials when running Rill using the `--env` flag.
An example of using this syntax in terminal:
```
rill start --env connector.salesforce.username="[email protected]" --env connector.salesforce.password="MyPasswordMyToken"
```

Alternatively, you can include the credentials string directly in the source code by adding the `username` and `password` parameters.
An example of a source using this approach:
```
type: "salesforce"
endpoint: "login.salesforce.com"
username: "[email protected]"
password: "MyPasswordMyToken"
soql: "SELECT Id, Name, CreatedDate FROM Opportunity"
sobject: "Opportunity"
```
This approach is less recommended because it places the connection string (which may contain sensitive information like passwords) in the source file, which is committed to Git. For more information, please refer to the documentation on [sources](../../reference/project-files/index.md).

### Configure credentials for deployments on Rill Cloud

Once a project having a Salesforce source has been deployed using `rill deploy`, Rill requires you to explicitly provide the credentials using following command:
```
rill env configure
```
Note that you must `cd` into the Git repository that your project was deployed from before running `rill env configure`.

Leave `key` and `client_id` blank unless using JWT as described below.

### JWT

Authentication using JWT instead of a password is also supported by setting
`client_id` to the Client Id (also known as Consumer Key) of the Connected App
to use, and setting `key` to contain the PEM-formatted private key to use for
signing.

0 comments on commit 8951aec

Please sign in to comment.