Skip to content

Conversation

@gsanchietti
Copy link
Member

@gsanchietti gsanchietti commented Feb 4, 2026

The UI will display expiration date for all involved certificates.

Improves #1481

UI changes: NethServer/nethsecurity-ui#690

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the OpenVPN tunnel API to retrieve expiration dates for all certificates involved in tunnel configurations (CA, server, and client certificates), addressing the need to display certificate expiration information in the UI.

Changes:

  • Replaced the single-certificate expiration function with a comprehensive certificate parser that extracts CN and expiration dates from PEM files containing multiple certificates
  • Updated the list-tunnels API to include certificate information for both server and client tunnels
  • Updated documentation with examples showing the new certificates field structure

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/ns-api/files/ns.ovpntunnel Replaced get_cert_expiry_ts() with get_certificates_from_pem() to extract multiple certificates with their CNs and expiration timestamps; integrated the new function into both client and server tunnel listings
packages/ns-api/README.md Added documentation examples showing the new certificates field structure with CN-keyed expiration timestamps for server tunnels
Comments suppressed due to low confidence (1)

packages/ns-api/README.md:970

  • The documentation example doesn't include the 'certificates' field for clients even though the code at line 388 in ns.ovpntunnel adds this field when vpn.get('cert') is available. Consider adding an example showing what the certificates field looks like for a client tunnel, similar to how it's shown for servers.
  "clients": [
    {
      "ns_name": "clientsubent",
      "id": "ns_1234",
      "topology": "subnet",
      "enabled": true,
      "port": "1200",
      "remote_host": "185.96.130.33",
      "remote_network": []
    },
    {
      "ns_name": "c1",
      "id": "ns_333",
      "topology": "p2p",
      "enabled": true,
      "port": "1122",
      "remote_host": "1.2.3.4",
      "remote_network": [
        "10.0.1.0/24"
      ]
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The UI will display expiration date for all involved
certificates.
@gsanchietti gsanchietti merged commit c775eb7 into main Feb 6, 2026
2 checks passed
@gsanchietti gsanchietti deleted the issue1481 branch February 6, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants