Repository navigation
Conversation
Collaborator
|
/ok to test 2057e57 |
3 tasks
ResolvedWorkloadIdentity derives Deserialize with public fields, so a value decoded from a serialized descriptor (for example the supervisor's SandboxRuntimeDescriptor payload) bypassed the non-root, non-empty, and sorted-unique-group invariants that new() enforces. Route deserialization through a private raw mirror type and a TryFrom impl that delegates to new(), so invalid identities fail to decode and supplementary groups are normalized on the way in. The wire format for valid values is unchanged. Signed-off-by: Emilien Macchi <emacchi@redhat.com>
EmilienM
force-pushed
the
fix/5189-identity-deser-invariants/EmilienM
branch
from
November 4, 2026 03:26
2057e57 to
d0d47c3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ResolvedWorkloadIdentityderivedDeserializewith public fields, so a value decoded from a serialized descriptor skipped the checksnew()enforces. Deserialization now goes through a private wire mirror andTryFrom, which delegates tonew(): UID/GID 0 and empty or whitespace-only source/digest fail to decode, and supplementary groups are sorted, de-duplicated, and stripped of the primary GID during decode. An unsorted group list in a descriptor used to fail the later match against the admitted identity; it now decodes to the canonical form, so the same logical identities are accepted as before. The wire format for valid values is unchanged.Related Issue
Closes #5189
Changes
RawResolvedWorkloadIdentity(private,deny_unknown_fields) and#[serde(try_from)]onResolvedWorkloadIdentity, delegating tonew()BoundaryConfirmationvalidate()covers only part of what they carry:BoundaryConfirmation: session ID, resource claims, and evidence digest are checked by the RPC client, not on decodeProvisioningEvidence: an empty generation is only caught byvalidate(), and the digest binding cannot be re-verified at decodeExecutableIdentity/BinaryIdentity: absolute-path and ancestor shape are unvalidated on decodeRelease Notes
Descriptors carrying an invalid workload identity (UID or GID 0, empty source or resource digest) now fail to deserialize instead of being accepted.
Testing
cargo testfor openshell-isolation-interface, openshell-sandbox-backend, openshell-supervisor, openshell-driver-{docker,podman,kubernetes,vm}, openshell-sandbox; rust:lint)Checklist