-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
enhancementNew feature or request. Issue will appear in the change log "Features"New feature or request. Issue will appear in the change log "Features"
Milestone
Description
Description
With #313 we add a JSON Schema to Ankaios that can be checked by entities reading Ankaios manifests.
The validation of the objects received by Ankaios (be it the server, the agent or the cli) is currently done manually using verification methods. Sometimes even different methods are used in different executables.
To provide a consistent verification the following is required:
- validation annotations in the JSON schema
- checking of the schema in the server and the cli when loading a manifest
- validation possibilities (at best generated) in the rust code (via annotations)
- checking the validity when receiving protobuf objects
There are multiple possibilities to properly achieve the requirements:
- use prost-validate to generate both validate methods for rust and schemars annotations
Good alternative with probably minimal effort, but we must conder the risks for using this crate - write our own prost plugin that adds the annotations
- manually add annotations to the JSON schema and implement (keep) manually written Rust code
In all cases it would be good if we have some validation added to the JSON schema before releasing Ankaios v1
Goals
Have a consistent, easy to maintain validation of the objects received on the external interfaces
Final result
Summary
To be filled when the final solution is sketched.
Tasks
- Task 1
- Task 2
- ...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request. Issue will appear in the change log "Features"New feature or request. Issue will appear in the change log "Features"