All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eberg.iceberg-aws.1.4.1.source-code.s3-signer-open-api.yaml Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

---
openapi: 3.0.3
info:
  title: Apache Iceberg S3 Signer API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.0.1
  description:
    Defines the specification for the S3 Signer API.
servers:
  - url: "{scheme}://{host}/{basePath}"
    description: Server URL when the port can be inferred from the scheme
    variables:
      scheme:
        description: The scheme of the URI, either http or https.
        default: https
      host:
        description: The host address for the specified server
        default: localhost
      basePath:
        description: Optional prefix to be prepended to all routes
        default: ""
  - url: "{scheme}://{host}:{port}/{basePath}"
    description: Generic base server URL, with all parts configurable
    variables:
      scheme:
        description: The scheme of the URI, either http or https.
        default: https
      host:
        description: The host address for the specified server
        default: localhost
      port:
        description: The port used when addressing the host
        default: "443"
      basePath:
        description: Optional prefix to be appended to all routes
        default: ""

paths:

  /v1/aws/s3/sign:

    post:
      tags:
        - S3 Signer API
      summary: Remotely signs S3 requests
      operationId: signS3Request
      requestBody:
        description: The request containing the headers to be signed
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S3SignRequest'
        required: true
      responses:
        200:
          $ref: '#/components/responses/S3SignResponse'
        400:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/BadRequestErrorResponse'
        401:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/UnauthorizedResponse'
        403:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/ForbiddenResponse'
        419:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse'
        503:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse'
        5XX:
          $ref: '../../../../open-api/rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse'

  ##############################
  # Application Schema Objects #
  ##############################
components:
  schemas:

    S3Headers:
      type: object
      additionalProperties:
        type: array
        items:
          type: string

    S3SignRequest:
      required:
        - region
        - uri
        - method
        - headers
      properties:
        region:
          type: string
        uri:
          type: string
        method:
          type: string
          enum: ["PUT", "GET", "HEAD", "POST", "DELETE", "PATCH", "OPTIONS"]
        headers:
          $ref: '#/components/schemas/S3Headers'
        properties:
          type: object
          additionalProperties:
            type: string
        body:
          type: string
          description: Optional body of the S3 request to send to the signing API. This should only be populated
            for S3 requests which do not have the relevant data in the URI itself (e.g. DeleteObjects requests)


  #############################
  # Reusable Response Objects #
  #############################
  responses:

    S3SignResponse:
      description: The response containing signed & unsigned headers. The server will also send
        a Cache-Control header, indicating whether the response can be cached (Cache-Control = ["private"])
        or not (Cache-Control = ["no-cache"]).
      content:
        application/json:
          schema:
            type: object
            required:
              - uri
              - headers
            properties:
              uri:
                type: string
              headers:
                $ref: '#/components/schemas/S3Headers'




© 2015 - 2024 Weber Informatics LLC | Privacy Policy