Static ReadonlyCA_The error code of a CA file setting that names an unusable file:
STS-CORE-0104.
StaticassertRefuses a named file that may not be read, before a caller reads it. The sentence names the setting and not the path, and is the same whether the file is outside the directories or does not exist.
A caller that reads the file itself uses readNamedFile() instead
(#2247); this stays for one that hands the PATH to a library that opens
it (a cloud SDK's key file), where the check is all this process can do.
the path as configured
nothing
StaticassignedFor a dialer whose own CA REPLACES node's store (the kubelet, the Kubernetes API, the external AuthZEN PDP): null where its use case is unassigned, so the dialer keeps its own setting exactly as before; otherwise what the assignment resolves to, as one PEM bundle, or undefined for node's store (#2118).
the outbound use case
null, { ca }, or { problem }
StaticcaReads the certificates in a PEM file.
the file's path
the PEM certificates, or a sentence saying why there are none
StaticcheckHolds a verified peer chain to the path rules without checking the host name, for a request that deliberately names no host (SPIRE's kubelet).
the host dialled, for the message
the peer certificate node verified
an Error when the chain breaks the rules, otherwise undefined
StaticcheckThe host check every verified outbound request makes: the host against the certificate's names, then the verified chain against the path rules.
the host dialled
the peer certificate node verified
an Error when either check fails, otherwise undefined
StaticdescribeDescribes a family's three settings as they are in force here, which in product is not what is stored.
the family's settings
{ allowHttp, skipTlsVerification, skipTlsVerificationSet, caFile }
StaticdescriptorThe real path of an open descriptor: what the kernel holds for it, from
/proc/self/fd/<fd>, where there is such a view. Where there is not
(not Linux), the path is resolved again and accepted only when it names
the same file the descriptor is open on (device and inode), so a link
swapped in between the open and this cannot be mistaken for it.
the open descriptor
the path it was opened by
its fstat
the fs-like module it was opened with
the test seams
the real path, or '' when it cannot be told
StatichostChecks a host against a certificate's names as RFC 9525 reads them: subjectAltName DNS-IDs and IP-IDs only, a wildcard only as a whole left-most label, never the common name.
the host name or IP address dialled
the peer certificate, as node describes it
'' when the certificate names the host, otherwise a sentence saying why not
StatichttpDecides whether an http:// URL may be dialled for a family.
Development allows any host while the family's setting is on; product refuses, except a loopback host for a family that allows one.
the family's settings and error codes
the URL's host
{ ok, why, errorCode }
StaticinstallMakes the RFC 9525 host check and the path rules node's default
checkServerIdentity for every TLS client in this process. Idempotent.
StaticisTells whether a host name is a loopback address: localhost, 127.0.0.0/8 or ::1.
the host name, IPv6 brackets allowed
true for a loopback address
StaticnamedSays whether a CA file an administrator named may be read (#1481, ASVS
5.0.0 5.3.2). In product its real path, symbolic links followed, must be
inside a directory security.fileRoots lists. A path that does not
exist answers the same as one outside them, so this says nothing about
what is on the disk.
THIS IS A CHECK OF THE PATH, NOT OF WHAT IS READ (#2247, ASVS 5.0.0
15.4.2): a link swapped in after it answers is followed by whatever opens
the path next. A caller that READS the file goes through
readNamedFile(), which checks the descriptor it reads through.
the path as configured
whether it may be read
StaticnamedThe refusal of a named file, the same Error every reader throws: it
names the setting and not the path, and is the same whether the file is
outside the directories, does not exist, or was swapped for a link out
of them after the check. namedFileRefused tells it from an fs error.
the Error, not thrown
StaticoptionsBuilds the options for a verified outbound connection of one outbound use
case (#2118): verification on, the RFC 9525 host check, and what the use
case's truststores hold as ca — node's store unchanged where the list
is system alone.
the outbound use case
Optionaloptions: { extraPems?: string[] }
{ extraPems }: an entry's own CA certificates (a SCIM
client, a secret destination, an attribute source), added
the TLS options, or { problem } where a store named cannot be
used — a legacy CA file that will not read refuses the connection, as
it always did
StaticreadREADS a file an administrator or a setting named, held to
security.fileRoots in product (#1481) WITHOUT a window between the
check and the read (#2247, ASVS 5.0.0 15.4.2). The path is checked, then
opened ONCE, and what is checked again is the open descriptor: it must
be a regular file, and its real path, as the kernel holds it, must lie
inside a listed directory. Only then is it read, through that
descriptor, and closed. A link swapped in after the path check is
followed by the open and refused by the second check, with the same
sentence as any other refusal.
O_NOFOLLOW is NOT used: a link INSIDE the directories to a file inside
them is what /etc/ssl/certs and a Kubernetes secret volume (..data)
are made of, and it was always followed. O_NONBLOCK is, so a FIFO
cannot hold the open; it is then refused as not a regular file.
Outside product nothing is confined and the file is read as before.
the path as configured
Optionalseams: NamedFileSeams
optional: the fs-like module, and the test seams
the file's text (UTF-8)
StaticskipsTells whether certificate verification is to be skipped: only when the setting is on and the mode allows it.
In product a setting that is on is ignored, and said once per process with the code given.
the setting that asks to skip verification
the error code logged when product ignores it
what is being sent, for the log line
true when verification is skipped
StatictlsBuilds the TLS options for one request of a family: verification skipped, node's store, or node's store plus the family's CA file.
Never throws; an unusable CA file is ok: false with a sentence.
the family's settings and error codes
where the request goes, for the log line
{ ok, why, errorCode, rejectUnauthorized, skipped }, with ca
and checkServerIdentity where verifying
StaticunderSays whether a real path (links already resolved) lies inside a directory
security.fileRoots lists. A listed directory is itself resolved, and
one this image does not have is compared as written.
an absolute path with no link left in it
whether it is inside one of the directories
StaticverifiedBuilds the options for a verified outbound connection that is not one of the families: verification on, the RFC 9525 host check, and any CA given beside node's store.
Optionalca: string | string[]
extra CA certificates, as PEM text or a list
Optionaloptions: { systemRoots?: boolean }
systemRoots: false trusts ca ALONE, without node's
store (#94: a connection whose operator named its own chain); ignored
when no ca is given, which would trust nothing
the TLS options
The transport policy of every outbound request to an address somebody else answers: whether it may be plain http, and whether the certificate of whoever answers is verified.
Each family has three settings (allow http, skip verification, a CA file); product mode refuses plain http and ignores a switch that skips verification.