skills/spire/SKILL.md
Guide for installing, configuring, and deploying SPIRE servers and agents. Use when working with SPIRE, SPIFFE, workload identity, trust domains, node attestation, workload attestation, service identity, or X.509/JWT SVIDs on Kubernetes or Linux.
npx skillsauth add peterj/skills spireInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
wget https://github.com/spiffe/spire/releases/download/<TAG>/<TARBALL>
tar zvxf <TARBALL>
sudo cp -r spire-<VERSION>/. /opt/spire/
sudo ln -s /opt/spire/bin/spire-server /usr/bin/spire-server
sudo ln -s /opt/spire/bin/spire-agent /usr/bin/spire-agent
Configure the server at /opt/spire/conf/server/server.conf and agent at /opt/spire/conf/agent/agent.conf. Use --config flag to specify an alternate path.
Configuration files are loaded once at startup — restart after any changes.
conf/server/server.conf (default)conf/agent/agent.conf (default)--config <path>The trust domain is the trust root of a SPIFFE identity provider. Configured in both server and agent via trust_domain in their respective config stanzas. Must match between server and agent.
trust_domain = "prod.acme.com"
prod.acme.com), does not need actual DNS infrastructureDefault: 8081. Change via bind_port in server.conf:
bind_port = "9090"
If changed on the server, agents must also be updated.
Set via data_dir in both configs. Use absolute paths for production:
data_dir = "/opt/spire/data"
Ensure the running user has read permissions. Use data_dir as the base for other data paths (e.g., KeyManager disk directory, SQLite connection string).
Configured on both server and agent. At least one node attestor required on the server; exactly one on each agent.
| Method | Environment | Server Plugin | Agent Plugin |
|---|---|---|---|
| PSAT (Projected Service Account Token) | Kubernetes | k8s_psat | k8s_psat |
| Join Token | Any Linux | join_token | join_token |
| X.509 Certificate (x509pop) | Linux / Datacenter | x509pop | x509pop |
| SSH Certificate (sshpop) | Linux with SSH certs | sshpop | sshpop |
| GCP IIT | Google Compute Engine | gcp_iit | gcp_iit |
| AWS IID | Amazon EC2 | aws_iid | aws_iid |
| Azure MSI | Azure VMs | azure_msi | azure_msi |
Join Token example (server config):
NodeAttestor "join_token" {
plugin_data {
}
}
Generate token: spire-server token generate [-spiffeID <id>]
Start agent with token: spire-agent run -joinToken <token>
SAT-based node attestation is no longer supported as of SPIRE 1.12.0. Use PSAT instead.
For Azure MSI: the default resource is scoped to
https://management.azure.com. Consider using a custom resource ID for narrower scope. If custom resource ID is set on the agent, matching custom resource IDs must be specified per tenant on the server.
Configured on the agent only. Multiple workload attestors can be combined for a single workload.
| Attestor | Use case | Key selectors | |---|---|---| | Kubernetes | K8s pods | namespace, service account, labels | | Docker | Docker containers | image, environment variables | | Unix | Linux processes | unix group, process metadata |
Configured via DataStore "sql" plugin in server.conf.
SQLite (default, testing only):
DataStore "sql" {
plugin_data {
database_type = "sqlite3"
connection_string = "/opt/spire/data/server/datastore.sqlite3"
}
}
MySQL (production):
DataStore "sql" {
plugin_data {
database_type = "mysql"
connection_string = "username:password@tcp(localhost:3306)/dbname?parseTime=true"
}
}
Postgres (production):
DataStore "sql" {
plugin_data {
database_type = "postgres"
connection_string = "dbname=mydb user=myuser password=mypass host=localhost port=5432"
}
}
Both server and agent support:
Configured via UpstreamAuthority in server.conf. Options:
Generate on-disk root key and cert:
sudo openssl req \
-subj "/C=/ST=/L=/O=/CN=acme.com" \
-newkey rsa:2048 -nodes -keyout /opt/spire/conf/root.key \
-x509 -days 365 -out /opt/spire/conf/root.crt
The signing key is extremely sensitive — compromise allows impersonation of the SPIRE Server.
Export metrics to Prometheus, DogStatsD, StatsD, or M3. Configured in the telemetry block:
telemetry {
Prometheus {
port = 9988
}
DogStatsd = [
{ address = "localhost:8125" },
]
Statsd = [
{ address = "localhost:1337" },
]
M3 = [
{ address = "localhost:9000" env = "prod" },
]
InMem {
enabled = false
}
}
log_file: path to log file (default: STDOUT)log_level: one of DEBUG, INFO, WARN, ERRORFor Kubernetes-specific installation steps (namespaces, service accounts, configmaps, statefulsets, daemonsets), see references/kubernetes-deployment.md.
development
Diagnoses and resolves common Istio service mesh problems across traffic management, security, observability, and upgrades. Use when debugging Istio networking issues (503 errors, route rules not working, TLS mismatches, gateway 404s), security problems (authorization policies, mTLS, JWT authentication), observability gaps (missing traces, Grafana output issues), EnvoyFilter breakage, or when upgrading Istio and migrating from EnvoyFilter to first-class APIs.
tools
Configures Istio traffic management including multicluster traffic control, gateway network topology (XFF/XFCC headers, PROXY protocol), protocol selection, and TLS configuration. Use when working with Istio service mesh traffic routing, multicluster setups, gateway configuration, protocol detection, mTLS settings, or when troubleshooting TLS/proxy header issues.
development
Guide for installing, deploying, debugging, and cleaning up Istio's ambient mode mesh. Use when working with Istio ambient mode, ztunnel proxies, ambient mesh traffic redirection, istio-cni, HBONE encryption, Bookinfo sample application deployment, or istioctl commands for ambient profile setup and teardown.
development
Configures PagerDuty v1 and v2 notification services for Argo CD. Use when setting up PagerDuty incident creation or event triggering from Argo CD notifications, including secrets, ConfigMaps, templates, and annotations for PagerDuty integrations.