diff --git a/client.yml b/client.yml index 61617d0..434ffbc 100644 --- a/client.yml +++ b/client.yml @@ -15,7 +15,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.26.32 + version: 0.26.33 host: demo.ziti.dev basePath: /edge/client/v1 paths: @@ -3867,6 +3867,8 @@ definitions: type: string httpUrl: type: string + id: + type: string maxLength: type: integer minLength: @@ -3878,11 +3880,17 @@ definitions: items: type: string typeId: - type: string + $ref: '#/definitions/authQueryType' authQueryList: type: array items: $ref: '#/definitions/authQueryDetail' + authQueryType: + type: string + enum: + - MFA + - TOTP + - EXT-JWT authenticate: description: A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method. diff --git a/management.yml b/management.yml index e193139..7d5c6d0 100644 --- a/management.yml +++ b/management.yml @@ -15,7 +15,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.26.32 + version: 0.26.33 host: demo.ziti.dev basePath: /edge/management/v1 paths: @@ -16322,6 +16322,8 @@ definitions: type: string httpUrl: type: string + id: + type: string maxLength: type: integer minLength: @@ -16333,11 +16335,17 @@ definitions: items: type: string typeId: - type: string + $ref: '#/definitions/authQueryType' authQueryList: type: array items: $ref: '#/definitions/authQueryDetail' + authQueryType: + type: string + enum: + - MFA + - TOTP + - EXT-JWT authenticate: description: A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method. diff --git a/rest_client_api_server/doc.go b/rest_client_api_server/doc.go index b21f600..239385a 100644 --- a/rest_client_api_server/doc.go +++ b/rest_client_api_server/doc.go @@ -30,7 +30,7 @@ // https // Host: demo.ziti.dev // BasePath: /edge/client/v1 -// Version: 0.26.32 +// Version: 0.26.33 // License: Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0.html // Contact: OpenZiti https://openziti.discourse.group // diff --git a/rest_client_api_server/embedded_spec.go b/rest_client_api_server/embedded_spec.go index f18fae9..817ba83 100644 --- a/rest_client_api_server/embedded_spec.go +++ b/rest_client_api_server/embedded_spec.go @@ -64,7 +64,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.32" + "version": "0.26.33" }, "host": "demo.ziti.dev", "basePath": "/edge/client/v1", @@ -5301,6 +5301,9 @@ func init() { "httpUrl": { "type": "string" }, + "id": { + "type": "string" + }, "maxLength": { "type": "integer" }, @@ -5317,7 +5320,7 @@ func init() { } }, "typeId": { - "type": "string" + "$ref": "#/definitions/authQueryType" } } }, @@ -5327,6 +5330,14 @@ func init() { "$ref": "#/definitions/authQueryDetail" } }, + "authQueryType": { + "type": "string", + "enum": [ + "MFA", + "TOTP", + "EXT-JWT" + ] + }, "authenticate": { "description": "A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method.", "type": "object", @@ -7681,7 +7692,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.32" + "version": "0.26.33" }, "host": "demo.ziti.dev", "basePath": "/edge/client/v1", @@ -13000,6 +13011,9 @@ func init() { "httpUrl": { "type": "string" }, + "id": { + "type": "string" + }, "maxLength": { "type": "integer" }, @@ -13016,7 +13030,7 @@ func init() { } }, "typeId": { - "type": "string" + "$ref": "#/definitions/authQueryType" } } }, @@ -13026,6 +13040,14 @@ func init() { "$ref": "#/definitions/authQueryDetail" } }, + "authQueryType": { + "type": "string", + "enum": [ + "MFA", + "TOTP", + "EXT-JWT" + ] + }, "authenticate": { "description": "A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method.", "type": "object", diff --git a/rest_management_api_server/doc.go b/rest_management_api_server/doc.go index fd308d7..89b07cd 100644 --- a/rest_management_api_server/doc.go +++ b/rest_management_api_server/doc.go @@ -30,7 +30,7 @@ // https // Host: demo.ziti.dev // BasePath: /edge/management/v1 -// Version: 0.26.32 +// Version: 0.26.33 // License: Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0.html // Contact: OpenZiti https://openziti.discourse.group // diff --git a/rest_management_api_server/embedded_spec.go b/rest_management_api_server/embedded_spec.go index 9d22a70..2bd9c2d 100644 --- a/rest_management_api_server/embedded_spec.go +++ b/rest_management_api_server/embedded_spec.go @@ -64,7 +64,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.32" + "version": "0.26.33" }, "host": "demo.ziti.dev", "basePath": "/edge/management/v1", @@ -22572,6 +22572,9 @@ func init() { "httpUrl": { "type": "string" }, + "id": { + "type": "string" + }, "maxLength": { "type": "integer" }, @@ -22588,7 +22591,7 @@ func init() { } }, "typeId": { - "type": "string" + "$ref": "#/definitions/authQueryType" } } }, @@ -22598,6 +22601,14 @@ func init() { "$ref": "#/definitions/authQueryDetail" } }, + "authQueryType": { + "type": "string", + "enum": [ + "MFA", + "TOTP", + "EXT-JWT" + ] + }, "authenticate": { "description": "A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method.", "type": "object", @@ -28526,7 +28537,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.32" + "version": "0.26.33" }, "host": "demo.ziti.dev", "basePath": "/edge/management/v1", @@ -51130,6 +51141,9 @@ func init() { "httpUrl": { "type": "string" }, + "id": { + "type": "string" + }, "maxLength": { "type": "integer" }, @@ -51146,7 +51160,7 @@ func init() { } }, "typeId": { - "type": "string" + "$ref": "#/definitions/authQueryType" } } }, @@ -51156,6 +51170,14 @@ func init() { "$ref": "#/definitions/authQueryDetail" } }, + "authQueryType": { + "type": "string", + "enum": [ + "MFA", + "TOTP", + "EXT-JWT" + ] + }, "authenticate": { "description": "A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method.", "type": "object", diff --git a/rest_model/auth_query_detail.go b/rest_model/auth_query_detail.go index 15c5852..5e01be3 100644 --- a/rest_model/auth_query_detail.go +++ b/rest_model/auth_query_detail.go @@ -55,6 +55,9 @@ type AuthQueryDetail struct { // http Url HTTPURL string `json:"httpUrl,omitempty"` + // id + ID string `json:"id,omitempty"` + // max length MaxLength int64 `json:"maxLength,omitempty"` @@ -69,7 +72,7 @@ type AuthQueryDetail struct { Scopes []string `json:"scopes"` // type Id - TypeID string `json:"typeId,omitempty"` + TypeID AuthQueryType `json:"typeId,omitempty"` } // Validate validates this auth query detail @@ -84,6 +87,10 @@ func (m *AuthQueryDetail) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTypeID(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -131,6 +138,23 @@ func (m *AuthQueryDetail) validateProvider(formats strfmt.Registry) error { return nil } +func (m *AuthQueryDetail) validateTypeID(formats strfmt.Registry) error { + if swag.IsZero(m.TypeID) { // not required + return nil + } + + if err := m.TypeID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeId") + } + return err + } + + return nil +} + // ContextValidate validate this auth query detail based on the context it is used func (m *AuthQueryDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -143,6 +167,10 @@ func (m *AuthQueryDetail) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateTypeID(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -179,6 +207,20 @@ func (m *AuthQueryDetail) contextValidateProvider(ctx context.Context, formats s return nil } +func (m *AuthQueryDetail) contextValidateTypeID(ctx context.Context, formats strfmt.Registry) error { + + if err := m.TypeID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeId") + } + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *AuthQueryDetail) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/rest_model/auth_query_type.go b/rest_model/auth_query_type.go new file mode 100644 index 0000000..5f1eabb --- /dev/null +++ b/rest_model/auth_query_type.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// +// Copyright NetFoundry Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// __ __ _ +// \ \ / / (_) +// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _ +// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` | +// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it. +// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, | +// __/ | +// |___/ + +package rest_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// AuthQueryType auth query type +// +// swagger:model authQueryType +type AuthQueryType string + +func NewAuthQueryType(value AuthQueryType) *AuthQueryType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated AuthQueryType. +func (m AuthQueryType) Pointer() *AuthQueryType { + return &m +} + +const ( + + // AuthQueryTypeMFA captures enum value "MFA" + AuthQueryTypeMFA AuthQueryType = "MFA" + + // AuthQueryTypeTOTP captures enum value "TOTP" + AuthQueryTypeTOTP AuthQueryType = "TOTP" + + // AuthQueryTypeEXTDashJWT captures enum value "EXT-JWT" + AuthQueryTypeEXTDashJWT AuthQueryType = "EXT-JWT" +) + +// for schema +var authQueryTypeEnum []interface{} + +func init() { + var res []AuthQueryType + if err := json.Unmarshal([]byte(`["MFA","TOTP","EXT-JWT"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + authQueryTypeEnum = append(authQueryTypeEnum, v) + } +} + +func (m AuthQueryType) validateAuthQueryTypeEnum(path, location string, value AuthQueryType) error { + if err := validate.EnumCase(path, location, value, authQueryTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this auth query type +func (m AuthQueryType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateAuthQueryTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this auth query type based on context it is used +func (m AuthQueryType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/source/client.yml b/source/client.yml index beeaf47..e6a63df 100644 --- a/source/client.yml +++ b/source/client.yml @@ -1,7 +1,7 @@ --- swagger: '2.0' info: - version: 0.26.32 + version: 0.26.33 title: Ziti Edge Client description: OpenZiti Edge Client API contact: diff --git a/source/management.yml b/source/management.yml index f40615f..21162e1 100644 --- a/source/management.yml +++ b/source/management.yml @@ -1,7 +1,7 @@ --- swagger: '2.0' info: - version: 0.26.32 + version: 0.26.33 title: Ziti Edge Management description: OpenZiti Edge Management API contact: diff --git a/source/shared/auth-query.yml b/source/shared/auth-query.yml index b347dde..96c7bf6 100644 --- a/source/shared/auth-query.yml +++ b/source/shared/auth-query.yml @@ -1,5 +1,11 @@ --- definitions: + authQueryType: + type: string + enum: + - MFA #legacy TOTP type + - TOTP + - EXT-JWT authQueryList: type: array items: @@ -10,7 +16,7 @@ definitions: - provider properties: typeId: - type: string + $ref: '#/definitions/authQueryType' provider: $ref: 'current-identity-mfa.yml#/definitions/mfaProviders' httpMethod: @@ -28,4 +34,6 @@ definitions: items: type: string clientId: + type: string + id: type: string \ No newline at end of file