Records the options. Nothing is bound and nothing is attested here.
the server, the socket, the trust domain, the join token and the trust bundle
Records one accepted peer and injects the paused socket.
the accepted socket
Turns a thrown error into the refusal a handler reports.
what was thrown
the refusal
Attests with the join token, retrying while the call failed. A token minted on another node is not visible everywhere at once, and a refusal before the token is known does not spend it. A success is not retried: the token is spent.
the agent's CSR
the agent X509-SVID message
One AttestAgent exchange. The send side stays open until the answer arrives: half-closing first makes the server finish the stream before the handler replies, and the token is spent on an empty answer.
the agent's CSR
the response message
The entries the Server API says this agent may issue.
the entries
Binds the Unix socket and hands each connection to grpc-js after the peer is recorded. The socket is mode 0666 so a workload of another uid in the same task can connect. It is not resumed.
FetchJWTSVID's answer.
the request
the caller's selector texts
the response
ValidateJWTSVID's answer. The signature is checked here, with node, against the bundle the Server API publishes.
the request
the SPIFFE ID and the claims
Mints an X509-SVID for every entry the caller matches.
the caller's selector texts
the SVIDs, the federated bundles and the shortest lifetime
One bundle response. The trust domain's own bundle is written after every federated one, so a federated document cannot replace it.
x509 or jwt
the response message
Marks a connection's facts as no longer the process that connected, so the next call on that socket is refused. A test uses this; killing the pidfd from outside is the same check against a live process.
the connection's facts
One unary Server API call.
the service client
the method
the request
the response
Accepts the server only when its certificate names this trust domain's SPIRE server. A hostname check cannot: the certificate has no DNS name.
unused; grpc-js passes it
the peer certificate
undefined when it matches, otherwise an Error
Stops one stream's rotation and forgets its timer.
the stream's flag
The entries this agent may issue, narrowed to the caller when attestation is on.
the caller's selector texts
the entries
The device and inode of a process's executable.
the process id
the device and inode, or zeros
Ends a server stream with a status.
the gRPC call
the error code, the status and the sentence
Fails a unary call.
the gRPC call
grpc-js's callback
the error code, the status and the sentence
Federated bundles named by registration entries. A denial is ignored: one trust domain the server will not show must not empty the answer. A key equal to this trust domain is skipped.
the trust domain names
JWT documents rather than X.509 DER
the map keyed by spiffe://<domain>
GETs a URL and returns the body. Used for the public bundle document only.
the URL
the body
Closes the pidfd and drops the facts.
the connection's facts
The Workload API handlers, keyed by the proto's method names.
the handlers
Re-sends a stream at half the lifetime, and again after that, while the client is still there. Two functions, so the wait and the send are not one function calling itself: this is the Workload API's own rotation, per stream, in this process.
the gRPC call
the stream's flag
what is being re-sent
the next message
the lifetime the last message carried
This trust domain's JWT authorities, as a JWK Set document.
the document's bytes
The JWT keys of a trust domain. Null when this agent has no bundle for it. A failure to reach this trust domain's own bundle is thrown.
the trust domain
the JWKs, or null
The facts of the connection accepted most recently, or null.
the facts
Fetches the trust anchors: the PEM handed in, or the public HTTPS
bundle document's x509-svid certificates.
Loads the native peer-credentials module. A failure here is the end: the socket is not created, because a Workload API that cannot say who called it must not answer.
Loads the four Server API services and the Workload API service.
Makes one ECDSA P-256 certificate request. The server reads the public key and ignores the subject. The attributes tag is present and empty, because PKCS#10 requires it and pkijs omits it when the member is undefined.
the subject CN
the PKCS#8 private key and the CSR, both DER
The next X509 response, or a refusal when the caller is entitled to nothing any more.
the caller
the message and the lifetime
What the kernel says about the socket's peer, taken at accept. Never
throws; a failure is facts.error and the socket is closed.
the accepted socket
the facts
FetchJWTSVID.
the gRPC call
grpc-js's callback
FetchJWTBundles. Stays open.
the gRPC call
FetchX509SVID. The first message is written and the stream stays open.
the gRPC call
FetchX509Bundles. Stays open. A caller entitled to no SVID still receives the bundles: the method is how a client validates.
the gRPC call
FetchWITSVID and FetchWITBundles. Unimplemented, after the header.
the gRPC call
the method
ValidateJWTSVID.
the gRPC call
grpc-js's callback
Opens the Server API clients with the agent SVID.
This trust domain's X.509 anchors, concatenated DER.
the DER
The number in unix:attested-<n>, matched as a whole number. A prefix
would take 1 out of unix:attested-10.
the gRPC call
the id, or null
The header, then the attested peer. The header wins, so a client that forgot it is told about the header.
the gRPC call
the method
the caller, or a refusal
Whether the call carries workload.spiffe.io: true.
the gRPC call
whether it does
The selector texts for one connection's uid and gid.
the connection's facts
the texts unix:uid:…
Writes the first bundle response and keeps the stream open.
the gRPC call
the stream's flag
x509 or jwt
Writes the first X509 response and keeps the stream open.
the gRPC call
the stream's flag
the caller
The Server API address, without a scheme.
host:port
Waits. One delay inside an attestation attempt, not a periodic timer.
the delay
Attests, then serves. The native module is loaded before any socket
exists. A failure throws an Error whose code is STS-SPIFFE-0148.
A process's start time, field 22 of /proc/pid/stat, counted from the last ')' because the command may contain spaces.
the process id
the start time, or ''
Whether these facts still name the process that connected. '' when they do. A peer that was never visible (another pid namespace) stays valid: its identity is the uid and gid, which do not change.
the connection's facts
'' or why not
Closes the socket, the clients and every pidfd. Safe to call twice, and safe to call when start did not finish.
TLS credentials for the Server API. No client certificate until the agent has attested.
the agent key and certificate, or null
the channel credentials
StaticanchorsTakes the x509-svid x5c certificates out of a JWK Set.
the document
PEM anchors, or ''
Staticb64urlDecodes a base64url segment, adding the padding the JWT omitted.
the segment
the bytes
StaticcertsConcatenates certificates as PEM, leaf first.
the certificate DER fragments
the PEM
StaticconcatConcatenates DER fragments, leaf first as the caller handed them.
the fragments
one buffer
StaticdecodeSplits a compact JWS. The signing input is the two segments as they were sent, not a re-encoding of the JSON.
the compact JWS
the header, the payload and the signing input, or not ok
StaticensureInstalls node's Web Crypto as pkijs's engine when nothing has. A process that already installed one — the service, in the in-process test — is left alone: replacing the engine would change the service's signatures.
StaticentryReads one registration entry out of the Server API's message.
the proto
the entry
StaticfailBuilds an Error carrying an STS code. The code is for the operator; it is never put on the wire.
the error code
the sentence
the error
StaticflagReads a boolean flag. Absent means on, which is the default for both checks.
the text, or undefined
the boolean
StaticidReads a SPIFFE ID out of a SPIRE trust_domain and path.
the proto
the id, or ''
StaticjwtThe JWT authorities of a bundle message, as JWKs with use and kid.
the bundle
the JWKs
StaticmainThe process entry. Loads nothing of the service and binds nothing until start().
StaticnameLooks up one name by id in a passwd- or group-style file.
the file's path
the numeric id
the name, or ''
StaticnotThe sentence a caller entitled to nothing is answered with.
the method
what it is not entitled to
the sentence
StaticparseParses a SPIFFE ID. Enough of the grammar that a caller cannot name an identity by a string that is not one; the server remains the authority for the ids it issues.
the text
{ ok, id, trustDomain, path } or { ok: false, reason }
StaticpemWraps DER as a PEM block, 64 columns to a line.
the DER
the PEM label
the PEM
StaticreadReads argv. A --join-token flag is refused and its value is not
repeated. The token comes from the environment or from a file.
the arguments after the program name
{ ok, message } or { ok, opts, readyFile }, where
readyFile is --ready-file or empty
StaticrefusalBuilds a refusal a Workload API method answers with: a gRPC status and the STS code the log records.
the error code
the gRPC status
the sentence the client sees
the error
StaticremoveRemoves the ready file, so an agent that has stopped does not still claim to serve.
the path given as --ready-file, or empty
StaticselectorsThe unix selectors a caller of this uid and gid is seen as. The same set accept emits: uid, gid, and the names when the files have them.
the numeric uid
the numeric gid
Optionalopts: any
passwdPath and groupPath, when not the system files
the selectors, type unix
StaticselectorsSPIRE's rule: every selector on the entry is present on the caller. An entry with none matches every caller.
the entry's selectors
the caller's selector texts
whether the entry matches
StaticselectorsThe selectors as the admin API takes them, comma-separated.
the numeric uid
the numeric gid
Optionalopts: any
passwdPath and groupPath, when not the system files
the selector text
StaticsignatureVerifies one JWS signature with node. ES uses IEEE-P1363, PS uses PSS, EdDSA uses the key's own algorithm.
the JWS alg
the signing input
the signature
the key, which may still carry use and kid
whether it verified
StaticstatusAsks whether one batch item's status is OK. The loader stringifies enums and int64s, and this field is an int32, so 0, '0' and 'OK' are the same answer.
the status message
whether it is OK
StaticstructConverts a plain object to a google.protobuf.Struct. The well-known
type's fields are camelCase even when every other field is kept in
the proto's spelling: stringValue, not string_value.
the object
the Struct
StaticvalueConverts one JSON value to a google.protobuf.Value.
the value
the Value
StaticverifyVerifies a decoded JWT-SVID: the signature, then the audience, then the expiry. A failure of any of the three is STS-SPIFFE-0037.
the decoded token
the audience the caller claims
the JWKs that may have signed it
the result
StaticwriteWrites the ready file: the agent's SPIFFE ID and a newline, once the socket serves. Written beside itself and renamed, so a reader never sees half an ID. A sidecar's workload waits for this file rather than for the socket, because the socket exists a moment before the agent is worth calling and the ID is what an entry is parented on.
the path given as --ready-file
the agent's SPIFFE ID
whether the file was written
Staticx509The X.509 anchors of a bundle message.
the bundle
concatenated DER
A workload agent: one join token, the SPIRE Server API, and the Workload API on a Unix socket beside the workload (#324).