Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enchance validation of ClusterImagePolicy #1581

Closed
vaikas opened this issue Mar 10, 2022 · 6 comments
Closed

Enchance validation of ClusterImagePolicy #1581

vaikas opened this issue Mar 10, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@vaikas
Copy link
Contributor

vaikas commented Mar 10, 2022

As a follow on to #1548 @kkavitha and I chatted about some additional checks that we should be doing. For example, we should check the inline data to ensure inline data is a valid Public Key. There might be some additional ones as well. Just creating this to track that work here.

@vaikas vaikas added the enhancement New feature or request label Mar 10, 2022
@vaikas
Copy link
Contributor Author

vaikas commented Mar 10, 2022

Another one we should do is validate the glob string. My understanding is that we only support 'one' trailing '*' character. Since parsing functions have traditionally been a source of confusion / bugs, I'd like to propose that we enforce it strictly so matching is easier to reason about.

@kkavitha
Copy link
Contributor

Thanks for creating the issue! Public keys, certs and regex/glob validations were the three we talked about.Do we need extra validations for the URL field? KMS field is still a string though.

@vaikas
Copy link
Contributor Author

vaikas commented Mar 11, 2022

Also, when we add validation for inline data being a valid public key, we should also reuse that validation to address the public key we get from the secret. I have created this to track that work:
#1596

Good question about the URL field.

@hectorj2f
Copy link
Contributor

Regarding, the URL I believe a url.Parse( validation would be enough.

@hectorj2f
Copy link
Contributor

@vaikas Do we miss any work here ? If so we could create a new issue in the policy-controller repository.

@vaikas
Copy link
Contributor Author

vaikas commented Jan 30, 2023

We should be all good here and any additional work should be tracked in policy-controller.

@vaikas vaikas closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants