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

Using extended headers with sign URL #2422

Merged
merged 20 commits into from
Jan 24, 2018
Merged

Conversation

frantello
Copy link

Special features over sign URLs require extension headers.

Added headers must match specification about canonicalized extension headers.

I discover that headers must be ordered before sign. Otherwise server never will match signatures.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 10, 2017
if (canonicalizedExtensionHeaders != null) {

List<String> orderedKeys = new ArrayList<>(canonicalizedExtensionHeaders.keySet());
Collections.sort(orderedKeys);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* Creates an {@code SignatureInfo} object from this builder.
*/
public SignatureInfo build() {
return new SignatureInfo(this);

This comment was marked as spam.

This comment was marked as spam.

* @param path the resource URI
* @return signature info
*/
private SignatureInfo buildSignarueInfo(Map<SignUrlOption.Option, Object> optionMap,

This comment was marked as spam.

This comment was marked as spam.

@garrettjonesgoogle
Copy link
Member

@frantello do you still want to get this PR submitted?

@frantello
Copy link
Author

Hi @garrettjonesgoogle, for sure. I think it is an interesting feature.

Just let me apply the @andreamlin revisions. I was very busy these weeks.

I thank you both for the support!

@frantello
Copy link
Author

frantello commented Jan 1, 2018

@garrettjonesgoogle @andreamlin, it is done

Copy link
Contributor

@andreamlin andreamlin left a comment

Choose a reason for hiding this comment

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

LGTM

@yihanzhen
Copy link
Contributor

@andreamlin Is this pull request ready to merge?

@andreamlin
Copy link
Contributor

@frantello Would you mind fixing the java 8 Travis build error? It might just be that the URL on CanonicalExtensionHeadersSerializer.java:28 is broken up into two lines and the doc linter would rather have the URL on one line.

@frantello
Copy link
Author

@andreamlin done!

@andreamlin andreamlin merged commit f40fffc into googleapis:master Jan 24, 2018
@andreamlin
Copy link
Contributor

Thanks @frantello !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants