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

allow missing trailing slashes in chainUploadLocation #970

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jmhodges
Copy link
Contributor

@jmhodges jmhodges commented Sep 4, 2024

  • trim leading slash before uploading chains to S3
  • started as just filepath.Join(target.Path, name) in writeLocalFile
  • make subtests for easier testing
  • join the X5U
  • remove FIXME log
  • use url.JoinPath to correctly escape and join x5u and chainName
  • use default http client everywhere now since we're not modifying it

The stage environment went down for a while. The details of why can be
found in AUT-231.

One of the triggers was that aws-go-sdk-v2 no longer removes leading
slashes from uploaded S3 key names like the v1 version of the library
did. That caused some cascading failures leading to too many AWS
CloudHSM slots being consumed.

This change trims the leading slashes from the uploaded S3 key names for
the contentsignaturepki certificate chains.

This change also gets us closer to not needing to be careful about
remembering to end chainUploadLocation strings with a slash with an
application of `path.Join`. The `file://` handling elsewhere is still
bugged.

Updates AUT-233
Updates AUT-231
Then noticed we were modifying http.Client live in the process
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.

1 participant