mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-08 19:29:17 +08:00

Integrates Vault PKI service as a service addon. Also adds some helper scripts to help setup the CA in Vault, as well as some docs to explain how to use them. Originally based from https://github.com/mteodor/vault. Signed-off-by: Joao Matos <joao@tritao.eu> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
23 lines
454 B
Bash
Executable File
23 lines
454 B
Bash
Executable File
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
export MAINFLUX_DIR=$scriptdir/../../../
|
|
|
|
readDotEnv() {
|
|
set -o allexport
|
|
source $MAINFLUX_DIR/.env
|
|
set +o allexport
|
|
}
|
|
|
|
vault() {
|
|
docker exec -it mainflux-vault vault "$@"
|
|
}
|
|
|
|
readDotEnv
|
|
|
|
vault operator unseal ${MF_VAULT_UNSEAL_KEY_1}
|
|
vault operator unseal ${MF_VAULT_UNSEAL_KEY_2}
|
|
vault operator unseal ${MF_VAULT_UNSEAL_KEY_3}
|