mirror of
https://github.com/balena-io/open-balena.git
synced 2025-06-25 02:29:16 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
35ab5300e6 | |||
fd031ad3a4 | |||
95d53993bc | |||
1721728794 | |||
061440f109 | |||
2f0fb27145 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file
|
|||||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
# v1.0.1
|
||||||
|
## (2019-03-20)
|
||||||
|
|
||||||
|
* vpn: Remove BALENA_ROOT_CA from the VPN trust chain [Rich Bayliss]
|
||||||
|
|
||||||
|
# v1.0.0
|
||||||
|
## (2019-03-15)
|
||||||
|
|
||||||
|
* tags: Pin the image tags for the service stack [Rich Bayliss]
|
||||||
|
|
||||||
# v0.2.2
|
# v0.2.2
|
||||||
## (2019-03-08)
|
## (2019-03-08)
|
||||||
|
|
||||||
|
5
compose/versions
Normal file
5
compose/versions
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export OPENBALENA_API_VERSION_TAG=v0.11.8
|
||||||
|
export OPENBALENA_DB_VERSION_TAG=v2.0.3
|
||||||
|
export OPENBALENA_REGISTRY_VERSION_TAG=v2.5.0
|
||||||
|
export OPENBALENA_S3_VERSION_TAG=v2.5.0
|
||||||
|
export OPENBALENA_VPN_VERSION_TAG=v8.10.0
|
@ -11,6 +11,12 @@ echo_bold() {
|
|||||||
printf "\\033[1m%s\\033[0m\\n" "$@"
|
printf "\\033[1m%s\\033[0m\\n" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VERSIONS_FILE="${BASE_DIR}/compose/versions"
|
||||||
|
if [ ! -f "$VERSIONS_FILE" ]; then
|
||||||
|
echo_bold "No service versions defined in ${VERSIONS_FILE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
ENV_FILE="${CONFIG_DIR}/activate"
|
ENV_FILE="${CONFIG_DIR}/activate"
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
if [ ! -f "$ENV_FILE" ]; then
|
||||||
echo_bold 'No configuration found; please create one first with: ./scripts/quickstart'
|
echo_bold 'No configuration found; please create one first with: ./scripts/quickstart'
|
||||||
@ -19,7 +25,7 @@ if [ ! -f "$ENV_FILE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "${ENV_FILE}"; docker-compose \
|
source "${VERSIONS_FILE}"; source "${ENV_FILE}"; docker-compose \
|
||||||
--project-name 'openbalena' \
|
--project-name 'openbalena' \
|
||||||
-f "${BASE_DIR}/compose/services.yml" \
|
-f "${BASE_DIR}/compose/services.yml" \
|
||||||
-f "${CONFIG_DIR}/docker-compose.yml" \
|
-f "${CONFIG_DIR}/docker-compose.yml" \
|
||||||
|
@ -32,14 +32,9 @@ if [ ! -f $VPN_CA ] || [ ! -f $VPN_CRT ] || [ ! -f $VPN_KEY ] || [ ! -f $VPN_DH
|
|||||||
|
|
||||||
rm -f $VPN_CA $VPN_CRT $VPN_DH $VPN_KEY
|
rm -f $VPN_CA $VPN_CRT $VPN_DH $VPN_KEY
|
||||||
|
|
||||||
# generate VPN sub-CA
|
# generate VPN CA
|
||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" init-pki &>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" init-pki &>/dev/null
|
||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --days="${CA_EXPIRY_DAYS}" --req-cn="vpn-ca.${CN}" build-ca nopass subca 2>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --days="${CA_EXPIRY_DAYS}" --req-cn="vpn-ca.${CN}" build-ca nopass 2>/dev/null
|
||||||
|
|
||||||
# import sub-CA CSR into root PKI, sign, and copy back to vpn PKI
|
|
||||||
"$easyrsa_bin" --pki-dir="${ROOT_PKI}" import-req "${VPN_PKI}/reqs/ca.req" "vpn-ca" 2>/dev/null
|
|
||||||
"$easyrsa_bin" --pki-dir="${ROOT_PKI}" sign-req ca "vpn-ca" 2>/dev/null
|
|
||||||
cp "${ROOT_PKI}/issued/vpn-ca.crt" "${VPN_PKI}/ca.crt"
|
|
||||||
|
|
||||||
# generate and sign vpn server certificate
|
# generate and sign vpn server certificate
|
||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --days="${CRT_EXPIRY_DAYS}" build-server-full "vpn.${CN}" nopass 2>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --days="${CRT_EXPIRY_DAYS}" build-server-full "vpn.${CN}" nopass 2>/dev/null
|
||||||
@ -48,8 +43,6 @@ if [ ! -f $VPN_CA ] || [ ! -f $VPN_CRT ] || [ ! -f $VPN_KEY ] || [ ! -f $VPN_DH
|
|||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --keysize=2048 gen-dh 2>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" --keysize=2048 gen-dh 2>/dev/null
|
||||||
|
|
||||||
# update indexes and generate CRLs
|
# update indexes and generate CRLs
|
||||||
"$easyrsa_bin" --pki-dir="${ROOT_PKI}" update-db 2>/dev/null
|
|
||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" update-db 2>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" update-db 2>/dev/null
|
||||||
"$easyrsa_bin" --pki-dir="${ROOT_PKI}" gen-crl 2>/dev/null
|
|
||||||
"$easyrsa_bin" --pki-dir="${VPN_PKI}" gen-crl 2>/dev/null
|
"$easyrsa_bin" --pki-dir="${VPN_PKI}" gen-crl 2>/dev/null
|
||||||
fi
|
fi
|
@ -12,7 +12,7 @@ usage() {
|
|||||||
echo " JWT_CRT Path to Token Auth certificate"
|
echo " JWT_CRT Path to Token Auth certificate"
|
||||||
echo " JWT_KEY Path to Token Auth private key"
|
echo " JWT_KEY Path to Token Auth private key"
|
||||||
echo " JWT_KID Path to KeyID for the Token Auth certificate"
|
echo " JWT_KID Path to KeyID for the Token Auth certificate"
|
||||||
echo " VPN_CA Path to the VPN sub-CA certificate"
|
echo " VPN_CA Path to the VPN CA certificate"
|
||||||
echo " VPN_CRT Path to the VPN server certificate"
|
echo " VPN_CRT Path to the VPN server certificate"
|
||||||
echo " VPN_KEY Path to the VPN server private key"
|
echo " VPN_KEY Path to the VPN server private key"
|
||||||
echo " VPN_DH Path to the VPN server Diffie Hellman parameters"
|
echo " VPN_DH Path to the VPN server Diffie Hellman parameters"
|
||||||
@ -83,7 +83,7 @@ export OPENBALENA_TOKEN_AUTH_PUB=$(b64file "$JWT_CRT")
|
|||||||
export OPENBALENA_TOKEN_AUTH_KEY=$(b64file "$JWT_KEY")
|
export OPENBALENA_TOKEN_AUTH_KEY=$(b64file "$JWT_KEY")
|
||||||
export OPENBALENA_TOKEN_AUTH_KID=$(b64file "$JWT_KID")
|
export OPENBALENA_TOKEN_AUTH_KID=$(b64file "$JWT_KID")
|
||||||
export OPENBALENA_VPN_CA=$(b64file "$VPN_CA")
|
export OPENBALENA_VPN_CA=$(b64file "$VPN_CA")
|
||||||
export OPENBALENA_VPN_CA_CHAIN=$(b64file "$ROOT_CA" "$VPN_CA")
|
export OPENBALENA_VPN_CA_CHAIN=$(b64file "$VPN_CA")
|
||||||
export OPENBALENA_VPN_CONFIG=$(b64encode "$VPN_CONFIG")
|
export OPENBALENA_VPN_CONFIG=$(b64encode "$VPN_CONFIG")
|
||||||
export OPENBALENA_VPN_SERVER_CRT=$(b64file "$VPN_CRT")
|
export OPENBALENA_VPN_SERVER_CRT=$(b64file "$VPN_CRT")
|
||||||
export OPENBALENA_VPN_SERVER_KEY=$(b64file "$VPN_KEY")
|
export OPENBALENA_VPN_SERVER_KEY=$(b64file "$VPN_KEY")
|
||||||
|
Reference in New Issue
Block a user