-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RD: Add CDDL file for security policies, small changes to policy file…
… format
- Loading branch information
1 parent
fd5d83f
commit 0fe5ab6
Showing
2 changed files
with
64 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
security-policy = { | ||
"sectors": sector-map, | ||
? "registrar_has_permissions": bool, ; Will default to "true" if not defined | ||
} | ||
|
||
sector-map = { | ||
* tstr => sector-policy, | ||
} | ||
|
||
sector-policy = { | ||
? "endpoints": endpoint-map, | ||
? "default_policies": policy-map | ||
} | ||
|
||
endpoint-map = { | ||
* tstr => endpoint-policy | ||
} | ||
|
||
endpoint-policy = { | ||
"policies": policy-map | ||
} | ||
|
||
; These are the same as in credentials.cddl | ||
claim = uripattern / credential-reference | ||
uripattern = tstr .regexp "[^:]" | ||
credential-reference = tstr .regexp ":.+" | ||
|
||
policy-map = { | ||
* claim => policy | ||
} | ||
|
||
policy = { | ||
? "write": bool, ; Will default to "false" if not defined | ||
? "read": bool, ; Will default to "false" if not defined | ||
? "create": bool, ; Will default to "false" if not defined | ||
} |