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

implement certificate transfer interface #279

Conversation

bencekov
Copy link
Contributor

Issue

This PR is a solution for issue #277.

Solution

This pr implements handling the self-signed-certificate's certificate_transfer interface.
When the certificate_transfer integration databag is updated with a new certificate the following steps are taken:

  • Grafana app restarts.
  • The cert from the relation is stored in a file in directory /usr/local/share/ca-certificates.
  • Trusted certificates are updated.

When the cert is revoked by the relation, the file in /usr/local/share/ca-certificates is deleted, grafana is restarted,
and the trusted certificates are updated.

Context

Testing Instructions

An integration test is included to check for the received certificate being included among the trusted certificates.
tox -e integration

Release Notes

src/charm.py Outdated Show resolved Hide resolved
metadata.yaml Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
@observability-noctua-bot observability-noctua-bot changed the title Iam 591 implement certificate transfer interface implement certificate transfer interface Nov 30, 2023
@bencekov bencekov marked this pull request as ready for review December 1, 2023 12:11
.wokeignore Outdated Show resolved Hide resolved
metadata.yaml Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
bencekov added a commit to bencekov/grafana-k8s-operator that referenced this pull request Dec 4, 2023
@bencekov bencekov force-pushed the IAM-591-Implement-certificate-transfer-interface branch from 5be044b to 00b505f Compare December 4, 2023 22:26
@bencekov
Copy link
Contributor Author

bencekov commented Dec 4, 2023

To avoid the issues with asyncio that came from the recent breaking changes I pinned pytest-asyncio to version 0.21.1.

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.

5 participants