Skip to content
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

Cannot obtain IAM client without endpoint override #490

Open
ronjaquensel opened this issue Nov 26, 2024 · 3 comments · May be fixed by #492
Open

Cannot obtain IAM client without endpoint override #490

ronjaquensel opened this issue Nov 26, 2024 · 3 comments · May be fixed by #492
Assignees
Labels
bug Something isn't working

Comments

@ronjaquensel
Copy link
Contributor

Bug Report

Describe the Bug

The AwsClientProviderImpl provides a method for obtaining an IAM async client. Within this method, the endpointOverride property is used as the key for storing existing IAM clients. When working with the standard AWS endpoints, the endpointOverride property will be null. Therefore null will be used as the key for the created client, causing a NullPointerException.

Expected Behavior

An IAM client can be obtained for working with AWS standard endpoints.

Observed Behavior

A NullPointerException is thrown when trying to obtain an IAM client for AWS standard endpoints.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a test case using an AwsClientProviderImpl instance
  2. Create an S3ClientRequest with endpointOverride=null
  3. Call AwsClientProviderImpl.iamAsyncClient() with the previously created S3ClientRequest
  4. See NullPointerException thrown

Possible Implementation

Define a default key that will be used if endpointOverride is null.

@ronjaquensel ronjaquensel added bug_report Suspected bugs, awaiting triage triage all new issues awaiting classification labels Nov 26, 2024
@ronjaquensel ronjaquensel self-assigned this Nov 26, 2024
@paullatzelsperger
Copy link
Member

does this have anything to do with #486? if so, we should coordinate efforts with the author of that issue

@ronjaquensel
Copy link
Contributor Author

At first glance, I don't think the 2 are related, even though both revolve around the endpointOverride feature. 486 aims at enabling to propagate the endpointOverride property also to the SDK classes used in vault-aws, as in that module the property currently isn't regarded at all. This issue aims at adjusting the AwsClientProviderImpl to not fail if no endpoindOverride is set, but generally the property is already supported for all clients obtained via the AwsClientProviderImpl. So I'd say both issues are independent and can be tackled in parallel without dependencies on each other.

@ronjaquensel ronjaquensel added bug Something isn't working and removed bug_report Suspected bugs, awaiting triage triage all new issues awaiting classification labels Nov 26, 2024
@ronjaquensel ronjaquensel linked a pull request Nov 26, 2024 that will close this issue
@chlorochrule
Copy link

Yes, that's right.

  • 486 aims to enable endpoint overriding in vault-aws
  • This issue reports unexpected NPE in AwsClientProviderImpl when endpointOverride is null in aws-s3-core

FYI: The setting key of endpointOverride for vault-aws will be defined as edc.vault.aws.endpoint.override. So, endpointOverride settings are not shared between Secrets Manager and S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants