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

barbican fallback to legacy only if not found #40

Conversation

notandy
Copy link
Collaborator

@notandy notandy commented Jun 6, 2024

  • When we failed to load pkcs12 cert print warning
  • barbican: only fallback to legacy secret container when missing pkcs12

This PR changes the behavior of the upstream barbican cert mechanism.
The code used to try first to fetch the certificate as a barbican pkcs12 secret,
and if any exception happened to try fetch the certifcate from a barbican container.

The octavia-f5-driver used the 404 message as a hint that the cert was missing or expired. But this
was shadowed by any connection error that the pkcs12 barbican code was encountered, even if there
is a valid pkcs12 certificate.

This change will do the fallback to legacy containers only if the pkcs12 retrieval fails with 404 (not found).

Therefor, octavia-f5-driver can correctly act on a missing certificate

jumpojoy and others added 2 commits June 6, 2024 17:56
Print actual error when we failed to load pkcs12 cert and
falling back to the default implemntation, as exception may
not be related to certificate or its format like an issue
with wrong methods during cryptography version mismatch

*** AttributeError: module 'OpenSSL.crypto' has no attribute 'load_pkcs12'

Related-Prod: PRODX-39931
Change-Id: I85c8a615c4f2e08e28939805ae0e9b2028dadaed
Copy link
Collaborator

@BenjaminLudwigSAP BenjaminLudwigSAP left a comment

Choose a reason for hiding this comment

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

Thx.
This is in conjunction with sapcc/octavia-f5-provider-driver#271

@BenjaminLudwigSAP BenjaminLudwigSAP merged commit 8c6ada9 into stable/yoga-m3 Jun 7, 2024
1 check passed
@BenjaminLudwigSAP BenjaminLudwigSAP deleted the barbican-fallback-to-legacy-only-if-not-found branch June 7, 2024 09:26
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.

4 participants