Demonstrates connecting to Safeguard using client certificate authentication with a PKCS12 (PFX) file. This is the recommended authentication method for automated processes and services.
Before running this sample, you must configure Safeguard:
- Upload the CA certificate chain — Add the root CA and any intermediate CAs
to Safeguard's trusted certificates (
POST TrustedCertificates) - Create a certificate user — Create a Safeguard user with the
PrimaryAuthenticationProviderset to Certificate (Id: -2) with the client certificate's thumbprint as the Identity
mvn clean packagejava -jar target/certificate-connect-1.0-SNAPSHOT-jar-with-dependencies.jar <appliance> <certificate-file>| Argument | Description |
|---|---|
| appliance | IP or hostname of Safeguard appliance |
| certificate-file | Path to PKCS12/PFX client certificate file |
You will be prompted for the certificate password.
java -jar target/certificate-connect-1.0-SNAPSHOT-jar-with-dependencies.jar safeguard.example.com /path/to/client.pfx