Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
WouterLemaire
Active Contributor

Introduction

As I used certbot to sign my custom domain certificate it is only valid for 3 months and I need to renew it.

Last time, I used the CF CLI plugin for custom domains because CLI is just cool but also because I didn’t know if the custom domain manager application is free or costs extra. Nevertheless, I wanted to use the custom domain manager application for the renewal of the certificate to compare it with the CLI.

Preparation: Activate the custom domain manager application

First, make sure you have the entitlements in your subaccount for this:

WouterLemaire_0-1715379997463.png

Now, you should be able to subscribe to the Custom Domain Service with plan standard in your subaccount:

WouterLemaire_1-1715379997466.png

Once subscribed, your subaccount contains new roles. Assign the Custom Domain Administrator role to your user:

WouterLemaire_2-1715379997470.png

With the authorizations you can start the application. Go to "instances and subscriptions" to find the Custom Domain Manager in the list of subscriptions. Select the line and you’ll see the button “Go to Application”. This button will bring you to Custom Domain Manager application:

WouterLemaire_3-1715379997472.png

Renew certificate – Try 1

My expectation was that I would be able to simply renew the certificate in the earlier created private key. Unfortunately, I didn’t find any button in the screen of the private key to do so, no option to request a new CSR, no update certificate,... .

WouterLemaire_4-1715379997478.png

Renew certificate – Try 2

This brought me back to the CF CLI where I tried the command to get a new CSR:

WouterLemaire_5-1715379997479.png

This one clearly stated that the CSR is not available anymore.

Renew certificate – Try 3

So I tried to use the previous retrieved CSR again (which I stored on my computer) to send it to certbot for signing:

WouterLemaire_6-1715379997479.png

WouterLemaire_7-1715379997481.png

Once signed, I tried to upload it to the same private key which resulted in the following error.

WouterLemaire_8-1715379997481.png

Renew certificate – Final try

When looking for SAP notes about the previous error message I found the following SAP note:

https://me.sap.com/notes/3233828

This says it is not possible to use the same key for updating the certificate with a reference to the documentation: https://help.sap.com/docs/custom-domain/custom-domain-service/update-certificate

This means we need to create a new key every time we renew the certificate and delete the previous one afterwards:

WouterLemaire_9-1715379997483.png

With this new information, I went back to the “Custom Domain Service Manager” application:

WouterLemaire_10-1715379997484.png

In the app I navigate to the tab “Server Certificates” followed by “ Create Server Certificate for your Custom Domains”:

WouterLemaire_11-1715379997486.png

This starts a wizard where I provided the following information:

  • Alias: a name that contains the month and year for the certificate
  • Key Size: I kept the default “3072”

WouterLemaire_12-1715379997489.png

Select the landscape to apply the custom domain on:

WouterLemaire_13-1715379997492.png

I also used the opportunity to use “*.lemaire.tech” as main domain. This allows me to use wouter.lemaire .tech but also other subdomains for “lemaire.tech” without always to have “wouter” in it😊 . So I selected the following two:

WouterLemaire_14-1715379997495.png

All the details for the subject:

WouterLemaire_15-1715379997499.png

Once the wizard is finished I was able to download the CSR:

WouterLemaire_16-1715379997501.png

This opens a dialog with the certificate which you have to copy into a .pem file:

WouterLemaire_17-1715379997512.png

This CSR (.pem) file can be used to sign it with certbot using the following command. The steps are the same as the first time when using CF CLI. The command to sign it with certbot:

certbot certonly --manual --csr ./csr.pem --preferred-challenges dns

WouterLemaire_18-1715379997517.png

During this process I had to apply the following config in the custom domain configuration of google domains:

WouterLemaire_19-1715379997518.png

Once saved it looks like this, it still contains the previous acme record in my config:

WouterLemaire_20-1715379997519.png

This generated again a certificat chain that can be uploaded to BTP in the Custom Domain Manager:

WouterLemaire_21-1715379997521.png

In the Custom Domain Manager app I had to paste the certificate from the file. Certbot provided me 3 files but only the last one is needed:

WouterLemaire_22-1715379997532.png

Validate the certificate and click on next step:

WouterLemaire_23-1715379997536.png

The last step is just for confirmation, just click on Finish:

WouterLemaire_24-1715379997538.png

This will result in two certificates, one that will expire soon and one which is inactive (the one you just created):

WouterLemaire_25-1715379997540.png

Activate the new Certificate

Click on the newly created private key and click on “Activate”:

WouterLemaire_26-1715379997540.png

This opens a new wizard where you need to select the Subject Alternative Names which you would like to activate. I only selected “*.lemaire.tech” because I want to use it for other subdomains but not the “lemaire.tech” domain itself.

WouterLemaire_27-1715379997542.png

I just continued with the default TLS configuration:

WouterLemaire_28-1715379997546.png

Validate the summary and confirm!

WouterLemaire_29-1715379997550.png

Final step, configure the domain in your custom domain manager (I use google domains for this):

WouterLemaire_30-1715379997550.png

Cleanup

Once the new certificate is active, you can delete the previous one. Navigate to the previous certificate and click on delete:

WouterLemaire_31-1715379997551.png

After cleaning up, you should have one left:

WouterLemaire_32-1715379997554.png

Result

I have my personal website running using this domain: https://wouter.lemaire.tech

Next to that, I also used to domain to make an easy to remember url for the BTP Service overview matrix application: https://btp-services.lemaire.tech

 My conclusion, the Custom Domain Manager application works great and makes a lot of the steps easier to execute. Nevertheless, using the CF CLI helps to better understand all the steps you need to execute. In the end, the application executes the CF CLI commands through an API with a UI on top of it which makes it more user friendly 😉

Labels in this area