Repository navigation
Conversation
… the Multipass bundle Adds pkg/secretcontracts: ValidateProducer, ValidateStored, EncodeJSON, EncodeText and typed helpers that return the content type with the encoded bytes. Duplicate JSON keys are rejected before a parser can discard one; key order, whitespace and escapes are left alone. The bundle, its pin and vendor/ arrive in the next commit, so this commit does not build alone. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bundle copied by make update-secret-contracts from Multipass 4e8772335c7ff91271ba426e80b6af10cc98c165 (source revision f0329db6ae9a90eff95beac8deda1d9226791cff, bundle sha256 40d4c65a6fd8a006780d1d5ada3634d9fd3bb1e761b9c2c135fc752e5f2774ae). vendor/ is the output of go mod vendor for github.com/santhosh-tekuri/jsonschema/v6 v6.0.2. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…declared names EncodeJSON and EncodeText now return an error for invalid UTF-8 instead of letting encoding/json substitute U+FFFD. Error.Field keeps only names a bundled type declares. Tests cover both paths, the document and value size gates, and Unicode round trips. update-secret-contracts.sh accepts a Git worktree as the Multipass checkout. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mark the vendored bundle and UPSTREAM.json -text so autocrlf checkouts (Windows CI) cannot rewrite line endings and break the byte-exact pin hash. The hash assertions are unchanged. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
…types' into highb/secret-payload-contract-bundle
Connectors declare secret output types and the helpers return them; a single exported source avoids repeating the string. A test pins the constants to the bundled types. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
General PR Review: Add simple credential payload buildersBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryThis PR adds a new standalone package, Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agentsReviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Squire (openai/gpt-6.1-sol):
Add straightforward JSON builders for the existing Multipass credential formats. This PR is stacked on #1192; #1195 carries the combined native-input/output tip for C1.
pkg/secretcontractsprovides password, API-key, SSH-key, OAuth-client-secret and certificate structs with the existing JSON field names. TheirEncodemethods return JSON bytes and the corresponding content type.EncodeJSONalso supports custom fields/types;EncodeTextpreserves text bytes. These are serializers: empty values, unfamiliar types and values that do not match a receiver schema are not rejected here. Ordinary JSON serialization errors are returned.Type provenance and synchronization
Multipass owns these document formats. The Go builders mirror the content-type identifiers, JSON field names and scalar/list shapes in its canonical type catalog. The source snapshot used for this reference is pinned in the links below:
PasswordV2password_v2APIKeyV2api_key_v2SSHKeyssh_keyOAuthClientSecretV2oauth_client_secret_v2CertificatecertificateThe Multipass codec defines document encoding/decoding; the separate value-envelope implementation sets
content_typeandenvelope_version. These builders produce the inner document bytes, not that envelope.When changing a builder, compare its JSON tags, Go field types and collection shapes with the corresponding Multipass definition and codec, update the serialization tests, and refresh these pinned references to the source actually checked. In particular, OAuth
redirect_uriis a list despite its singular JSON name. Multipass documents that deployed content-type layouts are frozen; incompatible layouts require a new content-type identifier. This PR does not add automatic cross-repository drift checks or copy Multipass's semantic validation rules into Baton.Use the existing delivery metadata and encodings: bare JSON fields,
content_type, and the existingSecretPayloadV2envelope version. No new JSON wrapper, crypto format or admission policy is introduced.This replaces the earlier copied schemas/catalog, semantic validators, producer/stored validation APIs, parity fixtures, update scripts and JSON Schema dependency. The superseded Multipass #975 is closed and is no longer a dependency. Multipass owns its existing rendering and error behavior; strict cross-repository payload matching is not required.
Validation on the combined tip: six affected SDK packages pass tests/build/vet; affected lint passes with the CI-pinned tool; protobuf build/lint/format and breaking checks against the exact current upstream revision pass. Root independently ran uncached builder and connector-builder tests. Tests cover existing field names, type metadata, JSON escaping/Unicode, empty and otherwise schema-invalid values, custom fields/types, serialization errors and text-byte preservation. Historical broader checks retain their original revisions; the unrelated prior uhttp lint baseline is not waived.
Request-input validation, selected-output identity, recipient/AAD/authentication and encryption checks remain separate and unchanged. No live provider, merge, release or deployment acceptance is claimed.