GenAI & Agents · Agent-assisted
Vault Access via Directory Groups, Requested by an Agent, Approved by a Human
Vault identity, groups and policies are Terraform-managed, and an agent turns an access ticket into a validated branch and pull request that edits group membership.
// Overview
In the Vault stack, policy files per environment are loaded, users are created with an OIDC accessor and identity groups attach policies. A platform workflow plans on pull requests and applies on merge. The agent (a Python CLI plus Copilot instructions) maps a role and environment to groups, validates the request, edits the membership config and opens a PR.
// The problem
Vault access requests were slow, error-prone manual edits.
// Flow
- Ticketrequest names role, environment and user
- Validate gateemail domain, role from a fixed list, environment upper, lower or both
- Existence checkuser looked up before the edit
- Branchcreated from latest main with a ticket-based name
- Edituser added to role groups for the chosen environments
- Pull requestcommit and PR opened; the agent applies nothing
- Review and planPR triggers plan-only workflow for both environments
- Merge and applyno-op plans skip apply
- Revokethe same path removes membership
// Design decisions & guardrails
- The agent never applies; a human reviews the plan.
- Role-to-group mapping is a fixed list, so the agent cannot invent roles.
- Policies live as files in version control; PR-plan and merge-apply are split.
- Chat and scan toggles are controlled per workflow.
// Outcome
Access changes become reviewed, revocable pull requests; 6 roles across 2 environments.