Skip to content

docs: add secure credential practices guide#24

Open
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:docs/secure-credential-practices
Open

docs: add secure credential practices guide#24
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:docs/secure-credential-practices

Conversation

@stevefulme1
Copy link
Copy Markdown

Summary

  • Adds docs/secure_credential_practices.md — developer-facing guide for secure credential handling
  • Covers the five golden rules for credential management in this collection
  • Documents tooling enforcement: Gitleaks pre-commit hook setup, CI workflow, and .gitignore protections
  • Includes step-by-step instructions for adding new secrets, using Ansible Vault, and referencing secrets in playbooks
  • Provides a code review checklist for credential-related PRs
  • Defines a new team member onboarding process (Day 1 setup + key concepts)
  • Includes incident response procedures for accidental credential commits
  • References the Red Hat IT InfoSec secret management policy as the authoritative organizational standard

Related

  • Resolves: MFG-381
  • Companion to: MFG-380 (secure credential storage), MFG-376 (Gitleaks configuration)

Test plan

  • Review documentation for accuracy and completeness
  • Verify pre-commit setup instructions work on a fresh clone
  • Confirm code review checklist covers all credential patterns in the collection
  • Validate onboarding steps can be followed by a new contributor

🤖 Generated with Claude Code

Developer-facing guide covering golden rules for credential handling,
tooling enforcement (Gitleaks pre-commit and CI), code review checklist,
new team member onboarding process, and incident response procedures.
References Red Hat IT InfoSec secret management policy as the
authoritative source.

Resolves: MFG-381

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

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

This is a good guide as a whole. Check the comments as there are some pieces where it is clear AI was used including repeating some of the same points. Also, check if there are any publicly available documents that align to the principles that are being referenced

# Secure Credential Practices for Developers

This guide defines the secure credential management practices that all
contributors to the OpenShift Virtualization Migration Factory must
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
contributors to the OpenShift Virtualization Migration Factory must
contributors to the Ansible for OpenShift Virtualization Migration project must

secret management. Refer to the authoritative source for organization-
wide requirements:

> <https://source.redhat.com/departments/strategy_and_operations/it/it_information_security/wiki/secret_management_at_red_hat>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a public reference that can be used that illustrates these same primitives?

or empty strings as values for any credential field.
3. **Encrypt sensitive variable files with Ansible Vault.** Any file
containing real credential values must be encrypted before it
touches disk. See `inventory.vault.yml.example` for the template.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where is this template file?


```bash
pip install pre-commit
cd openshift_virtualization_migration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably dont need this line

`changeme` placeholder or an empty string.
2. Add the variable to `inventory.vault.yml.example` with an empty
value and a descriptive comment.
3. If the secret is used at runtime by AAP, define it in the
Copy link
Copy Markdown
Contributor

@sabre1041 sabre1041 Apr 12, 2026

Choose a reason for hiding this comment

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

For other reviewers, see #23


2. **Read this guide** and `docs/secure_credential_management.md`.

3. **Review the Red Hat secret management policy:**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See prior comment

4. **Set up local vault file** (if running playbooks locally):

```bash
cp inventory.vault.yml.example inventory.vault.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

File once again does not exist

- How to add a false positive allowlist entry to `.gitleaks.toml` if
needed.

## Incident Response
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With a public repository, there would need to be some additional considerations including communicating with the community on any steps they need to perform

@sabre1041
Copy link
Copy Markdown
Contributor

Portions of this PR depends on #23

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