Preserve empty scopes when generating OpenBao JWT roles
Open
@gsharma-nv is already working on this.
Since Jul 17, 2026.
needs-triage
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Is this related to a problem? Please describe.
When an OpenBao JWT role is configured with an empty SCOPES value, the migration currently generates [""] instead of an empty array. The current string-based JSON construction can also mishandle quotes and backslashes.
Describe the solution you'd like
Pass the raw scopes value to jq, split non-empty comma-separated values there, and convert an empty value to:
[]
Describe alternatives you've considered
Special-casing empty values and escaping each scope in Bash. Keeping all JSON processing in jq is simpler and safer.
Additional context
Add validation for empty scopes and values containing characters that require JSON escaping. Existing non-empty scope lists must remain unchanged.
By submitting this issue, you agree to follow our code of conduct and our contributing guidelines.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.