TWSD-796 APV wants to support ACME (Automatic Certificate Management Environment)

Review Request #1055 — Created Sept. 11, 2025 and submitted

mingji
APV10
TWSD-796
timsu, weikai

Implement ACME feature with cerbot.
Document:
https://arraynetworks.atlassian.net/wiki/spaces/~712020b01d430745ea477faa9173a38c0a1430/pages/2889515062/ACME+for+APV

new CLIs:
ssl certbot test <domain_name> [challenge]
ssl certbot request <host_name> <domain_name> [cert_idx] [challenge]
ssl certbot sni request <host_name> <domain_name> [cert_idx] [challenge]
ssl certbot renew <host_name> [cert_idx] [domain_name] [is_force]
ssl certbot schedule <host_name> [cert_idx] [domain_name] [hour] [minute] [month] [days] [weekday]
no ssl certbot schedule <host_name> [cert_idx] [domain_name]
no ssl certbot certificate <host_name> [cert_idx] [domain_name]
show ssl certbot vhost <host_name>
show ssl certbot sni vhost <host_name>
show ssl certbot log [num_lines]
clear ssl certbot log

prerequisite:
- A public IP for VIP and has its domain name
- Register an EAB from a CA, for example Developer - ZeroSSL
- ACME server’s url: https://acme.zerossl.com/v2/DV90
- Generate your own EAB KID, EAB HMAC Key

Verify following the configuration steps:
https://arraynetworks.atlassian.net/browse/TWSD-796

Description From Last Updated

Create a block yourself and add comments, instead of placing it under "for PostgreSQL and Prometheus."

weikaiweikai

Remove redundant or non-functional code; don’t keep it in the project.

weikaiweikai

Remove unnecessary spaces.

weikaiweikai

If you can add comments here to explain what kind of command will be assembled and executed in the end, …

weikaiweikai

Remove the unnecessary parts. If port 80 is already in use by someone else, the challenge should fail. That should …

weikaiweikai

Currently only HTTP is supported, but here it says DNS is also accepted. Please fix this. You can leave a …

weikaiweikai

Is anyone using this tag? If not, please remove it. If it’s only meant to separate code blocks, you can …

weikaiweikai

Not quite sure about the meaning of this code and its comment. If it’s not needed, please remove it. If …

weikaiweikai

The terminal width is not necessarily that wide. You can use line breaks or just a few - characters to …

weikaiweikai

There’s no check for whether the file exists or whether fopen succeeds.

weikaiweikai

Deleting might not be the best option, because there’s no prior check whether the file exists. You could also use …

weikaiweikai

Remove redundant or non-functional code; don’t keep it in the project.

weikaiweikai

Remove redundant or non-functional code; don’t keep it in the project.

weikaiweikai
weikai
  1. 
      
  2. Create a block yourself and add comments, instead of placing it under "for PostgreSQL and Prometheus."

  3. 
      
weikai
  1. 
      
  2. Remove unnecessary spaces.

  3. 
      
weikai
  1. 
      
  2. branches/rel_apv_10_7/usr/click/lib/libkernelapi/addCommands.pm (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Remove redundant or non-functional code; don’t keep it in the project.

  3. 
      
weikai
  1. 
      
  2. branches/rel_apv_10_7/usr/src/sys/click/app/ssl/ssl_ui.c (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Remove redundant or non-functional code; don’t keep it in the project.

  3. 
      
weikai
  1. 
      
  2. branches/rel_apv_10_7/usr/src/sys/click/app/ssl/ssl_ui.c (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Remove redundant or non-functional code; don’t keep it in the project.

  3. 
      
weikai
  1. 
      
  2. branches/rel_apv_10_7/usr/click/lib/libssl_cli/ssl_cli.c (Diff revision 1)
     
     
     
     
     
     
     
     

    If you can add comments here to explain what kind of command will be assembled and executed in the end, it will make it easier for everyone to understand.

  3. 
      
weikai
  1. 
      
  2. Remove the unnecessary parts.

    1. If port 80 is already in use by someone else, the challenge should fail. That should be the expected error message, right?

    2. If port 80 was already open, there’s no check here. The code always closes it afterward, which could break other functionality.

      1. add the error meesage for not using 80 port when challenge fail
      2. for the friewall part,
        firewall-cmd without tag "--permanent" won't modify its config file, so when running firewall-cmd reload again, it will recover the configuration according the config file and won't break other functionality.
  3. 
      
weikai
  1. 
      
  2. Currently only HTTP is supported, but here it says DNS is also accepted. Please fix this.
    You can leave a comment here so that anyone adding features in the future can understand more quickly.

  3. 
      
weikai
  1. 
      
  2. branches/rel_apv_10_7/usr/click/lib/libssl_cli/ssl_cli.c (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Not quite sure about the meaning of this code and its comment.
    If it’s not needed, please remove it.
    If it has important meaning, please provide an additional explanation.

  3. 
      
weikai
  1. 
      
  2. Is anyone using this tag? If not, please remove it.
    If it’s only meant to separate code blocks, you can use comments instead.

  3. 
      
weikai
  1. 
      
  2. There’s no check for whether the file exists or whether fopen succeeds.

  3. 
      
weikai
  1. 
      
  2. Deleting might not be the best option,
    because there’s no prior check whether the file exists.
    You could also use echo "" > CERTBOTUSERLOGPATH.

  3. 
      
weikai
  1. 
      
  2. The terminal width is not necessarily that wide.
    You can use line breaks or just a few - characters to indicate meaning, e.g., 10–20 -.

  3. 
      
mingji
mingji
weikai
  1. Ship It!
  2. 
      
mingji
mingji
Review request changed

Status: Closed (submitted)

Loading...