NVIDIA / NVIDIA/nvcf

Preserve empty scopes when generating OpenBao JWT roles

Open
#247 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.