Skip to content

OCPBUGS-440: improve CA and certificate generation #361

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

Merged

Conversation

perdasilva
Copy link
Contributor

Recently during an audit on a user's cluster, it was discovered that
OLM's certificate generation functionality has a few minor shortcomings.

  1. The generated CA and server cert do not include a common name,
    which causes some tooling to have trouble tracing the cert chain.
  2. The generated CA and server cert include unnecessary key usages,
    which means those certificates can be used for more than their
    intended purposes.

This commit resolves the above issues by ensuring the certificates
include common names and by using the minimal key usages necessary.

Signed-off-by: Joe Lanford [email protected]

Upstream-commit: 13fa7be0e153711a9ef6b8c3d4315ce088ad6274
Upstream-repository: operator-lifecycle-manager

@openshift-ci openshift-ci bot requested review from dinhxuanvu and exdx August 16, 2022 10:16
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2022
@perdasilva
Copy link
Contributor Author

perdasilva commented Aug 16, 2022

/hold don't merge before #360 gets merged and qe approves

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 16, 2022
@perdasilva perdasilva changed the title improve CA and certificate generation fix: improve CA and certificate generation Aug 16, 2022
@oceanc80
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2022
@perdasilva perdasilva force-pushed the cert_generation_improvement branch from 6d26e03 to 8b92082 Compare August 16, 2022 13:02
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2022
@perdasilva
Copy link
Contributor Author

/retest

Recently during an audit on a user's cluster, it was discovered that
OLM's certificate generation functionality has a few minor shortcomings.
  1) The generated CA and server cert do not include a common name,
     which causes some tooling to have trouble tracing the cert chain.
  2) The generated CA and server cert include unnecessary key usages,
     which means those certificates can be used for more than their
     intended purposes.

This commit resolves the above issues by ensuring the certificates
include common names and by using the minimal key usages necessary.

Signed-off-by: Joe Lanford <[email protected]>

Upstream-commit: 13fa7be0e153711a9ef6b8c3d4315ce088ad6274
Upstream-repository: operator-lifecycle-manager
@perdasilva perdasilva force-pushed the cert_generation_improvement branch from 8b92082 to 4d356d1 Compare August 18, 2022 05:29
@perdasilva
Copy link
Contributor Author

/retest

1 similar comment
@perdasilva
Copy link
Contributor Author

/retest

@perdasilva perdasilva changed the title fix: improve CA and certificate generation OCPBUGS-440: improve CA and certificate generation Aug 23, 2022
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Aug 23, 2022
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 23, 2022

@perdasilva: This pull request references [Jira Issue OCPBUGS-440](https://issues.redhat.com//browse/OCPBUGS-440), which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.12.0) matches configured target version for branch (4.12.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST)

In response to this:

Recently during an audit on a user's cluster, it was discovered that
OLM's certificate generation functionality has a few minor shortcomings.

  1. The generated CA and server cert do not include a common name,
    which causes some tooling to have trouble tracing the cert chain.
  2. The generated CA and server cert include unnecessary key usages,
    which means those certificates can be used for more than their
    intended purposes.

This commit resolves the above issues by ensuring the certificates
include common names and by using the minimal key usages necessary.

Signed-off-by: Joe Lanford [email protected]

Upstream-commit: 13fa7be0e153711a9ef6b8c3d4315ce088ad6274
Upstream-repository: operator-lifecycle-manager

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 23, 2022
@perdasilva
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 23, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 23, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva, timflannagan

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:
  • OWNERS [perdasilva,timflannagan]

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 23, 2022

@perdasilva: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f8c466a into openshift:master Aug 23, 2022
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 23, 2022

@perdasilva: All pull requests linked via external trackers have merged:

[Jira Issue OCPBUGS-440](https://issues.redhat.com//browse/OCPBUGS-440) has been moved to the MODIFIED state.

In response to this:

Recently during an audit on a user's cluster, it was discovered that
OLM's certificate generation functionality has a few minor shortcomings.

  1. The generated CA and server cert do not include a common name,
    which causes some tooling to have trouble tracing the cert chain.
  2. The generated CA and server cert include unnecessary key usages,
    which means those certificates can be used for more than their
    intended purposes.

This commit resolves the above issues by ensuring the certificates
include common names and by using the minimal key usages necessary.

Signed-off-by: Joe Lanford [email protected]

Upstream-commit: 13fa7be0e153711a9ef6b8c3d4315ce088ad6274
Upstream-repository: operator-lifecycle-manager

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants