Repository navigation
feat(ontology): company directors, roles, delegations, delegated signatures and shareholdings #1191
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 hidden or 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,74 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "schemaId": "e2736a06-176e-4004-8fda-b40b9a132669", | ||
| "title": "DelegatedSignature", | ||
| "domain": "governance", | ||
| "description": "Audit record of a signature made for a company under a Delegation. Written to the company's eVault by the platform that verified it.", | ||
| "type": "object", | ||
| "properties": { | ||
| "companyEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$" | ||
| }, | ||
| "signerEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$" | ||
| }, | ||
| "delegationId": { | ||
| "type": "string", | ||
| "description": "MetaEnvelope id of the Delegation used", | ||
| "minLength": 1 | ||
| }, | ||
| "title": { | ||
| "type": "string", | ||
| "description": "The signer's title at signing time" | ||
| }, | ||
| "scope": { | ||
| "type": "string", | ||
| "pattern": "^(ontology:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|@[^\\s:]+:[a-z][a-z0-9-]*)$", | ||
| "description": "`ontology:<schemaId>` or a platform-declared keyword `@<platform-eName>:<keyword>`" | ||
| }, | ||
| "documentHash": { | ||
| "type": "string", | ||
| "description": "Hash of what was signed, as named in the payload" | ||
|
coodos marked this conversation as resolved.
|
||
| }, | ||
| "session": { | ||
| "type": "string" | ||
| }, | ||
| "signedPayload": { | ||
| "type": "string", | ||
| "description": "The exact `w3ds-sign/v1` string the wallet signed", | ||
| "minLength": 1 | ||
| }, | ||
| "signature": { | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "platformEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$", | ||
| "description": "Platform that requested, verified and recorded the signature" | ||
| }, | ||
| "signedAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "companyEName", | ||
| "signerEName", | ||
| "delegationId", | ||
| "scope", | ||
| "documentHash", | ||
| "signedPayload", | ||
| "signature", | ||
| "platformEName", | ||
| "signedAt", | ||
| "createdAt" | ||
| ], | ||
| "additionalProperties": false | ||
| } | ||
This file contains hidden or 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,226 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "schemaId": "0b2f15d8-c3f9-4dba-b959-5cfa11272dae", | ||
| "title": "Delegation", | ||
| "domain": "governance", | ||
| "description": "Lets a person sign for a company within some scopes. Either assigns a Role (granted by a director) or narrows a parent Delegation (re-delegation, only when the parent allows it). Lives in the company's eVault and is public so verifiers can check it.", | ||
| "type": "object", | ||
| "properties": { | ||
| "companyEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$", | ||
| "description": "eName of the company eVault" | ||
| }, | ||
| "delegateEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$", | ||
| "description": "Who may sign for the company" | ||
| }, | ||
| "roleId": { | ||
| "type": "string", | ||
| "description": "MetaEnvelope id of the Role this assigns", | ||
| "minLength": 1 | ||
| }, | ||
| "parentDelegationId": { | ||
| "type": "string", | ||
| "description": "MetaEnvelope id of the Delegation this narrows", | ||
| "minLength": 1 | ||
| }, | ||
| "title": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 80 | ||
| }, | ||
| "scopes": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "string", | ||
| "pattern": "^(ontology:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|@[^\\s:]+:[a-z][a-z0-9-]*)$", | ||
| "description": "`ontology:<schemaId>` or a platform-declared keyword `@<platform-eName>:<keyword>`" | ||
| }, | ||
| "description": "Must be a subset of the role's or parent's scopes" | ||
| }, | ||
| "appLimits": { | ||
| "type": "object", | ||
| "description": "May only tighten the parent's app limits" | ||
| }, | ||
| "mayRedelegate": { | ||
| "type": "boolean" | ||
| }, | ||
| "validFrom": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| "validUntil": { | ||
| "type": [ | ||
| "string", | ||
| "null" | ||
| ], | ||
| "format": "date-time" | ||
| }, | ||
| "grantedBy": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$", | ||
| "description": "The director, or the parent delegation's delegate" | ||
| }, | ||
| "status": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "active", | ||
| "revoked" | ||
| ] | ||
| }, | ||
| "revokedAt": { | ||
| "type": [ | ||
| "string", | ||
| "null" | ||
| ], | ||
| "format": "date-time" | ||
|
coodos marked this conversation as resolved.
|
||
| }, | ||
| "revokedBy": { | ||
| "type": [ | ||
| "string", | ||
| "null" | ||
| ] | ||
| }, | ||
| "revocationReason": { | ||
| "type": [ | ||
| "string", | ||
| "null" | ||
| ], | ||
|
coodos marked this conversation as resolved.
|
||
| "enum": [ | ||
| "revoked", | ||
| "cascade", | ||
| null | ||
| ], | ||
| "description": "`cascade` when revoked because a role or parent was revoked or narrowed" | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| "updatedAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| "authorization": { | ||
| "type": "object", | ||
| "description": "The wallet signature of the grantor over this record's canonical form (`w3ds-grant/v1`). The eVault verifies it before accepting the write.", | ||
| "properties": { | ||
| "signerEName": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$" | ||
| }, | ||
| "signedPayload": { | ||
| "type": "string", | ||
| "description": "The exact canonical string that was signed", | ||
| "minLength": 1 | ||
| }, | ||
| "signature": { | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "signedAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "signerEName", | ||
| "signedPayload", | ||
| "signature", | ||
| "signedAt" | ||
| ], | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "required": [ | ||
| "companyEName", | ||
| "delegateEName", | ||
| "title", | ||
| "scopes", | ||
| "mayRedelegate", | ||
| "grantedBy", | ||
| "status", | ||
| "createdAt", | ||
| "updatedAt", | ||
| "authorization" | ||
| ], | ||
| "additionalProperties": false, | ||
| "allOf": [ | ||
| { | ||
| "oneOf": [ | ||
| { | ||
| "required": [ | ||
| "roleId" | ||
| ], | ||
| "not": { | ||
| "required": [ | ||
| "parentDelegationId" | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "required": [ | ||
| "parentDelegationId" | ||
| ], | ||
| "not": { | ||
| "required": [ | ||
| "roleId" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "if": { | ||
| "properties": { | ||
| "status": { | ||
| "const": "revoked" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "status" | ||
| ] | ||
| }, | ||
| "then": { | ||
| "required": [ | ||
| "revokedAt", | ||
| "revokedBy", | ||
| "revocationReason" | ||
| ], | ||
| "properties": { | ||
| "revokedAt": { | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
| "revokedBy": { | ||
| "type": "string", | ||
| "pattern": "^@[^\\s]+$" | ||
| }, | ||
| "revocationReason": { | ||
| "enum": [ | ||
| "revoked", | ||
| "cascade" | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "else": { | ||
| "properties": { | ||
| "revokedAt": { | ||
| "type": "null" | ||
| }, | ||
| "revokedBy": { | ||
| "type": "null" | ||
| }, | ||
| "revocationReason": { | ||
| "type": "null" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.