Skip to content

Gpg workflow#18

Merged
mbolla22 merged 9 commits into
mainfrom
gpgWorkflow
Jan 6, 2026
Merged

Gpg workflow#18
mbolla22 merged 9 commits into
mainfrom
gpgWorkflow

Conversation

@mbolla22

@mbolla22 mbolla22 commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

🔐 GPG Key Generation Workflow

This workflow automates the generation and distribution of GPG keys for signing New Relic Infrastructure packages.

✨ Features

🔑 Automated GPG Key Generation

Creates RSA 4096-bit keys with SHA256 hashing for package signing

📦 Dual Secret Storage

Private Keys stored in GitHub Organization Secrets:

  • OHAI_GPG_PRIVATE_SHA256 - 🔄 Current (overwritten on each run)
  • OHAI_GPG_PRIVATE_SHA256_<timestamp> - 📚 Historical backup

📄 Dual Public Key Storage

Repository Structure:

  • gpg/keys/current/newrelic_rpm_key_current.gpg - 🔄 Current (overwritten)
  • gpg/keys/new/newrelic_rpm_key_<timestamp>.gpg - 📚 Historical backup

🛡️ Security Features

  • ✅ Organization-level secrets with selected repository visibility
  • ✅ Secure cleanup: shred (10-pass overwrite) + rm
  • ✅ Environment-based access control (GpgKeysOHAI)
  • ✅ Ephemeral runner ensures no key persistence

📝 Audit Trail

Optional reason input for documentation and compliance tracking

🚀 Triggers

  • 🖱️ Manual: GitHub Actions UI → "Run workflow" button

📋 Key Format

Public keys exported in ASCII-armored format for easy viewing and distribution

🎯 Use Cases

Scenario Solution
🔐 Key Rotation Run workflow to generate new key pair
📦 Package Signing Use OHAI_GPG_PRIVATE_SHA256 secret
🔙 Rollback Access timestamped backup keys
✅ Verification Use public keys from gpg/keys/current/

@mbolla22 mbolla22 requested a review from a team December 30, 2025 09:13
abhishuraina
abhishuraina previously approved these changes Jan 6, 2026

@abhishuraina abhishuraina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just one comment

Comment thread .github/workflows/gpgKeys_generation.yml Outdated

@abhishuraina abhishuraina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mbolla22 mbolla22 marked this pull request as ready for review January 6, 2026 10:18
@mbolla22 mbolla22 merged commit f28e3c1 into main Jan 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants