The Blind Oracle is a secure, remote signing service that holds GPG private keys and signs RPM packages and repository metadata on behalf of build servers. Build servers never have access to private keys, significantly reducing the attack surface.
┌─────────────────────────────────────────────────────────────┐
│ Build Server (GitLab Runner) │
│ │
│ ┌──────────────┐ ┌─────────────────────────────────┐ │
│ │ gitlab-build │─────▶│ sign-package.sh │ │
│ │ -4.sh │ │ (Client Mode) │ │
│ └──────────────┘ └─────────────────────────────────┘ │
│ │ │
│ │ HTTPS POST │
│ │ {hash, dist, key_type} │
└─────────────────────────────────┼────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Blind Oracle Server │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ HTTP API (Flask/FastAPI) │ │
│ │ - POST /sign/rpm │ │
│ │ - POST /sign/repodata │ │
│ │ - GET /health │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Signing Engine │ │
│ │ - Key selection (Legacy/Modern) │ │
│ │ - GPG signing operations │ │
│ │ - Audit logging │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ GPG Keyring (Offline Storage) │ │
│ │ - Legacy Key (4520AFA9) │ │
│ │ - Modern Key (CB2C73F04F3BE076) │ │
│ │ - Passphrases in secure vault │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
- Build Server Compromise: Private keys never leave the Oracle
- Network Interception: HTTPS + API token authentication
- Unauthorized Signing: Token-based access control + audit logs
- Key Compromise: Master key offline, only signing subkeys on Oracle
- API tokens per build server
- Token rotation capability
- Rate limiting per token
- All signing requests logged with:
- Timestamp
- Requesting server (token ID)
- Package hash
- Key used
- Success/failure
Sign an RPM package.
Request:
{
"package_hash": "sha256:abc123...",
"distribution": "el10-x86_64",
"key_type": "modern",
"token": "secret-api-token"
}Response:
{
"signature": "-----BEGIN PGP SIGNATURE-----...",
"key_id": "CB2C73F04F3BE076",
"timestamp": "2026-01-06T11:25:00Z"
}Sign repository metadata (repomd.xml).
Request:
{
"repodata_hash": "sha256:def456...",
"key_type": "modern",
"token": "secret-api-token"
}Response:
{
"signature": "-----BEGIN PGP SIGNATURE-----...",
"key_id": "CB2C73F04F3BE076",
"timestamp": "2026-01-06T11:25:00Z"
}- ✅
sign-package.shuses local GPG keys - ✅ Dual key selection logic
- ✅ Deployed to GitLab runners
- Create Flask/FastAPI service
- Implement signing endpoints
- Add authentication/authorization
- Deploy to secure server
- Audit logging
- Update
sign-package.shto detect Oracle mode - Implement HTTP client for signing requests
- Fallback to local signing if Oracle unavailable
- Token management
- HTTPS with mutual TLS
- Hardware Security Module (HSM) integration
- High availability / redundancy
- Monitoring and alerting
- Key rotation automation
- Oracle runs on
winona7(local development) - Build servers use API token for testing
- Oracle runs on dedicated, hardened server
- Firewall rules: Only GitLab runners can access
- Private keys stored in encrypted volume
- Regular backups of audit logs
blind-oracle/
├── ARCHITECTURE.md # This file
├── SIGNING_STRATEGY.md # GPG key strategy (existing)
├── server/
│ ├── oracle-service.py # Main Flask/FastAPI app
│ ├── signing_engine.py # GPG signing logic
│ ├── auth.py # Token authentication
│ ├── audit.py # Audit logging
│ └── requirements.txt # Python dependencies
├── client/
│ ├── sign-package.sh # Updated with Oracle support
│ └── oracle-client.py # Python client library
├── deployment/
│ ├── systemd/
│ │ └── oracle.service # Systemd unit file
│ ├── nginx/
│ │ └── oracle.conf # Nginx reverse proxy config
│ └── docker/
│ └── Dockerfile # Container image
└── tests/
├── test_signing.py # Unit tests
└── test_integration.py # Integration tests
- Implement basic Flask service with
/sign/rpmendpoint - Create Python signing engine using
gpglibrary - Update
sign-package.shto support Oracle mode - Test end-to-end signing workflow
- Add authentication and audit logging