Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate self signed certificate #97

Merged
merged 4 commits into from
Nov 9, 2018
Merged

Generate self signed certificate #97

merged 4 commits into from
Nov 9, 2018

Conversation

kfurgol
Copy link
Contributor

@kfurgol kfurgol commented Nov 7, 2018

Description

Changes proposed in this pull request:

  • Added script that generates a self signed certificate

Related issue(s)
Provisioning GKE cluster for integration tests #20

@kfurgol kfurgol added the area/ci Issues or PRs related to CI related topics label Nov 7, 2018
@kfurgol kfurgol requested review from a-thaler, clebs, lilitgh and a team as code owners November 7, 2018 08:39
KEY_PATH="${SCRIPTS_DIR}/key.pem"
CERT_PATH="${SCRIPTS_DIR}/cert.pem"

openssl req -x509 -newkey rsa:4096 -keyout ${KEY_PATH} -out ${CERT_PATH} -days 365 -subj "/CN=${DOMAIN}" -nodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 365 days?


echo "TLS_CERT=${TLS_CERT}"
echo "TLS_KEY=${TLS_KEY}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment that explains how this script be used, why we are removing files above etc

KEY_PATH="${SCRIPTS_DIR}/key.pem"
CERT_PATH="${SCRIPTS_DIR}/cert.pem"

openssl req -x509 -newkey rsa:4096 -keyout ${KEY_PATH} -out ${CERT_PATH} -days 5 -subj "/CN=${DOMAIN}" -nodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The certificate doesn't have SAN. Will not work. You need something like this:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
                 -subj "/C=/ST=/O=/localityName=/commonName=$DOMAIN/organizationalUnitName=/emailAddress=/" \
                 -reqexts SAN -extensions SAN \
                 -config <(cat /etc/ssl/openssl.cnf \
        <(printf "\n[SAN]\nsubjectAltName=DNS:*.$DOMAIN")) \
                 -keyout server.key \
                 -out server.crt

@kfurgol kfurgol merged commit 0036071 into kyma-project:master Nov 9, 2018
@kfurgol kfurgol deleted the generate-self-signed-cert branch November 15, 2018 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI related topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants