Skip to content

[5/8] coordinator: support insecure manifests behind opt-in#2356

Open
msanft wants to merge 1 commit into
split/pr-2337-initdatafrom
split/pr-2337-coordinator
Open

[5/8] coordinator: support insecure manifests behind opt-in#2356
msanft wants to merge 1 commit into
split/pr-2337-initdatafrom
split/pr-2337-coordinator

Conversation

@msanft
Copy link
Copy Markdown
Member

@msanft msanft commented Apr 27, 2026

Split from #2337 as part of a stacked review series.

Depends on: #2355

This PR wires insecure manifests into the Coordinator behind explicit opt-in:

  • manifest helpers for insecure reference values
  • Coordinator opt-in gate
  • validator registration for insecure manifests
  • user API and tests

@msanft msanft added the no changelog PRs not listed in the release notes label Apr 27, 2026
@msanft msanft force-pushed the split/pr-2337-runtime-nodeinstaller branch from 4a00b00 to 657abac Compare April 27, 2026 13:27
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 552c173 to 27802b6 Compare April 27, 2026 13:27
@msanft msanft requested review from burgerdev and charludo April 27, 2026 13:30
@msanft msanft changed the title coordinator: support insecure manifests behind opt-in [5/8] coordinator: support insecure manifests behind opt-in Apr 27, 2026
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 27802b6 to 7073c58 Compare April 27, 2026 16:17
@msanft msanft force-pushed the split/pr-2337-runtime-nodeinstaller branch from 657abac to 41b8d92 Compare April 27, 2026 16:17
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 7073c58 to af50bbe Compare May 5, 2026 12:55
@msanft msanft force-pushed the split/pr-2337-runtime-nodeinstaller branch from 41b8d92 to c596cca Compare May 5, 2026 12:55
Base automatically changed from split/pr-2337-runtime-nodeinstaller to split/pr-2337-initdata May 5, 2026 12:55
@msanft msanft force-pushed the split/pr-2337-initdata branch from 72898ef to f2897e6 Compare May 6, 2026 09:56
@msanft msanft force-pushed the split/pr-2337-coordinator branch from af50bbe to 65b519a Compare May 6, 2026 09:56
@msanft msanft force-pushed the split/pr-2337-initdata branch from f2897e6 to 91b1df7 Compare May 6, 2026 11:55
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 65b519a to 891d7f0 Compare May 6, 2026 11:55
@msanft msanft force-pushed the split/pr-2337-initdata branch from 91b1df7 to db7cd22 Compare May 6, 2026 12:00
@msanft msanft force-pushed the split/pr-2337-coordinator branch 2 times, most recently from 6223484 to acaa9fd Compare May 6, 2026 12:27
@msanft msanft force-pushed the split/pr-2337-initdata branch 2 times, most recently from a8f6eb6 to fd0d094 Compare May 11, 2026 20:39
@msanft msanft force-pushed the split/pr-2337-coordinator branch 2 times, most recently from 9eeeeba to 55e4947 Compare May 11, 2026 20:47
@msanft msanft force-pushed the split/pr-2337-initdata branch 2 times, most recently from bbf67f4 to 9da6471 Compare May 12, 2026 14:04
@msanft msanft force-pushed the split/pr-2337-coordinator branch 2 times, most recently from 21d6bec to 1cd7565 Compare May 12, 2026 14:20
@msanft msanft force-pushed the split/pr-2337-initdata branch from 9da6471 to aa5ba51 Compare May 12, 2026 14:20
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 1cd7565 to c26922a Compare May 12, 2026 14:21
@msanft msanft force-pushed the split/pr-2337-initdata branch from 4e3d618 to c168265 Compare May 12, 2026 14:59
@msanft msanft force-pushed the split/pr-2337-coordinator branch from c26922a to 708ea30 Compare May 12, 2026 14:59
@charludo charludo self-assigned this May 19, 2026
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 708ea30 to b1dd9dc Compare May 26, 2026 07:22
@msanft msanft force-pushed the split/pr-2337-initdata branch from c168265 to 28e1b1e Compare May 26, 2026 07:22
@msanft msanft force-pushed the split/pr-2337-coordinator branch from b1dd9dc to 746bc55 Compare May 26, 2026 07:25
@msanft msanft force-pushed the split/pr-2337-initdata branch from 28e1b1e to 464e044 Compare May 26, 2026 07:25
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 746bc55 to 9b0cc73 Compare May 26, 2026 07:38
@msanft msanft force-pushed the split/pr-2337-initdata branch from 464e044 to 0762a6e Compare May 26, 2026 07:38
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 9b0cc73 to 50a85ba Compare May 26, 2026 08:21
@msanft msanft force-pushed the split/pr-2337-initdata branch from 0762a6e to 1cff241 Compare May 26, 2026 08:21
@msanft msanft force-pushed the split/pr-2337-coordinator branch from 50a85ba to abb75b8 Compare May 26, 2026 08:43
@msanft msanft force-pushed the split/pr-2337-initdata branch from 1cff241 to 62ac3e2 Compare May 26, 2026 08:43
@msanft msanft force-pushed the split/pr-2337-initdata branch from 62ac3e2 to 9d6a048 Compare May 26, 2026 08:48
@msanft msanft force-pushed the split/pr-2337-coordinator branch from abb75b8 to 2701421 Compare May 26, 2026 08:48
Copy link
Copy Markdown
Collaborator

