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

"Verification failed" after adding AppParams #3

Open
justincpresley opened this issue Sep 10, 2023 · 2 comments
Open

"Verification failed" after adding AppParams #3

justincpresley opened this issue Sep 10, 2023 · 2 comments

Comments

@justincpresley
Copy link

After playing around with the schema-based examples, I found a situation where verification fails.

Go version: 1.21.1 + 1.20.8 (tested both)
Example: Schema-based Single Packet

Changing this line to be the following:
result := <-mNode.Call("NeedChan", enc.Wire{prefix.Bytes()}).(chan schema.NeedResult)
i.e. adding AppParams to the interest (the prefix name in this case for simplicity).

This results in the attached error. error

I assume the schema needs to be changed to state there is parameters added to the interest? Yet after looking through the codebase including the svs example that also signs the interest, I do not see any option. Am I missing something?

@zjkmxy
Copy link
Owner

zjkmxy commented Sep 10, 2023

An Interest with AppParam must be signed. However, current NTSchema does not automatically signs the Interest.
The SVS example specifies a signer as:

"type": "FixedHmacIntSigner",
"path": "/sync/32=notif",
"attrs": {
"KeyValue": "$hmacKey"
}

@justincpresley
Copy link
Author

That makes sense. It's good it doesn't just let me use the Sha256Signer for security reasons.
Okay, I suppose Hmac can work for rough testing the functionality of an app.
Thank you!

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

No branches or pull requests

2 participants