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

Signature validation fails if a message contains BOTH a signature and a secret token #33

Open
peacekeeper opened this issue Jan 28, 2015 · 0 comments
Assignees
Milestone

Comments

@peacekeeper
Copy link
Member

Given the following message:

[+]!:uuid:8888[$msg]!:uuid:1234/$is()/([+]!:uuid:8888)
[+]!:uuid:8888[$msg]!:uuid:1234/$do/([+]!:uuid:8888/[+]!:uuid:8888)$do
([+]!:uuid:8888[$msg]!:uuid:1234$do/$set)([=]!:uuid:1234)<$xdi><$uri>&/&/"....."
[+]!:uuid:8888[$msg]!:uuid:1234<$secret><$token>&/&/"....."
[+]!:uuid:8888[$msg]!:uuid:1234<$sig>&/&/"....."
[+]!:uuid:8888[$msg]!:uuid:1234<$sig>/$is#/$sha$256$rsa$2048

When the secret token is validated, a "virtual" statement is added to the incoming message, e.g.:

[+]!:uuid:8888[$msg]!:uuid:1234<$secret><$token><$valid>&/&/true

This will subsequently make signature validation fail, since the normalized context node has the additional statement that is not covered by the signature.

These "virtual" statements should therefore be handled differently and not included in the signature validation process.

Workarounds:

  1. Don't send messages that contain both a secret token and a signature.
  2. In the messaging target's configuration, place the AuthenticationSecretTokenInterceptor AFTER the AuthenticationSignatureInterceptor.
@peacekeeper peacekeeper self-assigned this Jan 28, 2015
@peacekeeper peacekeeper added this to the release-0.7 milestone Jan 28, 2015
@peacekeeper peacekeeper modified the milestones: release-0.7, release-0.8 Jun 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant