Repository navigation
ateom/actor ID split: Define MintAteomActorCertificate - #1626
Conversation
|
whats your view on adding another part "/x/" vs prefixing the existing part already - like 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 { |
There was a problem hiding this comment.
whats the rationale behind "ateomSupportServer" name? whats ateomSupport?
There was a problem hiding this comment.
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
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? |
Yes, that's a good idea. |
c504250 to
ae3f3a2
Compare
Done, I used |
c271e09 to
a7d525c
Compare
a7d525c to
3bcd865
Compare
|
This PR grew pretty large, so I have split it into three.
|
| // Must be a valid actor that currently exists according to the actor store. | ||
| // | ||
| // +k8s:required | ||
| ObjectRef actor = 6; |
There was a problem hiding this comment.
Why are we starting field numbers at 6 for a brand new message?
There was a problem hiding this comment.
Done.
| // Parse the CSR. | ||
| csr, err := x509.ParseCertificateRequest(req.GetCertificateSigningRequest()) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("while parsing CSR: %w", err) |
There was a problem hiding this comment.
Should this return InvalidArgument?
There was a problem hiding this comment.
Done.
| // | ||
| // Must be a valid actor that currently exists according to the actor store. | ||
| // | ||
| // +k8s:required |
There was a problem hiding this comment.
Other actor references include "+k8s:subfield(atespace)=+k8s:required," to ensure an atespace is specified, should we require that here as well?
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
[nit] This can be triggered by the client providing a bad signature on a CSR, so should we log at WARN rather than ERROR?
There was a problem hiding this comment.
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
| // leaf certificate, and any remaining entries are intermediates in | ||
| // leaf-to-root order. | ||
| repeated bytes actor_certificates = 1; | ||
| } No newline at end of file |
There was a problem hiding this comment.
[nit] dropped the trailing newline here
There was a problem hiding this comment.
Done.
cd5be8e to
b5b38fd
Compare
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).
b5b38fd to
aba8c69
Compare
|
are you planning to update whatever is using the purpose field on the cert to use the new format? |
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.