Skip to content

Issue #41 Fix value of 'algorithm' field when signing algorithm is set to 'hs2019'#36

Merged
jeanouii merged 2 commits intotomitribe:masterfrom
CiscoM31:fix-hs2019
Jun 17, 2020
Merged

Issue #41 Fix value of 'algorithm' field when signing algorithm is set to 'hs2019'#36
jeanouii merged 2 commits intotomitribe:masterfrom
CiscoM31:fix-hs2019

Conversation

@sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented May 28, 2020

This is a fix for #41.

When the signing algorithm is set to 'hs2019', the value of the 'algorithm' field in the Authorization header must be set to hs2019. Previously it was set to the actual cryptographic algorithm, such as rsa-sha256. When the signing algorithm is something other than 'hs2019', the value of the 'algorithm' field remains as it was before.

Example:

Signature keyId="my-key",algorithm="hs2019",\
headers="(request-target) host date digest content-length", \
signature="q2ctRkTYo6RRi7Tb7+C6nfYFRV+P2mw5ykEEdB0vQlcqF4pXqnWKjGI3ZBkrb7qKDxEE/zvrZKDsY3WUAS+UFvinhEwZUap4W3Xi4xwm4R7Wd9Gzm4l6SJf7I+UqhW0FjlH9i1/c+xpLFOY0puw1XIdVOBKS3UqxOpeY/0qdlkM="

versus:

Signature keyId="my-key",algorithm="rsa-sh256",\
headers="(request-target) host date digest content-length",\
signature="q2ctRkTYo6RRi7Tb7+C6nfYFRV+P2mw5ykEEdB0vQlcqF4pXqnWKjGI3ZBkrb7qKDxEE/zvrZKDsY3WUAS+UFvinhEwZUap4W3Xi4xwm4R7Wd9Gzm4l6SJf7I+UqhW0FjlH9i1/c+xpLFOY0puw1XIdVOBKS3UqxOpeY/0qdlkM="

Copy link
Member

@jeanouii jeanouii left a comment

Choose a reason for hiding this comment

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

This is a bug and needs to go in the release notes, so ticket is required here in my opinion. Can you do that?

@sebastien-rosset
Copy link
Contributor Author

This is a bug and needs to go in the release notes, so ticket is required here in my opinion. Can you do that?

I have created #41.

@sebastien-rosset
Copy link
Contributor Author

This is a bug and needs to go in the release notes, so ticket is required here in my opinion. Can you do that?

@jeanouii , is there anything else you need before these three PRs can be merged?

@jeanouii jeanouii changed the title Fix value of 'algorithm' field when signing algorithm is set to 'hs2019' Issue #41 Fix value of 'algorithm' field when signing algorithm is set to 'hs2019' Jun 17, 2020
@jeanouii jeanouii merged commit a6ce20d into tomitribe:master Jun 17, 2020
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

Comments