Skip to content

Using extended headers with sign URL#2422

Merged
andreamlin merged 20 commits intogoogleapis:masterfrom
frantello:master
Jan 24, 2018
Merged

Using extended headers with sign URL#2422
andreamlin merged 20 commits intogoogleapis:masterfrom
frantello:master

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