Appliance Web Certificate

By default, browsers that open the Athena web console on port 8443 see a certificate issued by the appliance's own Athena CA. You can replace it with a certificate from your own CA (a corporate PKI or a public CA). Upload a PFX and Athena checks it and shows you every problem before you switch. The switch is live, with no restart, and you can switch back to the built-in certificate at any time.

The setting is in Settings → Appliance → Web certificate (port 8443), between Firewall and API documentation (Swagger). The same actions are available over the REST API and in the PowerShell module.

Agents are not affected

This changes the certificate for port 8443 only (the web console, the REST API and PowerShell). The agent port 8444 always keeps its Athena CA certificate, so enrolled agents keep connecting whether you upload, replace or revert. See Certificates & PKI.

Appliance only

The Appliance tab only exists when Athena runs on the virtual appliance, and the api/appliance/certificate endpoints answer 404 on other installs. On a Docker or Windows install, set Server:WebCertPath / Server:WebCertPassword and restart. See Server TLS: Installing your own certificate.

Who can use it#

PermissionAllows
appliance.viewSee which certificate port 8443 serves and its details.
appliance.manageCheck a PFX, switch to it, and revert to the built-in certificate.

By default only the built-in Admin role holds them. Users who have appliance.view but not appliance.manage see the current certificate and the note “Read-only: changing this needs the appliance.manage permission.” See Permission Model & Role Bundles.

The current certificate#

The top of the section describes the certificate port 8443 presents right now:

FieldShows
In useBuilt-in Athena certificate or Uploaded certificate. For an uploaded one it also shows who uploaded it and when (“uploaded by user on date”).
Subject / IssuerThe certificate's subject and issuing CA.
Names (SAN)The Subject Alternative Names, as DNS: and IP: entries, or - if there are none.
ValidNot-before and not-after dates.
SHA-256 thumbprintUpper-case hex. This is the value openssl x509 -fingerprint -sha256 prints, without the colons.
Days leftGreen normally, amber in the last 30 days, red once expired.

In the last 30 days the section also shows “The web certificate expires in N days. Upload a renewed one before it does.” After expiry it shows “The web certificate has expired: browsers refuse it. Upload a valid one or revert to the built-in certificate.” If TLS is turned off on the server, the section shows only “TLS is off on this server, so there is no web certificate to manage.”

Replacing the certificate#

