Repository navigation
feat(auth): verify delegated company signatures from eVault history and build delegated sign requests - #1195
Conversation
…nd build delegated sign requests
|
@codex review |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 717a2f7aa6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ges, normalise eNames and ship the delegation workspace in the oidc image
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 622f9ec061
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… and return the normalised grant signer
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 783ceb5c6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Description of change
PR 4 of 5 for company signing delegation: what platforms call. The eVault stays a plain store; this reads it and decides.
verifyDelegatedSignature({ payload, signature, registryBaseUrl, platformToken }):w3ds-sign/v1payload,verifyEnameSignature),/whois(type: company, pinned manifest),metaEnvelopeHistory(100 per page, bounded) with the platform token,evaluateFromHistory+checkDelegatedSignaturefrom@metastate-foundation/delegation.Returns
{ valid, companyEName, title, scopes, appLimits[], chain }or{ valid: false, error, detail }. Never throws. Grant checks are memoised per verification.buildDelegatedSignRequest: thew3ds://signURI whosesessionis the payload, withdata.message"Signing as <title> for ". No wallet changes. Non-ASCII is\u-escaped so the wallet'satob+JSON.parseshows names correctly.buildGrantSignRequest: the same for a director/delegate approving a Company, Role, Delegation or Shareholding record under a pre-chosen id; returnspayloadandsignedAtto assembleauthorization.verifyLoginSignaturerejects anyw3ds-session (reserved_payload), so a company or grant signature is never a login.Issue Number
Type of change
How the change has been tested
delegated-signature.spec.ts(11): real P-256 wallets, Registry-signed key binding certificates and a mocked Registry + eVault serving paginatedmetaEnvelopeHistory, with records signed throughbuildGrantSignRequest. Covers a valid signature; forged signer; uncovered scope; plain login string; revoked delegation; outsider-written board ignored; history across pages (150+ versions); non-company eVault; URI shape and wallet-side decoding of non-ASCII; grant payload parity with the delegation package; login refusing reserved sessions. Fullpackages/authsuite 91/91,tscclean, builtdistimported from plain Node ESM.Not covered here: a run against a live evault-core. The query fields were checked against
typedefs.ts(MetaEnvelopeVersion,PageInfo).Change checklist