From b6979fdb9b2cb92065ca404a8ca8a5ad9355bc11 Mon Sep 17 00:00:00 2001 From: pasqualespica <36746022+pasqualespica@users.noreply.github.com> Date: Sun, 12 May 2024 17:01:36 +0200 Subject: [PATCH 1/2] fix docker files --- Dockerfile | 9 +- openapi/openapi.json | 1681 ++++++++++++++----------------- openapi/openapi_core.json | 1442 ++++++++++++-------------- openapi/openapi_enrolledci.json | 410 ++++---- 4 files changed, 1649 insertions(+), 1893 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65e6a12..0c59e37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,19 @@ # # Build # -FROM maven:3.8.4-jdk-11-slim as buildtime +FROM maven:3.9.5-amazoncorretto-17-al2023@sha256:eeaa7ab572d931f7273fc5cf31429923f172091ae388969e11f42ec6dd817d74 as buildtime WORKDIR /build COPY . . -RUN mvn clean package +RUN --mount=type=secret,id=GH_TOKEN,dst=/tmp/secret_token export GITHUB_TOKEN_READ_PACKAGES="$(cat /tmp/secret_token)" \ + && mvn clean package -Dmaven.test.skip=true -FROM adoptopenjdk/openjdk11:alpine-jre as builder +FROM amazoncorretto:17.0.9-alpine3.18@sha256:df48bf2e183230040890460ddb4359a10aa6c7aad24bd88899482c52053c7e17 as builder COPY --from=buildtime /build/target/*.jar application.jar RUN java -Djarmode=layertools -jar application.jar extract -FROM ghcr.io/pagopa/docker-base-springboot-openjdk11:v1.0.1@sha256:bbbe948e91efa0a3e66d8f308047ec255f64898e7f9250bdb63985efd3a95dbf +FROM ghcr.io/pagopa/docker-base-springboot-openjdk17:v1.1.0@sha256:6fa320d452fa22066441f1ef292d15eb06f944bc8bca293e1a91ea460d30a613 ADD --chown=spring:spring https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.25.1/opentelemetry-javaagent.jar . COPY --chown=spring:spring --from=builder dependencies/ ./ diff --git a/openapi/openapi.json b/openapi/openapi.json index 9b0833e..ccc050f 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1108 +1,989 @@ { - "openapi": "3.0.1", - "info": { - "title": "platform-authorizer-config", - "description": "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.2.4" + "openapi" : "3.0.1", + "info" : { + "title" : "platform-authorizer-config", + "description" : "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "0.2.4" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Enrolled Orgs", - "description": "Everything about enrolled organizations" - }, - { - "name": "Cached Authorizations", - "description": "Everything about cached authorizations" - }, - { - "name": "Authorizations", - "description": "Everything about authorizations" - } - ], - "paths": { - "/authorizations/{authorizationId}": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization by identifier", - "operationId": "getAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Enrolled Orgs", + "description" : "Everything about enrolled organizations" + }, { + "name" : "Cached Authorizations", + "description" : "Everything about cached authorizations" + }, { + "name" : "Authorizations", + "description" : "Everything about authorizations" + } ], + "paths" : { + "/authorizations/{authorizationId}" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization by identifier", + "operationId" : "getAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "put": { - "tags": [ - "Authorizations" - ], - "summary": "Update existing authorization", - "operationId": "updateAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Authorization" + "put" : { + "tags" : [ "Authorizations" ], + "summary" : "Update existing authorization", + "operationId" : "updateAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Authorization" } } }, - "required": true + "required" : true }, - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "delete": { - "tags": [ - "Authorizations" - ], - "summary": "Delete existing authorization", - "operationId": "deleteAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "delete" : { + "tags" : [ "Authorizations" ], + "summary" : "Delete existing authorization", + "operationId" : "deleteAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "200" : { + "description" : "OK" + }, + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/cachedauthorizations/{domain}/refresh": { - "post": { - "tags": [ - "Cached Authorizations" - ], - "summary": "Refresh cached authorizations by domain and owner", - "operationId": "refreshCachedAuthorizations", - "parameters": [ - { - "name": "domain", - "in": "path", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "/cachedauthorizations/{domain}/refresh" : { + "post" : { + "tags" : [ "Cached Authorizations" ], + "summary" : "Refresh cached authorizations by domain and owner", + "operationId" : "refreshCachedAuthorizations", + "parameters" : [ { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": {} + "200" : { + "description" : "OK", + "content" : { + "application/json" : { } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/authorizations": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization list", - "operationId": "getAuthorizations_1", - "parameters": [ - { - "name": "domain", - "in": "query", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 999, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "/authorizations" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization list", + "operationId" : "getAuthorizations_1", + "parameters" : [ { + "name" : "domain", + "in" : "query", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "post": { - "tags": [ - "Authorizations" - ], - "summary": "Create new authorization", - "operationId": "createAuthorization", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Authorization" + "post" : { + "tags" : [ "Authorizations" ], + "summary" : "Create new authorization", + "operationId" : "createAuthorization", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Authorization" } } }, - "required": true + "required" : true }, - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "409" : { + "description" : "Conflict", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } + }, + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/organizations/{organizationfiscalcode}/domains/{domain}": { - "get": { - "tags": [ - "Enrolled Orgs" - ], - "summary": "Get list of stations associated to organizations enrolled to a specific domain", - "operationId": "getStationsForEnrolledOrganizations", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The enrolled organization on which the stations will be extracted.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "domain", - "in": "path", - "description": "The domain on which the stations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "/organizations/{organizationfiscalcode}/domains/{domain}" : { + "get" : { + "tags" : [ "Enrolled Orgs" ], + "summary" : "Get list of stations associated to organizations enrolled to a specific domain", + "operationId" : "getStationsForEnrolledOrganizations", + "parameters" : [ { + "name" : "organizationfiscalcode", + "in" : "path", + "description" : "The enrolled organization on which the stations will be extracted.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the stations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrolledCreditorInstitutionList" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitutionList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/organizations/domains/{domain}": { - "get": { - "tags": [ - "Enrolled Orgs" - ], - "summary": "Get list of organizations enrolled to a specific domain", - "operationId": "getEnrolledOrganizations", - "parameters": [ - { - "name": "domain", - "in": "path", - "description": "The domain on which the organizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "/organizations/domains/{domain}" : { + "get" : { + "tags" : [ "Enrolled Orgs" ], + "summary" : "Get list of organizations enrolled to a specific domain", + "operationId" : "getEnrolledOrganizations", + "parameters" : [ { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the organizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrolledCreditorInstitutionList" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitutionList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/cachedauthorizations": { - "get": { - "tags": [ - "Cached Authorizations" - ], - "summary": "Get cached authorizations", - "operationId": "getAuthorizations", - "parameters": [ - { - "name": "domain", - "in": "query", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "formatTTL", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CachedAuthorizationList" + "/cachedauthorizations" : { + "get" : { + "tags" : [ "Cached Authorizations" ], + "summary" : "Get cached authorizations", + "operationId" : "getAuthorizations", + "parameters" : [ { + "name" : "domain", + "in" : "query", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "formatTTL", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : true + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CachedAuthorizationList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/authorizations/subkey/{subscriptionKey}": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization by subscription key", - "operationId": "getAuthorizationBySubscriptionKey", - "parameters": [ - { - "name": "subscriptionKey", - "in": "path", - "description": "The subscription key related to the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "/authorizations/subkey/{subscriptionKey}" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization by subscription key", + "operationId" : "getAuthorizationBySubscriptionKey", + "parameters" : [ { + "name" : "subscriptionKey", + "in" : "path", + "description" : "The subscription key related to the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "Authorization": { - "required": [ - "authorized_entities", - "domain", - "other_metadata", - "owner", - "subscription_key" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The identifier of the saved authorization, automatically generated during creation as UUID." - }, - "domain": { - "type": "string", - "description": "The domain to which the authorization belongs, within which it has validity. Typically, it is defined by choosing from a pool of tags that already exist and are used by the various membership domains." - }, - "subscription_key": { - "type": "string", - "description": "The value of the subscription key to be associated with the stored authorization. This key is assigned to an entity that wants to interface with a pagoPA service via APIM, and is the pivotal element on which the Authorizer system will make its evaluations. No two authorizations can exist with the same domain-subscription_key value pair." - }, - "description": { - "type": "string", - "description": "An optional description useful to add more information about the scope of the authorization, defining information also impossible to include in the other tags." - }, - "owner": { - "$ref": "#/components/schemas/AuthorizationOwner" - }, - "authorized_entities": { - "type": "array", - "description": "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier.", - "items": { - "$ref": "#/components/schemas/AuthorizationEntity" - } - }, - "other_metadata": { - "type": "array", - "description": "The list of authorization metadata, useful for performing other types of computation after the authorization process.", - "items": { - "$ref": "#/components/schemas/AuthorizationMetadata" - } - }, - "inserted_at": { - "type": "string", - "description": "The date of authorization entry. This value is set only in authorization creation operations.", - "readOnly": true - }, - "last_update": { - "type": "string", - "description": "The date of last authorization update. It is only visible as output in read requests.", - "readOnly": true - }, - "last_forced_refresh": { - "type": "string", - "description": "The date of last forced refresh of the authorization. It is updated only when the forced refresh API is executed.", - "readOnly": true + "components" : { + "schemas" : { + "Authorization" : { + "required" : [ "authorized_entities", "domain", "other_metadata", "owner", "subscription_key" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "The identifier of the saved authorization, automatically generated during creation as UUID." + }, + "domain" : { + "type" : "string", + "description" : "The domain to which the authorization belongs, within which it has validity. Typically, it is defined by choosing from a pool of tags that already exist and are used by the various membership domains." + }, + "subscription_key" : { + "type" : "string", + "description" : "The value of the subscription key to be associated with the stored authorization. This key is assigned to an entity that wants to interface with a pagoPA service via APIM, and is the pivotal element on which the Authorizer system will make its evaluations. No two authorizations can exist with the same domain-subscription_key value pair." + }, + "description" : { + "type" : "string", + "description" : "An optional description useful to add more information about the scope of the authorization, defining information also impossible to include in the other tags." + }, + "owner" : { + "$ref" : "#/components/schemas/AuthorizationOwner" + }, + "authorized_entities" : { + "type" : "array", + "description" : "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationEntity" + } + }, + "other_metadata" : { + "type" : "array", + "description" : "The list of authorization metadata, useful for performing other types of computation after the authorization process.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationMetadata" + } + }, + "inserted_at" : { + "type" : "string", + "description" : "The date of authorization entry. This value is set only in authorization creation operations.", + "readOnly" : true + }, + "last_update" : { + "type" : "string", + "description" : "The date of last authorization update. It is only visible as output in read requests.", + "readOnly" : true + }, + "last_forced_refresh" : { + "type" : "string", + "description" : "The date of last forced refresh of the authorization. It is updated only when the forced refresh API is executed.", + "readOnly" : true } }, - "description": "The list of authorization retrieved from search." + "description" : "The list of authorization retrieved from search." }, - "AuthorizationEntity": { - "required": [ - "name", - "value", - "values" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name or the description associated to the authorization entity in order to reference it in a more human-readable mode." - }, - "value": { - "type": "string", - "description": "The single simple value related to an entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." - }, - "values": { - "type": "array", - "description": "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object.", - "items": { - "type": "string", - "description": "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." + "AuthorizationEntity" : { + "required" : [ "name", "value", "values" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "The name or the description associated to the authorization entity in order to reference it in a more human-readable mode." + }, + "value" : { + "type" : "string", + "description" : "The single simple value related to an entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." + }, + "values" : { + "type" : "array", + "description" : "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object.", + "items" : { + "type" : "string", + "description" : "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." } } }, - "description": "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier." + "description" : "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier." }, - "AuthorizationGenericKeyValue": { - "required": [ - "key", - "value", - "values" - ], - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The key used to reference the metadata into the related map." - }, - "value": { - "type": "string", - "description": "The single simple value related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." - }, - "values": { - "type": "array", - "description": "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object.", - "items": { - "type": "string", - "description": "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." + "AuthorizationGenericKeyValue" : { + "required" : [ "key", "value", "values" ], + "type" : "object", + "properties" : { + "key" : { + "type" : "string", + "description" : "The key used to reference the metadata into the related map." + }, + "value" : { + "type" : "string", + "description" : "The single simple value related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." + }, + "values" : { + "type" : "array", + "description" : "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object.", + "items" : { + "type" : "string", + "description" : "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." } } }, - "description": "A key-value map that defines the actual content of the metadata to be stored." + "description" : "A key-value map that defines the actual content of the metadata to be stored." }, - "AuthorizationMetadata": { - "required": [ - "content", - "name", - "short_key" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A description that defines the full name of the metadata." - }, - "short_key": { - "pattern": "_[a-zA-Z0-9]{1,3}", - "type": "string", - "description": "The key that defines an abbreviation by which it will be identified in cached maps." - }, - "content": { - "type": "array", - "description": "A key-value map that defines the actual content of the metadata to be stored.", - "items": { - "$ref": "#/components/schemas/AuthorizationGenericKeyValue" + "AuthorizationMetadata" : { + "required" : [ "content", "name", "short_key" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "A description that defines the full name of the metadata." + }, + "short_key" : { + "pattern" : "_[a-zA-Z0-9]{1,3}", + "type" : "string", + "description" : "The key that defines an abbreviation by which it will be identified in cached maps." + }, + "content" : { + "type" : "array", + "description" : "A key-value map that defines the actual content of the metadata to be stored.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationGenericKeyValue" } } }, - "description": "The list of authorization metadata, useful for performing other types of computation after the authorization process." + "description" : "The list of authorization metadata, useful for performing other types of computation after the authorization process." }, - "AuthorizationOwner": { - "required": [ - "id", - "name", - "type" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." - }, - "name": { - "type": "string", - "description": "The name of the authorization owner, useful in order to make an authorization more human-readable. It can be the entity's business name or any other information that helps its recognition." - }, - "type": { - "type": "string", - "description": "The authorization owner type, useful both for adding an additional recognizable 'label' to the subject and for use as a search filter.", - "enum": [ - "BROKER", - "CI", - "OTHER", - "PSP" - ] + "AuthorizationOwner" : { + "required" : [ "id", "name", "type" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." + }, + "name" : { + "type" : "string", + "description" : "The name of the authorization owner, useful in order to make an authorization more human-readable. It can be the entity's business name or any other information that helps its recognition." + }, + "type" : { + "type" : "string", + "description" : "The authorization owner type, useful both for adding an additional recognizable 'label' to the subject and for use as a search filter.", + "enum" : [ "BROKER", "CI", "OTHER", "PSP" ] } }, - "description": "The information about the owner of the authorization. These information are required in order to make maintenance easier and performs some kind of search operations." + "description" : "The information about the owner of the authorization. These information are required in order to make maintenance easier and performs some kind of search operations." }, - "AuthorizationList": { - "required": [ - "authorizations", - "page_info" - ], - "type": "object", - "properties": { - "authorizations": { - "type": "array", - "description": "The list of authorization retrieved from search.", - "items": { - "$ref": "#/components/schemas/Authorization" + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 + }, + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" + } + } + }, + "AuthorizationList" : { + "required" : [ "authorizations", "page_info" ], + "type" : "object", + "properties" : { + "authorizations" : { + "type" : "array", + "description" : "The list of authorization retrieved from search.", + "items" : { + "$ref" : "#/components/schemas/Authorization" } }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "The page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "The required maximum number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "The number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "The total number of pages", - "format": "int32" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "The page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "The required maximum number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "The number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "The total number of pages", + "format" : "int32" } }, - "description": "The information related to the paginated results." - }, - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } - } + "description" : "The information related to the paginated results." }, - "EnrolledCreditorInstitution": { - "required": [ - "organization_fiscal_code", - "segregation_codes" - ], - "type": "object", - "properties": { - "organization_fiscal_code": { - "type": "string", - "description": "The fiscal code related to the creditor institution." - }, - "segregation_codes": { - "type": "array", - "description": "The list of segregation codes used by the creditor institution to register a station for the required service domain.", - "items": { - "type": "string", - "description": "The list of segregation codes used by the creditor institution to register a station for the required service domain." + "EnrolledCreditorInstitution" : { + "required" : [ "organization_fiscal_code", "segregation_codes" ], + "type" : "object", + "properties" : { + "organization_fiscal_code" : { + "type" : "string", + "description" : "The fiscal code related to the creditor institution." + }, + "segregation_codes" : { + "type" : "array", + "description" : "The list of segregation codes used by the creditor institution to register a station for the required service domain.", + "items" : { + "type" : "string", + "description" : "The list of segregation codes used by the creditor institution to register a station for the required service domain." } } }, - "description": "The list of creditor institution enrolled to the Authorizer service." + "description" : "The list of creditor institution enrolled to the Authorizer service." }, - "EnrolledCreditorInstitutionList": { - "required": [ - "creditor_institutions" - ], - "type": "object", - "properties": { - "creditor_institutions": { - "type": "array", - "description": "The list of creditor institution enrolled to the Authorizer service.", - "items": { - "$ref": "#/components/schemas/EnrolledCreditorInstitution" + "EnrolledCreditorInstitutionList" : { + "required" : [ "creditor_institutions" ], + "type" : "object", + "properties" : { + "creditor_institutions" : { + "type" : "array", + "description" : "The list of creditor institution enrolled to the Authorizer service.", + "items" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitution" } } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" }, - "dbConnection": { - "type": "string" + "dbConnection" : { + "type" : "string" } } }, - "CachedAuthorization": { - "required": [ - "ttl" - ], - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "The description that is associated with particular noteworthy items to be added to the list of cached information." - }, - "owner": { - "type": "string", - "description": "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." - }, - "subscription_key": { - "type": "string", - "description": "The value of the subscription key associated with the cached authorization." - }, - "ttl": { - "type": "string", - "description": "The remaining Time-to-Live related to the cached authorization. This can be formatted either in seconds format or in a particular format that follows the structure 'XXh YYm ZZs'." + "CachedAuthorization" : { + "required" : [ "ttl" ], + "type" : "object", + "properties" : { + "description" : { + "type" : "string", + "description" : "The description that is associated with particular noteworthy items to be added to the list of cached information." + }, + "owner" : { + "type" : "string", + "description" : "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." + }, + "subscription_key" : { + "type" : "string", + "description" : "The value of the subscription key associated with the cached authorization." + }, + "ttl" : { + "type" : "string", + "description" : "The remaining Time-to-Live related to the cached authorization. This can be formatted either in seconds format or in a particular format that follows the structure 'XXh YYm ZZs'." } }, - "description": "The list of authorization cached in Authorizer system." + "description" : "The list of authorization cached in Authorizer system." }, - "CachedAuthorizationList": { - "required": [ - "cached_authorizations" - ], - "type": "object", - "properties": { - "cached_authorizations": { - "type": "array", - "description": "The list of authorization cached in Authorizer system.", - "items": { - "$ref": "#/components/schemas/CachedAuthorization" + "CachedAuthorizationList" : { + "required" : [ "cached_authorizations" ], + "type" : "object", + "properties" : { + "cached_authorizations" : { + "type" : "array", + "description" : "The list of authorization cached in Authorizer system.", + "items" : { + "$ref" : "#/components/schemas/CachedAuthorization" } } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_core.json b/openapi/openapi_core.json index 96df01f..e509a63 100644 --- a/openapi/openapi_core.json +++ b/openapi/openapi_core.json @@ -1,946 +1,846 @@ { - "openapi": "3.0.1", - "info": { - "title": "platform-authorizer-config", - "description": "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.2.4" + "openapi" : "3.0.1", + "info" : { + "title" : "platform-authorizer-config", + "description" : "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "0.2.4" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Cached Authorizations", - "description": "Everything about cached authorizations" - }, - { - "name": "Authorizations", - "description": "Everything about authorizations" - } - ], - "paths": { - "/authorizations/{authorizationId}": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization by identifier", - "operationId": "getAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Cached Authorizations", + "description" : "Everything about cached authorizations" + }, { + "name" : "Authorizations", + "description" : "Everything about authorizations" + } ], + "paths" : { + "/authorizations/{authorizationId}" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization by identifier", + "operationId" : "getAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "put": { - "tags": [ - "Authorizations" - ], - "summary": "Update existing authorization", - "operationId": "updateAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Authorization" + "put" : { + "tags" : [ "Authorizations" ], + "summary" : "Update existing authorization", + "operationId" : "updateAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Authorization" } } }, - "required": true + "required" : true }, - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "delete": { - "tags": [ - "Authorizations" - ], - "summary": "Delete existing authorization", - "operationId": "deleteAuthorization", - "parameters": [ - { - "name": "authorizationId", - "in": "path", - "description": "The identifier of the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "delete" : { + "tags" : [ "Authorizations" ], + "summary" : "Delete existing authorization", + "operationId" : "deleteAuthorization", + "parameters" : [ { + "name" : "authorizationId", + "in" : "path", + "description" : "The identifier of the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "200" : { + "description" : "OK" + }, + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/cachedauthorizations/{domain}/refresh": { - "post": { - "tags": [ - "Cached Authorizations" - ], - "summary": "Refresh cached authorizations by domain and owner", - "operationId": "refreshCachedAuthorizations", - "parameters": [ - { - "name": "domain", - "in": "path", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "/cachedauthorizations/{domain}/refresh" : { + "post" : { + "tags" : [ "Cached Authorizations" ], + "summary" : "Refresh cached authorizations by domain and owner", + "operationId" : "refreshCachedAuthorizations", + "parameters" : [ { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": {} + "200" : { + "description" : "OK", + "content" : { + "application/json" : { } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/authorizations": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization list", - "operationId": "getAuthorizations_1", - "parameters": [ - { - "name": "domain", - "in": "query", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The number of elements to be included in the page.", - "required": true, - "schema": { - "maximum": 999, - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "page", - "in": "query", - "description": "The index of the page, starting from 0.", - "required": true, - "schema": { - "minimum": 0, - "type": "integer", - "format": "int32", - "default": 0 - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "/authorizations" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization list", + "operationId" : "getAuthorizations_1", + "parameters" : [ { + "name" : "domain", + "in" : "query", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The number of elements to be included in the page.", + "required" : true, + "schema" : { + "maximum" : 999, + "type" : "integer", + "format" : "int32", + "default" : 10 + } + }, { + "name" : "page", + "in" : "query", + "description" : "The index of the page, starting from 0.", + "required" : true, + "schema" : { + "minimum" : 0, + "type" : "integer", + "format" : "int32", + "default" : 0 + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] }, - "post": { - "tags": [ - "Authorizations" - ], - "summary": "Create new authorization", - "operationId": "createAuthorization", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Authorization" + "post" : { + "tags" : [ "Authorizations" ], + "summary" : "Create new authorization", + "operationId" : "createAuthorization", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Authorization" } } }, - "required": true + "required" : true }, - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "409" : { + "description" : "Conflict", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" - }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } + }, + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/cachedauthorizations": { - "get": { - "tags": [ - "Cached Authorizations" - ], - "summary": "Get cached authorizations", - "operationId": "getAuthorizations", - "parameters": [ - { - "name": "domain", - "in": "query", - "description": "The domain on which the authorizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ownerId", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "formatTTL", - "in": "query", - "description": "The identifier of the authorizations' owner.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CachedAuthorizationList" + "/cachedauthorizations" : { + "get" : { + "tags" : [ "Cached Authorizations" ], + "summary" : "Get cached authorizations", + "operationId" : "getAuthorizations", + "parameters" : [ { + "name" : "domain", + "in" : "query", + "description" : "The domain on which the authorizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "ownerId", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "formatTTL", + "in" : "query", + "description" : "The identifier of the authorizations' owner.", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : true + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CachedAuthorizationList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/authorizations/subkey/{subscriptionKey}": { - "get": { - "tags": [ - "Authorizations" - ], - "summary": "Get authorization by subscription key", - "operationId": "getAuthorizationBySubscriptionKey", - "parameters": [ - { - "name": "subscriptionKey", - "in": "path", - "description": "The subscription key related to the stored authorization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationList" + "/authorizations/subkey/{subscriptionKey}" : { + "get" : { + "tags" : [ "Authorizations" ], + "summary" : "Get authorization by subscription key", + "operationId" : "getAuthorizationBySubscriptionKey", + "parameters" : [ { + "name" : "subscriptionKey", + "in" : "path", + "description" : "The subscription key related to the stored authorization.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationList" } } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "404" : { + "description" : "Not found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "Authorization": { - "required": [ - "authorized_entities", - "domain", - "other_metadata", - "owner", - "subscription_key" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The identifier of the saved authorization, automatically generated during creation as UUID." - }, - "domain": { - "type": "string", - "description": "The domain to which the authorization belongs, within which it has validity. Typically, it is defined by choosing from a pool of tags that already exist and are used by the various membership domains." - }, - "subscription_key": { - "type": "string", - "description": "The value of the subscription key to be associated with the stored authorization. This key is assigned to an entity that wants to interface with a pagoPA service via APIM, and is the pivotal element on which the Authorizer system will make its evaluations. No two authorizations can exist with the same domain-subscription_key value pair." - }, - "description": { - "type": "string", - "description": "An optional description useful to add more information about the scope of the authorization, defining information also impossible to include in the other tags." - }, - "owner": { - "$ref": "#/components/schemas/AuthorizationOwner" - }, - "authorized_entities": { - "type": "array", - "description": "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier.", - "items": { - "$ref": "#/components/schemas/AuthorizationEntity" - } - }, - "other_metadata": { - "type": "array", - "description": "The list of authorization metadata, useful for performing other types of computation after the authorization process.", - "items": { - "$ref": "#/components/schemas/AuthorizationMetadata" - } - }, - "inserted_at": { - "type": "string", - "description": "The date of authorization entry. This value is set only in authorization creation operations.", - "readOnly": true - }, - "last_update": { - "type": "string", - "description": "The date of last authorization update. It is only visible as output in read requests.", - "readOnly": true - }, - "last_forced_refresh": { - "type": "string", - "description": "The date of last forced refresh of the authorization. It is updated only when the forced refresh API is executed.", - "readOnly": true + "components" : { + "schemas" : { + "Authorization" : { + "required" : [ "authorized_entities", "domain", "other_metadata", "owner", "subscription_key" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "The identifier of the saved authorization, automatically generated during creation as UUID." + }, + "domain" : { + "type" : "string", + "description" : "The domain to which the authorization belongs, within which it has validity. Typically, it is defined by choosing from a pool of tags that already exist and are used by the various membership domains." + }, + "subscription_key" : { + "type" : "string", + "description" : "The value of the subscription key to be associated with the stored authorization. This key is assigned to an entity that wants to interface with a pagoPA service via APIM, and is the pivotal element on which the Authorizer system will make its evaluations. No two authorizations can exist with the same domain-subscription_key value pair." + }, + "description" : { + "type" : "string", + "description" : "An optional description useful to add more information about the scope of the authorization, defining information also impossible to include in the other tags." + }, + "owner" : { + "$ref" : "#/components/schemas/AuthorizationOwner" + }, + "authorized_entities" : { + "type" : "array", + "description" : "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationEntity" + } + }, + "other_metadata" : { + "type" : "array", + "description" : "The list of authorization metadata, useful for performing other types of computation after the authorization process.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationMetadata" + } + }, + "inserted_at" : { + "type" : "string", + "description" : "The date of authorization entry. This value is set only in authorization creation operations.", + "readOnly" : true + }, + "last_update" : { + "type" : "string", + "description" : "The date of last authorization update. It is only visible as output in read requests.", + "readOnly" : true + }, + "last_forced_refresh" : { + "type" : "string", + "description" : "The date of last forced refresh of the authorization. It is updated only when the forced refresh API is executed.", + "readOnly" : true } }, - "description": "The list of authorization retrieved from search." + "description" : "The list of authorization retrieved from search." }, - "AuthorizationEntity": { - "required": [ - "name", - "value", - "values" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name or the description associated to the authorization entity in order to reference it in a more human-readable mode." - }, - "value": { - "type": "string", - "description": "The single simple value related to an entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." - }, - "values": { - "type": "array", - "description": "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object.", - "items": { - "type": "string", - "description": "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." + "AuthorizationEntity" : { + "required" : [ "name", "value", "values" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "The name or the description associated to the authorization entity in order to reference it in a more human-readable mode." + }, + "value" : { + "type" : "string", + "description" : "The single simple value related to an entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." + }, + "values" : { + "type" : "array", + "description" : "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object.", + "items" : { + "type" : "string", + "description" : "The multiple composite sub-values which concatenation forms a complex entity to be authorized to access within an authorization. Only one between 'value' and 'values' tag at a time can exists in this object." } } }, - "description": "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier." + "description" : "The authorized entity list, which are the resource identifiers that the caller includes in requests that define which objects the entity is authorized to operate on. It consists of a key-value map in which the entity name and its identifier are defined, respectively, in order to make maintenance easier." }, - "AuthorizationGenericKeyValue": { - "required": [ - "key", - "value", - "values" - ], - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The key used to reference the metadata into the related map." - }, - "value": { - "type": "string", - "description": "The single simple value related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." - }, - "values": { - "type": "array", - "description": "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object.", - "items": { - "type": "string", - "description": "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." + "AuthorizationGenericKeyValue" : { + "required" : [ "key", "value", "values" ], + "type" : "object", + "properties" : { + "key" : { + "type" : "string", + "description" : "The key used to reference the metadata into the related map." + }, + "value" : { + "type" : "string", + "description" : "The single simple value related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." + }, + "values" : { + "type" : "array", + "description" : "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object.", + "items" : { + "type" : "string", + "description" : "The set of values related to the metadata. Only one between 'value' and 'values' tag at a time can exists in this object." } } }, - "description": "A key-value map that defines the actual content of the metadata to be stored." + "description" : "A key-value map that defines the actual content of the metadata to be stored." }, - "AuthorizationMetadata": { - "required": [ - "content", - "name", - "short_key" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A description that defines the full name of the metadata." - }, - "short_key": { - "pattern": "_[a-zA-Z0-9]{1,3}", - "type": "string", - "description": "The key that defines an abbreviation by which it will be identified in cached maps." - }, - "content": { - "type": "array", - "description": "A key-value map that defines the actual content of the metadata to be stored.", - "items": { - "$ref": "#/components/schemas/AuthorizationGenericKeyValue" + "AuthorizationMetadata" : { + "required" : [ "content", "name", "short_key" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "A description that defines the full name of the metadata." + }, + "short_key" : { + "pattern" : "_[a-zA-Z0-9]{1,3}", + "type" : "string", + "description" : "The key that defines an abbreviation by which it will be identified in cached maps." + }, + "content" : { + "type" : "array", + "description" : "A key-value map that defines the actual content of the metadata to be stored.", + "items" : { + "$ref" : "#/components/schemas/AuthorizationGenericKeyValue" } } }, - "description": "The list of authorization metadata, useful for performing other types of computation after the authorization process." + "description" : "The list of authorization metadata, useful for performing other types of computation after the authorization process." }, - "AuthorizationOwner": { - "required": [ - "id", - "name", - "type" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." - }, - "name": { - "type": "string", - "description": "The name of the authorization owner, useful in order to make an authorization more human-readable. It can be the entity's business name or any other information that helps its recognition." - }, - "type": { - "type": "string", - "description": "The authorization owner type, useful both for adding an additional recognizable 'label' to the subject and for use as a search filter.", - "enum": [ - "BROKER", - "CI", - "OTHER", - "PSP" - ] + "AuthorizationOwner" : { + "required" : [ "id", "name", "type" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." + }, + "name" : { + "type" : "string", + "description" : "The name of the authorization owner, useful in order to make an authorization more human-readable. It can be the entity's business name or any other information that helps its recognition." + }, + "type" : { + "type" : "string", + "description" : "The authorization owner type, useful both for adding an additional recognizable 'label' to the subject and for use as a search filter.", + "enum" : [ "BROKER", "CI", "OTHER", "PSP" ] } }, - "description": "The information about the owner of the authorization. These information are required in order to make maintenance easier and performs some kind of search operations." + "description" : "The information about the owner of the authorization. These information are required in order to make maintenance easier and performs some kind of search operations." }, - "AuthorizationList": { - "required": [ - "authorizations", - "page_info" - ], - "type": "object", - "properties": { - "authorizations": { - "type": "array", - "description": "The list of authorization retrieved from search.", - "items": { - "$ref": "#/components/schemas/Authorization" - } - }, - "page_info": { - "$ref": "#/components/schemas/PageInfo" + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 + }, + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" } } }, - "PageInfo": { - "required": [ - "items_found", - "limit", - "page", - "total_pages" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "description": "The page number", - "format": "int32" - }, - "limit": { - "type": "integer", - "description": "The required maximum number of items per page", - "format": "int32" - }, - "items_found": { - "type": "integer", - "description": "The number of items found. (The last page may have fewer elements than required)", - "format": "int32" - }, - "total_pages": { - "type": "integer", - "description": "The total number of pages", - "format": "int32" + "AuthorizationList" : { + "required" : [ "authorizations", "page_info" ], + "type" : "object", + "properties" : { + "authorizations" : { + "type" : "array", + "description" : "The list of authorization retrieved from search.", + "items" : { + "$ref" : "#/components/schemas/Authorization" + } + }, + "page_info" : { + "$ref" : "#/components/schemas/PageInfo" } - }, - "description": "The information related to the paginated results." + } }, - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" + "PageInfo" : { + "required" : [ "items_found", "limit", "page", "total_pages" ], + "type" : "object", + "properties" : { + "page" : { + "type" : "integer", + "description" : "The page number", + "format" : "int32" + }, + "limit" : { + "type" : "integer", + "description" : "The required maximum number of items per page", + "format" : "int32" + }, + "items_found" : { + "type" : "integer", + "description" : "The number of items found. (The last page may have fewer elements than required)", + "format" : "int32" + }, + "total_pages" : { + "type" : "integer", + "description" : "The total number of pages", + "format" : "int32" } - } + }, + "description" : "The information related to the paginated results." }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" }, - "dbConnection": { - "type": "string" + "dbConnection" : { + "type" : "string" } } }, - "CachedAuthorization": { - "required": [ - "ttl" - ], - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "The description that is associated with particular noteworthy items to be added to the list of cached information." - }, - "owner": { - "type": "string", - "description": "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." - }, - "subscription_key": { - "type": "string", - "description": "The value of the subscription key associated with the cached authorization." - }, - "ttl": { - "type": "string", - "description": "The remaining Time-to-Live related to the cached authorization. This can be formatted either in seconds format or in a particular format that follows the structure 'XXh YYm ZZs'." + "CachedAuthorization" : { + "required" : [ "ttl" ], + "type" : "object", + "properties" : { + "description" : { + "type" : "string", + "description" : "The description that is associated with particular noteworthy items to be added to the list of cached information." + }, + "owner" : { + "type" : "string", + "description" : "The identifier of the authorization owner. This can be the fiscal code of the entity/intermediary or other information that uniquely identifies that entity." + }, + "subscription_key" : { + "type" : "string", + "description" : "The value of the subscription key associated with the cached authorization." + }, + "ttl" : { + "type" : "string", + "description" : "The remaining Time-to-Live related to the cached authorization. This can be formatted either in seconds format or in a particular format that follows the structure 'XXh YYm ZZs'." } }, - "description": "The list of authorization cached in Authorizer system." + "description" : "The list of authorization cached in Authorizer system." }, - "CachedAuthorizationList": { - "required": [ - "cached_authorizations" - ], - "type": "object", - "properties": { - "cached_authorizations": { - "type": "array", - "description": "The list of authorization cached in Authorizer system.", - "items": { - "$ref": "#/components/schemas/CachedAuthorization" + "CachedAuthorizationList" : { + "required" : [ "cached_authorizations" ], + "type" : "object", + "properties" : { + "cached_authorizations" : { + "type" : "array", + "description" : "The list of authorization cached in Authorizer system.", + "items" : { + "$ref" : "#/components/schemas/CachedAuthorization" } } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file diff --git a/openapi/openapi_enrolledci.json b/openapi/openapi_enrolledci.json index 8745b93..d6179c7 100644 --- a/openapi/openapi_enrolledci.json +++ b/openapi/openapi_enrolledci.json @@ -1,287 +1,261 @@ { - "openapi": "3.0.1", - "info": { - "title": "platform-authorizer-config", - "description": "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.2.4" + "openapi" : "3.0.1", + "info" : { + "title" : "platform-authorizer-config", + "description" : "A microservice that provides a set of APIs to manage authorization records for the Authorizer system.", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "0.2.4" }, - "servers": [ - { - "url": "http://localhost", - "description": "Generated server url" - } - ], - "tags": [ - { - "name": "Enrolled Orgs", - "description": "Everything about enrolled organizations" - } - ], - "paths": { - "/organizations/{organizationfiscalcode}/domains/{domain}": { - "get": { - "tags": [ - "Enrolled Orgs" - ], - "summary": "Get list of stations associated to organizations enrolled to a specific domain", - "operationId": "getStationsForEnrolledOrganizations", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "The enrolled organization on which the stations will be extracted.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "domain", - "in": "path", - "description": "The domain on which the stations will be filtered.", - "required": true, - "schema": { - "type": "string" - } + "servers" : [ { + "url" : "http://localhost", + "description" : "Generated server url" + } ], + "tags" : [ { + "name" : "Enrolled Orgs", + "description" : "Everything about enrolled organizations" + } ], + "paths" : { + "/organizations/{organizationfiscalcode}/domains/{domain}" : { + "get" : { + "tags" : [ "Enrolled Orgs" ], + "summary" : "Get list of stations associated to organizations enrolled to a specific domain", + "operationId" : "getStationsForEnrolledOrganizations", + "parameters" : [ { + "name" : "organizationfiscalcode", + "in" : "path", + "description" : "The enrolled organization on which the stations will be extracted.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + }, { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the stations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrolledCreditorInstitutionList" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitutionList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/organizations/domains/{domain}": { - "get": { - "tags": [ - "Enrolled Orgs" - ], - "summary": "Get list of organizations enrolled to a specific domain", - "operationId": "getEnrolledOrganizations", - "parameters": [ - { - "name": "domain", - "in": "path", - "description": "The domain on which the organizations will be filtered.", - "required": true, - "schema": { - "type": "string" - } + "/organizations/domains/{domain}" : { + "get" : { + "tags" : [ "Enrolled Orgs" ], + "summary" : "Get list of organizations enrolled to a specific domain", + "operationId" : "getEnrolledOrganizations", + "parameters" : [ { + "name" : "domain", + "in" : "path", + "description" : "The domain on which the organizations will be filtered.", + "required" : true, + "schema" : { + "type" : "string" } - ], - "responses": { - "403": { - "description": "Forbidden" - }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + } ], + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrolledCreditorInstitutionList" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitutionList" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } }, - "/info": { - "get": { - "tags": [ - "Home" - ], - "summary": "Return OK if application is started", - "operationId": "healthCheck", - "responses": { - "403": { - "description": "Forbidden" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "/info" : { + "get" : { + "tags" : [ "Home" ], + "summary" : "Return OK if application is started", + "operationId" : "healthCheck", + "responses" : { + "500" : { + "description" : "Service unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "429": { - "description": "Too many requests" - }, - "500": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProblemJson" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "401": { - "description": "Unauthorized" + "401" : { + "description" : "Unauthorized" + }, + "403" : { + "description" : "Forbidden" + }, + "429" : { + "description" : "Too many requests" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + "components" : { + "schemas" : { + "ProblemJson" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 + "status" : { + "maximum" : 600, + "minimum" : 100, + "type" : "integer", + "description" : "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format" : "int32", + "example" : 200 }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" + "detail" : { + "type" : "string", + "description" : "A human readable explanation specific to this occurrence of the problem.", + "example" : "There was an error processing the request" } } }, - "EnrolledCreditorInstitution": { - "required": [ - "organization_fiscal_code", - "segregation_codes" - ], - "type": "object", - "properties": { - "organization_fiscal_code": { - "type": "string", - "description": "The fiscal code related to the creditor institution." + "EnrolledCreditorInstitution" : { + "required" : [ "organization_fiscal_code", "segregation_codes" ], + "type" : "object", + "properties" : { + "organization_fiscal_code" : { + "type" : "string", + "description" : "The fiscal code related to the creditor institution." }, - "segregation_codes": { - "type": "array", - "description": "The list of segregation codes used by the creditor institution to register a station for the required service domain.", - "items": { - "type": "string", - "description": "The list of segregation codes used by the creditor institution to register a station for the required service domain." + "segregation_codes" : { + "type" : "array", + "description" : "The list of segregation codes used by the creditor institution to register a station for the required service domain.", + "items" : { + "type" : "string", + "description" : "The list of segregation codes used by the creditor institution to register a station for the required service domain." } } }, - "description": "The list of creditor institution enrolled to the Authorizer service." + "description" : "The list of creditor institution enrolled to the Authorizer service." }, - "EnrolledCreditorInstitutionList": { - "required": [ - "creditor_institutions" - ], - "type": "object", - "properties": { - "creditor_institutions": { - "type": "array", - "description": "The list of creditor institution enrolled to the Authorizer service.", - "items": { - "$ref": "#/components/schemas/EnrolledCreditorInstitution" + "EnrolledCreditorInstitutionList" : { + "required" : [ "creditor_institutions" ], + "type" : "object", + "properties" : { + "creditor_institutions" : { + "type" : "array", + "description" : "The list of creditor institution enrolled to the Authorizer service.", + "items" : { + "$ref" : "#/components/schemas/EnrolledCreditorInstitution" } } } }, - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" }, - "version": { - "type": "string" + "version" : { + "type" : "string" }, - "environment": { - "type": "string" + "environment" : { + "type" : "string" }, - "dbConnection": { - "type": "string" + "dbConnection" : { + "type" : "string" } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "description" : "The API key to access this function app.", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" } } } -} +} \ No newline at end of file From 323e326464371b2328369d770469f510d97f0a1e Mon Sep 17 00:00:00 2001 From: pasqualespica <36746022+pasqualespica@users.noreply.github.com> Date: Sun, 12 May 2024 17:02:45 +0200 Subject: [PATCH 2/2] fix docker file --- Dockerfile | 3 +-- README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c59e37..afeadcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,7 @@ FROM maven:3.9.5-amazoncorretto-17-al2023@sha256:eeaa7ab572d931f7273fc5cf31429923f172091ae388969e11f42ec6dd817d74 as buildtime WORKDIR /build COPY . . -RUN --mount=type=secret,id=GH_TOKEN,dst=/tmp/secret_token export GITHUB_TOKEN_READ_PACKAGES="$(cat /tmp/secret_token)" \ - && mvn clean package -Dmaven.test.skip=true +RUN mvn clean package -DskipTests FROM amazoncorretto:17.0.9-alpine3.18@sha256:df48bf2e183230040890460ddb4359a10aa6c7aad24bd88899482c52053c7e17 as builder diff --git a/README.md b/README.md index 09c2e43..7bcc9fd 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ See the [OpenAPI 3 here.](https://editor.swagger.io/?url=https://raw.githubuserc --- ## Technology Stack -- Java 11 +- Java 17 - Quarkus - other... ---