-
Notifications
You must be signed in to change notification settings - Fork 151
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
Signature: error in 4.3 examples #2347
Comments
Verification of claim above: The test on line 173 of VerifySignatureTests.scala had to be disabled for my tests to pass on the JVM (JS tests coming soon). Further commits to the PR 12 should get the JS to work. |
The proxy should not alter the original signature, and that signature does need to include the |
It is indeed an option to have the final recipient rely on the signature of the proxy as a verification of the originally signed message. But the text currently says "The proxy's signature and the client's original signature can be verified independently for the same message, based on the needs of the application." The "independently" reads to me as if the application (that is the server receiving the signature) should be able to verify both signatures. It seems to me that it can only verify the proxy's signature though. But perhaps I was just misreading... It seems there is a dependence of the final recipient on the signature of the proxy. I think there is still the problem of the time being wrong... |
Yes, the signature needs to be recalculated and replaced due to the typo in the timestamp (I will need to check the generation script). I can see now how that line can be misread. Though it is definitely possible for the origin server to validate the client's signature if it has additional information, like that discussed in https://www.ietf.org/archive/id/draft-ietf-httpbis-message-signatures-14.html#name-multiple-message-component- and https://www.ietf.org/archive/id/draft-ietf-httpbis-message-signatures-14.html#name-message-component-source-an -- but this could be made more clear. |
…ity and verification of signatures. Closes #2347
The first example signature from §4.3 of message-signatures-15 fails signature verification.
By changing the validity date from 1618884475 to 1618884473 the validation succeeds. I guessed that date as it is the one used in all the other signatures. So I guess that is a typo. (It would have been good to have a different created date, just to make testing less mechanical, but then the signature needs to be changed).
There is then perhaps a logical mistake in the next example.
The story goes that the proxy receiving the above request alters the message and signs it before sending it on. The original signature is kept and added as part of the signature. The proxy alters the
Host
header and adds aForwarded
header along with a new Signature. But by changing theHost
the proxy makes it impossible for the recipient to verify the initial signature, since that includes a@authority
component which was changed.So the spec has to either remove the
@authority
component from the client request, or change the text at the end of the section which saysNote: the proxy's signature does verify for me with the timestamp of the client as it appears in the spec.
The text was updated successfully, but these errors were encountered: