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

Fix s3 fips endpoint #265

Merged
merged 2 commits into from
Mar 28, 2014
Merged

Fix s3 fips endpoint #265

merged 2 commits into from
Mar 28, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Mar 27, 2014

There were two issues that led to this bug.

  1. The _regions.json defined fips as fips-us-gov-west-1 but the s3.extra.json defined this region as fips-gov-west-1.
  2. get_endpoint() would return the global endpoint if one was defined whenever an unknown region_name was given (botocore.session.get_session().get_service('s3').get_endpoint('DOES NOT EXIST'))

As a result, the special casing for the fips govcloud region was not being handled correctly. In order to address this I've changed the region name in s3.extra.json to match what's in _regions.json. I've also added a test specifically for fips.

I also started to fix the get_endpoint() method by raising an exception when you try to create an endpoint for an known region, but for the time being I have to leave it in. The added test discusses this behavior, and it's something we might be able to change later, but for now I think we have to leave it in.

cc @danielgtaylor

The s3.json model had "fips-gov-west-1" when the
region needed to be "fips-us-gov-west-1".  Interestingly
enough, botocore did *not* given an error when this happened.
This should be fixed...
This didn't make sense to me at first, but for a number of reasons
(noted in the comments) we can't change this behavior just yet.
Otherwise this would be a breaking change to the CLI.  I think there's
probably a better way to do this, but for now leaving things as is.  I
did add a test that documents this behavior though, so hopefully
others don't hit this code and wonder what's going on.
@danielgtaylor
Copy link
Member

LGTM 🚢-it!

@jamesls jamesls merged commit f84eaaa into boto:develop Mar 28, 2014
@jamesls jamesls deleted the fix-s3-fips-endpoint branch June 23, 2014 18:19
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 this pull request may close these issues.

None yet

2 participants