openapi: 3.0.0 info: description: Infra API license: name: Elastic License v2.0 url: https://www.elastic.co/licensing/elastic-license title: Infra Authentication Providers API version: 0.0.0 servers: - url: https://api.infrahq.com tags: - name: Providers paths: /api/providers: get: description: ListProviders operationId: ListProviders parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - description: Name of the provider example: okta in: query name: name schema: description: Name of the provider example: okta type: string - description: Page number to retrieve example: '1' in: query name: page schema: description: Page number to retrieve example: '1' format: int minimum: 0 type: integer - description: Number of objects to retrieve per page (up to 1000) example: '100' in: query name: limit schema: description: Number of objects to retrieve per page (up to 1000) example: '100' format: int maximum: 1000 minimum: 0 type: integer responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/ListResponse_Provider' description: Success summary: ListProviders tags: - Providers post: description: CreateProvider operationId: CreateProvider parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string requestBody: content: application/json: schema: properties: api: properties: clientEmail: format: email type: string domainAdminEmail: format: email type: string privateKey: example: '-----BEGIN PRIVATE KEY----- MIIDNTCCAh2gAwIBAgIRALRetnpcTo9O3V2fAK3ix+c -----END PRIVATE KEY----- ' type: string type: object clientID: example: 0oapn0qwiQPiMIyR35d6 type: string clientSecret: example: jmda5eG93ax3jMDxTGrbHd_TBGT6kgNZtrCugLbU type: string kind: enum: - oidc - okta - azure - google example: oidc type: string name: example: okta format: '[a-zA-Z0-9\-_.]' maxLength: 256 minLength: 2 type: string url: example: infrahq.okta.com type: string required: - url - clientID - clientSecret type: object responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Provider' description: Success summary: CreateProvider tags: - Providers /api/providers/{id}: delete: description: DeleteProvider operationId: DeleteProvider parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/EmptyResponse' description: Success summary: DeleteProvider tags: - Providers get: description: GetProvider operationId: GetProvider parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Provider' description: Success summary: GetProvider tags: - Providers patch: description: PatchProvider operationId: PatchProvider parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string requestBody: content: application/json: schema: properties: clientSecret: example: jmda5eG93ax3jMDxTGrbHd_TBGT6kgNZtrCugLbU type: string name: example: okta type: string type: object responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Provider' description: Success summary: PatchProvider tags: - Providers put: description: UpdateProvider operationId: UpdateProvider parameters: - in: header name: Infra-Version required: true schema: description: Version of the API being requested example: 0.0.0 format: \d+\.\d+\(.\d+)?(-.\w(+\w)?)? type: string - in: header name: Authorization required: true schema: description: Bearer followed by your access key example: Bearer ACCESSKEY format: Bearer [\da-zA-Z]{10}\.[\da-zA-Z]{24} type: string - in: path name: id required: true schema: example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string requestBody: content: application/json: schema: properties: api: properties: clientEmail: format: email type: string domainAdminEmail: format: email type: string privateKey: example: '-----BEGIN PRIVATE KEY----- MIIDNTCCAh2gAwIBAgIRALRetnpcTo9O3V2fAK3ix+c -----END PRIVATE KEY----- ' type: string type: object clientID: example: 0oapn0qwiQPiMIyR35d6 type: string clientSecret: example: jmda5eG93ax3jMDxTGrbHd_TBGT6kgNZtrCugLbU type: string kind: enum: - oidc - okta - azure - google example: oidc type: string name: example: okta format: '[a-zA-Z0-9\-_.]' maxLength: 256 minLength: 2 type: string url: example: infrahq.okta.com type: string required: - name - url - clientID - clientSecret type: object responses: '400': content: application/json: schema: $ref: '#/components/schemas/Error' description: Bad Request '401': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Unauthorized: Requestor is not authenticated' '403': content: application/json: schema: $ref: '#/components/schemas/Error' description: 'Forbidden: Requestor does not have the right permissions' '404': content: application/json: schema: $ref: '#/components/schemas/Error' description: Not Found '409': content: application/json: schema: $ref: '#/components/schemas/Error' description: Duplicate Record default: content: application/json: schema: $ref: '#/components/schemas/Provider' description: Success summary: UpdateProvider tags: - Providers components: schemas: Error: properties: code: format: int32 type: integer fieldErrors: items: properties: errors: items: type: string type: array fieldName: type: string type: object type: array message: type: string ListResponse_Provider: properties: count: description: Total number of items on the current page example: '100' format: int type: integer items: items: properties: authURL: description: Authorize endpoint for the OIDC provider example: https://example.com/oauth2/v1/authorize type: string clientID: description: Client ID for the OIDC provider example: 0oapn0qwiQPiMIyR35d6 type: string created: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string id: description: Provider ID example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string kind: description: Kind of provider example: oidc type: string name: description: Name of the provider example: okta type: string scopes: description: Scopes set in the OIDC provider configuration example: '[''openid'', ''email'']' items: description: Scopes set in the OIDC provider configuration example: '[''openid'', ''email'']' type: string type: array updated: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string url: description: URL of the Infra Server example: infrahq.okta.com type: string type: object type: array limit: description: Number of objects per page example: '100' format: int type: integer page: description: Page number retrieved example: '1' format: int type: integer totalCount: description: Total number of objects example: '485' format: int type: integer totalPages: description: Total number of pages example: '5' format: int type: integer EmptyResponse: {} Provider: properties: authURL: description: Authorize endpoint for the OIDC provider example: https://example.com/oauth2/v1/authorize type: string clientID: description: Client ID for the OIDC provider example: 0oapn0qwiQPiMIyR35d6 type: string created: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string id: description: Provider ID example: 4yJ3n3D8E2 format: uid pattern: '[1-9a-km-zA-HJ-NP-Z]{1,11}' type: string kind: description: Kind of provider example: oidc type: string name: description: Name of the provider example: okta type: string scopes: description: Scopes set in the OIDC provider configuration example: '[''openid'', ''email'']' items: description: Scopes set in the OIDC provider configuration example: '[''openid'', ''email'']' type: string type: array updated: description: formatted as an RFC3339 date-time example: '2022-03-14T09:48:00Z' format: date-time type: string url: description: URL of the Infra Server example: infrahq.okta.com type: string