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

Add a subcommand to create a notation secret #4692

Closed
Tracked by #4712
souleb opened this issue Mar 25, 2024 · 6 comments
Closed
Tracked by #4712

Add a subcommand to create a notation secret #4692

souleb opened this issue Mar 25, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@souleb
Copy link
Member

souleb commented Mar 25, 2024

Update the Flux CLI subcommand flux create secret to generate a secret containing notation configuration that can be used to verify a source.

This is a follow-up to fluxcd/source-controller#1075.

@souleb souleb added the enhancement New feature or request label Mar 25, 2024
@JasonTheDeveloper
Copy link
Contributor

Happy to pick this up, if you haven't ready started on it, @souleb

@souleb
Copy link
Member Author

souleb commented Apr 3, 2024

hello @JasonTheDeveloper what is your plan for this issue?

@JasonTheDeveloper
Copy link
Contributor

JasonTheDeveloper commented Apr 4, 2024

Hey @souleb, I've made some progress on this. Just have to write unit tests to cover the changes introduced before creating the PR. You can see what I've done in feat/4692.

Basically, in short, I've introduced a new flux create secret notation command that requires two arguments, a --trust-policy-file and a --ca-cert-file. --ca-cert-file is a slice and can accept multiple file paths. I've also added support for directories so that the user can pass in a folder and let flux walk the directory.

I've added validations to check the trust policy is a valid notation policy as well as checking the certs passed end in .pem or .crt.

Because Notation can handle multiple certs in one secret, I had to update manifestgen/sourcesecret.options to handle multiple certs and their file names.

I didn't have time today to add those unit tests but I aim to do that tomorrow before creating the PR.

@souleb
Copy link
Member Author

souleb commented Apr 4, 2024

Awesome. Thank you!

@souleb
Copy link
Member Author

souleb commented Apr 16, 2024

I have updated our docs, but it depends on this feature. See: fluxcd/website#1911. It would be nice if you could review it too.

@stefanprodan
Copy link
Member

Implemented in #4735

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