From c2538a87e5f681112795d6f752f2c7aacca40811 Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Wed, 26 Feb 2025 22:17:27 +0300 Subject: [PATCH 1/4] feat(jans-lock): add SwaggerBasePathModifier Signed-off-by: Yuriy Movchan --- jans-lock/lock-server.yaml | 18 +- jans-lock/lock-server.yaml.txt | 595 ------------------ jans-lock/lock-server/pom.xml | 16 +- jans-lock/lock-server/service/pom.xml | 5 +- .../ws/rs/app/ResteasyInitializer.java | 1 + .../ws/rs/app/SwaggerBasePathModifier.java | 32 + 6 files changed, 61 insertions(+), 606 deletions(-) delete mode 100644 jans-lock/lock-server.yaml.txt create mode 100644 jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/SwaggerBasePathModifier.java diff --git a/jans-lock/lock-server.yaml b/jans-lock/lock-server.yaml index e332178a9db..bf803136ab3 100644 --- a/jans-lock/lock-server.yaml +++ b/jans-lock/lock-server.yaml @@ -19,7 +19,7 @@ tags: - name: Lock - Audit Telemetry - name: Lock - SSE paths: - /configuration: + /api/v1/configuration: get: tags: - Lock - Server Configuration @@ -59,7 +59,7 @@ paths: application/json: schema: $ref: '#/components/schemas/LockApiError' - /audit/health/bulk: + /api/v1/audit/health/bulk: post: tags: - Lock - Audit Health @@ -100,7 +100,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/health.write - /audit/log/bulk: + /api/v1/audit/log/bulk: post: tags: - Lock - Audit Log @@ -141,7 +141,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/log.write - /audit/telemetry/bulk: + /api/v1/audit/telemetry/bulk: post: tags: - Lock - Audit Telemetry @@ -182,7 +182,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/telemetry.write - /audit/health: + /api/v1/audit/health: post: tags: - Lock - Audit Health @@ -221,7 +221,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/health.write - /audit/log: + /api/v1/audit/log: post: tags: - Lock - Audit Log @@ -260,7 +260,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/log.write - /audit/telemetry: + /api/v1/audit/telemetry: post: tags: - Lock - Audit Telemetry @@ -299,7 +299,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/telemetry.write - /sse: + /api/v1/sse: get: tags: - Lock - SSE @@ -332,7 +332,7 @@ paths: security: - oauth2: - https://jans.io/oauth/lock/sse.readonly - /internal/stat: + /api/v1/internal/stat: get: tags: - Lock - Stat diff --git a/jans-lock/lock-server.yaml.txt b/jans-lock/lock-server.yaml.txt deleted file mode 100644 index 3571e55b9d4..00000000000 --- a/jans-lock/lock-server.yaml.txt +++ /dev/null @@ -1,595 +0,0 @@ -openapi: 3.0.1 -info: - title: Jans Lock API - contact: - name: Contact - url: https://github.com/JanssenProject/jans/discussions - license: - name: License - url: https://github.com/JanssenProject/jans/blob/main/LICENSE - version: OAS Version -servers: -- url: https://jans.local.io - description: The Jans server -tags: -- name: Lock - Stat -- name: Lock - Audit Health -- name: Lock - Audit Log -- name: Lock - Audit Telemetry -- name: Lock - SSE -paths: - /configuration: - get: - operationId: getConfiguration - responses: - default: - description: default response - content: - application/json: {} - /audit/health/bulk: - post: - tags: - - Lock - Audit Health - summary: Bulk save health data - description: Bulk save health data - operationId: processBulkHealthRequest_1 - requestBody: - description: Bulk health entry - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/HealthEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/health.write - /audit/log/bulk: - post: - tags: - - Lock - Audit Log - summary: Bulk save log data - description: Bulk save log data - operationId: processBulkLogRequest_1 - requestBody: - description: Bulk log entry - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/LogEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/log.write - /audit/telemetry/bulk: - post: - tags: - - Lock - Audit Telemetry - summary: Bulk save telemetry data - description: Bulk save telemetry data - operationId: processBulkTelemetryRequest_1 - requestBody: - description: Bulk telemetry entry - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TelemetryEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/telemetry.write - /audit/health: - post: - tags: - - Lock - Audit Health - summary: Save health data - description: Save health data - operationId: processHealthRequest_1 - requestBody: - description: Health entry - content: - application/json: - schema: - $ref: '#/components/schemas/HealthEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/health.write - /audit/log: - post: - tags: - - Lock - Audit Log - summary: Save log data - description: Save log data - operationId: processLogRequest_1 - requestBody: - description: Log entry - content: - application/json: - schema: - $ref: '#/components/schemas/LogEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/log.write - /audit/telemetry: - post: - tags: - - Lock - Audit Telemetry - summary: Save telemetry data - description: Save telemetry data - operationId: processTelemetryRequest_1 - requestBody: - description: Telemetry entry - content: - application/json: - schema: - $ref: '#/components/schemas/TelemetryEntry' - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - https://jans.io/oauth/lock/telemetry.write - /config: - get: - operationId: processConfigRequest - responses: - default: - description: default response - content: - application/json: {} - /config/issuers: - get: - operationId: processIssuersRequest - responses: - default: - description: default response - content: - application/json: {} - /config/policy: - get: - operationId: processPolicyRequest - responses: - default: - description: default response - content: - application/json: {} - /config/schema: - get: - operationId: processSchemaRequest - responses: - default: - description: default response - content: - application/json: {} - /sse: - get: - tags: - - Lock - SSE - summary: Subscribe to SSE events - description: Subscribe to SSE events - operationId: subscribe - responses: - "200": - description: Ok - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - jans_stat - /internal/stat: - get: - tags: - - Lock - Stat - summary: Request stat data - description: Request stat data - operationId: statGet_1 - parameters: - - name: month - in: query - schema: - type: string - - name: start-month - in: query - schema: - type: string - - name: end-month - in: query - schema: - type: string - - name: format - in: query - schema: - type: string - responses: - "200": - description: Ok - content: - application/json: - schema: - $ref: '#/components/schemas/FlatStatResponse' - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - jans_stat - post: - tags: - - Lock - Stat - summary: Request stat data - description: Request stat data - operationId: statPost_1 - requestBody: - content: - '*/*': - schema: - type: object - properties: - month: - type: string - start-month: - type: string - end-month: - type: string - format: - type: string - responses: - "200": - description: Ok - content: - application/json: - schema: - $ref: '#/components/schemas/FlatStatResponse' - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "401": - description: Unauthorized - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - "500": - description: InternalServerError - content: - application/json: - schema: - $ref: '#/components/schemas/LockApiError' - security: - - oauth2: - - jans_stat -components: - schemas: - HealthEntry: - type: object - properties: - dn: - type: string - creationDate: - type: string - format: date-time - eventTime: - type: string - format: date-time - service: - type: string - nodeName: - type: string - status: - type: string - engineStatus: - type: string - baseDn: - type: string - inum: - type: string - LockApiError: - type: object - properties: - code: - type: string - message: - type: string - description: - type: string - LogEntry: - type: object - properties: - dn: - type: string - creationDate: - type: string - format: date-time - eventTime: - type: string - format: date-time - service: - type: string - nodeName: - type: string - eventType: - type: string - severetyLevel: - type: string - action: - type: string - decisionResult: - type: string - requestedResource: - type: string - princiaplId: - type: string - clientId: - type: string - contextInformation: - type: object - additionalProperties: - type: string - baseDn: - type: string - inum: - type: string - TelemetryEntry: - type: object - properties: - dn: - type: string - creationDate: - type: string - format: date-time - eventTime: - type: string - format: date-time - service: - type: string - nodeName: - type: string - status: - type: string - lastPolicyLoadSize: - type: integer - format: int32 - policySuccessLoadCounter: - type: integer - format: int64 - policyFailedLoadCounter: - type: integer - format: int64 - lastPolicyEvaluationTimeNs: - type: integer - format: int32 - avgPolicyEvaluationTimeNs: - type: integer - format: int32 - evaluationRequestsCount: - type: integer - format: int64 - policyStats: - type: object - additionalProperties: - type: string - baseDn: - type: string - inum: - type: string - memoryUsage: - type: string - FlatStatResponse: - type: object - properties: - response: - type: array - items: - $ref: '#/components/schemas/StatResponseItem' - StatResponseItem: - type: object - properties: - month: - type: string - monthly_active_users: - type: integer - format: int64 - monthly_active_clients: - type: integer - format: int64 - operations_by_type: - type: object - additionalProperties: - type: object - additionalProperties: - type: integer - format: int64 - securitySchemes: - oauth2: - type: oauth2 - flows: - clientCredentials: - tokenUrl: "https://{op-hostname}/.../token" - scopes: - https://jans.io/oauth/lock-config.readonly: View configuration related - information - https://jans.io/lock-server/issuers.read: View issuers related information - https://jans.io/lock-server/schema.read: View schema related information - https://jans.io/lock-server/policy.read: View policy related information - https://jans.io/oauth/lock/health.write: Write audit health entries - https://jans.io/oauth/lock/log.write: Write audit log entries - https://jans.io/oauth/lock/telemetry.write: Write telemetry health entries - https://jans.io/oauth/lock/sse.read: Subscribe to SSE events - jans_stat: View stat related information diff --git a/jans-lock/lock-server/pom.xml b/jans-lock/lock-server/pom.xml index 32d676694cc..3539ab272dc 100644 --- a/jans-lock/lock-server/pom.xml +++ b/jans-lock/lock-server/pom.xml @@ -38,7 +38,7 @@ janssenproject https://sonarcloud.io - 2.2.7 + 2.2.28 2.2.19 2.2.7 1.6.15 @@ -104,12 +104,26 @@ jans-lock-service ${project.version} + + io.swagger swagger-annotations ${swagger-annotations} compile + + io.swagger.core.v3 + swagger-core-jakarta + ${swagger.version} + compile + + + io.swagger.core.v3 + swagger-jaxrs2 + ${swagger.version} + compile + diff --git a/jans-lock/lock-server/service/pom.xml b/jans-lock/lock-server/service/pom.xml index 3da148a1de2..1ed3757c6fc 100644 --- a/jans-lock/lock-server/service/pom.xml +++ b/jans-lock/lock-server/service/pom.xml @@ -186,7 +186,10 @@ io.swagger.core.v3 swagger-core-jakarta - 2.2.10 + + + io.swagger.core.v3 + swagger-jaxrs2 io.swagger diff --git a/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/ResteasyInitializer.java b/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/ResteasyInitializer.java index 52fbf6874eb..c0c31dec3f0 100644 --- a/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/ResteasyInitializer.java +++ b/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/ResteasyInitializer.java @@ -94,3 +94,4 @@ public Set> getClasses() { } } + diff --git a/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/SwaggerBasePathModifier.java b/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/SwaggerBasePathModifier.java new file mode 100644 index 00000000000..f98c738d0bf --- /dev/null +++ b/jans-lock/lock-server/service/src/main/java/io/jans/lock/service/ws/rs/app/SwaggerBasePathModifier.java @@ -0,0 +1,32 @@ +package io.jans.lock.service.ws.rs.app; + +import io.jans.lock.util.Constants; +import io.swagger.v3.jaxrs2.ReaderListener; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.integration.api.OpenApiReader; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Paths; + +@OpenAPIDefinition +public class SwaggerBasePathModifier implements ReaderListener { + + @Override + public void beforeScan(OpenApiReader reader, OpenAPI openAPI) { + } + + @Override + public void afterScan(OpenApiReader reader, OpenAPI openAPI) { + Paths paths = openAPI.getPaths(); + Paths modifiedPaths = new Paths(); + + paths.forEach((path, pathItem) -> { + if (path.startsWith("/.well-known")) { + modifiedPaths.addPathItem(path, pathItem); + } else { + modifiedPaths.addPathItem(Constants.BASE_PATH + path, pathItem); + } + }); + + openAPI.setPaths(modifiedPaths); + } +} From 7efde8dbe6edd417bc5b0dc7aaad88c1c2d6a296 Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Wed, 26 Feb 2025 22:20:42 +0300 Subject: [PATCH 2/4] feat(jans-lock): add SwaggerBasePathModifier Signed-off-by: Yuriy Movchan --- jans-lock/lock-server/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jans-lock/lock-server/pom.xml b/jans-lock/lock-server/pom.xml index 3539ab272dc..1e9fa026cff 100644 --- a/jans-lock/lock-server/pom.xml +++ b/jans-lock/lock-server/pom.xml @@ -110,19 +110,19 @@ io.swagger swagger-annotations ${swagger-annotations} - compile + provided io.swagger.core.v3 swagger-core-jakarta ${swagger.version} - compile + provided io.swagger.core.v3 swagger-jaxrs2 ${swagger.version} - compile + provided From a650614749562919003211bc0c9e9dd4f7f26e4d Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Wed, 26 Feb 2025 22:28:49 +0300 Subject: [PATCH 3/4] feat(jans-lock): add SwaggerBasePathModifier Signed-off-by: Yuriy Movchan --- jans-lock/lock-server.yaml | 76 +++++++++++++-------------- jans-lock/lock-server/pom.xml | 15 ++---- jans-lock/lock-server/service/pom.xml | 2 +- 3 files changed, 42 insertions(+), 51 deletions(-) diff --git a/jans-lock/lock-server.yaml b/jans-lock/lock-server.yaml index bf803136ab3..9c6b9c2d406 100644 --- a/jans-lock/lock-server.yaml +++ b/jans-lock/lock-server.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" /.well-known/lock-server-configuration: get: tags: @@ -58,7 +58,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" /api/v1/audit/health/bulk: post: tags: @@ -73,7 +73,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/HealthEntry' + $ref: "#/components/schemas/HealthEntry" responses: "200": description: Ok @@ -82,7 +82,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -90,13 +90,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/health.write @@ -114,7 +114,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/LogEntry' + $ref: "#/components/schemas/LogEntry" responses: "200": description: Ok @@ -123,7 +123,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -131,13 +131,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/log.write @@ -155,7 +155,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/TelemetryEntry' + $ref: "#/components/schemas/TelemetryEntry" responses: "200": description: Ok @@ -164,7 +164,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -172,13 +172,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/telemetry.write @@ -194,7 +194,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HealthEntry' + $ref: "#/components/schemas/HealthEntry" responses: "200": description: Ok @@ -203,7 +203,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -211,13 +211,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/health.write @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LogEntry' + $ref: "#/components/schemas/LogEntry" responses: "200": description: Ok @@ -242,7 +242,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -250,13 +250,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/log.write @@ -272,7 +272,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TelemetryEntry' + $ref: "#/components/schemas/TelemetryEntry" responses: "200": description: Ok @@ -281,7 +281,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -289,13 +289,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/telemetry.write @@ -314,7 +314,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -322,13 +322,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - https://jans.io/oauth/lock/sse.readonly @@ -362,13 +362,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FlatStatResponse' + $ref: "#/components/schemas/FlatStatResponse" "400": description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -376,13 +376,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - jans_stat @@ -412,13 +412,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FlatStatResponse' + $ref: "#/components/schemas/FlatStatResponse" "400": description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "401": description: Unauthorized "404": @@ -426,13 +426,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" "500": description: InternalServerError content: application/json: schema: - $ref: '#/components/schemas/LockApiError' + $ref: "#/components/schemas/LockApiError" security: - oauth2: - jans_stat @@ -558,7 +558,7 @@ components: response: type: array items: - $ref: '#/components/schemas/StatResponseItem' + $ref: "#/components/schemas/StatResponseItem" StatResponseItem: type: object properties: diff --git a/jans-lock/lock-server/pom.xml b/jans-lock/lock-server/pom.xml index 1e9fa026cff..f7bb008aba2 100644 --- a/jans-lock/lock-server/pom.xml +++ b/jans-lock/lock-server/pom.xml @@ -39,9 +39,7 @@ https://sonarcloud.io 2.2.28 - 2.2.19 - 2.2.7 - 1.6.15 + 2.2.28 @@ -107,9 +105,9 @@ - io.swagger + io.swagger.core.v3 swagger-annotations - ${swagger-annotations} + ${swagger.version} provided @@ -238,13 +236,6 @@ io.swagger.core.v3 swagger-maven-plugin-jakarta ${swagger-maven-plugin-jakarta} - - - io.swagger.core.v3 - swagger-models-jakarta - ${swagger-models-jakarta} - - diff --git a/jans-lock/lock-server/service/pom.xml b/jans-lock/lock-server/service/pom.xml index 1ed3757c6fc..ebff94ab589 100644 --- a/jans-lock/lock-server/service/pom.xml +++ b/jans-lock/lock-server/service/pom.xml @@ -192,7 +192,7 @@ swagger-jaxrs2 - io.swagger + io.swagger.core.v3 swagger-annotations From 438ba5a4188f2674fe474c734df78df525ebc703 Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Thu, 27 Feb 2025 14:44:26 +0300 Subject: [PATCH 4/4] feat(jans-lock): update sse scope name Signed-off-by: Yuriy Movchan --- jans-linux-setup/jans_setup/templates/jans-lock/scopes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jans-linux-setup/jans_setup/templates/jans-lock/scopes.json b/jans-linux-setup/jans_setup/templates/jans-lock/scopes.json index 104baf2a1ac..113a95ba4a8 100644 --- a/jans-linux-setup/jans_setup/templates/jans-lock/scopes.json +++ b/jans-linux-setup/jans_setup/templates/jans-lock/scopes.json @@ -1,7 +1,7 @@ [ { "inum": "4000.01.1", - "jansId": "https://jans.io/oauth/lock/sse.read", + "jansId": "https://jans.io/oauth/lock/sse.readonly", "displayName": "Lock API scope", "description": "Permission to access SSE endpoint", "jansDefScope": false,