implement certificate posture check

This commit is contained in:
pascal
2026-08-31 13:47:55 +02:00
parent 086d8ba507
commit 84d83fa05e
34 changed files with 2825 additions and 1236 deletions
+14
View File
@@ -1663,6 +1663,8 @@ components:
$ref: '#/components/schemas/PeerNetworkRangeCheck'
process_check:
$ref: '#/components/schemas/ProcessCheck'
certificate_check:
$ref: '#/components/schemas/CertificateCheck'
NBVersionCheck:
description: Posture check for the version of NetBird
type: object
@@ -1780,6 +1782,18 @@ components:
description: Path to the process executable file in a Windows operating system
type: string
example: "C:\ProgramData\NetBird\netbird.exe"
CertificateCheck:
description: Posture check for a certificate held by the peer that chains to one of the given CA certificates
type: object
properties:
ca_certificates:
description: PEM encoded CA certificates the peer's certificate must chain to
type: array
items:
type: string
example: ["-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----"]
required:
- ca_certificates
Location:
description: Describe geographical location information
type: object
+9
View File
@@ -2617,6 +2617,12 @@ type BypassResponse struct {
PeerId string `json:"peer_id"`
}
// CertificateCheck Posture check for a certificate held by the peer that chains to one of the given CA certificates
type CertificateCheck struct {
// CaCertificates PEM encoded CA certificates the peer's certificate must chain to
CaCertificates []string `json:"ca_certificates"`
}
// CheckoutResponse defines model for CheckoutResponse.
type CheckoutResponse struct {
// SessionId The unique identifier for the checkout session.
@@ -2628,6 +2634,9 @@ type CheckoutResponse struct {
// Checks List of objects that perform the actual checks
type Checks struct {
// CertificateCheck Posture check for a certificate held by the peer that chains to one of the given CA certificates
CertificateCheck *CertificateCheck `json:"certificate_check,omitempty"`
// GeoLocationCheck Posture check for geo location
GeoLocationCheck *GeoLocationCheck `json:"geo_location_check,omitempty"`