Skip to content

rfc: application level verification#1948

Merged
burgerdev merged 3 commits intomainfrom
rfc/012
Nov 24, 2025
Merged

rfc: application level verification#1948
burgerdev merged 3 commits intomainfrom
rfc/012

Conversation

@burgerdev
Copy link
Member

@burgerdev burgerdev commented Nov 19, 2025

@burgerdev burgerdev added the no changelog PRs not listed in the release notes label Nov 19, 2025
Comment on lines +47 to +52
// The following fields match the fields of userapi.GetManifestsResponse

Manifests [][]byte // Manifest history, the current manifest being last.
Policies map[manifest.HexString][]byte // Policies referred to by manifests.
RootCA []byte // PEM-encoded certificate
MeshCA []byte // PEM-encoded certificate
Copy link
Member Author

Choose a reason for hiding this comment

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

We also have

contrast/sdk/verify.go

Lines 99 to 109 in dda33d5

// CoordinatorState represents the state of the Contrast Coordinator at a fixed point in time.
type CoordinatorState struct {
// Manifests is a slice of manifests. It represents the manifest history of the Coordinator it was received from, sorted from oldest to newest.
Manifests [][]byte
// Policies contains all policies that have been referenced in any manifest in Manifests. Used to verify the guarantees a deployment had over its lifetime.
Policies [][]byte
// PEM-encoded certificate of the deployment's root CA.
RootCA []byte
// PEM-encoded certificate of the deployment's mesh CA.
MeshCA []byte
}

Might be good to consolidate this into a shared type.

Mention browser use-case

Co-authored-by: Moritz Sanft <[email protected]>
This could be a future _addition_ to the SDK, but is mostly unrelated to the proposal made here.

As a workaround for now, the history check can be implemented outside the SDK (since it's just a byte-for-byte comparison of slice items).
This check can be made even simpler if the Contrast deployment is only ever expected to have one manifest in the history (Privatemode.ai, for example).
Copy link
Member

Choose a reason for hiding this comment

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

If I --disable-updates, I don't need to check anything myself, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

--disable-updates results in a manifest without workload owner keys. However, that state can also be reached by just setting a manifest without workload owner keys on an existing coordinator history. If you care about that (which you only need to if you're relying on workload secrets, imho), you should validate that the history has only one manifest.

@burgerdev burgerdev merged commit 85531d7 into main Nov 24, 2025
9 checks passed
@burgerdev burgerdev deleted the rfc/012 branch November 24, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants