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

IAM authentication not compatible with GovCloud #100

Closed
benbalter opened this issue Apr 29, 2015 · 3 comments · Fixed by #102
Closed

IAM authentication not compatible with GovCloud #100

benbalter opened this issue Apr 29, 2015 · 3 comments · Fixed by #102

Comments

@benbalter
Copy link
Contributor

In https://github.com/fog/fog-aws/blob/master/lib/fog/aws/iam.rb#L233, the IAM implementation assumes the region us us-east-1 for all requets.

#global services that have no region are signed with the us-east-1 region
@signer = Fog::AWS::SignatureV4.new( @aws_access_key_id, @aws_secret_access_key,'us-east-1','iam')

This is not true for AWS GovCloud, the government-specific AWS region.

If the host is set as iam.us-gov.amazonaws.com, a request for Fog::AWS::IAM#roles will return:

Credential should be scoped to a valid region, not 'us-east-1'.

Instead, I'd suggest that the IAM constructor accept a region argument (to mirror other constructors), which defaults to us-east-1, to allow for better GovCloud support.

@geemus
Copy link
Member

geemus commented May 1, 2015

@benbalter sounds reasonable, I suspect we just hadn't stumbled upon this just yet. Would you be up for working on a pull request to fix this? Thanks!

@benbalter
Copy link
Contributor Author

Would you be up for working on a pull request to fix this?

Sure thing. Done over in #102.

@geemus
Copy link
Member

geemus commented May 1, 2015

Awesome, thanks!

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

Successfully merging a pull request may close this issue.

2 participants