Files
ziti/specs/source/shared/authenticate.yml
T
Andrew Martinez b562fb5c07 splits API specs into composible modules
- splits Open API 2.0 (swagger) into client/management APIs
- uses go-swaggers flatten capabilities
- uses newer version of go-swagger (v0.27.0)
- introduces /edge/client/v1, /edge/management/v1
- non-prefixed URLs default to /edge/client/v1
- splits some shared management/client API handlers
- renames some REST models to "client" instead of "limited"
- passes all apitests, fails dataflow upd test (main fails this as well)
- updates generate rest script for powershell
- todo: test generate rest script for bash
- todo: use xweb (different branch)
2021-05-04 11:30:32 -04:00

130 lines
3.1 KiB
YAML

---
parameters:
authMethod:
name: method
in: query
required: true
type: string
enum:
- password
- cert
paths:
authenticate:
parameters:
- $ref: '#/parameters/authMethod'
post:
summary: Authenticate via a method supplied via a query string parameter
description: |
Allows authentication Methods include "password" and "cert"
security: [ ]
tags:
- Authentication
operationId: authenticate
parameters:
- name: auth
in: body
required: false
schema:
$ref: '#/definitions/authenticate'
responses:
'200':
$ref: './current-api-session.yml/#/responses/detailCurrentAPISession'
'400':
$ref: './standard-responses.yml#/responses/badRequestResponse'
'403':
$ref: './standard-responses.yml#/responses/invalidAuthResponse'
authenticate-mfa:
post:
summary: Complete MFA authentication
description: Completes MFA authentication by submitting a MFA time based one time token or backup code.
security:
- ztSession: [ ]
tags:
- Authentication
- MFA
operationId: authenticateMfa
parameters:
- name: mfaAuth
in: body
required: true
description: 'An MFA validation request'
schema:
$ref: '#/definitions/mfaCode'
responses:
'200':
$ref: './standard-responses.yml#/responses/emptyResponse'
'401':
$ref: './standard-responses.yml#/responses/emptyResponse'
responses:
$ref: 'standard-responses.yml#/responses'
definitions:
mfaCode:
type: object
required:
- code
properties:
code:
type: string
password:
type: string
minLength: 5
maxLength: 100
password-nullable:
type: string
minLength: 5
maxLength: 100
x-nullable: true
username:
type: string
minLength: 4
maxLength: 100
username-nullable:
type: string
minLength: 4
maxLength: 100
x-nullable: true
envInfo:
description: Environment information an authenticating client may provide
properties:
os:
type: string
arch:
type: string
osRelease:
type: string
osVersion:
type: string
type: object
sdkInfo:
description: SDK information an authenticating client may provide
properties:
type:
type: string
branch:
type: string
version:
type: string
revision:
type: string
appId:
type: string
appVersion:
type: string
type: object
authenticate:
type: object
description: A generic authenticate object meant for use with the /authenticate path. Required fields depend on authentication method.
properties:
username:
$ref: '#/definitions/username'
password:
$ref: '#/definitions/password'
envInfo:
$ref: '#/definitions/envInfo'
sdkInfo:
$ref: '#/definitions/sdkInfo'
configTypes:
$ref: 'config-types.yml#/definitions/configTypes'