-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test self-signed certificates for Che on Kubernetes/OS deployed with chectl (helm/operator installers) #14035
Comments
@skabashnyuk @slemeur @sleshchenko Is this needed for 7.0? |
@sleshchenko what's the relationship with #12634? I mean I thought we had fixed the issues with self-signed certs (wsmaster, plugin-broker, theia) and that we knew how to deploy Che using a self-signed cert. What's new here? |
I tried to play with generating a self-signed certificate and discovered typical issues people faced:
Here I found some meaningful instructions about generating self-signed certificates https://wiki.mozilla.org/SecurityEngineering/x509Certs and https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309 CA_CN=minishift-signer
DOMAIN=*.192.168.99.100.nip.io
#Generate root key # add -des3 if you want to set pass phrase
openssl genrsa -out rootCA.key 4096
# Generate root cert
openssl req -x509 \
-new -nodes \
-key rootCA.key \
-sha256 \
-days 1024 \
-out rootCA.crt \
-subj /CN=${CA_CN} \
-reqexts SAN \
-extensions SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf '[SAN]\nbasicConstraints=critical, CA:TRUE\nkeyUsage=keyCertSign, cRLSign, digitalSignature, keyEncipherment'))
#Create cert key for domain
openssl genrsa -out domain.key 2048
#create csr for domain
openssl req -new -sha256 \
-key domain.key \
-subj "/C=UA/ST=CK/O=RedHat/CN=${DOMAIN}" \
-reqexts SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf "\n[SAN]\nsubjectAltName=DNS:${DOMAIN}\nbasicConstraints=critical, CA:FALSE\nkeyUsage=keyCertSign, digitalSignature, keyEncipherment\nextendedKeyUsage=serverAuth")) \
-out domain.csr
# create cert for domain
openssl x509 -req -extfile <(printf "subjectAltName=DNS:${DOMAIN}\nbasicConstraints=critical, CA:FALSE\nkeyUsage=keyCertSign, digitalSignature, keyEncipherment\nextendedKeyUsage=serverAuth") -days 365 -in domain.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out domain.crt After executing it, you'll be able to use Deploy Che on Minishift
Precreate a secret with self-signed certificate for Che Server.
Deploy Che Server itself
Deploying on minikube is not fully working, I'm preparing fixes and will post PRs and instructions on how to deploy Che soon. |
I managed to deploy Che with self-signed cert (CA + certificate for TLS) with the following changes for helm chart and chectl: #14176, che-incubator/chectl#248.
|
as Mario suggested, moving to 7.0.0 as fixes are there and PR are there |
Helm chart is fixed to correctly deploy Che Server with self-signed-cert configured, chectl is adapted to these changes as well #14176, che-incubator/chectl#248 Also, the following issues were found but will be fixed in separate issues:
|
On Fedora openssl configuration file is located under # Generate root cert
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt -subj /CN=${CA_CN} -reqexts SAN -extensions SAN -config <(cat /etc/pki/tls/openssl.cnf <(printf '[SAN]\nbasicConstraints=critical, CA:TRUE\nkeyUsage=keyCertSign, cRLSign, digitalSignature, keyEncipherment'))
# Create csr for domain
openssl req -new -sha256 -key domain.key -subj "/C=UA/ST=CK/O=RedHat/CN=${DOMAIN}" -reqexts SAN -config <(cat /etc/pki/tls/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=DNS:${DOMAIN}\nbasicConstraints=critical, CA:FALSE\nkeyUsage=keyCertSign, digitalSignature, keyEncipherment\nextendedKeyUsage=serverAuth")) -out domain.csr |
Has anybody tried to create a self signed sertificate on windows to run in minishift? Is it possible to do, if so, where can i find the infos about it? All the tutorials and commands that i found so far seem to be opted for linux based OS. |
In case one need to include root CA cert into router chain, cat domain.crt rootCA.crt domain.key > minishift.crt |
Is your task related to a problem?
I tried to test self-signed certificate but I did manage to generate them correctly(more see #13946).
This issue is about setting up self-signed certificate for Che, and check if everything works correctly (like Java Maven workspace is started and working).
The text was updated successfully, but these errors were encountered: