diff --git a/management/server/http/api/openapi.yml b/management/server/http/api/openapi.yml index 1a049a0cf..8840b639d 100644 --- a/management/server/http/api/openapi.yml +++ b/management/server/http/api/openapi.yml @@ -796,8 +796,11 @@ components: type: array items: $ref: '#/components/schemas/PolicyRule' + PostureCheck: + $ref: '#/components/schemas/PostureCheck' required: - rules + - PostureCheck RouteRequest: type: object properties: @@ -1034,6 +1037,35 @@ components: - initiator_email - target_id - meta + PostureCheck: + description: Policy poster check + type: object + properties: + osVersionPostureCheck: + $ref: '#/components/schemas/OSVersionPostureCheck' + nbVersionPostureCheck: + $ref: '#/components/schemas/NBVersionPostureCheck' + required: + - osVersionPostureCheck + - nbVersionPostureCheck + NBVersionPostureCheck: + type: object + properties: + enabled: + type: boolean + example: false + minimumVersionAllowed: + type: string + example: "1.2.3" + OSVersionPostureCheck: + type: object + properties: + enabled: + type: boolean + example: false + minimumVersionAllowed: + type: string + example: "1.2.3" responses: not_found: description: Resource not found diff --git a/management/server/http/api/types.gen.go b/management/server/http/api/types.gen.go index 329c66884..7519c71f8 100644 --- a/management/server/http/api/types.gen.go +++ b/management/server/http/api/types.gen.go @@ -257,6 +257,12 @@ type GroupRequest struct { Peers *[]string `json:"peers,omitempty"` } +// NBVersionPostureCheck defines model for NBVersionPostureCheck. +type NBVersionPostureCheck struct { + Enabled *bool `json:"enabled,omitempty"` + MinimumVersionAllowed *string `json:"minimumVersionAllowed,omitempty"` +} + // Nameserver defines model for Nameserver. type Nameserver struct { // Ip Nameserver IP @@ -329,6 +335,12 @@ type NameserverGroupRequest struct { SearchDomainsEnabled bool `json:"search_domains_enabled"` } +// OSVersionPostureCheck defines model for OSVersionPostureCheck. +type OSVersionPostureCheck struct { + Enabled *bool `json:"enabled,omitempty"` + MinimumVersionAllowed *string `json:"minimumVersionAllowed,omitempty"` +} + // Peer defines model for Peer. type Peer struct { // AccessiblePeers List of accessible peers @@ -555,6 +567,9 @@ type PersonalAccessTokenRequest struct { // Policy defines model for Policy. type Policy struct { + // PostureCheck Policy poster check + PostureCheck PostureCheck `json:"PostureCheck"` + // Description Policy friendly description Description string `json:"description"` @@ -724,6 +739,12 @@ type PolicyUpdate struct { Rules []PolicyRuleUpdate `json:"rules"` } +// PostureCheck Policy poster check +type PostureCheck struct { + NbVersionPostureCheck NBVersionPostureCheck `json:"nbVersionPostureCheck"` + OsVersionPostureCheck OSVersionPostureCheck `json:"osVersionPostureCheck"` +} + // Route defines model for Route. type Route struct { // Description Route description