-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use EAB if available no matter the ACME CI (#981)
* ci: setup Pebble with docker-compose + .env file * refactor: move acme.sh hooks further down the file * feat: user EAB with other CAs than Zero SSL * tests: ACME External Account Binding (EAB) * ci: add local Pebble EAB testing
- Loading branch information
Showing
14 changed files
with
277 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PEBBLE_VERSION='v2.3.1' | ||
PEBBLE_CONFIG='pebble-config.json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3' | ||
|
||
services: | ||
pebble: | ||
image: "letsencrypt/pebble:${PEBBLE_VERSION}" | ||
container_name: pebble | ||
volumes: | ||
- "./${PEBBLE_CONFIG}:/test/config/pebble-config.json" | ||
environment: | ||
- PEBBLE_VA_NOSLEEP=1 | ||
command: pebble -config /test/config/pebble-config.json -dnsserver 10.30.50.3:8053 | ||
ports: | ||
- 14000:14000 # HTTPS ACME API | ||
- 15000:15000 # HTTPS Management API | ||
networks: | ||
acme_net: | ||
ipv4_address: 10.30.50.2 | ||
|
||
challtestsrv: | ||
image: "letsencrypt/pebble-challtestsrv:${PEBBLE_VERSION}" | ||
container_name: challtestserv | ||
command: pebble-challtestsrv -tlsalpn01 "" | ||
ports: | ||
- 8055:8055 # HTTP Management API | ||
networks: | ||
acme_net: | ||
ipv4_address: 10.30.50.3 | ||
|
||
networks: | ||
acme_net: | ||
name: acme_net | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 10.30.50.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"pebble": { | ||
"listenAddress": "0.0.0.0:14000", | ||
"managementListenAddress": "0.0.0.0:15000", | ||
"certificate": "test/certs/localhost/cert.pem", | ||
"privateKey": "test/certs/localhost/key.pem", | ||
"httpPort": 80, | ||
"tlsPort": 443, | ||
"ocspResponderURL": "", | ||
"externalAccountBindingRequired": true, | ||
"externalAccountMACKeys": { | ||
"kid-1": "zWNDZM6eQGHWpSRTPal5eIUYFTu7EajVIoguysqZ9wG44nMEtx3MUAsUDkMTQ12W", | ||
"kid-2": "b10lLJs8l1GPIzsLP0s6pMt8O0XVGnfTaCeROxQM0BIt2XrJMDHJZBM5NuQmQJQH" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"pebble": { | ||
"listenAddress": "0.0.0.0:14000", | ||
"managementListenAddress": "0.0.0.0:15000", | ||
"certificate": "test/certs/localhost/cert.pem", | ||
"privateKey": "test/certs/localhost/key.pem", | ||
"httpPort": 80, | ||
"tlsPort": 443, | ||
"ocspResponderURL": "", | ||
"externalAccountBindingRequired": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
setup_pebble() { | ||
curl --silent --show-error https://raw.githubusercontent.com/letsencrypt/pebble/master/test/certs/pebble.minica.pem > "${GITHUB_WORKSPACE}/pebble.minica.pem" | ||
cat "${GITHUB_WORKSPACE}/pebble.minica.pem" | ||
docker-compose --file "${GITHUB_WORKSPACE}/test/setup/pebble/docker-compose.yml" up --detach | ||
} | ||
|
||
wait_for_pebble() { | ||
for endpoint in 'https://pebble:14000/dir' 'http://pebble-challtestsrv:8055'; do | ||
while ! curl --cacert "${GITHUB_WORKSPACE}/pebble.minica.pem" "$endpoint" >/dev/null 2>&1; do | ||
if [ $((i * 5)) -gt $((5 * 60)) ]; then | ||
echo "$endpoint was not available under 5 minutes, timing out." | ||
exit 1 | ||
fi | ||
i=$((i + 1)) | ||
sleep 5 | ||
done | ||
done | ||
} | ||
|
||
setup_pebble_challtestserv() { | ||
curl --silent --show-error --data '{"ip":"10.30.50.1"}' http://pebble-challtestsrv:8055/set-default-ipv4 | ||
curl --silent --show-error --data '{"ip":""}' http://pebble-challtestsrv:8055/set-default-ipv6 | ||
curl --silent --show-error --data '{"host":"lim.it", "addresses":["10.0.0.0"]}' http://pebble-challtestsrv:8055/add-a | ||
} | ||
|
||
setup_pebble | ||
wait_for_pebble | ||
setup_pebble_challtestserv | ||
docker-compose --file "${GITHUB_WORKSPACE}/test/setup/pebble/docker-compose.yml" logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.