Skip to content

feat(connectorapi): add ServedPolicyEnvelope to GetConnectorConfigResponse#1028

Open
jugonzalez12 wants to merge 2 commits into
mainfrom
julian/sdk-egress-types
Open

feat(connectorapi): add ServedPolicyEnvelope to GetConnectorConfigResponse#1028
jugonzalez12 wants to merge 2 commits into
mainfrom
julian/sdk-egress-types

Conversation

@jugonzalez12

Copy link
Copy Markdown
Contributor

Define the server-computed policy envelope delivered on the connector-config response: a capabilities section carrying the recorded capability manifest verbatim (with its record-time digest), and an egress section carrying the per-instance allowed-hosts list computed at serve from revision-sealed derivation rules, plus the https_only scheme gate input.

The envelope is optional on the response; runtimes that require one treat absence, an unsupported version, a missing section, or any binding mismatch (revision id, integrity-root digest, config version) as deny-all, and a bad section poisons the whole envelope. Digest fields are lowercase hex with the algorithm bound to the enclosing version (v1 = sha256), so a hash migration is a version bump rather than in-band negotiation.

GetConnectorConfigResponse gains an optional config_version (explicit presence distinguishes a server that does not stamp versions from one that stamped an empty handle); when the envelope is present it must be non-empty and equal to the envelope's config_version.

…ponse

Define the server-computed policy envelope delivered on the
connector-config response: a capabilities section carrying the recorded
capability manifest verbatim (with its record-time digest), and an
egress section carrying the per-instance allowed-hosts list computed at
serve from revision-sealed derivation rules, plus the https_only scheme
gate input.

The envelope is optional on the response; runtimes that require one
treat absence, an unsupported version, a missing section, or any
binding mismatch (revision id, integrity-root digest, config version)
as deny-all, and a bad section poisons the whole envelope. Digest
fields are lowercase hex with the algorithm bound to the enclosing
version (v1 = sha256), so a hash migration is a version bump rather
than in-band negotiation.

GetConnectorConfigResponse gains an optional config_version (explicit
presence distinguishes a server that does not stamp versions from one
that stamped an empty handle); when the envelope is present it must be
non-empty and equal to the envelope's config_version.
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

General PR Review: feat(connectorapi): add ServedPolicyEnvelope to GetConnectorConfigResponse

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 3b2c82e.
Review mode: incremental since 2a1bbd4
View review run: https://github.com/ConductorOne/baton-sdk/actions/runs/30031526336

Review Summary

The new commit (Remove the CapabilitySection) drops the CapabilitySection message and its capabilities field from ServedPolicyEnvelope, renumbers egress from field 6 to field 5, and regenerates the matching pb.go / pb.validate.go output. Because servedpolicy.proto is introduced in this same PR and does not exist on the base branch, this renumbering is safe: there are no released consumers or serialized messages bound to the old field numbers. I scanned the full PR diff (including the generated servedpolicy.pb.go / servedpolicy_protoopaque.pb.go paths dropped from the incremental artifact) for security and correctness: the additive config_version (field 3, optional) and served_policy_envelope (field 4) fields on GetConnectorConfigResponse do not collide with existing field numbers, generated code is consistent with the proto source, and no Go code references the removed CapabilitySection. No new issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@jugonzalez12
jugonzalez12 marked this pull request as ready for review July 22, 2026 21:35
@jugonzalez12
jugonzalez12 requested a review from a team July 22, 2026 21:35
Comment on lines +56 to +69
// Canonical recorded bytes of the capability manifest, embedded unmodified
// after the serving layer re-verified them against the revision's recorded
// digest. Empty means no capability manifest is recorded for this revision:
// capability enforcement is not yet active and transport dispatch is
// governed by the egress section alone. Non-empty bytes that fail to
// parse, carry an unsupported inner version, or mismatch the recorded
// digest invalidate the whole envelope.
bytes manifest_bytes = 1;

// Record-time digest (lowercase hex; algorithm bound by envelope_version,
// v1 = sha256) over manifest_bytes, copied from the sealed revision record —
// never recomputed from the fetched bytes. Empty exactly when
// manifest_bytes is empty.
string recorded_manifest_digest = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to remove the capabilities. It looks like the capabilities part is not finalized yet. cc @gontzess

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove

That is still WIP, so let's not add it just yet.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants