Artica Wiki

Debian Agent for Artica Meta - Administrator Installation Guide

This guide covers installing the debian-agent on a server and obtaining enrollment tokens for client registration.

This guide covers installing the debian-agent on a server and obtaining enrollment tokens for client registration.

Prerequisites

Install from .deb Package 

The package automatically:

Post-Installation

● debian-agent.service - Debian Agent - Secure System Administration API
        Loaded: loaded (/etc/systemd/system/debian-agent.service; enabled)
        Active: active (running)

Getting Enrollment Tokens

Enrollment tokens are required for clients to register and obtain mTLS certificates.

Client Enrollment Process

Once you have a token, provide these details to the client administrator:

Parameter Value
Server URL https://<server-ip>:28811
Enrollment Endpoint POST /register
Token ABC-123-XYZ

Client Enrollment Example

The client generates a key pair and sends the public key:

On client: Generate ECDSA key pair: 
openssl ecparam -name secp384r1 -genkey -noout -out client.key openssl ec -in client.key -pubout -out client.pub  
Register with the server 
curl -k https://192.168.1.100:28811/register -H "Content-Type: application/json" -d '{"token": "ABC-123-XYZ",   "cn": "client-hostname","public_key_pem":"'"$(cat client.pub)"'"}'

Response contains the signed client certificate and CA certificate for mTLS.

Configuration

Configuration file: /etc/debian-agent/config.json

Key Settings

Setting Default Description
listen_addr 0.0.0.0 Bind address
listen_port 28811 HTTPS port
listen_interface `` Bind to specific interface (e.g., eth0)
tls.require_mtls_on_api true Require client certs for API
enrollment.token_ttl_seconds 3600 Token expiration (seconds)
scheduler.interval_hours 6 Background refresh interval

Example: Bind to Specific Interface

{
  "listen_interface": "eth1",
  "listen_port": 28811
}

Example: Disable IP Whitelist

{
  "security": {
      "enable_ip_whitelist": false
  }
}

Firewall Configuration

Allow incoming connections on the agent port:

ufw allow 28811/tcp  
iptables iptables -A INPUT -p tcp --dport 28811 -j ACCEPT

Logs and Troubleshooting

View Logs

journal journalctl -u debian-agent -f
tail -f /var/log/debian-agent/agent.log

Common Issues

Issue Solution
Service won't start Check logs: journalctl -u debian-agent -e
Token rejected Verify token format (XXX-000-XXX) and expiration
Connection refused Check firewall and listen_addr setting
Certificate errors Regenerate PKI: rm -rf /var/lib/debian-agent/pki /var/lib/debian-agent/tls && systemctl restart debian-agent

Test API Access

From the server (uses Unix socket, no auth needed)

curl --unix-socket /run/debian-agent/admin.sock http://localhost/healthz

Remote with mTLS

curl --cert client.crt --key client.key --cacert ca.crt https://server:28811/api/v3/status

File Locations

Path Purpose
/etc/debian-agent/config.json Configuration
/var/lib/debian-agent/pki/ CA certificate and key
/var/lib/debian-agent/tls/ Server certificate
/var/lib/debian-agent/agent.db Database (tokens, certs)
/var/log/debian-agent/agent.log Log file
/run/debian-agent/admin.sock Local admin socket