Skip to content

feat: simplify policy identification by using name as primary identif…#284

Open
Aliexe-code wants to merge 1 commit intospiffe:mainfrom
Aliexe-code:feature/250-remove-policy-id
Open

feat: simplify policy identification by using name as primary identif…#284
Aliexe-code wants to merge 1 commit intospiffe:mainfrom
Aliexe-code:feature/250-remove-policy-id

Conversation

@Aliexe-code
Copy link
Copy Markdown

@Aliexe-code Aliexe-code commented Feb 9, 2026

Summary
This PR removes the auto-generated UUID ID field from SPIKE policies and uses the user-provided name as the sole unique identifier, aligning with HashiCorp Vault's approach for better UX and simplicity.

Problem
SPIKE policies had two identifiers:

  • ID: Auto-generated UUID (e.g., 550e8400-e29b-41d4-a716-446655440000)
  • name: User-provided name (e.g., database-policy)

Testing

  • All existing tests pass

  • Build succeeds

  • No breaking changes to existing behavior (IDs are internal only)

  • This change is backward compatible for end users since they always used name in CLI commands. The ID field was only used internally and never exposed to users in the API responses of these endpoints.
    Follow-up Required ⚠️

SDK Dependency: The spike-sdk-go package contains request/response structs that still use ID fields. This PR includes a temporary workaround using the SDK's ID field but treating it as the policy name. A follow-up PR to the SDK is needed to:

@v0lkan
Copy link
Copy Markdown
Contributor

v0lkan commented Apr 10, 2026

Hey @Aliexe-code ; just saw this; will check it out and get back.

@v0lkan
Copy link
Copy Markdown
Contributor

v0lkan commented Apr 11, 2026

Quick update:

Overall, it makes sense.

But I have thoughts about

maybe removing policy ids altogether (name in itself uniquely identifies the policy anyway)

an autogenerated ID "can" be helpful; but I'm still not sure.

I'm adding this issue to my current radar to think about it further.

I'll update here.

@Aliexe-code
Copy link
Copy Markdown
Author

Hey @v0lkan - sounds good, Let me know if you want me to make any changes, or if you'd prefer to remove the ID field entirely. Happy to adjust based on your preference.

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