aws / aws/aws-sdk-net

AWSSDK.Extensions.NETCore.Setup support for RDSAuthTokenGenerator

Open
#3,228 7 comments 1 reaction 0 assignees View on GitHub
feature-request module/sdk-custom p2 queued
Dominant language
C#
Stars
140
Forks
891
Avg merge
21h 51m
Merged PRs (30d)
10

Description

### Describe the feature

RDSAuthTokenGenerator has static GenerateAuthToken and GenerateAuthTokenAsync methods to generate an auth token for RDS. It cannot have the credentials resolved by the NETCore.Setup package because there is no AWS service client instance constructed. AWSCredentials can be passed to a GenerateAuthToken overload or FallbackCredentialsFactory is used. Either way currently requires separate configuration than what is provided by NETCore.Setup.

NETCore.Setup does not provide a way of directly getting the configured AWSCredentials either. It would be beneficial to be able to get an AWSCredentials instance from AWSOptions so that only one configuration method needs to be implemented for an application.

### Use Case

Use AWSSDK.Extensions.NETCore.Setup to configure AWS credentials for RDSAuthTokenGenerator.

### Proposed Solution

ConfigurationExtensions.GetAWSOptions can currently be used to get an instance of AWSOptions that has the Profile and Region populated according to the configuration. There is a Credentials property on AWSOptions but it is null on the returned instance. If the AWSOptions could provide the resolved AWSCredentials instance it could be passed to RDSAuthTokenGenerator.

A new method or property could be added to AWSOptions to get the AWSCredentials or the Credentials getter could create the AWSCredentials when not set externally.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS .NET SDK and/or Package version used

AWSSDK.Extensions.NETCore.Setup 3.7.300
AWSSDK.RDS 3.7.309.5

### Targeted .NET Platform

.Net 8

### Operating System and version

Windows 10

Contributor guide

Open the contributing guide

Research direction

Start with ConfigurationExtensions.GetAWSOptions and the AWSOptions Credentials property in AWSSDK.Extensions.NETCore.Setup. Trace how the configured profile and region are resolved, then determine how the resolved credentials can be used by RDSAuthTokenGenerator. Done means applications can use the package's credential configuration for RDS auth tokens without separate credential setup, with relevant tests covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
authentication, cloud, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.