Registries¶
The registry service onboards registries and manages their certificates.
Start¶
cd src/onboarding/registry-service
make docker-up
The service listens on port 8080 and uses PostgreSQL. Change the database password in the Compose file before using it anywhere else.
Onboard¶
curl -X POST http://localhost:8080/api/v1/registries -H "Content-Type: application/json" -d '{
"registry_api_url": "https://my-registry.example.com",
"registry_public_ip": "203.0.113.10",
"metadata": {"region": "ap-south-1"}
}'
The answer is 202 with registry_id and status pending. Then
- a short-lived verification certificate is issued,
- it is posted to
<registry_api_url>/onboardwithregistry_id,verification_certandca_cert, - the certificate is issued, and the status becomes
active.
Status¶
pending, active, revoked or failed. GET /api/v1/registries/{id} returns status and certificate.
Revoke¶
curl -X POST http://localhost:8080/api/v1/registries/<id>/revoke -H "Content-Type: application/json" -d '{"reason": "Compromised key"}'
The registry is informed at <registry_api_url>/revoke.
Root certificate¶
If no root certificate exists, the service creates one. For production, provide your own with certs.root_ca_cert_path and certs.root_ca_key_path. Place the service behind a gateway that authenticates administrators.