Infisical Universal Auth API

The Universal Auth API from Infisical — 8 operation(s) for universal auth.

OpenAPI Specification

infisical-universal-auth-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Infisical Admin Universal Auth API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
- url: https://us.infisical.com
  description: Production server (US)
- url: https://eu.infisical.com
  description: Production server (EU)
- url: http://localhost:8080
  description: Local server
tags:
- name: Universal Auth
paths:
  /api/v1/auth/universal-auth/login:
    post:
      operationId: loginWithUniversalAuth
      tags:
      - Universal Auth
      description: Login with Universal Auth for machine identity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientId:
                  type: string
                  description: Your Machine Identity Client ID.
                clientSecret:
                  type: string
                  description: Your Machine Identity Client Secret.
                organizationSlug:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: When set, this will scope the login session to the specified organization the machine identity has access to. If omitted, the session defaults to the organization where the machine identity was created in.
              required:
              - clientId
              - clientSecret
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                  expiresIn:
                    type: number
                  accessTokenMaxTTL:
                    type: number
                  tokenType:
                    type: string
                    enum:
                    - Bearer
                required:
                - accessToken
                - expiresIn
                - accessTokenMaxTTL
                - tokenType
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
  /api/v1/auth/universal-auth/identities/{identityId}:
    post:
      operationId: attachUniversalAuth
      tags:
      - Universal Auth
      description: Attach Universal Auth configuration onto machine identity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientSecretTrustedIps:
                  type: array
                  items:
                    type: object
                    properties:
                      ipAddress:
                        type: string
                    required:
                    - ipAddress
                    additionalProperties: false
                  minItems: 1
                  default:
                  - ipAddress: 0.0.0.0/0
                  - ipAddress: ::/0
                  description: A list of IPs or CIDR ranges that the Client Secret can be used from together with the Client ID to get back an access token. You can use 0.0.0.0/0, to allow usage from any network address.
                accessTokenTrustedIps:
                  type: array
                  items:
                    type: object
                    properties:
                      ipAddress:
                        type: string
                    required:
                    - ipAddress
                    additionalProperties: false
                  minItems: 1
                  default:
                  - ipAddress: 0.0.0.0/0
                  - ipAddress: ::/0
                  description: A list of IPs or CIDR ranges that access tokens can be used from. You can use 0.0.0.0/0, to allow usage from any network address.
                accessTokenTTL:
                  type: integer
                  minimum: 0
                  maximum: 315360000
                  default: 2592000
                  description: The lifetime for an access token in seconds. This value will be referenced at renewal time.
                accessTokenMaxTTL:
                  type: integer
                  minimum: 0
                  maximum: 315360000
                  default: 2592000
                  description: The maximum lifetime for an access token in seconds. This value will be referenced at renewal time.
                accessTokenNumUsesLimit:
                  type: integer
                  minimum: 0
                  default: 0
                  description: The maximum number of times that an access token can be used; a value of 0 implies infinite number of uses.
                accessTokenPeriod:
                  type: integer
                  minimum: 0
                  default: 0
                  description: The period for an access token in seconds. This value will be referenced at renewal time. Default value is 0.
                lockoutEnabled:
                  type: boolean
                  default: true
                  description: Whether the lockout feature is enabled.
                lockoutThreshold:
                  type: number
                  minimum: 1
                  maximum: 30
                  default: 3
                  description: The amount of times login must fail before locking the identity auth method.
                lockoutDurationSeconds:
                  type: number
                  minimum: 30
                  maximum: 86400
                  default: 300
                  description: How long an identity auth method lockout lasts.
                lockoutCounterResetSeconds:
                  type: number
                  minimum: 5
                  maximum: 3600
                  default: 30
                  description: How long to wait from the most recent failed login until resetting the lockout counter.
              additionalProperties: false
      parameters:
      - schema:
          type: string
        in: path
        name: identityId
        required: true
        description: The ID of the machine identity to attach the configuration onto.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  identityUniversalAuth:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      clientId:
                        type: string
                      accessTokenTTL:
                        type: number
                        default: 7200
                      accessTokenMaxTTL:
                        type: number
                        default: 7200
                      accessTokenNumUsesLimit:
                        type: number
                        default: 0
                      clientSecretTrustedIps: {}
                      accessTokenTrustedIps: {}
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      identityId:
                        type: string
                        format: uuid
                      accessTokenPeriod:
                        type: number
                        default: 0
                      lockoutEnabled:
                        type: boolean
                        default: true
                      lockoutThreshold:
                        type: number
                        default: 3
                      lockoutDurationSeconds:
                        type: number
                        default: 300
                      lockoutCounterResetSeconds:
                        type: number
                        default: 30
                    required:
                    - id
                    - clientId
                    - createdAt
                    - updatedAt
                    - identityId
                    additionalProperties: false
                required:
                - identityUniversalAuth
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    patch:
      operationId: updateUniversalAuth
      tags:
      - Universal Auth
      description: Update Universal Auth configuration on machine identity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientSecretTrustedIps:
                  type: array
                  items:
                    type: object
                    properties:
                      ipAddress:
                        type: string
                    required:
                    - ipAddress
                    additionalProperties: false
                  minItems: 1
                  description: The new list of IPs or CIDR ranges that the Client Secret can be used from.
                accessTokenTrustedIps:
                  type: array
                  items:
                    type: object
                    properties:
                      ipAddress:
                        type: string
                    required:
                    - ipAddress
                    additionalProperties: false
                  minItems: 1
                  description: The new list of IPs or CIDR ranges that access tokens can be used from.
                accessTokenTTL:
                  type: integer
                  minimum: 0
                  maximum: 315360000
                  description: The new lifetime for an access token in seconds.
                accessTokenNumUsesLimit:
                  type: integer
                  minimum: 0
                  description: The new maximum number of times that an access token can be used.
                accessTokenMaxTTL:
                  type: integer
                  minimum: 0
                  maximum: 315360000
                  description: The new maximum lifetime for an access token in seconds.
                accessTokenPeriod:
                  type: integer
                  minimum: 0
                  maximum: 315360000
                  description: The new period for an access token in seconds.
                lockoutEnabled:
                  type: boolean
                  description: Whether the lockout feature is enabled.
                lockoutThreshold:
                  type: number
                  minimum: 1
                  maximum: 30
                  description: The amount of times login must fail before locking the identity auth method.
                lockoutDurationSeconds:
                  type: number
                  minimum: 30
                  maximum: 86400
                  description: How long an identity auth method lockout lasts.
                lockoutCounterResetSeconds:
                  type: number
                  minimum: 5
                  maximum: 3600
                  description: How long to wait from the most recent failed login until resetting the lockout counter.
              additionalProperties: false
      parameters:
      - schema:
          type: string
        in: path
        name: identityId
        required: true
        description: The ID of the machine identity to update the auth method for.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  identityUniversalAuth:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      clientId:
                        type: string
                      accessTokenTTL:
                        type: number
                        default: 7200
                      accessTokenMaxTTL:
                        type: number
                        default: 7200
                      accessTokenNumUsesLimit:
                        type: number
                        default: 0
                      clientSecretTrustedIps: {}
                      accessTokenTrustedIps: {}
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      identityId:
                        type: string
                        format: uuid
                      accessTokenPeriod:
                        type: number
                        default: 0
                      lockoutEnabled:
                        type: boolean
                        default: true
                      lockoutThreshold:
                        type: number
                        default: 3
                      lockoutDurationSeconds:
                        type: number
                        default: 300
                      lockoutCounterResetSeconds:
                        type: number
                        default: 30
                    required:
                    - id
                    - clientId
                    - createdAt
                    - updatedAt
                    - identityId
                    additionalProperties: false
                required:
                - identityUniversalAuth
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    get:
      operationId: getUniversalAuth
      tags:
      - Universal Auth
      description: Retrieve Universal Auth configuration on machine identity
      parameters:
      - schema:
          type: string
        in: path
        name: identityId
        required: true
        description: The ID of the machine identity to retrieve the auth method for.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  identityUniversalAuth:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      clientId:
                        type: string
                      accessTokenTTL:
                        type: number
                        default: 7200
                      accessTokenMaxTTL:
                        type: number
                        default: 7200
                      accessTokenNumUsesLimit:
                        type: number
                        default: 0
                      clientSecretTrustedIps: {}
                      accessTokenTrustedIps: {}
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      identityId:
                        type: string
                        format: uuid
                      accessTokenPeriod:
                        type: number
                        default: 0
                      lockoutEnabled:
                        type: boolean
                        default: true
                      lockoutThreshold:
                        type: number
                        default: 3
                      lockoutDurationSeconds:
                        type: number
                        default: 300
                      lockoutCounterResetSeconds:
                        type: number
                        default: 30
                    required:
                    - id
                    - clientId
                    - createdAt
                    - updatedAt
                    - identityId
                    additionalProperties: false
                required:
                - identityUniversalAuth
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    delete:
      operationId: deleteUniversalAuth
      tags:
      - Universal Auth
      description: Delete Universal Auth configuration on machine identity
      parameters:
      - schema:
          type: string
        in: path
        name: identityId
        required: true
        description: The ID of the machine identity to revoke the auth method for.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  identityUniversalAuth:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
   

# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/infisical/refs/heads/main/openapi/infisical-universal-auth-api-openapi.yml