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

feat: Add field name in the Policy #209

Closed
wants to merge 1 commit into from

Conversation

kairoaraujo
Copy link
Collaborator

Includes the field name for the Policy as an optional. The name helps users define and identify a policy with a unique identifier, allowing even versioning.

Motivation:
It can be difficult to manage and identify multiple policies by a file name or its content, depending on the storage usage.
In automation, this field can also be helpful.

This commit includes the field `name` for the Policy as an optional.
The `name` helps users define and identify a policy with a unique
identifier, allowing even versioning.

Signed-off-by: Kairo Araujo <[email protected]>
@@ -36,6 +36,7 @@ const PolicyPredicate = "https://witness.testifysec.com/policy/v0.1"
// +kubebuilder:object:generate=true
type Policy struct {
Expires metav1.Time `json:"expires"`
Name string `json:"name,omitempty"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it have some constraints?
i.e. ([A-Za-z0-9\-\_]+)

@adityasaky
Copy link
Member

I'm a bit nervous about this. On the one hand, it can be useful to ensure a supply chain owner signs the right policy and the orchestration actually provides the right policy for verification. But at the same time, I'm worried about a policy self identifying itself (where only the name + supporting data in the policy is used during verification) without appropriately bootstrapping the policy metadata's trust. If we can't guarantee a policy is bootstrapped using ITE-2/3 semantics, we should maybe tread carefully?

@jkjell
Copy link
Member

jkjell commented Apr 11, 2024

I had a chat with @kairoaraujo about this today. I think we'll store the policy name in the Archivista metadata instead of within the policy itself.

@kairoaraujo
Copy link
Collaborator Author

I misunderstood it. We don't require it in the Policy metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants