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

Implements Federated Bundle Fetching #98

Merged
merged 3 commits into from
Apr 9, 2020

Conversation

martincapello
Copy link
Contributor

@martincapello martincapello commented Apr 8, 2020

Fixes #65

Unit test are in progress and will be pushed in a new PR.

Signed-off-by: martincapello <m.a.capello@gmail.com>
Signed-off-by: martincapello <m.a.capello@gmail.com>
Comment on lines 25 to 27
var defaultFetchOptions = fetchOptions{
transport: http.DefaultTransport,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, how would you feel about transport being a concrete *http.Transport instead of a round tripper? The default could then be a copy of the default http transport:

defaultTransport := *http.DefaultTransport.(*http.Transport)
transport = &defaultTransport

I think there is value in preserving the default transport behavior even when we replace the TLS config for SPIFFE auth.

@martincapello
Copy link
Contributor Author

🤦‍♂️ you are right!

@martincapello
Copy link
Contributor Author

defaultTransport := *http.DefaultTransport.(*http.Transport)

In the above line I got:
copylocks: assignment copies lock value to defaultTransport: net/http.Transport contains sync.Mutex (govet)

@azdagron
Copy link
Member

azdagron commented Apr 9, 2020

Oh shoot. Yes. Instead use http.DefaultTransport.(*http.Transport).Clone()

Signed-off-by: martincapello <m.a.capello@gmail.com>
Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

@martincapello martincapello merged commit b2b8ea7 into spiffe:v2-api Apr 9, 2020
@martincapello martincapello deleted the issue-65 branch April 9, 2020 19:23
azdagron pushed a commit that referenced this pull request Apr 22, 2020
Signed-off-by: martincapello <m.a.capello@gmail.com>
marcosy pushed a commit that referenced this pull request Apr 22, 2020
Signed-off-by: martincapello <m.a.capello@gmail.com>
azdagron pushed a commit that referenced this pull request Apr 22, 2020
Signed-off-by: martincapello <m.a.capello@gmail.com>
martincapello added a commit that referenced this pull request Apr 22, 2020
Signed-off-by: martincapello <m.a.capello@gmail.com>
amartinezfayo pushed a commit that referenced this pull request Apr 22, 2020
Signed-off-by: martincapello <m.a.capello@gmail.com>
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.

2 participants