diff --git a/bitnami/etcd/Chart.yaml b/bitnami/etcd/Chart.yaml index 958243291ae581..c870220b6e2966 100644 --- a/bitnami/etcd/Chart.yaml +++ b/bitnami/etcd/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: etcd -version: 4.4.13 +version: 4.4.14 appVersion: 3.4.3 description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines keywords: diff --git a/bitnami/etcd/README.md b/bitnami/etcd/README.md index 1bdc0a92d207c1..49f1f4562554a0 100644 --- a/bitnami/etcd/README.md +++ b/bitnami/etcd/README.md @@ -291,6 +291,13 @@ As an alternative, this chart supports using an initContainer to change the owne You can enable this initContainer by setting `volumePermissions.enabled` to `true`. +## Notable changes + +### 4.4.14 + +In this release we addressed a vulnerability that showed the `ETCD_ROOT_PASSWORD` environment variable in the application logs. Users are advised to update immediately. More information in [this issue](https://github.com/bitnami/charts/issues/1901). + + ## Upgrading ### To 3.0.0 diff --git a/bitnami/etcd/templates/scripts-configmap.yaml b/bitnami/etcd/templates/scripts-configmap.yaml index 784797b673f401..0d515011bcef77 100644 --- a/bitnami/etcd/templates/scripts-configmap.yaml +++ b/bitnami/etcd/templates/scripts-configmap.yaml @@ -41,7 +41,10 @@ data: ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $clientPort }},{{ end }}" # Remove the last comma "," introduced in the string export ETCDCTL_ENDPOINTS="$(sed 's/,/ /g' <<< $ETCDCTL_ENDPOINTS | awk '{$1=$1};1' | sed 's/ /,/g')" - + export ROOT_PASSWORD="${ETCD_ROOT_PASSWORD:-}" + if [[ -n "${ETCD_ROOT_PASSWORD:-}" ]]; then + unset ETCD_ROOT_PASSWORD + fi # Functions ## Store member id for later member replacement store_member_id() { @@ -54,12 +57,12 @@ data: configure_rbac() { # When there's more than one replica, we can assume the 1st member # to be created is "{{ $etcdFullname }}-0" since a statefulset is used - if [[ -n "${ETCD_ROOT_PASSWORD:-}" ]] && [[ "$HOSTNAME" == "{{ $etcdFullname }}-0" ]]; then + if [[ -n "${ROOT_PASSWORD:-}" ]] && [[ "$HOSTNAME" == "{{ $etcdFullname }}-0" ]]; then echo "==> Configuring RBAC authentication!" 1>&3 2>&4 etcd & ETCD_PID=$! while ! etcdctl $AUTH_OPTIONS member list; do sleep 1; done - echo "$ETCD_ROOT_PASSWORD" | etcdctl $AUTH_OPTIONS user add root --interactive=false + echo "$ROOT_PASSWORD" | etcdctl $AUTH_OPTIONS user add root --interactive=false etcdctl $AUTH_OPTIONS auth enable kill "$ETCD_PID" sleep 5