An ACME server implementation performing no validations
git clone https://git.8pit.net/acme-mock.git
1# acme-mock 2 3An [ACME][RFC 8555] server implementation performing no validations. 4 5## Motivation 6 7I make heavy use of ACME in [ansible][ansible homepage] playbooks. 8Occasionally, I test these playbooks in virtual machines. Unfortunately, 9these virtual machines are incapable of completing ACME challenges and10therefore don't receive any certificates from configured ACME servers.11Without these certificates many daemons will refuse to start causing12failures of ansible tasks. For this reason, I implemented a simple ACME13server which doesn't perform any validations and always signs the given14certificate signing requests.1516## Status1718Horrible hack, didn't read the RFC and only implemented the parts needed19to make [acme-tiny][acme-tiny github] work.2021## Usage2223This software has no external dependencies and can be installed using:2425 $ go get github.com/nmeum/acme-mock2627Since ACME requires HTTPS, a TLS certificate is needed. A bogus28certificate can be generated with `openssl`:2930 $ yes "" | openssl req -x509 -nodes -newkey rsa:4096 \31 -keyout key.pem -out cert.pem3233The generated TLS certificate and key need to be passed to `acme-mock`.34Additionally, the certificate needs to be added to the certificate store35of the virtual machine. Afterwards, the ACME client needs to be36configured to use the `acme-mock` directory. The URL of the directory37resource depends on the address parameter, it defaults to38`https://localhost/directory`. The certificate, used for processing39certificate signing requests, is generated on startup.4041### Certbot4243Certbot can be used against this ACME mock to retrieve mock certificates.4445```46certbot certonly --standalone -d <your_domain> --server https://localhost/directory --register-unsafely-without-email47```4849## License5051This program is free software: you can redistribute it and/or modify it52under the terms of the GNU Affero General Public License as published by53the Free Software Foundation, either version 3 of the License, or (at54your option) any later version.5556This program is distributed in the hope that it will be useful, but57WITHOUT ANY WARRANTY; without even the implied warranty of58MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero59General Public License for more details.6061You should have received a copy of the GNU Affero General Public License62along with this program. If not, see <https://www.gnu.org/licenses/>.6364[RFC 8555]: https://tools.ietf.org/html/rfc855565[ansible homepage]: https://ansible.com/66[acme-tiny github]: https://github.com/diafygi/acme-tiny