Ceph Auth API

The Auth API from Ceph — 3 operation(s) for auth.

OpenAPI Specification

ceph-auth-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Ceph Manager REST Auth API
  description: 'REST API exposed by the Ceph Manager (ceph-mgr) dashboard module for

    managing and monitoring a Ceph cluster, including pools, OSDs, hosts,

    monitors, RGW, RBD, CephFS, users, and cluster configuration. Authentication

    uses a JWT obtained from POST /api/auth, supplied via the Authorization

    Bearer header. API versioning is negotiated via the Accept header using

    application/vnd.ceph.api.v{major}.{minor}+json. Generated as a best-effort

    spec from public Ceph documentation; the canonical OpenAPI is served by

    every Ceph Manager instance at /docs/api.json.

    '
  version: '1.0'
  contact:
    name: Ceph
    url: https://docs.ceph.com/en/latest/mgr/ceph_api/
  license:
    name: LGPL-2.1
    url: https://github.com/ceph/ceph/blob/main/COPYING
servers:
- url: https://{manager_host}:{dashboard_port}/api
  description: Ceph Manager dashboard
  variables:
    manager_host:
      default: localhost
    dashboard_port:
      default: '8443'
security:
- bearerAuth: []
tags:
- name: Auth
paths:
  /auth:
    post:
      tags:
      - Auth
      summary: Obtain JWT token
      description: Authenticate with username and password to obtain a JWT for subsequent calls.
      operationId: login
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRequest'
      responses:
        '201':
          description: Authentication successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          $ref: '#/components/responses/Error'
  /auth/check:
    post:
      tags:
      - Auth
      summary: Validate token
      description: Validate the current bearer token.
      operationId: checkAuth
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
      responses:
        '200':
          description: Token validity status.
          content:
            application/json:
              schema:
                type: object
  /auth/logout:
    post:
      tags:
      - Auth
      summary: Logout
      description: Revoke the current authentication session.
      operationId: logout
      responses:
        '200':
          description: Logged out.
components:
  schemas:
    AuthResponse:
      type: object
      properties:
        token:
          type: string
        username:
          type: string
        permissions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        pwdExpirationDate:
          type: integer
          nullable: true
        sso:
          type: boolean
        pwdUpdateRequired:
          type: boolean
    AuthRequest:
      type: object
      required:
      - username
      - password
      properties:
        username:
          type: string
        password:
          type: string
  responses:
    Error:
      description: Error response.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT obtained from POST /api/auth.