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

[master] Add x509_v2 SSH wrapper, emulate x509.certificate_managed during state.apply #65654

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

Conversation

lkubb
Copy link
Contributor

@lkubb lkubb commented Nov 30, 2023

What does this PR do?

  • Adds wrapper functions for x509.create_certificate and x509.get_signing_policy
  • Introduces a workaround for state modules not having wrappers for certificate_managed (essentially a very sophisticated Jinja macro) - certificates can now be managed via salt-ssh state.apply even when they are issued on a remote (this should also work for other salt-ssh minions from the roster as the CA, but it's hard to write tests for)
  • Fixes a bug that meant passing encoding to file.managed via the x509_v2 state module was impossible (I don't think anyone uses this though)

What issues does this PR fix or reference?

Fixes: #65728
Fixes: #40943 (actually fixes the author's issue - the title asks for a different thing than is necessary)

Previous Behavior

  • The x509_v2 modules could not request remotely signed certificates when run via salt-ssh

New Behavior

  • Certificates on SSH minions can be managed, even when a different minion issues them and even statefully

Merge requirements satisfied?

  • Docs
  • Changelog
  • Tests written/updated

Commits signed with GPG?

Yes

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Add x509_v2 SSH wrapper, emulate x509.certificate_managed during state.apply [master] Add x509_v2 SSH wrapper, emulate x509.certificate_managed during state.apply Nov 30, 2023
@lkubb lkubb force-pushed the x509v2-ssh-wrapper branch 2 times, most recently from e171d03 to a832a20 Compare November 30, 2023 18:07
@lkubb lkubb force-pushed the x509v2-ssh-wrapper branch 2 times, most recently from 639ae1e to 83ea4eb Compare November 30, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants