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

Add support for specifying port of custom endpoint in IamAwsProvider #1522

Closed
jgolda opened this issue Jan 15, 2024 · 3 comments
Closed

Add support for specifying port of custom endpoint in IamAwsProvider #1522

jgolda opened this issue Jan 15, 2024 · 3 comments

Comments

@jgolda
Copy link
Contributor

jgolda commented Jan 15, 2024

Currently IamAwsProvider accepts providing a custom endpoint of IMDS service. It's great for testing, but in my opinion could be further improved by allowing the class'es client to provide a custom port as well. Currently in order to setup a local testing environment the user needs to set up a mock endpoint listening on port 80, which is sometimes not acceptable (eg. collides with other services).

Let me know if you're interested in such a feature. If so, i'll prepare a PR

@balamurugana
Copy link
Member

You could use customEndpoint argument to the constructor of IamAwsProvider class.

@jgolda
Copy link
Contributor Author

jgolda commented Jan 15, 2024

Not really, as the url provided via customEndpoint is later parsed and the port part is ignored, only scheme, hostname is used, eg in io.minio.credentials.IamAwsProvider#fetchImdsToken.
If the user passes eg. http://localhost:8180 then minio client attempts to connect to http://localhost:80 (as 80 is default). There is no way around it

@balamurugana
Copy link
Member

Feel free to send a fix WRT customEndpoint usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants