Fixes in generate cert script
This commit is contained in:
@@ -39,7 +39,6 @@ mkdir -p \
|
|||||||
${CERTS_DIR}api-cache \
|
${CERTS_DIR}api-cache \
|
||||||
${CERTS_DIR}api-logger \
|
${CERTS_DIR}api-logger \
|
||||||
${CERTS_DIR}db-postgres \
|
${CERTS_DIR}db-postgres \
|
||||||
# ${CERTS_DIR}db-mongo \
|
|
||||||
${CERTS_DIR}identity-svc \
|
${CERTS_DIR}identity-svc \
|
||||||
${CERTS_DIR}basket-svc \
|
${CERTS_DIR}basket-svc \
|
||||||
${CERTS_DIR}catalog-svc \
|
${CERTS_DIR}catalog-svc \
|
||||||
@@ -47,12 +46,12 @@ mkdir -p \
|
|||||||
${CERTS_DIR}pricing-svc
|
${CERTS_DIR}pricing-svc
|
||||||
|
|
||||||
# Generate Root CA cert
|
# Generate Root CA cert
|
||||||
# openssl req -newkey rsa:2048 -nodes -x509 -days 1024 \
|
openssl req -newkey rsa:2048 -nodes -x509 -days 1024 \
|
||||||
# -subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/OU=DevOps Team/CN=Egommerce CA" \
|
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/OU=DevOps Team/CN=Egommerce CA" \
|
||||||
# -keyout ${CERTS_DIR}ca-root/ca-root.key -out ${CERTS_DIR}ca-root/ca-root.crt >/dev/null
|
-keyout ${CERTS_DIR}ca-root/ca-root.key -out ${CERTS_DIR}ca-root/ca-root.crt >/dev/null
|
||||||
|
|
||||||
# Create fullchain pem file
|
# Create fullchain pem file
|
||||||
# cat ${CERTS_DIR}ca-root/ca-root.key ${CERTS_DIR}ca-root/ca-root.crt > ${CERTS_DIR}ca-root/ca-root.pem
|
cat ${CERTS_DIR}ca-root/ca-root.key ${CERTS_DIR}ca-root/ca-root.crt > ${CERTS_DIR}ca-root/ca-root.pem
|
||||||
|
|
||||||
|
|
||||||
# Generate Gateway cert
|
# Generate Gateway cert
|
||||||
@@ -70,6 +69,7 @@ openssl x509 -req -days 365 \
|
|||||||
# Create fullchain pem file
|
# Create fullchain pem file
|
||||||
cat ${CERTS_DIR}api-gateway/api-gateway.key ${CERTS_DIR}api-gateway/api-gateway.crt > ${CERTS_DIR}api-gateway/api-gateway.pem
|
cat ${CERTS_DIR}api-gateway/api-gateway.key ${CERTS_DIR}api-gateway/api-gateway.crt > ${CERTS_DIR}api-gateway/api-gateway.pem
|
||||||
|
|
||||||
|
|
||||||
# Generate Eventbus cert
|
# Generate Eventbus cert
|
||||||
openssl req -newkey rsa:2048 -nodes \
|
openssl req -newkey rsa:2048 -nodes \
|
||||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$EVENTBUS_CN" \
|
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$EVENTBUS_CN" \
|
||||||
@@ -108,6 +108,7 @@ openssl x509 -req -days 365 \
|
|||||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${LOGGER_SAN}")) \
|
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${LOGGER_SAN}")) \
|
||||||
-out ${CERTS_DIR}api-logger/api-logger.crt >/dev/null
|
-out ${CERTS_DIR}api-logger/api-logger.crt >/dev/null
|
||||||
|
|
||||||
|
|
||||||
# Generate Postgres cert
|
# Generate Postgres cert
|
||||||
openssl req -newkey rsa:2048 -nodes \
|
openssl req -newkey rsa:2048 -nodes \
|
||||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$POSTGRES_CN" \
|
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$POSTGRES_CN" \
|
||||||
@@ -121,19 +122,6 @@ openssl x509 -req -days 365 \
|
|||||||
-out ${CERTS_DIR}db-postgres/db-postgres.crt >/dev/null
|
-out ${CERTS_DIR}db-postgres/db-postgres.crt >/dev/null
|
||||||
|
|
||||||
|
|
||||||
# Generate Mongo cert
|
|
||||||
# openssl req -newkey rsa:2048 -nodes \
|
|
||||||
# -subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$MONGO_CN" \
|
|
||||||
# -keyout ${CERTS_DIR}db-mongo/db-mongo.key \
|
|
||||||
# -out ${CERTS_DIR}db-mongo/db-mongo.csr >/dev/null
|
|
||||||
|
|
||||||
# openssl x509 -req -days 365 \
|
|
||||||
# -in ${CERTS_DIR}db-mongo/db-mongo.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
|
||||||
# -CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
|
||||||
# -extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${MONGO_SAN}")) \
|
|
||||||
# -out ${CERTS_DIR}db-mongo/db-mongo.crt >/dev/null
|
|
||||||
|
|
||||||
|
|
||||||
# Generate Identity cert
|
# Generate Identity cert
|
||||||
openssl req -newkey rsa:2048 -nodes \
|
openssl req -newkey rsa:2048 -nodes \
|
||||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$IDENTITY_CN" \
|
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$IDENTITY_CN" \
|
||||||
|
|||||||
Reference in New Issue
Block a user