Skip to content

Quarkus 3.33 HTTPS demo

This demo runs Quarkus 3.33.2 with Java 25 and serves GET /hello at https://localhost:8443/hello.

The demo uses a PEM certificate chain and PEM private key. Its source is in sslteam-services/demos/quarkus-3-33-demo.

Generate the PEM artifact

From the demos directory:

cd sslteam-services/demos
umask 077
mkdir -p private-material/quarkus

sslteam cert generate \
  --name quarkus-local \
  --common-name localhost \
  --san "DNS=localhost" \
  --output-profile PEM_ONLY \
  --out-dir private-material/quarkus

Set the artifact directory to the directory printed by the CLI and protect the private key:

export DEMO_ARTIFACT_DIR='private-material/quarkus/leaf-localhost-<issuance-id>'
export DEMO_TLS_CERTIFICATE_PATH="$(pwd)/$DEMO_ARTIFACT_DIR/fullchain.pem"
export DEMO_TLS_KEY_PATH="$(pwd)/$DEMO_ARTIFACT_DIR/leaf-key.pem"
chmod 600 "$DEMO_TLS_KEY_PATH"

PEM_ONLY is the intended profile for this demo.

Inspect and trust the Root CA

Inspect the public Root certificate and compare its fingerprint with an independently approved value:

openssl x509 \
  -in "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  -noout -subject -issuer -dates -fingerprint -sha256

The sslteam CLI installs the Root into the native trust store and verifies the result:

export DEMO_ROOT_FINGERPRINT='<approved-sha256-fingerprint>'

sslteam ca trust install \
  --certificate "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  --confirm-fingerprint "$DEMO_ROOT_FINGERPRINT"

sslteam ca trust verify \
  --certificate "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  --confirm-fingerprint "$DEMO_ROOT_FINGERPRINT"

You can also use the normal certificate-store mechanism for the operating system running the client. Verify the fingerprint before importing the Root:

  • macOS: Import root-ca.pem into the current user's login Keychain with Keychain Access and set Trust > When using this certificate to Always Trust. The command-line equivalent is:
security add-trusted-cert \
  -d -r trustRoot \
  -k "$HOME/Library/Keychains/login.keychain-db" \
  "$DEMO_ARTIFACT_DIR/root-ca.pem"
  • Linux: Install the PEM certificate in the distribution's CA directory and rebuild the trust bundle:
# Debian or Ubuntu
sudo install -m 0644 "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  /usr/local/share/ca-certificates/sslteam-demo-root.crt
sudo update-ca-certificates

# Fedora, RHEL, or compatible distributions
sudo install -m 0644 "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  /etc/pki/ca-trust/source/anchors/sslteam-demo-root.crt
sudo update-ca-trust extract
  • Windows: Convert the PEM file to DER format, then import it into the current user's Trusted Root Certification Authorities store:
$rootPem = Join-Path $env:DEMO_ARTIFACT_DIR "root-ca.pem"
$rootDer = Join-Path $env:TEMP "sslteam-demo-root.cer"
openssl x509 -in $rootPem -outform DER -out $rootDer
Import-Certificate -FilePath $rootDer -CertStoreLocation Cert:\CurrentUser\Root

After installation, use the operating-system trust store:

curl https://localhost:8443/hello

For a single request without changing the operating-system trust store, use:

curl --cacert "$DEMO_ARTIFACT_DIR/root-ca.pem" \
  https://localhost:8443/hello

Run and verify

The active Quarkus settings are:

quarkus.http.insecure-requests=disabled
quarkus.http.ssl-port=8443
quarkus.http.ssl.certificate.files=${DEMO_TLS_CERTIFICATE_PATH}
quarkus.http.ssl.certificate.key-files=${DEMO_TLS_KEY_PATH}

From sslteam-services/demos/, in the same shell that contains the PEM paths:

cd quarkus-3-33-demo
mvn test -DskipITs
mvn clean quarkus:dev

In a second terminal, run from sslteam-services/demos/:

curl https://localhost:8443/hello

Expected response:

{"message":"hello over TLS","framework":"quarkus"}

Plain HTTP is disabled. Do not use curl -k; it would hide trust or hostname problems.

Troubleshooting

  • If the issuer is unknown, confirm the Root fingerprint and use the explicit --cacert path.
  • If hostname validation fails, connect using localhost or issue a replacement with the required DNS or IP SAN.
  • If Quarkus cannot load the identity, confirm both PEM environment variables point to existing files and that the private key is readable only by the intended user.
  • Stop Quarkus before starting the Spring demo because both examples use port 8443.