StackRox SecretService API

The SecretService API from StackRox — 3 operation(s) for secretservice.

OpenAPI Specification

stackrox-secretservice-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: API Reference AlertService SecretService API
  version: '1'
  description: API reference for the StackRox Kubernetes Security Platform (upstream of Red Hat Advanced Cluster Security). Provides risk analysis, visibility, runtime alerts, policy management, compliance checking, and vulnerability management for containerized workloads. Authentication uses API tokens generated via /v1/apitokens/generate and passed as Bearer tokens.
  contact:
    email: support@stackrox.com
    url: https://www.stackrox.io/
  license:
    name: All Rights Reserved
    url: https://www.stackrox.com/
servers:
- url: https://{central-host}
  description: StackRox Central API server
  variables:
    central-host:
      default: stackrox.localhost
      description: StackRox Central hostname or IP
security:
- ApiToken: []
tags:
- name: SecretService
paths:
  /v1/secrets:
    get:
      operationId: ListSecrets
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListSecretsResponse'
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
      - name: pagination.limit
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: pagination.offset
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: pagination.sort_option.field
        in: query
        required: false
        schema:
          type: string
      - name: pagination.sort_option.reversed
        in: query
        required: false
        schema:
          type: boolean
          format: boolean
      tags:
      - SecretService
  /v1/secrets/{id}:
    get:
      operationId: GetSecret
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/storageSecret'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      tags:
      - SecretService
  /v1/secretscount:
    get:
      operationId: CountSecrets
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1CountSecretsResponse'
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
      - name: pagination.limit
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: pagination.offset
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: pagination.sort_option.field
        in: query
        required: false
        schema:
          type: string
      - name: pagination.sort_option.reversed
        in: query
        required: false
        schema:
          type: boolean
          format: boolean
      tags:
      - SecretService
components:
  schemas:
    storageSecret:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        clusterId:
          type: string
        clusterName:
          type: string
        namespace:
          type: string
        type:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        files:
          type: array
          items:
            $ref: '#/components/schemas/storageSecretDataFile'
        relationship:
          $ref: '#/components/schemas/storageSecretRelationship'
      title: 'Flat secret object.

        Any properties of an individual secret.

        (regardless of time, scope, or context)

        ////////////////////////////////////////'
    storageSecretDeploymentRelationship:
      type: object
      properties:
        id:
          type: string
          description: Id of the deployment using the secret within a container.
        name:
          type: string
          description: Name of the deployment.
      title: 'Secrets can be used by a deployment.

        Next Tag: 3'
    storageImagePullSecret:
      type: object
      properties:
        registries:
          type: array
          items:
            $ref: '#/components/schemas/ImagePullSecretRegistry'
    storageSecretDataFile:
      type: object
      properties:
        name:
          type: string
        type:
          $ref: '#/components/schemas/storageSecretType'
        cert:
          $ref: '#/components/schemas/storageCert'
        imagePullSecret:
          $ref: '#/components/schemas/storageImagePullSecret'
    storageSecretType:
      type: string
      enum:
      - UNDETERMINED
      - PUBLIC_CERTIFICATE
      - CERTIFICATE_REQUEST
      - PRIVACY_ENHANCED_MESSAGE
      - OPENSSH_PRIVATE_KEY
      - PGP_PRIVATE_KEY
      - EC_PRIVATE_KEY
      - RSA_PRIVATE_KEY
      - DSA_PRIVATE_KEY
      - CERT_PRIVATE_KEY
      - ENCRYPTED_PRIVATE_KEY
      - IMAGE_PULL_SECRET
      default: UNDETERMINED
    v1ListSecretsResponse:
      type: object
      properties:
        secrets:
          type: array
          items:
            $ref: '#/components/schemas/storageListSecret'
      title: 'A list of secrets with their relationships.

        Next Tag: 2'
    ImagePullSecretRegistry:
      type: object
      properties:
        name:
          type: string
        username:
          type: string
    v1CountSecretsResponse:
      type: object
      properties:
        count:
          type: integer
          format: int32
    storageCert:
      type: object
      properties:
        subject:
          $ref: '#/components/schemas/storageCertName'
        issuer:
          $ref: '#/components/schemas/storageCertName'
        sans:
          type: array
          items:
            type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        algorithm:
          type: string
    storageCertName:
      type: object
      properties:
        commonName:
          type: string
        country:
          type: string
        organization:
          type: string
        organizationUnit:
          type: string
        locality:
          type: string
        province:
          type: string
        streetAddress:
          type: string
        postalCode:
          type: string
        names:
          type: array
          items:
            type: string
    storageSecretRelationship:
      type: object
      properties:
        id:
          type: string
          title: Secret id
        containerRelationships:
          type: array
          items:
            $ref: '#/components/schemas/storageSecretContainerRelationship'
          title: Container id to relationship.s
        deploymentRelationships:
          type: array
          items:
            $ref: '#/components/schemas/storageSecretDeploymentRelationship'
          description: Deployment id to relationship.
      title: 'The combined relationships that belong to the secret.

        Next Tag: 6'
    storageSecretContainerRelationship:
      type: object
      properties:
        id:
          type: string
          description: Id of the container the secret is mounted in.
        path:
          type: string
          description: Path is a container specific mounting directory.
      title: 'Secrets can be mounted in a path in a container.

        Next Tag: 3'
    storageListSecret:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        clusterName:
          type: string
        namespace:
          type: string
        types:
          type: array
          items:
            $ref: '#/components/schemas/storageSecretType'
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'StackRox API token. Format: Bearer {token}'