You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 570e0c4
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
- accept ordered named credential definitions in `vaults credentials
create`
- preserve ordered definitions in display-safe output
- steer callers to follow the website's natural top-to-bottom order
- test against the generated Go SDK preview from kernel/kernel#4163
## Rollout
- depends on kernel/kernel#4163
- the preview SDK pin must be replaced with the published SDK version
during the coordinated release
## Testing
- `go test ./...`
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Breaking change for `credentials create` JSON (map → ordered array)
tied to a preview SDK/API rollout; touches credential spec handling and
public value redaction, though update/fill paths are largely unchanged.
>
> **Overview**
> **Credential create specs now use an ordered `fields` array**
(`[{"name":"username",...}]`) instead of a name-keyed object, matching
the updated Go SDK preview. Array order is preserved in display-safe
JSON output and drives the hosted collection form layout.
>
> Help text and **README** vault examples now tell callers to list
fields in the site’s natural top-to-bottom order.
`preservePublicCredentialValues` and `vaultItemFields` were updated for
the array shape; tests and fixtures follow suit, including a check that
definition order survives filtering. **Credential update** specs remain
map-based for partial value changes.
>
> `go.mod` pins **`kernel-go-sdk`** to a generated preview
(`kernel/kernel#4163`) until a coordinated release replaces it with a
published version.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
dda95bf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: cmd/vaults_commands.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Use wallet and card item types for credit cards and payment checkout instead.
59
59
60
60
User credential flow:
61
61
1. Create a vault per end user and create a browser with --vault <id-or-name>.
62
-
2. Navigate to a sensitive form and define its fields with credentials create --spec-file.
62
+
2. Navigate to a sensitive form and define its fields in natural top-to-bottom order with credentials create --spec-file; that array order controls the user-facing collection form.
63
63
3. Present the returned collection URL to the user. Poll items get --wait 60 for ready.
64
64
4. Use items invoke <vault> <key> fill --spec-file with browser_id and field selectors.
65
65
Use credentials update --version for edits, or items invoke collect to reopen the form.
Copy file name to clipboardExpand all lines: cmd/vaults_credentials_test.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ import (
15
15
"github.com/stretchr/testify/require"
16
16
)
17
17
18
-
constcredentialFixture=`{"id":"credential-1","key":"login","type":"credential","version":2,"spec":{"description":"Website login","fields":{"password":{"type":"password","required":true,"sensitive":true,"value":"never-print"}}},"state":{"status":"pending_collection","fields":{"password":{"has_value":false,"value":"never-print"}}},"action":{"name":"collect","url":"https://vault.kernel.sh/collect#token=item.random","expires_at":"2026-10-01T00:00:00Z"},"available_operations":[{"type":"collect","description":"Open the form"},{"type":"fill","description":"Fill the form"}],"available_expansions":[]}`
18
+
constcredentialFixture=`{"id":"credential-1","key":"login","type":"credential","version":2,"spec":{"description":"Website login","fields":[{"name":"password","type":"password","required":true,"sensitive":true,"value":"never-print"}]},"state":{"status":"pending_collection","fields":{"password":{"has_value":false,"value":"never-print"}}},"action":{"name":"collect","url":"https://vault.kernel.sh/collect#token=item.random","expires_at":"2026-10-01T00:00:00Z"},"available_operations":[{"type":"collect","description":"Open the form"},{"type":"fill","description":"Fill the form"}],"available_expansions":[]}`
0 commit comments