Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Example of configuration description file:

domain: "sample.egovstack.net"
instance: egovstack
members:
- name: Management
  class: GOV
  code: 0
  applications:
  - id: misp
    connection: http
- name: MinistryOfInterior
  class: GOV
  code: 7003
  applications:
  - id: CitizensRegistry
    services:
    - id: mcts
      spec_url: https://raw.githubusercontent.com/aleksander-reitsakas/pub/main/m3x.json
      service_url: http://securityserver/r1/egovstack/GOV/7001/DigitalRegistries/mcts11
      rights:
      - member: LocalMunicipality
        application: Registration
      - member: Management
        application: 0
      - member: MinistryOfHealth
        application: DigitalRegistries
  - id: ID_Verification
    services:
    - id: authenticate
      spec_url: https://raw.githubusercontent.com/aleksander-reitsakas/pub/main/id1.json
      service_url: https://id1.ext.egovstack.net/api
      rights:
      - member: LocalMunicipality
        application: Registration
      - member: LocalMunicipality
        application: test01
      - member: Management
        application: misp

API

openapi: 3.0.0
info:
  title: GovStack IM configuration management API
  version: 1.0.0
  description: This is a GovStack Information Mediator Building Block Configuration Management API
  x-logo:
    url: ''
  contact:
    email: bb-information-mediat-aaaafm2vhf6hnebpu3tizg3v74@govstack.slack.com
servers:
  - url: https://{securityserver}:{managment_port}/api/v1
    variables:
      securityserver:
        default: ''
        description: security server address
      management_port:
        default: xxxx
        description: IM management port
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/GovStack/GovStack_IM_Management_API/1.0.0
tags:
  - name: conf
    description: Configuration management
  - name: rights
    description: Access rights
paths:
  /config:
    get:
      tags:
        - conf
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconf'
          description: List of IM configuration
      operationId: listIMconf
      summary: List IM configuration
    post:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      parameters:
        - name: init
          description: Creates Central Servers if init=true
          schema:
            type: boolean
            default: false
          in: query
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration creation
      operationId: createIMconf
      summary: Initialize IM instance
    patch:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration update
      operationId: updateIMconf
      summary: Update IM configuration. Not described parts are not changed
    put:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration creation
      operationId: replaceIMconf
      summary: Replace IM configuration. Not described parts are deleted
  /status:
    get:
      tags:
        - conf
      responses:
        '200':
          description: IM is OK
      operationId: checkIMconf
      summary: Is IM configured. up and running?
  /applications/{app_id}/services/{service_id}/rights:
    get:
      tags:
        - rights
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedApplications'
          x-last-modified: 1678734276927
    post:
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowedApplications'
            example: ''
        required: false
      description: ''
      responses:
        '200':
          description: OK
      tags:
        - rights
    patch:
      tags:
        - rights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowedApplications'
        required: false
      responses:
        '200':
          description: OK
    parameters:
      - name: app_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
        x-last-modified: 1678733991527
      - name: service_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
        x-last-modified: 1678734012254
    x-last-modified: 1678733971137
    delete:
      tags: 
        - rights
      description: ''
      responses:
        '200':
          description: OK
components:
  schemas:
    IMconf:
      type: object
      required:
        - domain
        - instance
      properties:
        domain:
          description: Subdomain for GovStack instance to run in
          type: string
          example: sample.sandbox.govstack.global
        instance:
          description: Name of GovStack instance
          type: string
          example: nowhereland
        members:
          description: List of Member organisations
          type: array
          items:
            type: object
            required:
              - name
              - class
              - code
            properties:
              name:
                description: Organisation (Member) name
                type: string
                example: Ministry of Interior
              class:
                description: Kind of organisation. Namespace for organisation {code}
                type: string
                example: GOV
              code:
                description: Registration number (or identifier) of the organisation in {class} namespace
                type: string
                example: '7001'
              applications:
                description: List of applications of Member organisation
                type: array
                items:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: string
                      description: Name of application
                      example: Citizens_Registry
                    connection:
                      type: string
                      description: Connection protocol of application
                      example: http
                      default: https
                    services:
                      description: List of services
                      type: array
                      items:
                        type: object
                        required:
                          - id
                          - spec_url
                          - service_url
                        properties:
                          id:
                            description: Name of service/API
                            type: string
                            example: registration
                          spec_url:
                            description: Location of OpenAPI spec file
                            type: string
                            format: uri
                            example: https://raw.githubusercontent.com/GovStackWorkingGroup/bb-example/api/registration.json
                          service_url:
                            description: Location of service endpoints
                            type: string
                            format: uri
                            example: http://hostname.internal/api/registration
                          rights:
                            description: List of allowed consumers/clients
                            type: array
                            items:
                              type: object
                              required:
                                - member
                                - application
                              properties:
                                member:
                                  description: Name of Member
                                  type: string
                                  example: Local_Municipality
                                application:
                                  description: Name of application
                                  type: string
                                  example: Registration_portal
    IMconfResponse:
      type: string 
    AllowedApplications:
      type: array
      items:
        $ref: '#/components/schemas/AllowedApplication'
      x-last-modified: 1678734189258
    AllowedApplication:
      description: >-
        An identified member application that has the permission to access a
        service.
      type: object
      x-last-modified: 1678734225326
      required:
        - member
        - application
  securitySchemes:
    OpenIDAuth:
      openIdConnectUrl: https://{id_bb_oidc_config}
      type: openIdConnect
      description: >-
        OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0
        protocol.
      x-last-modified: 1678733600987
  headers: {}
  responses: {}
  parameters: {}
security:
  - OpenIDAuth: []
  • No labels