Merge pull request 'refs #2448 derive a strong password from the default opengnsys weak one' (#87) from ogkdf into main
Reviewed-on: #87pull/88/head 0.25.1
commit
334f961e4c
|
@ -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/),
|
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).
|
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
|
## [0.25.0] - 2025-07-11
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
F=/etc/filebeat/filebeat.yml
|
F=/etc/filebeat/filebeat.yml
|
||||||
OGLOG_PORT=9200
|
OPENSEARCH_PORT=9200
|
||||||
|
|
||||||
if [ -f $F ]; then
|
if [ -f $F ]; then
|
||||||
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 |sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') ## taken from a sibling script
|
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 |sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') ## taken from a sibling script
|
||||||
PASS=${PASS:-"og"}
|
PASS=${PASS:-"og"}
|
||||||
|
PASS=OG+$(echo -n $PASS |sha256sum |cut -c1-12) ## og KDF
|
||||||
chmod 0600 $F
|
chmod 0600 $F
|
||||||
sed -i -e "s/__OGLOG_IP__/$oglog/g" \
|
sed -i -e "s/__OGLOG_IP__/$oglog/g" \
|
||||||
-e "s/__OGLOG_PORT__/$OGLOG_PORT/g" \
|
-e "s/__OGLOG_PORT__/$OPENSEARCH_PORT/g" \
|
||||||
-e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \
|
-e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \
|
||||||
$F
|
$F
|
||||||
unset PASS
|
unset PASS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue