DEV Community

Carrie
Carrie

Posted on

3 1 1 1 1

How to Update SSL Certificate in SafeLine WAF through a File

Some users find it cumbersome to manually upload certificates via the interface when using the certificate management feature of SafeLine WAF. They prefer to store certificate files in a fixed directory, allowing SafeLine to automatically detect and update them after the files are overwritten. This way, the entire process can be automated using some tools.

To address or optimize these issues, SafeLine version 7.2.0 introduced the feature of automatically reading and updating certificates. Here’s how to use this feature:

Prerequisites

WAF version ≥ 7.2.0

Upload a Certificate for one time

To inform the WAF that a certificate needs to be periodically updated, you need to upload a certificate to the WAF for one time.

Image description

Obtain the Certificate Path

Certificates are stored by default under /data/safeline/resources/nginx/certs

ls /data/safeline/resources/nginx/certs/ -lh
total 8.0K
-rw-r--r-- 1 root root 1.4K Nov 22 18:15 cert_1.crt
-rw-r--r-- 1 root root 1.7K Nov 22 18:15 cert_1.key
Enter fullscreen mode Exit fullscreen mode

Update the Certificate Using Certbot

After obtaining the certificate using tools like certbot, simply overwrite the above files.

SafeLine WAF Scheduled Updates

SafeLine WAF refreshes the certificate content every hour by default.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay