Skip to content

feat: add secure credential management with Vault#23

Open
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:feat/secure-credential-management
Open

feat: add secure credential management with Vault#23
stevefulme1 wants to merge 1 commit intoredhat-cop:mainfrom
stevefulme1:feat/secure-credential-management

Conversation

@stevefulme1
Copy link
Copy Markdown

Summary

  • Adds inventory.vault.yml.example template with all sensitive variables ready for Ansible Vault encryption
  • Adds docs/secure_credential_management.md documenting the full credential management architecture (Ansible Vault, AAP credential types, Kubernetes Secrets, environment variable injection)
  • Updates .gitignore to exclude *.vault.yml, vault-password*, and .vault-password* files
  • Documents all credential types managed by the collection, access control recommendations, and migration steps from plaintext to encrypted storage

Related

  • Resolves: MFG-380

Test plan

  • Verify inventory.vault.yml.example can be copied, edited, and encrypted with ansible-vault encrypt
  • Verify encrypted vault file works with playbook execution via --ask-vault-pass
  • Confirm .gitignore patterns prevent committing vault password and encrypted files
  • Review documentation for accuracy against current credential types in aap_seed role

🤖 Generated with Claude Code

Adds Ansible Vault example file for encrypting sensitive inventory
variables, comprehensive credential management documentation covering
the AAP credential types architecture, and .gitignore patterns to
prevent accidental commit of vault password and encrypted files.

Resolves: MFG-380

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.

Looking good. A few suggestions

# To edit an encrypted file:
# ansible-vault edit inventory.vault.yml
#
# To use with a playbook:
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.

Any interest in showing an example with ansible-navigator?


## Architecture Overview

The Migration Factory uses a layered approach to credential management:
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
The Migration Factory uses a layered approach to credential management:
The Ansible for OpenShift Virtualization Migration uses a layered approach to credential management:

@@ -0,0 +1,236 @@
# Secure Credential Management

This document describes how the 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.

Suggested change
This document describes how the OpenShift Virtualization Migration
This document describes how the Ansible for OpenShift Virtualization Migration

# Secure Credential Management

This document describes how the OpenShift Virtualization Migration
Factory manages sensitive credentials and the recommended practices for
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
Factory manages sensitive credentials and the recommended practices for
manages sensitive credentials and the recommended practices for


## Credential Inventory

The following credentials are managed by the Migration Factory:
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
The following credentials are managed by the Migration Factory:
The following credentials are managed by the Ansible for OpenShift Virtualization Migration:


The following credentials are managed by the Migration Factory:

| Credential | Storage Method | Used By |
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.

Any concern that the content here becomes stale?

credentials are never stored in plaintext in Git.
2. **AAP Credential Types** — Stores and injects credentials at runtime
via Ansible Automation Platform's built-in credential management.
3. **Kubernetes Secrets** — Stores cluster-scoped credentials (API
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.

Not necessarily cluster scoped credentials. Can probably remove that distinction


### openshift_virtualization_migration_cac

Config-as-Code credential that stores Migration Factory configuration
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
Config-as-Code credential that stores Migration Factory configuration
Config-as-Code credential that stores Ansible for OpenShift Virtualization Migration configuration

- `VMWARE_HOST`, `VMWARE_USER`, `VMWARE_PASSWORD` (env)
- Target name, host, insecure SSL flag, VDDK image details (extra vars)

### Ovirt Migration Target
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
### Ovirt Migration Target
### oVirt Migration Target

rh_username: "{{ vault_rh_username }}"
rh_password: "{{ vault_rh_password }}"
```

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.

Add the values to the vaulted inventory.vault.yml file

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