You need a PFX (PKCS#12) file that contains the server certificate with its private key, ideally with the whole chain (intermediates). The file can be at most 1 MB. If you have separate PEM files, see Preparing the PFX.

  1. Open Settings → Appliance and scroll to Web certificate (port 8443).
  2. Under Replace the certificate, click the browse button next to PFX file (.pfx / .p12) and pick your file.
  3. Type the PFX password.
  4. Click Check. Athena opens the PFX and runs every check without changing anything. It shows the certificate's details, then any errors (red) and warnings (amber).
  5. If there are no errors, the Use this certificate button appears. Click it. Port 8443 serves the new certificate from the next connection, and the toast says “Port 8443 now serves the uploaded certificate. Reload the page to see it in the browser.”
  6. Reload the page. Your browser now shows the new certificate.

Athena keeps the PFX on the appliance and stores its password encrypted, never in plain text. The uploaded certificate stays in use after restarts and appliance reboots. To renew, upload the new PFX the same way. It replaces the old one directly.

Reverting to the built-in certificate#

While an uploaded certificate is in use, a Revert to built-in button appears next to Check. It switches port 8443 back to the built-in Athena certificate at once, also without a restart (“Port 8443 serves the built-in Athena certificate again.”). Browsers that don't trust the Athena Root CA will show a certificate warning again.

What Athena checks#

Errors block the switch: a browser would refuse the certificate, or the server couldn't use it. Warnings don't block it. Read them and decide for yourself.

CheckResult if it failsMessage
The file opens with the passwordError“The file could not be opened: it is not a PFX (PKCS#12) file, or the password is wrong.”
It contains a certificate with a private keyError“The PFX holds no certificate with a private key. Export it again with the private key included.”
The private key belongs to the certificateError“The private key in the PFX does not belong to the certificate (only RSA and ECDSA keys are supported).”
The certificate is currently validError“The certificate is not valid until …” or “The certificate expired on …”
It is issued for server authenticationError“The certificate is not issued for server authentication (its Extended Key Usage lacks 1.3.6.1.5.5.7.3.1).” A certificate with no Extended Key Usage at all passes.
Every certificate in the chain is validError“The certificate chain is invalid at "subject": …” (for example an expired intermediate or a bad signature).
More than 30 days leftWarning“The certificate expires in N days (date).”
The chain is completeWarning“The chain is incomplete: the PFX does not carry the intermediate certificate that issued … export the PFX with the whole chain.”
The root CA is trusted by the applianceWarning“The root CA "subject" is not trusted by this server. That is normal for a company CA: make sure your browsers trust it.”
The certificate covers the appliance's namesWarning“The certificate does not cover names: a browser opening Athena by that name will show a warning.”

If the uploaded certificate can't be loaded#

When Athena starts, it loads the uploaded certificate. If the file can't be read or decrypted, Athena doesn't lock you out. Port 8443 serves the built-in certificate instead, so the console stays reachable, and the section shows in red: “The uploaded certificate could not be loaded (…); port 8443 serves the built-in certificate.” To fix it, upload the PFX again, or click Revert to built-in to clear the setting.

Expiry tracking and audit#

Athena checks the port 8443 certificate (built-in or uploaded) every hour. It writes an audit event when the certificate enters its last 30 days and again when it expires: once per stage for each certificate while the server runs.

Event typeSeverityRecorded when
WebCertificateChangedWarning / ErrorAction Upload: the certificate was replaced (Warning; the description gives the subject, issuer, expiry, thumbprint and any warnings), or an upload was refused (Error, with the reasons). Action Revert: back to the built-in certificate (Warning; old and new thumbprints). The resource is the SHA-256 thumbprint. The password is never recorded.
WebCertificateExpiringWarning / ErrorWritten by System. Action ExpiresSoon (Warning) in the last 30 days, Expired (Error) after expiry. The description says whether the certificate is uploaded or built-in.

To get an alert before a certificate runs out, forward these events to your SIEM. See Audit Forwarding to SIEM and the Audit Event Types Reference.

REST API#

All endpoints return the usual { success, message, data } envelope and answer 404 off the appliance. Uploads are multipart/form-data with the PFX in the field file (at most 1 MB) and its password in the field password.

Method & pathPermissionPurpose
GET api/appliance/certificateappliance.viewThe certificate port 8443 serves now: source (builtin or custom), certificate (subject, issuer, SANs, validity, thumbprint), daysLeft, expiresSoon, uploadedBy, uploadedAt, loadError and expectedNames.
POST api/appliance/certificate/inspectappliance.manageRuns every check and describes the PFX: ok, certificate, errors, warnings, missingNames. Changes nothing.
POST api/appliance/certificateappliance.manageChecks the PFX and, if nothing blocks it, switches port 8443 to it at once. 200 with the check result, or 400 with the errors and the check result when refused.
DELETE api/appliance/certificateappliance.manageReverts to the built-in certificate at once. 400 “Port 8443 already serves the built-in certificate” when nothing was uploaded.

A request with no file, or a file over 1 MB, gets 400 “Send the PFX as the multipart field 'file' (at most 1 MB)”. To authenticate scripts, see API Tokens and the API Reference.

PowerShell#

The Athena PowerShell module wraps the same API. The PFX password is taken as a SecureString.

CmdletWhat it does
Get-AthenaWebCertificateThe certificate port 8443 serves now.
Test-AthenaWebCertificate-Path, -Password. Runs every check without using the certificate.
Set-AthenaWebCertificate-Path, -Password. Switches port 8443 to the certificate. Asks for confirmation; supports -WhatIf / -Confirm.
Reset-AthenaWebCertificateReverts to the built-in certificate. Asks for confirmation.
# Check the corporate certificate first, then switch to it
$pw = Read-Host -AsSecureString 'PFX password'
$check = Test-AthenaWebCertificate -Path .\athena-web.pfx -Password $pw
$check.Errors; $check.Warnings
# Use it only if no check blocks it
if ($check.Ok) { Set-AthenaWebCertificate -Path .\athena-web.pfx -Password $pw }

# Days left on the certificate port 8443 presents
(Get-AthenaWebCertificate).DaysLeft

# Back to the built-in Athena certificate
Reset-AthenaWebCertificate

Troubleshooting#

SymptomCause and fix
“The file could not be opened…”Wrong password, or the file isn't a PKCS#12. PEM, CER and CRT files are not accepted; bundle them into a PFX first (how).
“…no certificate with a private key”The PFX was exported without its key. On Windows, export it again and choose Yes, export the private key.
The browser still shows the old certificate after Use this certificateThe browser reuses its open connection. Reload the page; if it persists, close the tab and open the console again.
Browsers report an incomplete chainThe PFX lacks the intermediate CA. Export it again including all certificates in the certification path.
A name warning for the IP addressUsers who open Athena by IP will see a browser warning. Add the IP as an IP: SAN when you request the certificate, or have users open Athena by its DNS name.
The red “could not be loaded” message after a restartThe stored certificate couldn't be read. Port 8443 is on the built-in certificate. Upload the PFX again.
PowerShell or scripts fail TLS validation after the switchThe client now sees your CA instead of the Athena Root CA. Make sure the machine running the script trusts your CA.