From 8ae6b503a6baf6dcf5fa6414f3bb21ccf2545f4e Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Fri, 11 Jul 2025 14:04:18 +0200 Subject: [PATCH] refs #2448 derive a strong password from the default opengnsys weak one --- CHANGELOG.md | 6 ++++++ ogclient/etc/preinit/filebeat.sh | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0acd4a3..530758c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.25.1] - 2025-07-11 + +### Changed + +- Derive a strong password from the default opengnsys weak one + ## [0.25.0] - 2025-07-11 ## Added diff --git a/ogclient/etc/preinit/filebeat.sh b/ogclient/etc/preinit/filebeat.sh index cec6567..1f7984e 100755 --- a/ogclient/etc/preinit/filebeat.sh +++ b/ogclient/etc/preinit/filebeat.sh @@ -1,15 +1,16 @@ #!/bin/bash F=/etc/filebeat/filebeat.yml -OGLOG_PORT=9200 +OPENSEARCH_PORT=9200 if [ -f $F ]; then PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 |sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') ## taken from a sibling script PASS=${PASS:-"og"} + PASS=OG+$(echo -n $PASS |sha256sum |cut -c1-12) ## og KDF chmod 0600 $F - sed -i -e "s/__OGLOG_IP__/$oglog/g" \ - -e "s/__OGLOG_PORT__/$OGLOG_PORT/g" \ - -e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \ + sed -i -e "s/__OGLOG_IP__/$oglog/g" \ + -e "s/__OGLOG_PORT__/$OPENSEARCH_PORT/g" \ + -e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \ $F unset PASS