Skip to content

ateom/actor ID split: Define MintAteomActorCertificate - #1626

Merged
Taahir Ahmed (ahmedtd) merged 1 commit into
agent-substrate:mainfrom
ahmedtd:separate-certs
Sep 23, 2026
Merged

Taahir Ahmed (ahmedtd) merged 1 commit into
agent-substrate:mainfrom
ahmedtd:separate-certs

Conversation

@ahmedtd

@ahmedtd Taahir Ahmed (ahmedtd) commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

We need to draw a strong distinction between credentials that will be wielded directly by actor logic, and credentials used by system components on behalf of an actor. This will help us avoid attacks where an actor pretends to be a system component.

Ateom certificates are requested by ateom/atelet and used for the atunnel connection to the egress gateway. They have a SPIFFE URI like spiffe://${trustdomain}/ateom-for-actor/${atespace}/${actor}.

Actor certificates are requested by the egress gateway and used for opening outbound requests on behalf of the actor. They have a SPIFFE URI like spiffe://${trustdomain}/actor/${atespace}/${actor}. Note, this use case is not actually implemented yet.

@LiorLieberman

Copy link
Copy Markdown
Collaborator

whats your view on adding another part "/x/" vs prefixing the existing part already - like spiffe://${trustdomain}/ateom-actor/${atespace}/${actor}

Wouldn't it ease regexes / validation in different component that uses that peer identity?

type credentialBroker struct {
ateletpb.UnimplementedCredentialBrokerServer
controlClient ateapipb.ControlClient
type ateomSupportServer struct {

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.

whats the rationale behind "ateomSupportServer" name? whats ateomSupport?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's a server to support ateoms by providing RPCs they need. I am not attached to the name. I just want to avoid having $n$ different services between atelet and ateom.

@EItanya

Eitan Yarmush (EItanya) commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked over #1501

Stacking over a PR which doesn't feel ready to go is confusing, can this work stand on its own?

Or even better can we get to the bottom of the questions in #1501 (comment) before marking these ready for review?

@ahmedtd

Copy link
Copy Markdown
Collaborator Author

whats your view on adding another part "/x/" vs prefixing the existing part already - like spiffe://${trustdomain}/ateom-actor/${atespace}/${actor}

Wouldn't it ease regexes / validation in different component that uses that peer identity?

Yes, that's a good idea.

@ahmedtd
Taahir Ahmed (ahmedtd) force-pushed the separate-certs branch 3 times, most recently from c504250 to ae3f3a2 Compare September 17, 2026 01:50
@ahmedtd

Copy link
Copy Markdown
Collaborator Author

whats your view on adding another part "/x/" vs prefixing the existing part already - like spiffe://${trustdomain}/ateom-actor/${atespace}/${actor}
Wouldn't it ease regexes / validation in different component that uses that peer identity?

Yes, that's a good idea.

Done, I used ateom-for-actor

@ahmedtd
Taahir Ahmed (ahmedtd) force-pushed the separate-certs branch 3 times, most recently from c271e09 to a7d525c Compare September 17, 2026 04:45
@bowei Bowei Du (bowei) added kind/feature An enhancement / feature request or implementation area/security Security related issue/pr labels Sep 17, 2026
@ahmedtd

Copy link
Copy Markdown
Collaborator Author

This PR grew pretty large, so I have split it into three.

Comment thread pkg/proto/ateapipb/ateapi.proto Outdated
// Must be a valid actor that currently exists according to the actor store.
//
// +k8s:required
ObjectRef actor = 6;

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.

Why are we starting field numbers at 6 for a brand new message?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

// Parse the CSR.
csr, err := x509.ParseCertificateRequest(req.GetCertificateSigningRequest())
if err != nil {
return nil, fmt.Errorf("while parsing CSR: %w", err)

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.

Should this return InvalidArgument?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

//
// Must be a valid actor that currently exists according to the actor store.
//
// +k8s:required

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.

Other actor references include "+k8s:subfield(atespace)=+k8s:required," to ensure an atespace is specified, should we require that here as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

return nil, fmt.Errorf("while parsing CSR: %w", err)
}
if err := csr.CheckSignature(); err != nil {
slog.ErrorContext(ctx, "Failed to verify CSR signature", slog.Any("err", err))

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.

[nit] This can be triggered by the client providing a bad signature on a CSR, so should we log at WARN rather than ERROR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we need to log this, actually, I just switched it up so the error is returned. This doesn't seem like a sensitive error that we need to hide, it's post-authn/z

Comment thread pkg/proto/ateapipb/ateapi.proto Outdated
// leaf certificate, and any remaining entries are intermediates in
// leaf-to-root order.
repeated bytes actor_certificates = 1;
} No newline at end of file

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.

[nit] dropped the trailing newline here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@ahmedtd
Taahir Ahmed (ahmedtd) force-pushed the separate-certs branch 5 times, most recently from cd5be8e to b5b38fd Compare September 23, 2026 04:18
@ahmedtd Taahir Ahmed (ahmedtd) changed the title Separate ateom certificates vs direct actor certificates ateom/actor ID split: Define MintAteomActorCertificate Sep 23, 2026
We need to draw a strong distinction between credentials that will be
wielded directly by actor logic, and credentials used by system
components on behalf of an actor. This will help us avoid attacks where
an actor pretends to be a system component.

Ateom certificates are requested by ateom/atelet and used for the
atunnel connection to the egress gateway. They have a SPIFFE URI like
spiffe://${trustdomain}/ateom-for-actor/${atespace}/${actor}.

(Right now, there is no use for a similar JWT, but one could be added).
@ahmedtd
Taahir Ahmed (ahmedtd) added this pull request to the merge queue Sep 23, 2026
@LiorLieberman

Copy link
Copy Markdown
Collaborator

are you planning to update whatever is using the purpose field on the cert to use the new format?

@ahmedtd

Copy link
Copy Markdown
Collaborator Author

are you planning to update whatever is using the purpose field on the cert to use the new format?

Yes, there are other stacked PRs over this, #1809 and #1810

Merged via the queue into agent-substrate:main with commit 8ea4abe Sep 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/identity area/security Security related issue/pr kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants