Skip to content

Add workloadattestor v2#71

Open
arndt-s wants to merge 1 commit into
spiffe:mainfrom
arndt-s:add_workloadattestor_v2
Open

Add workloadattestor v2#71
arndt-s wants to merge 1 commit into
spiffe:mainfrom
arndt-s:add_workloadattestor_v2

Conversation

@arndt-s
Copy link
Copy Markdown
Member

@arndt-s arndt-s commented Feb 16, 2026

Adds v2 of workloadattestor plugin interface that allows to attest arbitrary references. See Broker API in spiffe and related SPIRE PR (referenced below)

SPIFFE PR: spiffe/spiffe#340
SPIRE PR: spiffe/spire#6594

Signed-off-by: arndt-s <17650715+arndt-s@users.noreply.github.com>

import "google/protobuf/any.proto";

service WorkloadAttestor {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This needs some more description.

@matheuscscp
Copy link
Copy Markdown

@amartinezfayo @MarcosDY @sorindumitru Yesterday one of you asked me if introducing this v2 for workloadattestor was really necessary, my conclusion today is: yes, unless the SPIFFE/SPIRE maintainers are ok with an abstraction in the SPIRE implementation that does not correctly express the WorkloadReference standard in the SPIFFE Broker API.

@sorindumitru
Copy link
Copy Markdown
Member

@amartinezfayo @MarcosDY @sorindumitru Yesterday one of you asked me if introducing this v2 for workloadattestor was really necessary, my conclusion today is: yes, unless the SPIFFE/SPIRE maintainers are ok with an abstraction in the SPIRE implementation that does not correctly express the WorkloadReference standard in the SPIFFE Broker API.

I still think this should be possible. We recommend using UnimplementedWorkloadAttestorServer in our workloadattestor plugins, so if we add a new method to the V1 interface it should work in most places without recompiling. It wouldn't work for the built-in plugins because we use UnsafeWorkloadAttestorServer, but that's ok.

What I didn't check, but it should also work, is loading a plugin compiled against an old version of the interface. I think it should also return Unimplemented in that case.

In the SPIRE code we can then use the Unimplemented code to fallback to attempting to attest using a PID reference, if that's what was provided to us. And similar for the Attest call, if it isn't implemented we fallback to AttestReference with a pid reference.

@matheuscscp
Copy link
Copy Markdown

Superseded by: #74

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.

3 participants