[DPE-9318] Config option for certificate extra sans#26
Open
[DPE-9318] Config option for certificate extra sans#26
Conversation
…ate-extra-sans # Conflicts: # config.yaml # poetry.lock # src/events/tls.py # src/managers/tls.py # src/statuses.py # tests/unit/test_tls.py
Mehdi-Bendriss
left a comment
There was a problem hiding this comment.
Thanks René, good work. I have a comment on a missing error log, but should be good for me.
| return | ||
|
|
||
| if not (private_key := self.charm.tls_manager.read_and_validate_private_key(secret_id)): | ||
| logger.error("Invalid private key provided, cannot update TLS certificates.") |
There was a problem hiding this comment.
Is this error log going too? This was a case we said (in etcd) we wanted to alert the user of through logging
Contributor
Author
There was a problem hiding this comment.
Users are still alerted through the blocked status and the detailed error log in read_and_validate_private_key() for every condition that is checked.
skourta
previously approved these changes
Mar 24, 2026
Contributor
skourta
left a comment
There was a problem hiding this comment.
One minor comment else LGTM. Thank you @reneradoi
This PR adds support for error propagation from a TLS provider in accordance with [TE202](https://docs.google.com/document/d/1Czkzq8aF-ac74yobbopWr4fSV_YfED9QHhMdHeb61BI/edit?usp=sharing). The operator observes the newly added `certificate-denied` event and displays a `blocked` status in case client TLS is enabled and the TLS provider is sending `request_errors` over the TLS relation interface. The PR also adds integration test coverage with Vault as TLS provider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a configuration option for
certificate-extra-sans, which allows users to configure specific Subject Alternative Names (SAN) that they want to add to the default SANs in the client certificates. These can be IP addresses or hostnames.The configuration option will only be considered if client TLS is enabled, not for internal peer TLS (self-managed certificates). If the configuration value is invalid, a "blocked" status will be displayed to the user.