Files
Andrew MartinezandGitHub 2a12985526 Fix.openziti.ziti.3356.www.authenticate.headers (#169)
* for openziti/ziti#3356 add www-authenticate headers

- adds www-authenticate headers to all responses
- moves to swagger 0.33.1
- updates readme
- updates version checking in powershell and bash
2026-02-12 13:41:23 -05:00

393 lines
13 KiB
YAML

---
paths:
service-policies:
get:
summary: List service policies
description: |
Retrieves a list of service policy resources; supports filtering, sorting, and pagination. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: listServicePolicies
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: '#/responses/listServicePolicies'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
post:
summary: Create a service policy resource
description: Create a service policy resource. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: createServicePolicy
parameters:
- name: policy
in: body
required: true
description: A service policy to create
schema:
$ref: '#/definitions/servicePolicyCreate'
responses:
'201':
$ref: '../shared/standard-responses.yml#/responses/createResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
service-policies-id:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: Retrieves a single service policy
description: Retrieves a single service policy by id. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: detailServicePolicy
responses:
'200':
$ref: '#/responses/detailServicePolicy'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
put:
summary: Update all fields on a service policy
description: Update all fields on a service policy by id. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: updateServicePolicy
parameters:
- name: policy
in: body
required: true
description: A service policy update object
schema:
$ref: '#/definitions/servicePolicyUpdate'
responses:
'200':
$ref: '../shared/standard-responses.yml#/responses/updateResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
patch:
summary: Update the supplied fields on a service policy
description: Update the supplied fields on a service policy. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: patchServicePolicy
parameters:
- name: policy
in: body
required: true
description: A service policy patch object
schema:
$ref: '#/definitions/servicePolicyPatch'
responses:
'200':
$ref: '../shared/standard-responses.yml#/responses/patchResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
delete:
summary: Delete a service policy
description: Delete a service policy by id. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: deleteServicePolicy
responses:
'200':
$ref: '../shared/standard-responses.yml#/responses/deleteResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'409':
$ref: '../shared/standard-responses.yml#/responses/cannotDeleteReferencedResourceResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
service-policies-id-identities:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: List identities a service policy affects
description: |
Retrieves a list of identity resources that are affected by a service policy; supports filtering, sorting, and pagination. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: listServicePolicyIdentities
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: 'identities.yml#/responses/listIdentities'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
service-policies-id-services:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: List services a service policy affects
description: |
Retrieves a list of service resources that are affected by a service policy; supports filtering, sorting, and pagination. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: listServicePolicyServices
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: '../shared/services.yml#/responses/listServices'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
service-policies-id-posture-checks:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: List posture check a service policy includes
description: |
Retrieves a list of posture check resources that are affected by a service policy; supports filtering, sorting, and pagination. Requires admin access.
security:
- ztSession: [ ]
- oauth2: [ openid ]
tags:
- Service Policy
operationId: listServicePolicyPostureChecks
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: 'posture-checks.yml#/responses/listPostureChecks'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'429':
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
'503':
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
responses:
listServicePolicies:
description: A list of service policies
headers:
WWW-Authenticate:
description: "Denotes different type of security token related information"
type: array
items:
type: string
schema:
$ref: '#/definitions/listServicePoliciesEnvelope'
detailServicePolicy:
description: A single service policy
headers:
WWW-Authenticate:
description: "Denotes different type of security token related information"
type: array
items:
type: string
schema:
$ref: '#/definitions/detailServicePolicyEnvelop'
definitions:
listServicePoliciesEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/servicePolicyList'
detailServicePolicyEnvelop:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/servicePolicyDetail'
servicePolicyList:
type: array
items:
$ref: '#/definitions/servicePolicyDetail'
servicePolicyDetail:
type: object
allOf:
- $ref: '../shared/base-entity.yml#/definitions/baseEntity'
- type: object
required:
- name
- type
- semantic
- serviceRoles
- serviceRolesDisplay
- identityRoles
- identityRolesDisplay
- postureCheckRoles
- postureCheckRolesDisplay
properties:
name:
type: string
type:
$ref: '../shared/base-entity.yml#/definitions/dialBind'
semantic:
$ref: '../shared/base-entity.yml#/definitions/semantic'
serviceRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
serviceRolesDisplay:
$ref: '../shared/base-entity.yml#/definitions/namedRoles'
identityRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
identityRolesDisplay:
$ref: '../shared/base-entity.yml#/definitions/namedRoles'
postureCheckRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
postureCheckRolesDisplay:
$ref: '../shared/base-entity.yml#/definitions/namedRoles'
servicePolicyCreate:
type: object
required:
- name
- type
- semantic
properties:
tags:
$ref: '../shared/base-entity.yml#/definitions/tags'
name:
type: string
type:
$ref: '../shared/base-entity.yml#/definitions/dialBind'
semantic:
$ref: '../shared/base-entity.yml#/definitions/semantic'
serviceRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
identityRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
postureCheckRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
servicePolicyUpdate:
type: object
required:
- name
- type
- semantic
properties:
tags:
$ref: '../shared/base-entity.yml#/definitions/tags'
name:
type: string
type:
$ref: '../shared/base-entity.yml#/definitions/dialBind'
semantic:
$ref: '../shared/base-entity.yml#/definitions/semantic'
serviceRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
identityRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
postureCheckRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
servicePolicyPatch:
type: object
properties:
tags:
$ref: '../shared/base-entity.yml#/definitions/tags'
name:
type: string
type:
$ref: '../shared/base-entity.yml#/definitions/dialBind'
semantic:
$ref: '../shared/base-entity.yml#/definitions/semantic'
serviceRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
identityRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'
postureCheckRoles:
$ref: '../shared/base-entity.yml#/definitions/roles'