https://github.com/runabol/spring-boot-starter-acme
Generate SSL certs easily for Spring Boot apps
https://github.com/runabol/spring-boot-starter-acme
acme apache2 spring-boot ssl ssl-certificate
Last synced: 5 months ago
JSON representation
Generate SSL certs easily for Spring Boot apps
- Host: GitHub
- URL: https://github.com/runabol/spring-boot-starter-acme
- Owner: runabol
- License: apache-2.0
- Created: 2018-02-06T00:45:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T17:24:48.000Z (over 1 year ago)
- Last Synced: 2025-04-14T22:14:46.081Z (11 months ago)
- Topics: acme, apache2, spring-boot, ssl, ssl-certificate
- Language: Java
- Homepage:
- Size: 83 KB
- Stars: 102
- Watchers: 6
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot Starter ACME
A Spring Boot module that is meant to ease the pain of generating a valid SSL Certificate using the Automatic Certificate Management Environment (ACME) protocol.
This project depends on the [acme4j](https://github.com/shred/acme4j) library.
# Dependencies
This module depends on having `openssl` on the `PATH` to convert the certificate to PKCS12 format.
# Maven
```
com.creactiviti
spring-boot-starter-acme
0.0.1-SNAPSHOT
maven-snapshots
http://oss.sonatype.org/content/repositories/snapshots
default
false
true
```
# Usage
1. Add the module to your `pom.xml` file as a dependency.
2. Build your project.
2. Deploy it to a target machine and point your domain name to the IP address of that machine. LetsEncrypt validates your ownership of the domain by making a callback to the `http://your-domain/.well-known/acme-challenge/{token}` endpoint exposed by this module.
3. Make sure that your server has `openssl` available on its `$PATH`.
4. To activate `spring-boot-starter-acme` and generate a certificate execute:
```
sudo java -Dserver.port=80 -Dacme.enabled=true -Dacme.domain-name= -Dacme.accept-terms-of-service=true -jar mysecureapp-0.0.1-SNAPSHOT.jar
```
5. Check your console for a confirmation that the certificate was successfully generated.
6. Stop your application and configure it to make use of the generated certificate:
```
server.port=443
server.ssl.key-store=keystore.p12
server.ssl.key-store-password=password
server.ssl.keyStoreType=PKCS12
```
# Configuration
| Name | Description | Type | Default Value |
|------------------------------|----------------------------------------------|----------------|---------------------------------|
| acme.enabled | Activate the spring-boot-starter-acme module | boolean | false |
| acme.accept-terms-of-service | Accepts the CA's terms of service | boolean | false |
| acme.domain-name | The domain name to register the SSL cert for | string | |
| acme.user-key-file | The location of the user private key file | string | user.key |
| acme.domain-key-file | The location of the domain private key file | string | domain.key |
| acme.domain-csr-file | The location of the domain csr file | string | domain.csr |
| acme.domain-chain-file | The location of the domain chain file | string | domain-chain.crt |
| acme.key-store-file | The location of the keystore file | string | keystore.p12 |
| acme.key-store-password | The keystore password | string | password |
| acme.endpoint | The acme endpoint to generate the cert with | string | acme://letsencrypt.org |
# Endpoints
| CA | Env | URL |
|-------------|------------|---------------------------------|
| LetsEncrypt | Staging | acme://letsencrypt.org/staging |
| LetsEncrypt | Prod | acme://letsencrypt.org |
# License
Version 2.0 of the Apache License.