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

Don't include wrong usages in e2e CSR blob #47

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

inteon
Copy link
Member

@inteon inteon commented Nov 16, 2023

Our cert-manager webhook has become a bit more strict, we improved the logic that detects mismatches between the usages in the CSR blob and the usages in the CertificateRequest resource. If the usages extension is included in the CSR blob, we expect it to match the usages specified in the CertificateRequest resource.

This e2e test was generating a CSR blob with different usages than specified in the CertificateRequest resource.
It used a Certificate resource that does not have the usages set to generate the CSR blob.
This means that the usages in the CSR blob defaulted to [ 'digital signature', 'key encipherment' ].
The test did also set the usages in the CertificateRequest, but it specified different values there.

see https://storage.googleapis.com/jetstack-logs/pr-logs/pull/cert-manager_csi-driver-spiffe/46/pull-cert-manager-csi-driver-spiffe-e2e/1725084507725369344/build-log.txt

encoded CSR error: the KeyUsages [ 'digital signature', 'key encipherment' ] do not match the expected KeyUsages [ 'digital signature', 'key encipherment', 'cert sign' ]

@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 16, 2023
@jetstack-bot jetstack-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 16, 2023
@inteon inteon changed the title Don't include empty usages in e2e CSR blob Don't include wrong usages in e2e CSR blob Nov 16, 2023
Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2023
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 16, 2023
@jetstack-bot jetstack-bot merged commit b875e5a into main Nov 16, 2023
@SgtCoDFish SgtCoDFish deleted the fix_e2e_tests branch November 16, 2023 09:59
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. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants