-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add identity keys to push #502
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
50eca2e
add push authentication file
llbartekll c3e4d3f
split identity keys and invite keys
llbartekll a95dda5
update identity keys
llbartekll 869704d
update cast and push proposal
llbartekll e93adbe
fix typos
llbartekll d449516
update push
llbartekll 441b443
Update docs/specs/clients/push/push-authentication.md
llbartekll 218045e
update push specs
llbartekll b68847c
fix references
llbartekll 4ba1dac
fix: fix references
Elyniss f8bc12f
Update docs/specs/clients/push/push-proposal.md
llbartekll d24eccf
Update docs/specs/servers/keys/identity-keys.md
llbartekll 3ada309
Update docs/specs/clients/push/push-proposal.md
llbartekll af69c12
Update docs/specs/clients/push/push-authentication.md
llbartekll 7b427ef
add account back to push request
llbartekll 248121f
update push proposal
llbartekll dc967e3
Apply suggestions from code review
llbartekll a3b867a
Update docs/specs/clients/push/push-proposal.md
llbartekll c6e9dbc
add register method to wallet client
llbartekll 4b227e5
remove register method, add onSign to approve
llbartekll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Invite Keys | ||
|
||
Invite keys are used by Chat API for public blockchain account resolution. | ||
|
||
When we are registering a chat invite key we must use the following mandatory fields in the jwt: | ||
|
||
* iat - timestamp when jwt was issued | ||
* exp - timestamp when jwt must expire | ||
* iss - public identity key in form of did:key | ||
* sub - public key for chat invite key | ||
* aud - key server url used for registering | ||
* pkh - corresponding blockchain account (did:pkh) | ||
|
||
Expiry will be calculated 1 hour (3600 seconds) from issued date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Push Authentication | ||
|
||
Given that a dapp is proposing a push subscription for a blockchain account that clients don't have to authenticate in advance, the wallet needs to prove account ownership in the Push Subscription response. | ||
|
||
This is achieved using [Identity Keys](../../servers/keys/identity-keys) and did-jwt with the following claims: | ||
|
||
iat - timestamp when jwt was issued | ||
exp - timestamp when jwt must expire | ||
iss - did:key of an identity key. Enables to resolve attached blockchain account. | ||
ksu - key server for identity key verification | ||
aud - dapp's url | ||
sub - blockchain account that push subscription has been proposed for (did:pkh) | ||
|
||
Expiry should be calculated from the addition of the issuance date and the push request TTL (86400 seconds) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkrem your comment has disappeared after committing your suggestion:
so, this is a very good question and I am not convinced here what is the best approach. Using pairing topic would require to use pairing symKey but we want to avoid that and respond with type1 envelope to secure a jwt after key exchange.
dapp doesn't know the subscription topic yet and we cannot use it.
What would you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the other hand I see, it's getting ugly with so many topics