-
Notifications
You must be signed in to change notification settings - Fork 7
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
Invite can not be accepted when using a different app key #1
Comments
The trick is that the shs cap needs to be the same when connecting to process the invite. at this line I think: https://github.com/ssbc/ssb-invite/blob/master/index.js#L225 @regular and @jfr are doing this I think with a shs cap appended to the invite, i think? |
Not sure if this helps, but I added some good old console.log debugging at https://github.com/ssbc/ssb-invite/blob/master/index.js#L225 and the |
and are you sure the server is also using your custom app key? |
If you want to make a PR, a failing test case would really help |
Created a PR with a test that exposes the problem I have. |
@dominictarr @mindshade that sounds like a bug I ran into too. Does this fix it? ssbc/ssb-server@cdcd385 There's some stuff going on in ssb-client when null is passed as |
@regular Yes, I can confirm that passing anything instead of ssb-invite/index.js:223
So this issue should be transfered to another repo where the code you refer to resides. Looks like the problem is related to that default config is loaded when key is https://github.com/ssbc/ssb-client/blob/master/index.js#L44 Ping @dominictarr |
@mindshade yes, that's where it is. No idea why we would want to call |
oh, the problem here is that in an invite, the address contains a seed, which means it doesn't need a key. |
update: ssb-server now runs ssb-client's tests, so should catch future regressions caused by new ssb-server releases. |
Great! So, now the I tried updatring the dependency against
And then modified the creation of the client in the connect method https://github.com/ssbc/ssb-invite/blob/master/index.js#L223 to:
This make the tests in the PR #2 succeed but I'm not really confident about why Maybe there is something weird hiding under the hood somewhere @dominictarr? |
appKey was what it was called originally, but later the idea was extended so that every time cryptography is used, there is another cap. especially if signatures are used - see hmac_key here https://github.com/ssbc/ssb-keys#signobjkeys-hmac_key-obj and the chosen protocol attack: https://www.schneier.com/academic/paperfiles/paper-chosen-protocol.pdf |
oh also, we should probably replace all instances of |
I think there's a passing test for this now (with |
While experimenting with
ssb
I have been using custom app key when configuring the server, like for example:This works fine, and peers connect etc. But when I try to create and use an invite I get the following problems:
Hub side error:
Client side error:
When switching back to the default ssb app key (i.e not providing my own), invites work fine again.
I have tried to figure out where the old key gets picked up (if that is the actual problem), but so far I've been unsuccessful.
If @dominictarr could give me a pointer I would be happy to dig deeper and provide a PR for this.
The text was updated successfully, but these errors were encountered: