🔐 Certificate Requirements¶
📋 Certificados Necesarios¶
╔═══════════════════════════════════════════════════════════════════════╗
║ Plataforma │ Tipo │ Por qué ║
╠════════════╪══════════════════════╪══════════════════════════════════╣
║ Windows │ EV Code Signing │ SmartScreen bypass, max trust ║
║ macOS │ Developer ID App │ Notarization, Gatekeeper pass ║
║ macOS │ Developer ID Install │ Installer packages ║
║ Linux │ GPG Key │ Repository signing ║
╚═══════════════════════════════════════════════════════════════════════╝
💰 Costos Anuales¶
- Windows EV: ~$300-500/año
- Apple Developer Program: $99/año
- GPG: Gratis
📅 Ciclo de Vida¶
⚠️ CRÍTICO¶
NUNCA en Git:
- *.p12, *.pfx (private keys)
- *.key files
- Passwords
- Passphrases
- Token secrets
SÍ en Git:
- *_public.cer (public certificates)
- Documentation
- Scripts (sin secrets)
- Renewal schedules
🔐 Windows EV Code Signing¶
Características¶
- Extended Validation certificate
- Hardware token required (USB)
- Immediate SmartScreen reputation
- Válido 1-3 años
Vendors Recomendados¶
- DigiCert: Industry standard, best support
- GlobalSign: Good alternative
- Sectigo: Budget option
Requisitos¶
- Validación de empresa (DUNS, artículos de incorporación)
- USB token (SafeNet, YubiKey)
- Instalación en build machine
Formato¶
.pfxfile protegido con password- Almacenado en hardware token
- Timestamp service para validez post-expiración
🍎 Apple Developer Certificates¶
Developer ID Application¶
- Firma apps distribuidas fuera del Mac App Store
- Requiere Apple Developer Program membership
- Permite notarization
Developer ID Installer¶
- Firma
.pkginstallers - Mismo account que App certificate
- Necesario para distribución tradicional
Provisioning Profiles¶
- Para testing en devices específicos
- Renew cada año automáticamente
- Gestión vía Xcode o portal web
Proceso de Obtención¶
- Join Apple Developer Program ($99/año)
- Generate CSR en Keychain Access
- Request certificates en developer portal
- Download e instalar en Keychain
- Configure en Xcode build settings
🐧 Linux GPG Signing¶
Propósito¶
- Firmar packages (
.deb,.rpm) - Firmar repository metadata
- Verificar integridad de releases
Generación¶
Distribución¶
- Public key en keyservers
- Incluir en package repositories
- Documentar fingerprint públicamente
🔄 Backup Strategy¶
Encrypted Backup¶
- Password-protected archive
- Stored en vault seguro (1Password, Azure Key Vault)
- Access list limitado
Recovery Plan¶
- Documentar quién tiene acceso
- Procedure para emergency access
- Test recovery process anualmente
📊 Certificate Inventory¶
Tracking Necesario¶
| Campo | Descripción |
|---|---|
| Type | EV Code Signing, Developer ID, etc. |
| Vendor | DigiCert, Apple, etc. |
| Purchase Date | Cuándo se compró |
| Expiration Date | Cuándo expira |
| Responsible | Quién gestiona |
| Storage Location | Dónde está almacenado |
| Renewal Status | Pending, Completed, etc. |
🛡️ Security Best Practices¶
Storage¶
- Hardware tokens cuando posible (Windows EV)
- Encrypted vaults para backups
- Access control estricto
- Audit log de uso
Usage¶
- Signing solo en build machines autorizadas
- No export de private keys
- Automated signing en CI/CD
- Timestamp all signatures
Monitoring¶
- Alert 90d antes de expiración
- Verify signatures regularmente
- Check revocation status
- Review access logs
🚨 Emergency Procedures¶
Certificate Compromised¶
- Revoke inmediatamente
- Notify vendor
- Generate new certificate
- Re-sign all releases
- Notify users si necesario
Certificate Expired¶
- Emergency purchase/renewal
- Fast-track validation si posible
- Communicate con users
- Re-sign affected builds
Lost Access¶
- Recovery de backup
- Re-issue si no recoverable
- Update all systems
- Document incident
📝 Compliance¶
Record Keeping¶
- Certificate purchase records
- Validation documents
- Renewal history
- Access logs
Auditing¶
- Annual review de certificates
- Verification de security practices
- Update procedures según necesario
- Training para team members