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

Protocol Query with or without grant, Configure with grant. #894

Merged
merged 11 commits into from
Sep 12, 2024

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Sep 7, 2024

  • protocol query with regular permission grant
    • if grant is not found, author query as delegate did to get any public protocols
  • protocol configure with delegate grant
  • Permission can now include configure which represents ProtocolsConfigure of a particular protocol
  • createPermissionRequestForProtocol now includes a grant for ProtocolsQuery for the protocol.

Copy link

changeset-bot bot commented Sep 7, 2024

🦋 Changeset detected

Latest commit: 911aa96

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@web5/api Patch
@web5/agent Patch
@web5/identity-agent Patch
@web5/proxy-agent Patch
@web5/user-agent Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 7, 2024

TBDocs Report

🛑 Errors: 0
⚠️ Warnings: 5

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts
📄 File: ./packages/crypto/src/utils.ts
⚠️ extractor:typedoc:missing-docs: CryptoUtils (Variable) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomPin (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomUuid (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomBytes (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.getJoseSignatureAlgorithmFromPublicKey (Property) does not have any documentation.

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts

TBDocs Report Updated at 2024-09-11T23:46:23Z 911aa96

@LiranCohen LiranCohen force-pushed the lirancohen/protocol-permission branch from 14d2849 to 857782f Compare September 8, 2024 21:12
Copy link

codecov bot commented Sep 8, 2024

Codecov Report

Attention: Patch coverage is 91.20879% with 8 lines in your changes missing coverage. Please review.

Project coverage is 93.44%. Comparing base (b5b36e3) to head (911aa96).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #894      +/-   ##
==========================================
- Coverage   93.45%   93.44%   -0.02%     
==========================================
  Files         117      117              
  Lines       33408    33470      +62     
  Branches     2697     2704       +7     
==========================================
+ Hits        31223    31277      +54     
- Misses       2146     2154       +8     
  Partials       39       39              
Components Coverage Δ
agent 87.44% <80.00%> (-0.05%) ⬇️
api 99.61% <100.00%> (+<0.01%) ⬆️
common 98.68% <ø> (ø)
credentials 94.95% <ø> (ø)
crypto 93.79% <ø> (ø)
dids 97.77% <ø> (ø)
identity-agent 96.42% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.42% <ø> (ø)
user-agent 96.57% <ø> (ø)

@LiranCohen LiranCohen force-pushed the lirancohen/protocol-permission branch from 857782f to 4603908 Compare September 11, 2024 19:51
@LiranCohen LiranCohen force-pushed the lirancohen/protocol-permission branch from e158029 to 79173c0 Compare September 11, 2024 23:37
@LiranCohen LiranCohen marked this pull request as ready for review September 11, 2024 23:44
@LiranCohen LiranCohen changed the title [WIP] Protocol Query with or without grant, Configure with grant. Protocol Query with or without grant, Configure with grant. Sep 11, 2024
@thehenrytsai thehenrytsai mentioned this pull request Sep 11, 2024
Comment on lines +610 to +616
// ProtocolConfigure messages are also delegated, as they modify state
return true;
}

// All other permissions are not treated as delegated
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests to cover these lines before merge?

Copy link
Contributor

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go.

@LiranCohen LiranCohen merged commit e7cb25a into main Sep 12, 2024
35 checks passed
@LiranCohen LiranCohen deleted the lirancohen/protocol-permission branch September 12, 2024 00:35
@github-actions github-actions bot mentioned this pull request Sep 12, 2024
@github-actions github-actions bot mentioned this pull request Sep 12, 2024
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

Successfully merging this pull request may close these issues.

3 participants