Thumbprint Mode
Thumbprint Mode
Section titled “Thumbprint Mode”Thumbprint mode enables mTLS authentication using self-signed certificates verified by their SHA-256 fingerprint.
Overview
Section titled “Overview”How Thumbprint Mode Works
Section titled “How Thumbprint Mode Works”Authentication Flow
Section titled “Authentication Flow”When to Use Thumbprint Mode
Section titled “When to Use Thumbprint Mode”Ideal Use Cases
Section titled “Ideal Use Cases”| Scenario | Why Thumbprint Mode |
|---|---|
| Quick setup | No CA infrastructure needed |
| Small deployments | Manual management is feasible |
| Development | Simple to configure |
| Isolated networks | No external CA dependencies |
| POC/testing | Minimal setup time |
Comparison with CA-Signed
Section titled “Comparison with CA-Signed”| Aspect | Thumbprint | CA-Signed |
|---|---|---|
| Setup complexity | Low | Medium |
| CA required | No | Yes |
| Scalability | Manual per-agent | Automated |
| Certificate management | Per-agent | Centralized |
| Best for | Small deployments | Enterprise |
Configuration
Section titled “Configuration”Thorax Configuration
Section titled “Thorax Configuration”[tls]auth_mode = "thumbprint"
# Server certificatecert_path = "/etc/mantis/certs/thorax.crt"key_path = "/etc/mantis/certs/thorax.key"
# No CA cert needed for thumbprint mode# But can still be provided for server cert chainEnvironment Variables
Section titled “Environment Variables”# Enable thumbprint modeexport MANTIS_TLS_AUTH_MODE=thumbprintexport MANTIS_TLS_CERT_PATH=/etc/mantis/certs/thorax.crtexport MANTIS_TLS_KEY_PATH=/etc/mantis/certs/thorax.keyTarsus Configuration
Section titled “Tarsus Configuration”[tls]cert_path = "/etc/tarsus/cert.pem"key_path = "/etc/tarsus/key.pem"
# Thorax's server certificate thumbprint (SHA-256, 64 hex chars).# Required in thumbprint mode: Tarsus verifies the Thorax server cert by# its fingerprint rather than a CA chain (Thorax presents a self-signed cert).trust_server_thumbprint = "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
# CA certificate used to verify the Thorax server and, in listen mode, to# enforce mTLS on inbound connections. Required in all modes — without it# Tarsus refuses to start.ca_cert_path = "/etc/tarsus/ca.crt"Certificate Generation
Section titled “Certificate Generation”Generate Self-Signed Certificate
Section titled “Generate Self-Signed Certificate”Tarsus automatically generates a self-signed certificate on first run if one is not configured. You can also generate certificates manually using OpenSSL.
Manual Generation
Section titled “Manual Generation”# Generate private keyopenssl genrsa -out /etc/tarsus/key.pem 2048
# Generate self-signed certificateopenssl req -new -x509 -key /etc/tarsus/key.pem \ -out /etc/tarsus/cert.pem \ -days 365 \ -subj "/CN=$(hostname)/O=Mantis Agent"Certificate Parameters
Section titled “Certificate Parameters”| Parameter | Recommended Value |
|---|---|
| Key size | 2048 bits (RSA) or P-256 (ECDSA) |
| Validity | 365 days |
| CN | Hostname or agent name |
| Signature | SHA-256 |
Thumbprint Management
Section titled “Thumbprint Management”Extract Thumbprint
Section titled “Extract Thumbprint”# Get thumbprint from certificatetarsus show-thumbprint
# Output:# abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
# Using OpenSSLopenssl x509 -in /etc/tarsus/cert.pem -fingerprint -sha256 -noout | \ sed 's/SHA256 Fingerprint=//' | tr -d ':' | tr '[:upper:]' '[:lower:]'Thumbprint Format
Section titled “Thumbprint Format”| Format | Example |
|---|---|
| Mantis | abcdef1234567890abcdef1234567890... (64 chars) |
| OpenSSL | AB:CD:EF:12:34:56:78:90:... (colon-separated) |
Convert between formats:
# OpenSSL to Mantis formatecho "AB:CD:EF:12:..." | tr -d ':' | tr '[:upper:]' '[:lower:]'
# Mantis to OpenSSL format (for display)echo "abcdef12..." | sed 's/../&:/g' | sed 's/:$//' | tr '[:lower:]' '[:upper:]'Registration Workflows
Section titled “Registration Workflows”Pre-Registration (Recommended)
Section titled “Pre-Registration (Recommended)”Register thumbprint before agent connects:
# 1. On agent: get thumbprinttarsus show-thumbprint# abcdef1234567890...
# 2. Share thumbprint securely with admin# (phone, encrypted email, secure chat)
# 3. Admin pre-registers thumbprintmantisctl cert pre-register \ --name "web-prod-01" \ --thumbprint "abcdef1234567890..."
# 4. Agent connects and is auto-approvedtarsus runPost-Connection Approval
Section titled “Post-Connection Approval”Approve after agent connects:
# 1. Agent connects (no pre-registration)tarsus run# Status: Pending (awaiting approval)
# 2. Admin sees pending registrationmantisctl cert list --status pending# CLIENT THUMBPRINT HOSTNAME# unknown-01 xyz789... server.local
# 3. Admin verifies and approves (by registration ID or thumbprint prefix)mantisctl cert approve "<REGISTRATION_UUID>" \ --notes "Verified web-prod-01 out of band"
# 4. Agent is now authenticatedVia Lens UI
Section titled “Via Lens UI”ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Pending Registrations ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤â ââ ââââââââââââââââââ¬ââââââââââââââââ¬ââââââââââââââââââââââ ââ â Client â Thumbprint â Actions â ââ ââââââââââââââââââ¼ââââââââââââââââ¼âââââââââââââââââââââ⤠ââ â unknown-01 â xyz789... â [Approve] [Reject] â ââ â unknown-02 â abc123... â [Approve] [Reject] â ââ ââââââââââââââââââ´ââââââââââââââââ´ââââââââââââââââââââââ ââ ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââSecurity Considerations
Section titled “Security Considerations”Thumbprint Verification
Section titled “Thumbprint Verification”Always verify thumbprints through a secure channel:
| Channel | Security Level | Use Case |
|---|---|---|
| In-person | Highest | High-security |
| Phone call | High | Verbal confirmation |
| Encrypted email | Medium | Audit trail |
| Secure chat | Medium | Quick verification |
Private Key Security
Section titled “Private Key Security”# Secure key file permissionschmod 600 /etc/tarsus/key.pemchown root:root /etc/tarsus/key.pem
# Verifyls -la /etc/tarsus/key.pem# -rw------- 1 root root 1679 Jan 15 10:00 /etc/tarsus/key.pemCertificate Renewal
Section titled “Certificate Renewal”Self-signed certificates should be renewed before expiry:
# Check expirationopenssl x509 -in /etc/tarsus/cert.pem -enddate -noout# notAfter=Jan 15 10:00:00 2026 GMT
# Generate new certificate using OpenSSLopenssl req -new -x509 -nodes \ -keyout /etc/tarsus/key.pem \ -out /etc/tarsus/cert.pem \ -days 365 \ -subj "/CN=$(hostname)/O=Mantis Agent"
# Get new thumbprinttarsus show-thumbprint
# Re-register with the new thumbprint (revoke old, pre-register new â there is no# in-place "update thumbprint" verb)mantisctl cert revoke "$OLD_REGISTRATION_ID" --reason "thumbprint rotation"mantisctl cert pre-register --name "web-prod-01" --thumbprint "$(tarsus show-thumbprint)"Bulk Operations
Section titled “Bulk Operations”Multiple Agents
Section titled “Multiple Agents”For deploying multiple agents:
#!/bin/bashSERVERS="web-01 web-02 api-01 api-02"
for server in $SERVERS; do # Get thumbprint from server (assumes SSH access) thumbprint=$(ssh $server "tarsus show-thumbprint")
# Pre-register in Mantis mantisctl cert pre-register \ --name "$server" \ --thumbprint "$thumbprint"
echo "Registered: $server"doneFrom Configuration Management
Section titled “From Configuration Management”Ansible example:
- name: Get Tarsus thumbprint command: tarsus show-thumbprint register: thumbprint
- name: Register with Mantis uri: url: '{{ mantis_api_url }}/api/v1/registrations/pre-register' method: POST headers: Authorization: 'Bearer {{ mantis_token }}' body_format: json body: client_name: '{{ inventory_hostname }}' thumbprint: '{{ thumbprint.stdout }}' tenant_id: '{{ tenant_id }}'Troubleshooting
Section titled “Troubleshooting”Agent Not Connecting
Section titled “Agent Not Connecting”Problem: Agent shows “Connecting…” but never authenticates
Diagnosis:
# Check agent logsjournalctl -u tarsus -f
# Verify certificateopenssl x509 -in /etc/tarsus/cert.pem -text -noout
# Test connectionopenssl s_client -connect thorax.example.com:50051 \ -cert /etc/tarsus/cert.pem \ -key /etc/tarsus/key.pemThumbprint Mismatch
Section titled “Thumbprint Mismatch”Problem: Agent rejected with “thumbprint mismatch”
Diagnosis:
# Get actual thumbprint from agenttarsus show-thumbprint
# Compare with the registered thumbprint (by registration ID or thumbprint prefix)mantisctl cert show "agent-registration-id"
# If different, certificate was regeneratedSolution:
# Re-register with the current thumbprint (revoke old, pre-register new)mantisctl cert revoke "$OLD_REGISTRATION_ID" --reason "thumbprint rotation"mantisctl cert pre-register --name "agent-name" \ --thumbprint "$(ssh agent-server 'tarsus show-thumbprint')"Certificate Expired
Section titled “Certificate Expired”Problem: Agent rejected with “certificate expired”
Solution:
# On agent: regenerate certificate using OpenSSLopenssl req -new -x509 -nodes \ -keyout /etc/tarsus/key.pem \ -out /etc/tarsus/cert.pem \ -days 365 \ -subj "/CN=$(hostname)/O=Mantis Agent"
# Get new thumbprinttarsus show-thumbprint
# Re-register with the new thumbprint (revoke old, pre-register new)mantisctl cert revoke "$OLD_REGISTRATION_ID" --reason "certificate renewal"mantisctl cert pre-register --name "agent-name" \ --thumbprint "new-thumbprint-here"
# Restart agentsystemctl restart tarsusCommon Errors
Section titled “Common Errors”| Error | Cause | Solution |
|---|---|---|
no certificate presented | TLS config wrong | Check cert_path path |
thumbprint not found | Not registered | Pre-register or approve |
registration pending | Awaiting approval | Approve in Mantis |
registration revoked | Agent was revoked | Re-register |
certificate expired | Cert past validity | Regenerate certificate |
Migration to CA-Signed
Section titled “Migration to CA-Signed”When ready to migrate from thumbprint to CA-signed mode:
- Deploy CA infrastructure (see CA-Signed Mode)
- Issue CA-signed certificates to agents
- Update Thorax configuration to
auth_mode = "ca_signed" - Agents re-register with new certificates
- Thumbprints still verified (defense-in-depth)
Best Practices
Section titled “Best Practices”1. Pre-Register When Possible
Section titled “1. Pre-Register When Possible”Pre-registration is more secure than post-connection approval:
- Reduces window of vulnerability
- Ensures only expected agents connect
- Creates audit trail before deployment
2. Use Meaningful Names
Section titled “2. Use Meaningful Names”# Good: descriptive namesmantisctl cert pre-register --name "web-prod-01" --thumbprint "..."mantisctl cert pre-register --name "api-staging-02" --thumbprint "..."
# Bad: generic namesmantisctl cert pre-register --name "server1" --thumbprint "..."mantisctl cert pre-register --name "agent" --thumbprint "..."3. Document Registrations
Section titled “3. Document Registrations”Maintain records of:
- Who requested the registration
- Purpose of the agent
- Expected thumbprint value
- Verification method used
4. Regular Audits
Section titled “4. Regular Audits”# List all registrationsmantisctl cert list
# Review pending approvalsmantisctl cert list --status pendingNext Steps
Section titled “Next Steps”- CA-Signed Mode - PKI-based authentication
- mTLS Authentication - mTLS overview
- Key Rotation - Certificate renewal
