mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
* ✨ Add support for insecure tls connections to LAPI * 📝 Add documentation for the TLS insecure parameter * 🚧 Add tls authority certificate and checks for params * 📝 Add example for tls communication in readme and folder * 📝 Update documentation and example for tls * 🚨 Fix easy lint errors * 🦺 logic to fetch certificates * 🚨 Fix lint on readme * ♻️ Refactor validate to fix lint and clean * 🚧 Add doc, cert gen for crowdsec example * 🚧 Progress on setting up Crowdsec with tls * 🚧 Update certs validation for example * ♻️ Add load variable from file or value and get client cert * ♻️ Refactor getting variables * 🚨 Fix lint, no new line on new files * 🐛 Fix bug on condition check lapi key cert * ♻️ Update after review * ♻️ Update after review * 🍱 fix mathieu code * ♻️ Refactor logic of loading tls certificates * 🍱 clean code * 🍱 last fix * 🍱 fix lint * ♻️ Add documentation in readme, fix lint, remove unfinished tests * 🐛 Fix conditions logics * 🚨 Fix Lint * ♻️ simplify code on getVariable Co-authored-by: Max Lerebourg <maxlerebourg@gmail.com>
14 lines
1.1 KiB
Bash
14 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
stdout=/out/res.log
|
|
cfssl gencert --initca /in/ca.json 2>${stdout} | cfssljson --bare "/out/ca" && \
|
|
# Generate an intermediate certificate that will be used to sign the client certificates
|
|
cfssl gencert --initca /in/intermediate.json 2>${stdout} | cfssljson --bare "/out/inter" && \
|
|
cfssl sign -ca "/out/ca.pem" -ca-key "/out/ca-key.pem" -config /in/profiles.json -profile intermediate_ca "/out/inter.csr" 2>${stdout} | cfssljson --bare "/out/inter" && \
|
|
# Generate a server side certificate
|
|
cfssl gencert -ca "/out/inter.pem" -ca-key "/out/inter-key.pem" -config /in/profiles.json -profile=server /in/server.json 2>${stdout} | cfssljson --bare "/out/server" && \
|
|
# Generate a client certificate for the bouncer whoami
|
|
cfssl gencert -ca "/out/inter.pem" -ca-key "/out/inter-key.pem" -config /in/profiles.json -profile=client /in/bouncer.json 2>${stdout} | cfssljson --bare "/out/bouncer" && \
|
|
# Generate a client certificate for the agent
|
|
cfssl gencert -ca "/out/inter.pem" -ca-key "/out/inter-key.pem" -config /in/profiles.json -profile=client /in/agent.json 2>${stdout} | cfssljson --bare "/out/agent"
|