Skip to main content

ClientCertificate

@webda/core


Interface: ClientCertificate

Defined in: packages/core/src/contexts/clientcertificate.ts:6

X.509 client certificate presented with a request (mTLS)

Properties​

fingerprint256​

fingerprint256: string

Defined in: packages/core/src/contexts/clientcertificate.ts:34

SHA-256 fingerprint, uppercase hexadecimal pairs separated by ":"


issuer​

issuer: Record<string, string | string[]>

Defined in: packages/core/src/contexts/clientcertificate.ts:22

Issuer attributes, a repeated attribute is a list


issuerDN​

issuerDN: string

Defined in: packages/core/src/contexts/clientcertificate.ts:26

Issuer distinguished name, attributes in certificate order separated by ", "


raw?​

optional raw?: string

Defined in: packages/core/src/contexts/clientcertificate.ts:52

PEM encoded certificate


san?​

optional san?: string[]

Defined in: packages/core/src/contexts/clientcertificate.ts:48

Subject alternative names as ":"

Example​

["email:alice@example.com", "URI:spiffe://example.com/alice", "DNS:alice.example.com"]

serialNumber​

serialNumber: string

Defined in: packages/core/src/contexts/clientcertificate.ts:30

Serial number (hexadecimal)


source​

source: "tls" | "proxy"

Defined in: packages/core/src/contexts/clientcertificate.ts:60

Where the certificate comes from: the TLS socket, or a header set by a trusted proxy


subject​

subject: Record<string, string | string[]>

Defined in: packages/core/src/contexts/clientcertificate.ts:12

Subject attributes, a repeated attribute (several OU) is a list

Example​

{ CN: "alice", OU: ["dev", "ops"] }

subjectDN​

subjectDN: string

Defined in: packages/core/src/contexts/clientcertificate.ts:18

Subject distinguished name, attributes in certificate order separated by ", "

Example​

"O=Webda, CN=alice"

validFrom​

validFrom: Date

Defined in: packages/core/src/contexts/clientcertificate.ts:38

Start of validity


validTo​

validTo: Date

Defined in: packages/core/src/contexts/clientcertificate.ts:42

End of validity


verified​

verified: boolean

Defined in: packages/core/src/contexts/clientcertificate.ts:56

Whether the certificate chain was verified against a trusted CA (by the TLS stack or by the trusted proxy)