Skip to content

Commit

Permalink
Making certs valid for wazuh.indexer, localhost and 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Nov 20, 2024
1 parent 373d3ee commit 72fd8f5
Showing 1 changed file with 101 additions and 100 deletions.
201 changes: 101 additions & 100 deletions distribution/packages/src/common/scripts/install-demo-certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,132 +20,133 @@ if [ $USE_DEMO_CERTS == "true" ]
then
cat <<'ADMIN_KEY' > $TMP_DIR/admin-key.pem
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC9EEeHfF8mDNMb
XjKZYm5HPND/bX6+xzs9K89ybavKiaCkjuoeSu9jdger7/L6VfO5+VKSvni5FNBt
fZ9Gv5knoOA8nGxgUK5NimJRzVbWLMXAFUDLdG8TTeWJj/uH72DQfPqev+oO7Ast
yJvSdB+veo6Thw1M72zgpdCj7OyGb45F9YLENZUb0alIAWNC2w96r5GGOt9ZN791
KIh9ynBlDKg0DFQuin60Qo9PiHQE2JN9x6Ipag4tXXBVsChbEcbg6BrTTZeq559E
SnWZLPtdOjJZXk2nG9chWr4KIhrrk+2omQAaMM7+4v0V5BUBiu8zW2HOiBGrj7T6
RlOxWouZAgMBAAECggEAAUR0q6HXzsd95XcSMRkJ0uHDfOgyVfu77UMNQZ/JQQhU
fVs/591qEWlJz+CXPmUJHJFhTlPcjKZpEfLU+IJxomRfschSqaqgyyrxpx67RaBI
ixXEDhkaYtoTfy0/QGqzDsgSXgdnUvDzejvCtPx2TJTZE9VvRLluKhYHz1wtPGbM
F0EFVjQupNpVOEwWLSF3m0zsGsYKDdM+/+CZjc2tLyMJiLJKgCv/4TpbS6t9/x0d
PfgDzuyMtKrkwHt6G7wwyv8EbbiBq9cnPdfZVffxwLD9h0zHaG6UmYDa2pyzr+pT
CE/2Gg5tYczpUKhYvhRn6w7DcZi5zNhpEuHampAuSQKBgQDnpIJOBLKBlDSj07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FNUoqfqFbOZrQGiWdU
xFetmKjdeAGTyKoWmSDX4qw5H9tKSVvIAIdl3GnK3KolCCQy1BeH8tAzuXfSKGoB
XLrLazUspUr1ICZX0UbLlP9uvr+xMswnUaQqUoW6lsX9LlpkGxwEDbBlPx4W1Vij
ODxnXcQum8Pdw5Lnfe82p3Y/89C3WRZSlLU7rFhkQuMgDjpXluap/L/Su3rmzsb6
FQIDAQABo1MwUTAdBgNVHQ4EFgQUZU4qc8xA/IwEColxBPfZtcnvd4swHwYDVR0j
BBgwFoAUZU4qc8xA/IwEColxBPfZtcnvd4swDwYDVR0TAQH/BAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAQEASGL3El7iI0XN7DXc4YHHj3j5lk2ZRjD69OiCBT0dLi6B
NCBdg2WpjnzRWHVfTHHgwg/N4vS2MQXD1D5LJNFl9TY8bP3Pq7n0ZOTF+imUlIfm
Ui39q/YlhFus6T33r+lSYEEAzRi1e2+Lk22eCNtxu5VPof3BqNI/sL5FzH1p4Get
foi6F0S5pmYrNsej3eo6oGfBJ5spu6DpanEGWvPqAmqoYiUuru/YNajP2xd39qEh
zktTmZw19StcKdznK0rOe6iR5ninMbruJcqgUERkNMfSxRQBEGGDs75vbX0PJ9cZ
MD5/joGKExUSdA9LRi6qXLCp2ZM8E9ZR4jOYH01jMQ==
-----END CERTIFICATE-----
ROOT_CA

Expand All @@ -165,7 +166,7 @@ else
openssl genrsa -out "$TMP_DIR/indexer-key-temp.pem" 2048
openssl pkcs8 -inform PEM -outform PEM -in "$TMP_DIR/indexer-key-temp.pem" -topk8 -nocrypt -v1 PBE-SHA1-3DES -out "$TMP_DIR/indexer-key.pem"
openssl req -new -key "$TMP_DIR/indexer-key.pem" -subj "/C=US/L=California/O=Wazuh/OU=Wazuh/CN=node-1" -out "$TMP_DIR/indexer.csr"
echo 'subjectAltName=DNS:node-1' > "$TMP_DIR/indexer.ext"
echo 'subjectAltName=subjectAltName=RID:1.2.3.4.5.5,DNS:wazuh.indexer,DNS:localhost,IP:127.0.0.1,IP:0:0:0:0:0:0:0:1' > "$TMP_DIR/indexer.ext"
openssl x509 -req -in "$TMP_DIR/indexer.csr" -CA "$TMP_DIR/root-ca.pem" -CAkey "$TMP_DIR/root-ca-key-temp.pem" -CAcreateserial -sha256 -out "$TMP_DIR/indexer.pem" -days 3650 -extfile "$TMP_DIR/indexer.ext"

# Cleanup temporary files
Expand Down

0 comments on commit 72fd8f5

Please sign in to comment.