@charludo charludo left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry review took so long. I have a couple of comments, see below; the one architectural one I want to get your opinion on is if we should allow mixed manifests. Is that something you actually require? Because if not, then I'd strongly urge to allow either all-secure, or all-insecure manifests, no mix.

Comment on lines +285 to +287
if !g.allowInsecure && mnfst.AllowInsecure() {
return nil, ErrInsecureNotAllowed
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry if this has been decided already, I might just be OOTL and wanted to make sure: Do we also care about the reverse? I.e. is it acceptable to allow users to have a secure deployment run with an insecure coordinator?

//
// If allowInsecure is true, the Guard will accept manifests that contain insecure platforms.
// Otherwise, setting such a manifest will be rejected with ErrInsecureNotAllowed.
func New(hist *history.History, reg *prometheus.Registry, log *slog.Logger, allowInsecure bool) *Guard {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not super happy with just passing an unnamed bool into here. Invocations don't make it super obvious what a serious effect this has. How would you feel about instead leaving New as-is, without the option to allowInsecure, and instead add something like func (g *Guard) MakeInsecure() that needs to be explicitly called?

Comment on lines 31 to 33
default:
return nil, fmt.Errorf("unsupported platform: %T", cpuid.CPU)
log.Warn("No TEE platform detected, using insecure attestation issuer")
return insecure.NewIssuer(), nil
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should not default to insecure. Any chance to something similar here as with allowInsecureAttestation() in the initedata processor?

logger.NewWithAttrs(logger.NewNamed(c.logger, "validator"), map[string]string{"reference-values": name}), &authInfo, name))
}

if state.Manifest().AllowInsecure() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

IMO there need to be two variants of AllowInsecure. One to use here, that is only true when all platforms allow insecure in the manifest (just as an additional guard), and the other one in the current form for use in

    if !g.allowInsecure && mnfst.AllowInsecure() {
		return nil, ErrInsecureNotAllowed
	}

below, that is true when any platform allows insecure.

Comment thread coordinator/main.go
Comment on lines +119 to +122
_, allowInsecure := os.LookupEnv(allowInsecureEnvVar)
if allowInsecure {
logger.Warn("Coordinator is configured to allow insecure manifests")
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Check value, not just presence. CONTRAST_ALLOW_INSECURE=0 should not enable insecure mode. I can easily see users deliberately "disabling" insecure mode like this. strconv.ParseBool should do the job.

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.

2 participants