Add support for security policies in resource directory #259
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.
This PR extends the current resource directory implementation in
aiocoap/cli/rd.py
with basic support for security policies, making it possible to restrict access to specific endpoints, which can be useful for a number of use cases:The configuration happens using a separate JSON file that needs to be provided with the
--security-policy
command line option.The file format is currently described in the rd.py module description, a CDDL description (like in credentials.cddl) is
not included yet (but should be added before merging).included inaiocoap/cli/securitypolicy.cddl
.This is my first pull request to this repository, I am open to feedback if there is anything I can improve.