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

Update CSR KEP with durationHint field details #2759

Closed
wants to merge 1 commit into from

Conversation

enj
Copy link
Member

@enj enj commented May 20, 2021

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 20, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 20, 2021
// durationHint is a hint to the signer in regards to when the issued certificate should expire.
// The signer may or may not honor this field. The well-known kubernetes signers will honor this field
// as long as the requested duration is not later than the maximum duration they will honor.
DurationHint *metav1.Duration
Copy link
Member

Choose a reason for hiding this comment

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

per https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#units, include unit in the field name and make it an int32 (we don't use time.Duration / metav1.Duration in REST APIs since it requires go parsing to decode)

@@ -323,6 +328,11 @@ type CertificateSigningRequestSpec struct {
// You can select on this field using `.spec.signerName`.
SignerName string

// durationHint is a hint to the signer in regards to when the issued certificate should expire.
// The signer may or may not honor this field. The well-known kubernetes signers will honor this field
// as long as the requested duration is not later than the maximum duration they will honor.
Copy link
Member

Choose a reason for hiding this comment

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

I'd also expect a minimum duration, similar to the minimum token lifetime we grant. Describe the behavior of the build-in signers when the hint is less than the min or greater than the max (clip to the min/max, or revert to the default)?

Copy link
Member

Choose a reason for hiding this comment

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

also, since this is an addition, we can't back-fill the hint honoring into the kubernetes signer definitions (since implementations before this field exists won't honor it), but we can say the in-tree implementations of the kubernetes signers will honor it from version X forward)

@kikisdeliveryservice
Copy link
Member

kikisdeliveryservice commented May 25, 2021

@enj as per a conversation in sig-release: https://kubernetes.slack.com/archives/C2C40FMNF/p1621950967079800

This PR is attempting to update an already GA/implemented KEP. For ref, the underlying issue is closed: #1513
The enhancement is marked as implemented in 1.19:
https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/1513-certificate-signing-request/kep.yaml

This new change also would need to go through the stages of alpha, beta, GA therefore please open a new KEP and tracking issue. As a reminder the Enhancements Freeze deadline has already passed (May 13th), so you will need to submit an exception request for this new KEP if you want it to be included in 1.22.

Thanks!
Kirsten

/hold

@enj
Copy link
Member Author

enj commented Jun 22, 2021

Closing in favor of #2788

@enj enj closed this Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants