-
Notifications
You must be signed in to change notification settings - Fork 505
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
[DOC] data prepper secret extensions #5202
Changes from 7 commits
a0ac70e
292895d
4cd2ade
1b9dd18
eaed2a5
09e9f33
df44c5d
0248055
543fde7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
sinkShutdownTimeout | No | Duration | The time given to sinks to clear any in-flight data and gracefully shut down. Default is 30s. | ||
peer_forwarder | No | Object | Peer forwarder configurations. See [Peer forwarder options](#peer-forwarder-options) for more details. | ||
circuit_breakers | No | [circuit_breakers](#circuit-breakers) | Configures a circuit breaker on incoming data. | ||
extensions | No | Object | The pipeline extension plugin configurations. See [Extension plugins](#extension-plugins) for more details. | ||
|
||
### Peer forwarder options | ||
|
||
|
@@ -100,3 +101,102 @@ | |
reset | No | Duration | After tripping the circuit breaker, no new checks are made until after this time has passed. This effectively sets the minimum time for a breaker to remain open to allow for clearing memory. Defaults to `1s`. | ||
check_interval | No | Duration | Specifies the time between checks of the heap size. Defaults to `500ms`. | ||
|
||
### Extension plugins | ||
|
||
Since Data Prepper 2.5, Data Prepper provides support for user configurable extension plugins. Extension plugins are shared common | ||
configurations shared across pipeline plugins, i.e. [source/buffer/processor/sink]({{site.url}}{{site.baseurl}}/data-prepper/index/#concepts). | ||
|
||
#### AWS extension plugins | ||
Check failure on line 109 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
|
||
|
||
Collection of AWS resource related extension plugins. All such plugin configuration objects are under `aws:` | ||
|
||
| Option | Required | Type | Description | | ||
|:-------|:---------|:-------|:-----------------------------------------| | ||
| aws | No | Object | The AWS extension plugins configuration. | | ||
|
||
##### AWS secrets extension plugin | ||
Check failure on line 117 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
|
||
|
||
Configures [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) extension plugin to be | ||
referenced in pipeline plugin configurations, e.g. | ||
|
||
``` | ||
extensions: | ||
aws: | ||
secrets: | ||
<YOUR_SECRET_CONFIG_ID_1>: | ||
secret_id: <YOUR_SECRET_ID_1> | ||
region: <YOUR_REGION_1> | ||
sts_role_arn: <YOUR_STS_ROLE_ARN_1> | ||
refresh_interval: <YOUR_REFRESH_INTERVAL> | ||
<YOUR_SECRET_CONFIG_ID_2>: | ||
... | ||
``` | ||
|
||
| Option | Required | Type | Description | | ||
|:--------|:---------|:-------|:---------------------------------------------------------------------------------------------| | ||
| secrets | No | Object | The AWS Secrets Manager extension plugin configuration. See [Secrets](#secrets) for details. | | ||
|
||
###### Secrets | ||
|
||
Multiple secrets configuration objects can be defined with unique id for each. | ||
|
||
| Option | Required | Type | Description | | ||
|:-----------------|:---------|:---------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| secret_id | Yes | String | The AWS secret name or ARN. | | ||
| region | No | String | The AWS region of the secret. Defaults to `us-east-1`. | | ||
| sts_role_arn | No | String | The AWS Security Token Service (AWS STS) role to assume for requests to AWS Secrets Manager. Defaults to `null`, which will use the [standard SDK behavior for credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). | | ||
| refresh_interval | No | Duration | The refreshment interval for AWS secrets extension plugin to poll new secret values. See [Secrets refreshment](#automatically-refreshing-secrets) for details. Defaults to `PT1H`. | | ||
|
||
###### Reference secrets | ||
|
||
In `pipelines.yaml`, secret values can be referenced within pipeline plugins using the following formats: | ||
|
||
* plaintext: `${{aws_secrets:<YOUR_SECRET_CONFIG_ID>}}`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be clearly state in the preceding paragraph that users need to replace <YOUR_SECRET_CONFIG_ID> including the <>. |
||
* JSON (key-value pairs): `${{aws_secrets:<YOUR_SECRET_CONFIG_ID>:<YOUR_KEY>}}` | ||
|
||
Note that `<YOUR_SECRET_CONFIG_ID>` should be replaced with the corresponding secret config ID under `/extensions/aws/secrets` and `<YOUR_KEY>` should be replaced with the desired key in the secret JSON value. The secret value reference string format can be interpreted for the following plugin setting data types: | ||
|
||
* String | ||
* Number | ||
* Long | ||
* Short | ||
* Integer | ||
* Double | ||
* Float | ||
* Boolean | ||
* Character | ||
|
||
The following snippet in `pipelines.yaml` uses an OpenSearch sink as an example | ||
|
||
``` | ||
sink: | ||
- opensearch: | ||
hosts: [ "${{aws_secrets:host-secret-config}}" ] | ||
username: "${{aws_secrets:credential-secret-config:username}}" | ||
password: "${{aws_secrets:credential-secret-config:password}}" | ||
index: "test-migration" | ||
``` | ||
|
||
Note that the above snippet reference assumes plaintext secret value in `host-secret-config` and json key-value pairs in `credential-secret-config` with both `username` and `password` present as keys. | ||
Check warning on line 180 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
Check failure on line 180 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
Check failure on line 180 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
Check failure on line 180 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
|
||
The corresponding AWS secrets extension plugin in `data-prepper-config.yaml` is as follows: | ||
|
||
``` | ||
extensions: | ||
aws: | ||
secrets: | ||
host-secret-config: | ||
secret_id: <YOUR_SECRET_ID_1> | ||
region: <YOUR_REGION_1> | ||
sts_role_arn: <YOUR_STS_ROLE_ARN_1> | ||
refresh_interval: <YOUR_REFRESH_INTERVAL_1> | ||
credential-secret-config: | ||
secret_id: <YOUR_SECRET_ID_2> | ||
region: <YOUR_REGION_2> | ||
sts_role_arn: <YOUR_STS_ROLE_ARN_2> | ||
refresh_interval: <YOUR_REFRESH_INTERVAL_2> | ||
``` | ||
|
||
###### Automatically refreshing secrets | ||
|
||
For each individual secret configuration, the latest secret value is polled on a regular interval to support refreshing secrets in AWS Secrets Manager. The refreshed secret values are utilized by certain pipeline plugins to refresh their components, e.g. connection and authentication to the backend service. | ||
For multiple secret configurations, jitter within 60s will be applied across them on the initial secrets polling. | ||
Check warning on line 202 in _data-prepper/managing-data-prepper/configuring-data-prepper.md GitHub Actions / style-job
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chenqi0805 , Does this default to
us-east-1
? I'd think it uses the AWS SDK's default. This can be theAWS_REGION
environment variable orus-east-1
. Do we know for sure?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We do default to
us-east-1
the same way as the S3 DLQ in opensearch sink