-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add domain linkage proto and implementation for domain verification * add domain linkage verification for dids, refactor error/status handling * add endpoints with pre-fetched configurations, add tests * add error details to DomainLinkageError message * add getter for `id` in `LinkedDomainService` * align error detail format * update readme with test setup description and add tooling scripts/files * fix clippy suggestions
- Loading branch information
Showing
13 changed files
with
743 additions
and
10 deletions.
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
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,60 @@ | ||
syntax = "proto3"; | ||
package domain_linkage; | ||
|
||
message ValidateDomainRequest { | ||
// domain to validate | ||
string domain = 1; | ||
} | ||
|
||
message ValidateDomainAgainstDidConfigurationRequest { | ||
// domain to validate | ||
string domain = 1; | ||
// already resolved domain linkage config | ||
string did_configuration = 2; | ||
} | ||
|
||
message LinkedDidValidationStatus { | ||
// validation succeeded or not, `error` property is added for `false` cases | ||
bool valid = 1; | ||
// credential from `linked_dids` as compact JWT domain linkage credential if it could be retrieved | ||
optional string document = 2; | ||
// an error message, that occurred when validated, omitted if valid | ||
optional string error = 3; | ||
} | ||
|
||
message ValidateDomainResponse { | ||
// list of JWT domain linkage credential, uses the same order as the `did-configuration.json` file for domain | ||
repeated LinkedDidValidationStatus linked_dids = 1; | ||
} | ||
|
||
message LinkedDidEndpointValidationStatus { | ||
// id of service endpoint entry | ||
string id = 1; | ||
// list of JWT domain linkage credential, uses the same order as the `did-configuration.json` file for domain | ||
repeated LinkedDidValidationStatus service_endpoint = 2; | ||
} | ||
|
||
message ValidateDidRequest { | ||
// DID to validate | ||
string did = 1; | ||
} | ||
|
||
message ValidateDidAgainstDidConfigurationsRequest { | ||
// DID to validate | ||
string did = 1; | ||
// already resolved domain linkage configs | ||
repeated ValidateDomainAgainstDidConfigurationRequest did_configurations = 2; | ||
} | ||
|
||
message ValidateDidResponse { | ||
// mapping of service entries from DID with validation status for endpoint URLs | ||
repeated LinkedDidEndpointValidationStatus service = 1; | ||
} | ||
|
||
service DomainLinkage { | ||
rpc validate_domain(ValidateDomainRequest) returns (ValidateDomainResponse); | ||
rpc validate_domain_against_did_configuration(ValidateDomainAgainstDidConfigurationRequest) returns (ValidateDomainResponse); | ||
|
||
rpc validate_did(ValidateDidRequest) returns (ValidateDidResponse); | ||
rpc validate_did_against_did_configurations(ValidateDidAgainstDidConfigurationsRequest) returns (ValidateDidResponse); | ||
} |
Oops, something went wrong.