Maintain a Secure Connection with UCL ​
After you have established a secure connection with UCL, you can fetch the configuration details and renew the client certificate before it expires. To renew the client certificate, follow the steps in this tutorial.
Prerequisites ​
- OpenSSL toolkit to create a Certificate Signing Request (CSR), keys, and certificates which meet high security standards
- UCL (previously called Compass)
- Registered Application
- Runtime connected to Compass
- Established secure connection with UCL
Steps ​
Get the CSR information with the configuration details.
To fetch the configuration, make a call to the Certificate-Secured Connector URL using the client certificate. The Certificate-Secured Connector URL is the
certificateSecuredConnectorURLobtained when establishing a secure connection with UCL. Send this query with the call:graphqlquery { result: configuration { certificateSigningRequestInfo { subject keyAlgorithm } managementPlaneInfo { directorURL } } }A successful call returns the requested configuration details.
Generate a key and a Certificate Signing Request (CSR).
Generate a CSR with this command using the certificate subject data obtained with the CSR information:
bashexport KEY_LENGTH=4096 openssl genrsa -out ucl-app.key $KEY_LENGTH openssl req -new -sha256 -out ucl-app.csr -key ucl-app.key -subj "{SUBJECT}"NOTE
The key length is configurable, however, 4096 is the recommended value.
Sign the CSR and renew the client certificate.
Encode the obtained CSR with base64:
bashopenssl base64 -in ucl-app.csrSend the following GraphQL mutation with the encoded CSR to the Certificate-Secured Connector URL:
graphqlmutation { result: signCertificateSigningRequest(csr: "{BASE64_ENCODED_CSR}") { certificateChain caCertificate clientCertificate } }The response contains a renewed client certificate signed by the Kyma Certificate Authority (CA), certificate chain, and the CA certificate.
Decode the certificate chain.
The returned certificates and the certificate chain are base64-encoded and need to be decoded before use. To decode the certificate chain, run:
bashbase64 -d {CERTIFICATE_CHAIN}
NOTE
See how to revoke a client certificate.