Skip to content

Handling of custom AWS Secrets Manager data formats #193

@ogjkoch

Description

@ogjkoch

Describe the feature

I would like to have a way for the library to be able to retrieve credentials from AWS Secrets Manager entries that contain data which is not in the standard format.

Use Case

One of our organization's products has hundreds of production databases, and each of these has multiple sets of credentials we are managing (a read only as well as a read write connection as an example). Each database has one associated entry in AWS Secrets Manager which contains multiple sets of database credentials as well as other information specific to that data set.

It would be interesting to us to be able to use this plugin so that we were not handling credentials ourselves (currently we read the secrets and parse what we need from them at runtime, including for handling of password rotation under load), but creating an AWS Secrets Manager entry for each database user we are managing would be a significant lift and an additional cost that we would prefer to avoid. Authenticating as an IAM Role is unfortunately not an option for us due to limits and the need to maintain isolation between databases.

Providing the library with the ARN for an AWS Secrets Manager entry to read is very achievable, but our Secrets Manager data is not in the format that this library expects.

Proposed Solution

Presumably there are multiple ways this might be achieved:

  • Setting of Properties which would allow consumers to provide a JSON path specification that identifies the location of username/password and any other desired properties within the secret value
  • Passing a delegate function from the consumer to the library which would parse the secrets manager value for the desired properties

Other Information

Presumably we could fork the repository and implement this ourselves but we would prefer to avoid taking on ongoing maintenance of a fork. However, this has not been fully investigated and it is possible that modification of this repository alone would not be sufficient to achieve the desired goal.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

The AWS Advanced .NET Data Provider Wrapper version used

We have only recently discovered the existence of this project are not yet consuming it

dotnet version used

9.0.308

Operating System and version

Microsoft Windows Server 2022

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpending releaseChanges merged in and will be included in the next release cycle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions