Skip to content

Hackweek 2025 Policy Wizard #31375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented Jul 25, 2025

Description

Policy wizard to help build a policy depending on the current context of the UI.

The functionality of this POC is limited to just secrets but could be extended to support other routes.

For example, when a user navigates to view a KV v2 secret, the fly out pre-fills the relevant paths for that view.
Screenshot 2025-07-25 at 9 50 54 AM

When capabilities are selected, it builds the policy stanza for that path:
Screenshot 2025-07-25 at 9 52 27 AM
Screenshot 2025-07-25 at 9 52 36 AM

The policy can also be assigned to various identity entities or groups:
Screenshot 2025-07-25 at 9 54 04 AM

Once selections are made, the UI can manually apply the policy or a CLI and TFVP (Terraform Vault Provider) snippet are generated that can be used depending on the users workflow.
Screenshot 2025-07-25 at 10 08 41 AM

Screenshot 2025-07-25 at 10 08 54 AM Screenshot 2025-07-25 at 10 09 05 AM

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jul 25, 2025
Copy link

vercel bot commented Jul 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vault-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2025 7:34pm

Copy link

github-actions bot commented Jul 25, 2025

CI Results:
All Go tests succeeded! ✅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💣 just deleted everything that was breaking SuperSelect in the flyout 🙃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maps route to API paths

};

// Regex-based route matching - more flexible for parent/child relationships
const ROUTE_PATTERNS: Array<{ pattern: RegExp; paths: ReturnType<typeof apiPath>[] }> = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this is one way to do this, I think it would be better and less effort to plug this into the existing capabilities service instead. That already handles permissions requests for various views. We could cache the requested paths and use those to map a route to a view instead of manually mapping route to api paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant