Skip to content

Commit adc2ef2

Browse files
authored
add more details to the credentials provider docs (#71)
1 parent 19e5606 commit adc2ef2

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

docs/auth.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
## Credentials Provider
22

3-
If you have an auth service that can provide credentials to NDC Elasticsearch, you should make use of the credentials provider in the connector. To use credentials provider, don't give any auth data to the connector when using `ddn connector init -i`. Instead, once the connector is initialized, set up the following env vars:
3+
If you have an auth service that can provide credentials to NDC Elasticsearch, you should make use of the credentials provider in the connector. The credentials provider works by requesting credentials from your auth service at the connector startup. The auth service should return a json response with the credentials present as a string in the root level `credentials` key and a `200` response code to be compliant with the credentials provider. Follwing is an example of a compliant response:
4+
5+
```json
6+
{
7+
"credentials": "my-api-key"
8+
}
9+
```
10+
11+
### Usage
12+
13+
To use credentials provider, only set the `ELASTICSEARCH_URL` env var when using `ddn connector init -i`. After that, once the connector is initialized, set up the following env vars using the command `ddn connector env add $my-connector --env $NEW_VAR=$value`
414

515
| Env Var | Description |
616
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)