Skip to content

aa: let the KBC select attestation policies by id - #1604

Open
Xynnn007 wants to merge 1 commit into
confidential-containers:mainfrom
Xynnn007:select-policy
Open

aa: let the KBC select attestation policies by id#1604
Xynnn007 wants to merge 1 commit into
confidential-containers:mainfrom
Xynnn007:select-policy

Conversation

@Xynnn007

Copy link
Copy Markdown
Member

Trustee gained a policy_id_map, with which an administrator maps an id that a client names in the RCAR Request to the Attestation Service policies that evaluate its evidence. Give the KBC a way to name such an id, so that a deployment can have different guests evaluated against different policies without running separate KBS instances.

kbs_protocol carries the id from KbsClientBuilder::set_id into the extra-params of the auth Request. AA takes it from the new id field of the [token_configs.kbs] section, which is empty by default.

An empty id is not sent at all: KBS falls back to a default policy for a Request without an id, but rejects the handshake of a client that sends an id the deployment does not declare. Configuring an id therefore only works against a KBS that maps it, which is why it stays opt-in and why the empty string, rather than an Option, expresses "not configured" in the config.

See also confidential-containers/trustee#1521

@Xynnn007
Xynnn007 marked this pull request as ready for review July 29, 2026 01:46
@Xynnn007
Xynnn007 requested a review from a team as a code owner July 29, 2026 01:46
@Xynnn007

Copy link
Copy Markdown
Member Author

Related to confidential-containers/trustee#282

Trustee gained a policy_selector_map, with which an administrator maps
a policy_selector that a client names in the RCAR Request to the
Attestation Service policies that evaluate its evidence. Give the KBC a
way to name such a policy_selector, so that a deployment can have
different guests evaluated against different policies without running
separate KBS instances.

kbs_protocol carries the policy_selector from
`KbsClientBuilder::set_policy_selector` into the extra-params of the
auth Request. AA takes it from the new policy_selector field of the
`[token_configs.kbs]` section, which is empty by default.

An empty policy_selector is not sent at all: KBS falls back to a
default policy for a Request without a policy_selector, but rejects
the handshake of a client that sends a policy_selector the deployment
does not declare. Configuring a policy_selector therefore only works
against a KBS that maps it, which is why it stays opt-in and why the
empty string, rather than an Option, expresses "not configured" in the
config.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant