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 require certificates to have unique ipaCertSubject #7504

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rcritten
Copy link
Contributor

In the wild a public CA issued a new subordinate CA certificate
with an identical subject to another, with a new private key.
This was uninstallable using ipa-cacert-manage because it would
fail with "subject public key info mismatch" during verification
because a different certificate with the same subject but
different public key was installed.

I'm not sure of the reasoning to prevent this situation but I
see it as giving users flexibility. This may be hurtful to them
but they can always remove any affected certs.

This is backwards compatible with older releases from the client
perspective. Older servers will choke on the duplicates and
won't be able to manage these.

A new serial number option is added for displaying the list of
certificates and for use when deleting one with a duplicate subject.

ipa-cacert-manage delete on systems without this patch will
successfully remove ALL of the requested certificates. There is no
way to distinguish. At least it won't break anything and the
deleted certificates can be re-added.

Fixes: https://pagure.io/freeipa/issue/9652

@rcritten rcritten added the ipa-4-12 Mark for backport to ipa 4.12 label Aug 26, 2024
In the wild a public CA issued a new subordinate CA certificate
with an identical subject to another, with a new private key.
This was uninstallable using ipa-cacert-manage because it would
fail with "subject public key info mismatch" during verification
because a different certificate with the same subject but
different public key was installed.

I'm not sure of the reasoning to prevent this situation but I
see it as giving users flexibility. This may be hurtful to them
but they can always remove any affected certs.

This is backwards compatible with older releases from the client
perspective. Older servers will choke on the duplicates and
won't be able to manage these.

A new serial number option is added for displaying the list of
certificates and for use when deleting one with a duplicate subject.

ipa-cacert-manage delete on systems without this patch will
successfully remove ALL of the requested certificates. There is no
way to distinguish. At least it won't break anything and the
deleted certificates can be re-added.

Fixes: https://pagure.io/freeipa/issue/9652

Signed-off-by: Rob Crittenden <[email protected]>
Use a pre-generated external CA plus two subordinate CA certificates
that use the same subject but have different serial numbers and a
validity period 3years+1day different.

Test that both certificates can be loaded and applied on a system.

If the duplicate subject certificates are not sufficiently
different in validity period, or prior to the this fix,
the test will fail because only one of the duplicately named
subject certificates will be visible: the second one (4097).

Fixes: https://pagure.io/freeipa/issue/9652

Signed-off-by: Rob Crittenden <[email protected]>
@rcritten rcritten added the needs review Pull Request is waiting for a review label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ipa-4-12 Mark for backport to ipa 4.12 needs review Pull Request is waiting for a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant