aws-samples / aws-secrets-manager-rotation-lambdas

Contains Lambda functions to be used for automatic rotation of secrets stored in AWS Secrets Manager
MIT No Attribution
329 stars 282 forks source link

Adding the InfluxDB Single and Multi-user Secret Rotation Lambda functions #140

Closed forestmvey closed 2 months ago

forestmvey commented 7 months ago

Issue #, if available:

N/A

Description of changes:

The InfluxDB Single and Multi-user Secret Rotation Lambdas enables the automatic rotation for users and tokens with Timestream for InfluxDB. The Multi-user rotation lambda uses an admin authenticated session to rotate another token credentials. The Single-user rotation lambda rotates their own authenticated session to update a user password with a new random password.

InfluxDB best practice for access management is to use users to create tokens for fine grain access control within an organization. Users permissions are scoped to allAccess within an organization and tokens can have any set of permissions. Use the multi-user variant for managing token rotation and use the single-user variant for rotating user credentials.

The Timestream for InfluxDB endpoint is retrieved through get_db_instance. In the case of the Multi-user rotator the authenticated client performing the rotation is the influxAuthParametersSecretArn that is created on DB initialization.

Validations:

Linting

single-user tests

multi-user tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.