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

Fix #68: missing lines in signature string example. #69

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

ioggstream
Copy link
Contributor

This PR

Adds missing virtual headers in signature string: (created) (expires).

Fixes: #68

Add missing virtual headers in signature string: `(created) (expires)`.
@ioggstream ioggstream changed the title Fix #68: missing lines in signature string. Fix #68: missing lines in signature string example. Jun 3, 2019
@hrobache
Copy link

hrobache commented Jun 4, 2019

Actually, it seems there is an inconsistency within C.3. All headers test.

  1. the signing string is
    (request-target): post /foo?param=value&pet=dog
    host: example.com
    date: Sun, 05 Jan 2014 21:31:40 GMT
    content-type: application/json
    digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
    content-length: 18

  2. the authorization header is
    Authorization: Signature keyId="Test",algorithm="rsa-sha256",
    created=1402170695, expires=1402170699,
    headers="(request-target) (created) (expires) host date content-type digest content-length",
    signature="vSdrb+dS3EceC9bcwHSo4MlyKS59iFIrhgYkz8+oVLEEzmYZZvRs
    8rgOp+63LEM3v+MFHB32NfpB2bEKBIvB1q52LaEUHFv120V01IL+TAD48XaERZF
    ukWgHoBTLMhYS2Gb51gWxpeIq8knRmPnYePbF5MOkR0Zkly4zKH7s1dE="

So:

  • either add (created) and (expires) in the signing string and recompute the signature
  • or remove (created) and (expires) from the "headers" part of the authorization header.

@ioggstream
Copy link
Contributor Author

ioggstream commented Jun 4, 2019

@hrobache Right. After adding created,expires I have to regenerate the signature value too. I'll try to do it soon

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.

Missing pseudo headers in draft version #11 examples
3 participants