Skip to content

Commit

Permalink
Merge pull request #135 from openziti/fix.2474.add.generic.network.wi…
Browse files Browse the repository at this point in the history
…de.jwt

addresses openziti/ziti#2474 adds a generic network JWT for enrollment
  • Loading branch information
andrewpmartinez authored Oct 11, 2024
2 parents 26b4368 + 62c6be7 commit c43eb5b
Show file tree
Hide file tree
Showing 31 changed files with 2,840 additions and 10 deletions.
89 changes: 88 additions & 1 deletion client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 0.26.33
version: 0.26.34
host: demo.ziti.dev
basePath: /edge/client/v1
paths:
Expand Down Expand Up @@ -2358,6 +2358,65 @@ paths:
meta:
apiEnrollmentVersion: 0.0.1
apiVersion: 0.0.1
/network-jwts:
get:
description: Returns a list of JWTs for trusting a network
tags:
- Enrollment
summary: Returns a list of JWTs suitable for bootstrapping network trust.
operationId: listNetworkJWTs
responses:
"200":
description: A list of network JWTs
schema:
$ref: '#/definitions/listNetworkJWTsEnvelope'
"400":
description: The supplied request contains invalid fields or could not be
parsed (json and non-json bodies). The error's code, message, and cause
fields can be inspected for further information
schema:
$ref: '#/definitions/apiErrorEnvelope'
examples:
application/json:
error:
args:
urlVars: {}
cause:
details:
context: (root)
field: (root)
property: fooField3
field: (root)
message: '(root): fooField3 is required'
type: required
value:
fooField: abc
fooField2: def
causeMessage: schema validation failed
code: COULD_NOT_VALIDATE
message: The supplied request contains an invalid document
requestId: ac6766d6-3a09-44b3-8d8a-1b541d97fdd9
meta:
apiEnrollmentVersion: 0.0.1
apiVersion: 0.0.1
"429":
description: The resource requested is rate limited and the rate limit has
been exceeded
schema:
$ref: '#/definitions/apiErrorEnvelope'
examples:
application/json:
error:
args:
urlVars: {}
causeMessage: you have hit a rate limit in the requested operation
code: RATE_LIMITED
message: The resource is rate limited and the rate limit has been
exceeded. Please try again later
requestId: 270908d6-f2ef-4577-b973-67bec18ae376
meta:
apiEnrollmentVersion: 0.0.1
apiVersion: 0.0.1
/posture-response:
post:
security:
Expand Down Expand Up @@ -4774,6 +4833,16 @@ definitions:
$ref: '#/definitions/capabilities'
meta:
$ref: '#/definitions/meta'
listNetworkJWTsEnvelope:
type: object
required:
- meta
- data
properties:
data:
$ref: '#/definitions/networkJWTList'
meta:
$ref: '#/definitions/meta'
listProtocols:
type: object
additionalProperties:
Expand Down Expand Up @@ -4870,6 +4939,24 @@ definitions:
enum:
- ziti
- url
networkJWT:
description: A network JWT
type: object
allOf:
- type: object
required:
- name
- token
properties:
name:
type: string
token:
type: string
networkJWTList:
description: An array of network JWTs
type: array
items:
$ref: '#/definitions/networkJWT'
nonceChallenge:
type: object
required:
Expand Down
89 changes: 88 additions & 1 deletion management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 0.26.33
version: 0.26.34
host: demo.ziti.dev
basePath: /edge/management/v1
paths:
Expand Down Expand Up @@ -10105,6 +10105,65 @@ paths:
name: id
in: path
required: true
/network-jwts:
get:
description: Returns a list of JWTs for trusting a network
tags:
- Enrollment
summary: Returns a list of JWTs suitable for bootstrapping network trust.
operationId: listNetworkJWTs
responses:
"200":
description: A list of network JWTs
schema:
$ref: '#/definitions/listNetworkJWTsEnvelope'
"400":
description: The supplied request contains invalid fields or could not be
parsed (json and non-json bodies). The error's code, message, and cause
fields can be inspected for further information
schema:
$ref: '#/definitions/apiErrorEnvelope'
examples:
application/json:
error:
args:
urlVars: {}
cause:
details:
context: (root)
field: (root)
property: fooField3
field: (root)
message: '(root): fooField3 is required'
type: required
value:
fooField: abc
fooField2: def
causeMessage: schema validation failed
code: COULD_NOT_VALIDATE
message: The supplied request contains an invalid document
requestId: ac6766d6-3a09-44b3-8d8a-1b541d97fdd9
meta:
apiEnrollmentVersion: 0.0.1
apiVersion: 0.0.1
"429":
description: The resource requested is rate limited and the rate limit has
been exceeded
schema:
$ref: '#/definitions/apiErrorEnvelope'
examples:
application/json:
error:
args:
urlVars: {}
causeMessage: you have hit a rate limit in the requested operation
code: RATE_LIMITED
message: The resource is rate limited and the rate limit has been
exceeded. Please try again later
requestId: 270908d6-f2ef-4577-b973-67bec18ae376
meta:
apiEnrollmentVersion: 0.0.1
apiVersion: 0.0.1
/posture-check-role-attributes:
get:
security:
Expand Down Expand Up @@ -18454,6 +18513,16 @@ definitions:
$ref: '#/definitions/identityTypeList'
meta:
$ref: '#/definitions/meta'
listNetworkJWTsEnvelope:
type: object
required:
- meta
- data
properties:
data:
$ref: '#/definitions/networkJWTList'
meta:
$ref: '#/definitions/meta'
listPostureCheckEnvelope:
type: object
required:
Expand Down Expand Up @@ -18634,6 +18703,24 @@ definitions:
items:
$ref: '#/definitions/namedRole'
x-omitempty: false
networkJWT:
description: A network JWT
type: object
allOf:
- type: object
required:
- name
- token
properties:
name:
type: string
token:
type: string
networkJWTList:
description: An array of network JWTs
type: array
items:
$ref: '#/definitions/networkJWT'
operatingSystem:
type: object
required:
Expand Down
105 changes: 105 additions & 0 deletions rest_client_api_client/enrollment/enrollment_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c43eb5b

Please sign in to comment.