-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic Implementation of Policy Constraints
Signed-off-by: Felix Hoops <9974641+jfelixh@users.noreply.github.com>
- Loading branch information
1 parent
989d8ef
commit 286af54
Showing
15 changed files
with
356 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# vscode settings | ||
.vscode | ||
.vscode | ||
|
||
.DS_Store |
Empty file.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"credentialID": "credential1", | ||
"credentialId": "credential1", | ||
"patterns": [ | ||
{ | ||
"issuer": "*", | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"credentialID": "one", | ||
"credentialId": "one", | ||
"patterns": [ | ||
{ | ||
"issuer": "did:web:app.altme.io:issuer", | ||
|
21 changes: 21 additions & 0 deletions
21
vclogin/__tests__/testdata/policies/acceptEmailFromAltmeConstr.json
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,21 @@ | ||
[ | ||
{ | ||
"credentialId": "one", | ||
"patterns": [ | ||
{ | ||
"issuer": "did:web:app.altme.io:issuer", | ||
"claims": [ | ||
{ | ||
"claimPath": "$.credentialSubject.email", | ||
"token": "id_token" | ||
} | ||
], | ||
"constraint": { | ||
"op": "equalsDID", | ||
"a": "$VP.proof.verificationMethod", | ||
"b": "$.credentialSubject.id" | ||
} | ||
} | ||
] | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
vclogin/__tests__/testdata/policies/acceptEmployeeFromAnyone.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"credentialID": "one", | ||
"credentialId": "one", | ||
"patterns": [ | ||
{ | ||
"issuer": "*", | ||
|
53 changes: 53 additions & 0 deletions
53
vclogin/__tests__/testdata/policies/acceptEmployeeFromAnyoneConstr.json
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,53 @@ | ||
[ | ||
{ | ||
"credentialId": "one", | ||
"patterns": [ | ||
{ | ||
"issuer": "*", | ||
"claims": [ | ||
{ | ||
"claimPath": "$.credentialSubject.hasLegallyBindingName", | ||
"newPath": "$.companyName" | ||
}, | ||
{ | ||
"claimPath": "$.credentialSubject.name", | ||
"token": "id_token" | ||
}, | ||
{ | ||
"claimPath": "$.credentialSubject.email", | ||
"token": "id_token" | ||
} | ||
], | ||
"constraint": { | ||
"op": "and", | ||
"a": { | ||
"op": "equalsDID", | ||
"a": "$VP.proof.verificationMethod", | ||
"b": "$.credentialSubject.id" | ||
}, | ||
"b": { | ||
"op": "and", | ||
"a": { | ||
"op": "endsWith", | ||
"a": "$.credentialSubject.email", | ||
"b": "@test.com" | ||
}, | ||
"b": { | ||
"op": "or", | ||
"a": { | ||
"op": "matches", | ||
"a": "$.credentialSubject.title", | ||
"b": "C[EOT]O" | ||
}, | ||
"b": { | ||
"op": "equals", | ||
"a": "$.credentialSubject.hasJurisdiction", | ||
"b": "GER" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"credentialID": "one", | ||
"credentialId": "one", | ||
"patterns": [ | ||
{ | ||
"issuer": "did:web:app.altme.io:issuer", | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.