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

Redirect handling not quite right? #397

Open
ericphanson opened this issue Jul 12, 2021 · 0 comments
Open

Redirect handling not quite right? #397

ericphanson opened this issue Jul 12, 2021 · 0 comments

Comments

@ericphanson
Copy link
Member

In #389 I added a throw if we could not set the URL from the returned location, but did not change the behavior otherwise.

But I'm not quite sure that original behavior was right: it seems like we set the URL in the request, but if nothing throws, we just continue on our way. I assumed that we would automatically retry with the new URL, but that was a misunderstanding of @retry. If there is no error, it does not retry. So I don't think setting the URL does much, since we don't use it to make another request.

I'm not really sure though when we will get a redirect from AWS that we want to follow; when you have the wrong region, we get 302s (without a location parameter sent back), but I'm not sure in what other circumstances it happens. On my #396 branch I have seen this code path triggered by

AWSServices.sts(
                             "AssumeRoleWithWebIdentity",
                             Dict(
                                 "RoleArn" => role_arn, # an actual role arn
                                 "RoleSessionName" => "test",
                                 "WebIdentityToken" => "123", # made up
                             );
                             aws_config=AWSConfig(creds=nothing)

but I don't know why-- AWS should be returning an error code about the WebIdentityToken being bad, not a redirect, like it does on master.

Also, I'm not sure why we don't use redirect=true in our HTTP stack, if we do want to follow redirects.

cc @omus

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.

1 participant