Application Research Signatures API

Operations for component signing and verification

Documentation

Specifications

Code Examples

Schemas & Data

OpenAPI Specification

application-research-signatures-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Application Research CNAB Bundle API Resources Signatures API
  version: 1.0.0
  description: 'API for managing Cloud Native Application Bundles (CNAB).


    This API provides endpoints for managing CNAB bundles, claims, claim results,

    dependencies, parameter sources, relocation mappings, and installation status.

    '
  contact:
    name: CNAB Specification
    url: https://cnab.io
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.example.com/v1
  description: Production server
- url: https://staging-api.example.com/v1
  description: Staging server
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Signatures
  description: Operations for component signing and verification
paths:
  /components/{name}/signatures:
    parameters:
    - $ref: '#/components/parameters/ComponentNameParam'
    get:
      tags:
      - Signatures
      summary: Application Research List signatures for a component
      operationId: listComponentSignatures
      parameters:
      - $ref: '#/components/parameters/VersionQueryParam'
      responses:
        '200':
          description: List of signatures
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignatureListResponse'
              examples:
                signatureList:
                  $ref: '#/components/examples/SignatureListResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Signatures
      summary: Application Research Sign a component
      operationId: signComponent
      parameters:
      - $ref: '#/components/parameters/VersionQueryParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignatureRequest'
            examples:
              rsaSignature:
                $ref: '#/components/examples/SignatureRequest'
      responses:
        '201':
          description: Component signed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Signature'
              examples:
                signature:
                  $ref: '#/components/examples/Signature'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /components/{name}/signatures/{signatureName}/verify:
    post:
      tags:
      - Signatures
      summary: Application Research Verify a component signature
      operationId: verifyComponentSignature
      parameters:
      - $ref: '#/components/parameters/ComponentNameParam'
      - $ref: '#/components/parameters/SignatureNameParam'
      - $ref: '#/components/parameters/VersionQueryParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationRequest'
            examples:
              verifyRequest:
                $ref: '#/components/examples/VerificationRequest'
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationResult'
              examples:
                verified:
                  $ref: '#/components/examples/VerificationResultSuccess'
                failed:
                  $ref: '#/components/examples/VerificationResultFailed'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  examples:
    SignatureListResponse:
      summary: Signature list
      description: Example list of signatures
      value:
      - name: acme-signing-authority
        digest:
          hashAlgorithm: SHA-256
          normalisationAlgorithm: jsonNormalisation/v1
          value: 7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730
        signature:
          algorithm: RSASSA-PSS-SHA256
          value: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
          mediaType: application/vnd.ocm.signature.rsa
    ErrorNotFound:
      summary: Not Found Error
      description: Example not found error
      value:
        code: NOT_FOUND
        message: Component 'github.com/acme.org/unknown-component' not found
    Signature:
      summary: Component Signature
      description: Example component signature
      value:
        name: acme-signing-authority
        digest:
          hashAlgorithm: SHA-256
          normalisationAlgorithm: jsonNormalisation/v1
          value: 7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730
        signature:
          algorithm: RSASSA-PSS-SHA256
          value: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
          mediaType: application/vnd.ocm.signature.rsa
    ErrorBadRequest:
      summary: Bad Request Error
      description: Example bad request error
      value:
        code: BAD_REQUEST
        message: Invalid component name format
        details:
          field: component.name
          pattern: ^[a-z][-a-z0-9]*([.][a-z][-a-z0-9]*)*[.][a-z]{2,}(/[a-z][-a-z0-9_]*([.][a-z][-a-z0-9_]*)*)+$
    SignatureRequest:
      summary: Signature Request
      description: Example request to sign a component
      value:
        name: acme-signing-authority
        algorithm: RSASSA-PSS-SHA256
        privateKey: '-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBg...'
    VerificationResultSuccess:
      summary: Successful Verification
      description: Example successful verification result
      value:
        verified: true
        message: Signature verification successful
        signatureName: acme-signing-authority
        componentName: github.com/acme.org/web-application
        version: 2.5.1
    ErrorInternal:
      summary: Internal Error
      description: Example internal server error
      value:
        code: INTERNAL_ERROR
        message: An unexpected error occurred
        details:
          requestId: req-xyz789
    VerificationResultFailed:
      summary: Failed Verification
      description: Example failed verification result
      value:
        verified: false
        message: 'Signature verification failed: digest mismatch'
        signatureName: acme-signing-authority
        componentName: github.com/acme.org/web-application
        version: 2.5.1
    VerificationRequest:
      summary: Verification Request
      description: Example request to verify a signature
      value:
        publicKey: '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhki...'
  schemas:
    ComponentName:
      type: string
      description: Fully qualified component name
      maxLength: 255
      pattern: ^[a-z][-a-z0-9]*([.][a-z][-a-z0-9]*)*[.][a-z]{2,}(/[a-z][-a-z0-9_]*([.][a-z][-a-z0-9_]*)*)+$
      examples:
      - github.com/acme.org/web-application
      - github.com/ailab.org/model-training-pipeline
    SignatureRequest:
      type: object
      description: Request to sign a component
      required:
      - name
      - algorithm
      properties:
        name:
          type: string
          description: Signature name
        algorithm:
          type: string
          description: Signing algorithm
          examples:
          - RSASSA-PSS-SHA256
          - ECDSA-SHA256
        privateKey:
          type: string
          description: Private key (PEM encoded)
        certificate:
          type: string
          description: Certificate chain (PEM encoded)
    Error:
      type: object
      description: Error response
      required:
      - code
      - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    SignatureListResponse:
      type: array
      items:
        $ref: '#/components/schemas/Signature'
    DigestSpec:
      type: object
      description: Cryptographic digest specification
      required:
      - hashAlgorithm
      - normalisationAlgorithm
      - value
      properties:
        hashAlgorithm:
          type: string
          description: Hash algorithm used
          examples:
          - SHA-256
          - SHA-512
        normalisationAlgorithm:
          type: string
          description: Normalisation algorithm used
          examples:
          - jsonNormalisation/v1
          - ociArtifactDigest/v1
        value:
          type: string
          description: The digest value
    Version:
      type: string
      description: Semantic version string
      pattern: ^[v]?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      examples:
      - 1.0.0
      - 2.5.1
      - v1.0.0-beta.1
    Signature:
      type: object
      description: Component signature
      required:
      - name
      - signature
      properties:
        name:
          type: string
          description: Signature name/identifier
        digest:
          $ref: '#/components/schemas/DigestSpec'
        signature:
          $ref: '#/components/schemas/SignatureSpec'
    VerificationResult:
      type: object
      description: Signature verification result
      required:
      - verified
      properties:
        verified:
          type: boolean
          description: Whether verification succeeded
        message:
          type: string
          description: Verification message or error
        signatureName:
          type: string
        componentName:
          $ref: '#/components/schemas/ComponentName'
        version:
          $ref: '#/components/schemas/Version'
    VerificationRequest:
      type: object
      description: Request to verify a signature
      required:
      - publicKey
      properties:
        publicKey:
          type: string
          description: Public key (PEM encoded)
        certificate:
          type: string
          description: Certificate for verification
    SignatureSpec:
      type: object
      description: Signature specification
      required:
      - algorithm
      - value
      - mediaType
      properties:
        algorithm:
          type: string
          description: Signature algorithm
          examples:
          - RSASSA-PSS-SHA256
          - ECDSA-SHA256
        value:
          type: string
          description: The signature value
        mediaType:
          type: string
          description: Media type of the signature
          examples:
          - application/vnd.ocm.signature.rsa
  parameters:
    SignatureNameParam:
      name: signatureName
      in: path
      required: true
      description: Signature name
      schema:
        type: string
    VersionQueryParam:
      name: version
      in: query
      description: Component version (semver)
      schema:
        $ref: '#/components/schemas/Version'
    ComponentNameParam:
      name: name
      in: path
      required: true
      description: Component name (e.g., github.com/acme.org/web-application)
      schema:
        $ref: '#/components/schemas/ComponentName'
  responses:
    BadRequest:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            badRequest:
              $ref: '#/components/examples/ErrorBadRequest'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            notFound:
              $ref: '#/components/examples/ErrorNotFound'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internalError:
              $ref: '#/components/examples/ErrorInternal'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication