fix(jsonschema): don't cap key-string (SSH public key) at secret-string's 64 chars #2

Merged
deranjer merged 1 commit from fix/key-string-maxlength into main 2026-07-08 19:40:56 +00:00
deranjer commented 2026-07-08 18:25:28 +00:00 (Migrated from github.com)

Problem

The key-string format (SSH public keys: system/aaa/user/*/ssh/authorized-key and ssh-server trusted CA keys) is aliased to the secret-string format, which the JSON Schema output caps at maxLength: 64.

SSH public keys are not secrets and exceed 64 chars — an ed25519 public key is 68 base64 chars. The generated schema therefore rejects every ed25519 key with maxLength: got 68, want 64.

Fix

Give key-string its own unbounded string format/$def instead of aliasing secret-string. secret-string's cap is unchanged.

Test

TestKeyStringFormat_NoMaxLength asserts a key-string field maps to #/$defs/key-string with no maxLength, and that secret-string keeps its cap.

🤖 Generated with Claude Code

## Problem The `key-string` format (SSH public keys: `system/aaa/user/*/ssh/authorized-key` and ssh-server trusted CA keys) is aliased to the `secret-string` format, which the JSON Schema output caps at `maxLength: 64`. SSH public keys are **not** secrets and exceed 64 chars — an ed25519 public key is 68 base64 chars. The generated schema therefore rejects **every** ed25519 key with `maxLength: got 68, want 64`. ## Fix Give `key-string` its own unbounded string format/$def instead of aliasing `secret-string`. `secret-string`'s cap is unchanged. ## Test `TestKeyStringFormat_NoMaxLength` asserts a `key-string` field maps to `#/$defs/key-string` with no `maxLength`, and that `secret-string` keeps its cap. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nemith (Migrated from github.com) reviewed 2026-07-08 19:40:51 +00:00
nemith (Migrated from github.com) left a comment

lgtm

lgtm
Sign in to join this conversation.
No description provided.