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

security/acme-client: Restart Action - Custom Shellscript #459

Closed
Constey opened this issue Jan 2, 2018 · 1 comment
Closed

security/acme-client: Restart Action - Custom Shellscript #459

Constey opened this issue Jan 2, 2018 · 1 comment
Assignees
Labels
support Community support

Comments

@Constey
Copy link

Constey commented Jan 2, 2018

As in the documentation of acme.sh it's mentioned to specify custom restart commands like with:
--reloadcmd "service nginx force-reload"

acme.sh --install-cert -d example.com \
--key-file       /path/to/keyfile/in/nginx/key.pem  \
--fullchain-file /path/to/fullchain/nginx/cert.pem \
--reloadcmd     "service nginx force-reload"

Currently I just find some pre-defined Restart Actions like
"none, Update and reload intrusion detection rules, Issue a reboot, Reconfigure a plugin facility, and some others"

Is it possible to let the user enter here a custom shell restart command?

Background is, that I want to use opnsense with le as central to fetch certificates and distribute them to the needed servers. In order to do this, I need to execute some commands like push the certificate and so on.

@fichtner fichtner added the support Community support label Jan 3, 2018
@fichtner fichtner changed the title ACME - Letsencrypt - Restart Action - Custom Shellscript security/acme-client: Restart Action - Custom Shellscript Jan 3, 2018
@fraenki
Copy link
Member

fraenki commented Jan 12, 2018

Hi @Constey, for security reasons it is not possible to inject arbitrary code through the OPNsense GUI (#100). That being said, it's still possible to create custom actions that can be used as "Restart Actions" for our Let's Encrypt plugin.

You'll have to create a custom action for the configd backend service. Please see the documentation for more information:
https://docs.opnsense.org/development/backend/configd.html

There are also several posts in the forums that demonstrate how to create custom configd actions:
https://forum.opnsense.org/index.php?topic=3047.msg9369#msg9369
https://forum.opnsense.org/index.php?topic=6177.msg25940#msg25940

HTH.

@fraenki fraenki closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

3 participants