Skip to content

Move encrypt_output from ConfidentialHTTPRequest to HTTPRequest#1828

Merged
prashantkumar1982 merged 2 commits into
mainfrom
move-encrypt-output-to-http-request
Feb 9, 2026
Merged

Move encrypt_output from ConfidentialHTTPRequest to HTTPRequest#1828
prashantkumar1982 merged 2 commits into
mainfrom
move-encrypt-output-to-http-request

Conversation

@nadahalli
Copy link
Copy Markdown
Contributor

@nadahalli nadahalli commented Feb 9, 2026

Summary

  • Bumps chainlink-protos/cre/go to cre-sdk/v1alpha.19 and regenerates confidential HTTP types
  • EncryptOutput moves from ConfidentialHTTPRequest to HTTPRequest (field 9) — it is an HTTP request property, not a framework/secrets concern

Breaking changes

Wire-breaking change matching chainlink-protos#291. Acceptable since the field is not yet used in production.

Downstream repos (confidential-compute, chainlink) will be updated in follow-up PRs.

@nadahalli nadahalli requested a review from a team as a code owner February 9, 2026 20:41
Copilot AI review requested due to automatic review settings February 9, 2026 20:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

👋 nadahalli, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

⚠️ API Diff Results - Breaking changes detected

📦 Module: github-com-smartcontractkit-chainlink-common

🔴 Breaking Changes (2)

pkg/capabilities/v2/actions/confidentialhttp.(*ConfidentialHTTPRequest) (1)
  • GetEncryptOutput — 🗑️ Removed
pkg/capabilities/v2/actions/confidentialhttp.ConfidentialHTTPRequest (1)
  • EncryptOutput — 🗑️ Removed

📄 View full apidiff report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates confidential HTTP protobufs to move EncryptOutput onto HTTPRequest and bumps the chainlink-protos/cre/go dependency accordingly.

Changes:

  • Bump github.com/smartcontractkit/chainlink-protos/cre/go to a newer revision.
  • Regenerate confidential HTTP Go types with EncryptOutput moved from ConfidentialHTTPRequest to HTTPRequest (field 9).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
pkg/capabilities/v2/actions/confidentialhttp/client.pb.go Regenerated protobuf Go output reflecting the new field placement for EncryptOutput.
go.mod Updates proto module version to pull in the changed wire definitions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc-gen-go v1.36.8
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The generated file header shows a downgrade from protoc-gen-go v1.36.11 to v1.36.8. This can cause unnecessary diffs across the repo and potential subtle generator output differences. Consider regenerating with the repo’s pinned/standard protobuf toolchain (or updating the pin) so all generated .pb.go files are produced by the same protoc-gen-go version.

Suggested change
// protoc-gen-go v1.36.8
// protoc-gen-go v1.36.11

Copilot uses AI. Check for mistakes.
Comment on lines +156 to +157
// If true, the response will be AES-GCM encrypted using the
// "san_marino_aes_gcm_encryption_key" secret.
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The updated comment hard-codes a specific secret name and states the response "will be AES-GCM encrypted" when enabled. Previously this logic was documented as conditional (AES-GCM if key present, otherwise TDH2). If the underlying runtime behavior is still conditional, the new comment is misleading. Consider updating the proto comment (then regenerating) to accurately describe the encryption behavior and avoid overly specific implementation details if they can vary.

Suggested change
// If true, the response will be AES-GCM encrypted using the
// "san_marino_aes_gcm_encryption_key" secret.
// If true, the response will be encrypted by the enclave.
// The specific encryption mechanism and keys are determined by the runtime configuration.

Copilot uses AI. Check for mistakes.
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.

NACK

Comment on lines 352 to 357
state protoimpl.MessageState `protogen:"open.v1"`
VaultDonSecrets []*SecretIdentifier `protobuf:"bytes,1,rep,name=vault_don_secrets,json=vaultDonSecrets,proto3" json:"vault_don_secrets,omitempty"`
Request *HTTPRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
// encrypt_output controls whether the enclave response should be encrypted.
// If true and a secret named "san_marino_aes_gcm_encryption_key" is provided,
// the response will be AES-GCM encrypted using that key.
// If true and no such key is provided, the response will be TDH2 encrypted
// using the VaultDON master public key.
// Default is false (response returned unencrypted).
EncryptOutput bool `protobuf:"varint,3,opt,name=encrypt_output,json=encryptOutput,proto3" json:"encrypt_output,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Since encrypt_output was removed from ConfidentialHTTPRequest (formerly field number 3), the corresponding .proto should reserve the old field number and name to prevent accidental reuse in the future (which would create hard-to-debug wire incompatibilities). This should be done in the proto source and then regenerated.

Copilot uses AI. Check for mistakes.
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.

This is not being used in production yet. So, making breaking changes now.

Bump chainlink-protos/cre/go to cre-sdk/v1alpha.19 and regenerate
confidential HTTP types. encrypt_output is now on HTTPRequest (field 9)
instead of ConfidentialHTTPRequest (field 3).
@nadahalli
Copy link
Copy Markdown
Contributor Author

The chainlink build error at core/services/workflows/syncer/v2/grpc_workflow_source.go:346 is not due to this PR.

@nadahalli nadahalli requested a review from jmank88 February 9, 2026 21:25
@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit a82fa41 Feb 9, 2026
35 of 36 checks passed
@prashantkumar1982 prashantkumar1982 deleted the move-encrypt-output-to-http-request branch February 9, 2026 21:43
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.

5 participants