-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dynamic Host Catalog creation fails credential validation for AWS GovCloud #2233
Dynamic Host Catalog creation fails credential validation for AWS GovCloud #2233
Comments
Thanks for reporting the issue. We are looking into it. |
|
Do you know if EC2 has other endpoints as well? I've gone through a bunch of the documentation and for things like EC2 I don't see govcloud-specific endpoints, but I might be looking in the wrong place. I want to make sure that if I add support for specifying endpoints I'm covering the full spectrum. |
As far as I know the endpoints for EC2 are based exclusively on the region (e.g. ec2.us-west-1.amazonaws.com vs. ec2.us-gov-east-1.amazonaws.com). This seems to be the standard for most services; however there are some, such as IAM, that do not support regions. See the comment at the bottom of the "regional endpoints" section here: AWS Service Endpoints. IAM in particular only uses different endpoints for govcloud and fips, per this page. (e.g. iam.amazonaws.com vs. iam.us-gov.amazonaws.com). As such this issue seems to be the exception, not the rule. I can't find a page that specifically lists non-region based endpoints, but as best I can tell IAM is the only one relevant to Boundary. |
@BoswellB35 I believe that if the region is set that it should pick the right endpoints automatically. However, I found that while we are setting the region for the EC2 client we are not setting the region for the IAM client. I'm going to add that logic anyways as it's clearly the right thing to do, but would you be able to give it a test if I send you a build? I don't have GovCloud access currently. |
This adds region information to IAM calls in AWS plugin and hopefully fixes #2233
@BoswellB35 Let me know if this doesn't fix things for you, but my understanding is that properly setting the region should handle the endpoints transparently. |
This adds region information to IAM calls in AWS plugin and hopefully fixes #2233
This adds region information to IAM calls in AWS plugin and hopefully fixes #2233
I've tested this build in our environment and was successfully able to create a dynamic host catalog, so this seems to have fixed our issue. Thank you! |
Describe the bug
When attempting to create a Dynamic Host Catalog using AWS GovCloud credentials, the process fails with the following credential validation error:
The AWS credentials, Boundary deployment, and target systems all exist within the same AWS GovCloud account. I have previously tested this feature in a matching deployment in a standard AWS account and did not encounter this issue.
I suspect this has to do with the endpoint that the plugin is using to validate credentials. GovCloud has different endpoints for some services which the host catalog plugin may not be aware of, for example see the IAM endpoints
To Reproduce
Steps to reproduce the behavior:
ec2:DescribeInstances
permissions, and generate an Access Key for that useraws ec2 describe-instances
command against a GovCloud region (i.e. us-gov-east-1)Expected behavior
I would expect this process to create a Dynamic Host Catalog without error that can then see instances in the corresponding AWS GovCloud account.
Additional context
I am currently using Boundary version 0.8.1 running in Docker on Ubuntu EC2 Instances. I can create a matching issue in the boundary-plugin-host-aws repo if that would be more appropriate for this.
The text was updated successfully, but these errors were encountered: