Commit dbbd7d64 authored by Muhammad Hamza's avatar Muhammad Hamza
Browse files

add CertificateManagement folder

parent 3c77810b
Loading
Loading
Loading
Loading
+593 −0
Original line number Diff line number Diff line
openapi: 3.0.2

info:
  title: SOL023 - Certificate Management interface
  description: |
    SOL023 - Certificate Management interface

    IMPORTANT: Please note that this file might be not aligned to the current
    version of the ETSI Group Specification it refers to. In case of
    discrepancies the published ETSI Group Specification takes precedence.

    Please report bugs to https://forge.etsi.org/rep/nfv/SOL023/issues

  contact:
    name: NFV-SOL WG
  license:
    name: ETSI Forge copyright notice
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
  version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1

externalDocs:
  description: ETSI GS NFV-SOL 023 V5.2.1
  url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/023/05.02.01_60/gs_nfv-sol023v050201p.pdf

servers:
  - url: http://127.0.0.1/cm/v2
  - url: https://127.0.0.1/cm/v2

paths:
  /api_versions:
    $ref: ../endpoints/SOL023_endpoints.yaml#/endpoints/api-versions

  /subject:
    parameters:
      - $ref: ../components/SOL023_params.yaml#/components/parameters/Accept
      - $ref: ../components/SOL023_params.yaml#/components/parameters/Authorization
      - $ref: ../components/SOL023_params.yaml#/components/parameters/Version
    
    post:
      description: |
         The POST method creates a new subject resource. See clause 5.5.3.3.1. 
      requestBody:
        $ref: "#/components/requestBodies/CreateSubjectRequest"   
      responses:
        "201": 
          $ref: "#/components/responses/SubjectInstance.Post.201"
        "409":
          $ref: "#/components/responses/SubjectInstance.Post.409"
        "400":
          $ref: ../responses/SOL023_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL023_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL023_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL023_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL023_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL023_resp.yaml#/responses/406
        "500":
          $ref: ../responses/SOL023_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL023_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL023_resp.yaml#/responses/504
     
  /subject/{subjectId}:
    parameters:
      - $ref: "#/components/parameters/subjectId"
      - $ref: ../components/SOL023_params.yaml#/components/parameters/Authorization
      - $ref: ../components/SOL023_params.yaml#/components/parameters/Version
    get:
      description: |
        The GET method retrieves information about a Subject instance by reading an "Individual Subject instance" resource.
        See clause 5.5.4.3.2.
      parameters:
        - $ref: ../components/SOL023_params.yaml#/components/parameters/Accept
      responses:
        "200": 
           $ref: "#/components/responses/IndividualSubjectInstance.Get.200"
        "400":
          $ref: ../responses/SOL023_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL023_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL023_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL023_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL023_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL023_resp.yaml#/responses/406
        "416":
          $ref: ../responses/SOL023_resp.yaml#/responses/416
        "500":
          $ref: ../responses/SOL023_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL023_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL023_resp.yaml#/responses/504
    delete:
      description: |
        This method deletes an "Individual Subject instance" resource. See clause 5.5.4.3.5. 
      responses:
        "204": 
          $ref: "#/components/responses/IndividualSubjectInstance.Delete.204"
        "409":
          $ref: "#/components/responses/IndividualSubjectInstance.Delete.409"
        "400":
          $ref: ../responses/SOL023_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL023_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL023_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL023_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL023_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL023_resp.yaml#/responses/406
        "500":
          $ref: ../responses/SOL023_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL023_resp.yaml#/responses/503


  /subject/{subjectId}/certificate:
    post:
      description: |
        The POST method creates a new Certificate resource with certificate for VNFCI and VNF OAM. See clause 5.5.5.3.1.
      requestBody:
        $ref: "#/components/requestBodies/CSRRequest"
      responses:
        "201": 
          $ref: "#/components/responses/CertificateInstance.Post.201"
        "409":
          $ref: "#/components/responses/CertificateInstance.Post.409"
        "400":
          $ref: ../responses/SOL023_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL023_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL023_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL023_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL023_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL023_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL023_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL023_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL023_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL023_resp.yaml#/responses/504

  /subject/{subjectId}/certificate/{certificateId}/certificate_content:
    parameters:
      - $ref: "#/components/parameters/subjectId"
      - $ref: "#/components/parameters/certificateId"
    get:
      description: |
        The GET method fetches the content of an individual certificate. See clause 5.5.x.3.2.
      responses:
        "200": 
          $ref: "#/components/responses/IndividualCertificateContentInstance.Get.200"
        "206":
          $ref: "#/components/responses/IndividualCertificateContentInstance.Get.206"
        "409":
          $ref: "#/components/responses/IndividualCertificateContentInstance.Get.409"
        "416":
          $ref: "#/components/responses/IndividualCertificateContentInstance.Get.416"
        "400":
          $ref: ../responses/SOL023_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL023_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL023_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL023_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL023_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL023_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL023_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL023_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL023_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL023_resp.yaml#/responses/504

components:
  parameters:
    subjectId:
      name: subjectId
      in: path
      description: |
        Identifier of the Subject instance. See note 1.

        NOTE 1:	This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new "Individual Subject instance" resource. It can also be retrieved from the "id" attribute in the message content of that response.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      
    certificateId:
      name: certificateId
      in: path
      description: |
        certificateId	Identifier of the Certificate instance. See note 2.

        NOTE 2:	This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new "Individual Certificate instance" resource. It can also be retrieved from the "id" attribute in the message content of that response.
      required: true
      style: simple
      explode: false
      schema:
        type: string

  responses:
    SubjectInstance.Post.201:
      description: >
        201 CREATED

        Shall be returned when a new "Individual Subject instance" resource and the associated Subject instance identifier has been created successfully. 

        The response body shall contain a representation of the created Subject instance, as defined in clause x.x.x.x.

        The HTTP response shall include a "Location" HTTP header that contains the resource URI of the created Subject instance.
      headers:
        Location:
          description: |
            The resource URI of the created subject resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 9110
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "./definitions/SOL023CertificateManagement_def.yaml#/definitions/SubjectInstance"

    SubjectInstance.Post.409:
      description: >
        409 CONFLICT

        Shall be returned upon the following error: The operation cannot be executed currently, due to a conflict with the state of the resource.

        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall convey more information about the error.
      headers:
        Location:
          description: |
            The resource URI of the created subject resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 9110
          style: simple
          explode: false
          schema:
            type: string

    IndividualSubjectInstance.Get.200:
      description: |
        200 OK
      
        Shall be returned when information about an individual Subject instance has been read successfully.
        The response body shall contain a representation of the Subject instance, as defined in clause x.x.x.x.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 9110
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../definitions/SOL023_def.yaml#/definitions/ProblemDetails"  

    IndividualSubjectInstance.Delete.204:
      description: |
        204 NO CONTENT

        Shall be returned when the "Individual Subject instance" resource and the associated
        Subject identifier were deleted successfully.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string

    IndividualSubjectInstance.Delete.409:
      description: |
        409 CONFLICT

        Shall be returned upon the following error: The
        operation cannot be executed currently, due to a
        conflict with the state of the resource.
        Typically, this is due to the fact that the "Individual
        VNF instance" resource is in INSTANTIATED state.
        The response body shall contain a ProblemDetails
        structure, in which the "detail" attribute shall convey
        more information about the error.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 7231
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../definitions/SOL023_def.yaml#/definitions/ProblemDetails"

    CertificateInstance.Post.201:
      description: >
        201 CREATED

        Shall be returned when a new "Individual Certificate instance" resource and the associated Certificate instance identifier has been created successfully. 

        The response body shall contain a representation of the created Certificate instance, as defined in clause x.x.x.x.

        The HTTP response shall include a "Location" HTTP header that contains the resource URI of the created Certificate instance.
      headers:
        Location:
          description: |
            The resource URI of the created subject resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 9110
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "./definitions/SOL023CertificateManagement_def.yaml#/definitions/CertificateInstance"
    
    CertificateInstance.Post.409:
      description: >
        409 CONFLICT

        Shall be returned upon the following error: The operation cannot be executed currently, due to a conflict with the state of the resource.

        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall convey more information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../definitions/SOL023_def.yaml#/definitions/ProblemDetails"
    
    IndividualCertificateContentInstance.Get.200:
      description: >
        200 OK

        Shall be returned when the whole content of the certificate file has been read successfully.

        The response body shall include a copy of the certificate file.

        The "Content-Type HTTP" header shall be set according to the type of the file, i.e. to "application/text" for a certificate content according to IETF RFC 7468[a].
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string

    IndividualCertificateContentInstance.Get.206:
      description: |
        206 PARTIAL CONTENT

        If the CMF supports range requests, this response shall be returned when a single consecutive byte range from the content of the certificate file has been read successfully according to the request.

        The response body shall contain the requested part of the certificate file.

        The "Content-Range" HTTP header shall be provided according to IETF RFC 9110 [c].

        The "Content-Type" HTTP header shall be set as defined above for the "200 OK" response.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        Content-Range:
          required : true
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/*:
          schema:
            type: string
            format: binary

    IndividualCertificateContentInstance.Get.409:
      description: >
        409 CONFLICT

        Shall be returned upon the following error: The operation cannot be executed currently, due to a conflict with the state of the resource.

        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall convey more information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../definitions/SOL023_def.yaml#/definitions/ProblemDetails"

    IndividualCertificateContentInstance.Get.416:
      description: |
        416 RANGE NOT SATISFIABLE

        Shall be returned upon the following error: The byte range passed in the "Range" header did not match any available byte range in the certificate file (e.g. "access after end of file"). 

        The response body may contain a ProblemDetails structure.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../definitions/SOL023_def.yaml#/definitions/ProblemDetails"

  requestBodies:
    CreateSubjectRequest:
      description: >
        Subject resource creation request.
      content:
        application/json:
          schema:
            $ref: "./definitions/SOL023CertificateManagement_def.yaml#/definitions/CreateSubjectRequest"
      required: true
    CSRRequest:
      description: >
        Certificate resource creation request.
      content:
        application/json:
          schema:
            $ref: "./definitions/SOL023CertificateManagement_def.yaml#/definitions/CSRRequest"
      required: true
 No newline at end of file
+233 −0

File added.

Preview size limit exceeded, changes collapsed.