diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 65a739b2e0a4c212d0e4df4711e0a22b0784c063..16195084bd3c02649bd803cb6340b753d7cc3366 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -113,7 +113,7 @@ services: init: true restart: "no" container_name: dbrepo-auth-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.1 environment: AUTH_SERVICE_ADMIN: ${AUTH_SERVICE_ADMIN:-admin} AUTH_SERVICE_ADMIN_PASSWORD: ${AUTH_SERVICE_ADMIN_PASSWORD:-admin} @@ -134,7 +134,7 @@ services: restart: "no" container_name: dbrepo-metadata-service hostname: metadata-service - image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.1 volumes: - "${SHARED_VOLUME:-/tmp}:/tmp" environment: @@ -197,7 +197,7 @@ services: restart: "no" container_name: dbrepo-analyse-service hostname: analyse-service - image: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.1 environment: AUTH_SERVICE_CLIENT: ${AUTH_SERVICE_CLIENT:-dbrepo-client} AUTH_SERVICE_CLIENT_SECRET: ${AUTH_SERVICE_CLIENT:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG} @@ -252,7 +252,7 @@ services: restart: "no" container_name: dbrepo-search-db hostname: search-db - image: registry.datalab.tuwien.ac.at/dbrepo/search-db:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/search-db:1.7.1 healthcheck: test: curl -sSL localhost:9200/_plugins/_security/health | jq .status | grep UP interval: 10s @@ -276,7 +276,7 @@ services: restart: "no" container_name: dbrepo-search-service hostname: search-service - image: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.1 environment: AUTH_SERVICE_CLIENT: ${AUTH_SERVICE_CLIENT:-dbrepo-client} AUTH_SERVICE_CLIENT_SECRET: ${AUTH_SERVICE_CLIENT_SECRET:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG} @@ -300,7 +300,7 @@ services: restart: "no" container_name: dbrepo-ui hostname: ui - image: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.1 environment: NUXT_PUBLIC_API_CLIENT: "${BASE_URL:-http://localhost}" NUXT_PUBLIC_API_SERVER: "${BASE_URL:-http://gateway-service}" @@ -377,7 +377,7 @@ services: init: true container_name: dbrepo-search-service-init hostname: search-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.1 environment: LOG_LEVEL: ${LOG_LEVEL:-info} METADATA_SERVICE_ENDPOINT: ${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080} @@ -434,7 +434,7 @@ services: restart: "no" container_name: dbrepo-dashboard-service hostname: dashboard-service - image: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.7.1 ports: - "3000:3000" volumes: @@ -461,7 +461,7 @@ services: init: true container_name: dbrepo-storage-service-init hostname: storage-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.1 environment: S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-seaweedfsadmin} S3_BUCKET: "${S3_BUCKET:-dbrepo}" @@ -477,7 +477,7 @@ services: restart: "no" container_name: dbrepo-data-service hostname: data-service - image: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.0 + image: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.1 volumes: - "${SHARED_VOLUME:-/tmp}:/tmp" environment: diff --git a/.docs/.openapi/api-data.yaml b/.docs/.openapi/api-data.yaml index 8cc02b64c06695710ed39eddfa318e9f340dcd84..6b1855a99e5e183c98270ce961899322beaa569e 100644 --- a/.docs/.openapi/api-data.yaml +++ b/.docs/.openapi/api-data.yaml @@ -8,10 +8,10 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 - version: 1.7.0 + version: 1.7.1 externalDocs: description: Sourcecode Documentation - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.0/system-services-metadata/ + url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.1/system-services-metadata/ servers: - url: http://localhost description: Development instance @@ -57,48 +57,60 @@ paths: schema: type: string format: date-time + - name: Accept + in: header + required: true + schema: + type: string responses: - "200": - description: Retrieved view data - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of rows - required: true - style: simple + "403": + description: Not allowed to retrieve view data content: application/json: schema: - type: string - "409": - description: View schema could not be mapped + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find view in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service + "400": + description: Request pagination is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find view in metadata database + "406": + description: Failed to format data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination is malformed + "409": + description: View schema could not be mapped content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to retrieve view data + "200": + description: Retrieved view data + headers: + Access-Control-Expose-Headers: + description: Expose `X-Count` custom header + required: true + style: simple + X-Count: + description: Number of rows + required: true + style: simple + content: + application/json: + schema: + type: string + text/csv: {} + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: @@ -144,48 +156,60 @@ paths: schema: type: string format: date-time + - name: Accept + in: header + required: true + schema: + type: string responses: - "200": - description: Retrieved view data - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of rows - required: true - style: simple + "403": + description: Not allowed to retrieve view data content: application/json: schema: - type: string - "409": - description: View schema could not be mapped + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find view in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service + "400": + description: Request pagination is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find view in metadata database + "406": + description: Failed to format data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination is malformed + "409": + description: View schema could not be mapped content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to retrieve view data + "200": + description: Retrieved view data + headers: + Access-Control-Expose-Headers: + description: Expose `X-Count` custom header + required: true + style: simple + X-Count: + description: Number of rows + required: true + style: simple + content: + application/json: + schema: + type: string + text/csv: {} + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: @@ -234,7 +258,24 @@ paths: schema: type: integer format: int64 + - name: Accept + in: header + required: true + schema: + type: string responses: + "404": + description: Failed to find table in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "200": description: Get table data headers: @@ -250,26 +291,21 @@ paths: application/json: schema: type: string - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to get table data + text/csv: {} + "406": + description: Failed to format data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination or table data select query is malformed + "403": + description: Not allowed to get table data content: application/json: schema: @@ -310,28 +346,28 @@ paths: $ref: "#/components/schemas/TupleUpdateDto" required: true responses: - "403": - description: Update table data not allowed + "404": + description: Failed to find table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service + "400": + description: Request pagination or table data select query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "202": + description: Updated table data + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated table data - "400": - description: Request pagination or table data select query is malformed + "403": + description: Update table data not allowed content: application/json: schema: @@ -372,30 +408,30 @@ paths: $ref: "#/components/schemas/TupleDto" required: true responses: - "404": - description: Failed to find table in metadata database or blob in storage - service + "400": + description: Request pagination or table data select query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created table data - "503": - description: Failed to establish connection with the metadata service or - storage service + "403": + description: Create table data not allowed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Create table data not allowed + "503": + description: Failed to establish connection with the metadata service or + storage service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination or table data select query is malformed + "201": + description: Created table data + "404": + description: Failed to find table in metadata database or blob in storage + service content: application/json: schema: @@ -436,14 +472,6 @@ paths: $ref: "#/components/schemas/TupleDeleteDto" required: true responses: - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted table data "404": description: Failed to find table in metadata database content: @@ -462,6 +490,14 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted table data + "503": + description: Failed to establish connection with the metadata service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - basicAuth: [] - bearerAuth: [] @@ -505,7 +541,24 @@ paths: schema: type: integer format: int64 + - name: Accept + in: header + required: true + schema: + type: string responses: + "404": + description: Failed to find table in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "200": description: Get table data headers: @@ -521,26 +574,21 @@ paths: application/json: schema: type: string - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to get table data + text/csv: {} + "406": + description: Failed to format data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination or table data select query is malformed + "403": + description: Not allowed to get table data content: application/json: schema: @@ -571,6 +619,11 @@ paths: schema: type: string format: uuid + - name: Accept + in: header + required: true + schema: + type: string - name: timestamp in: query required: false @@ -590,14 +643,27 @@ paths: type: integer format: int64 responses: - "400": - description: Invalid pagination + "404": + description: Failed to find database in metadata database or query in query + store of the data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to communicate with database + "403": + description: Not allowed to retrieve subset data + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "406": + description: Failed to format data + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Invalid pagination content: application/json: schema: @@ -623,15 +689,9 @@ paths: application/json: schema: type: string - "404": - description: Failed to find database in metadata database or query in query - store of the data database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to retrieve subset data + text/csv: {} + "503": + description: Failed to communicate with database content: application/json: schema: @@ -661,6 +721,11 @@ paths: schema: type: string format: uuid + - name: Accept + in: header + required: true + schema: + type: string - name: timestamp in: query required: false @@ -680,14 +745,27 @@ paths: type: integer format: int64 responses: - "400": - description: Invalid pagination + "404": + description: Failed to find database in metadata database or query in query + store of the data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to communicate with database + "403": + description: Not allowed to retrieve subset data + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "406": + description: Failed to format data + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Invalid pagination content: application/json: schema: @@ -710,18 +788,12 @@ paths: description: The list of headers separated by comma style: simple content: - application/json: - schema: - type: string - "404": - description: Failed to find database in metadata database or query in query - store of the data database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to retrieve subset data + application/json: + schema: + type: string + text/csv: {} + "503": + description: Failed to communicate with database content: application/json: schema: @@ -756,39 +828,39 @@ paths: $ref: "#/components/schemas/QueryPersistDto" required: true responses: - "202": - description: Persisted subset + "403": + description: Not allowed to persist subset content: application/json: schema: - $ref: "#/components/schemas/QueryDto" - "503": - description: Failed to communicate with database + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find database in metadata database or query in query + store of the data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "417": - description: Failed to persist subset + "202": + description: Persisted subset content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database or query in query - store of the data database + $ref: "#/components/schemas/QueryDto" + "400": + description: Malformed select query content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to persist subset + "503": + description: Failed to communicate with database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Malformed select query + "417": + description: Failed to persist subset content: application/json: schema: @@ -867,28 +939,28 @@ paths: $ref: "#/components/schemas/ImportDto" required: true responses: - "202": - description: Imported dataset successfully - "403": - description: Import table dataset not allowed + "404": + description: Failed to find table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service + "202": + description: Imported dataset successfully + "400": + description: Dataset and/or query are malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Dataset and/or query are malformed + "403": + description: Import table dataset not allowed content: application/json: schema: @@ -920,12 +992,6 @@ paths: schema: type: boolean responses: - "503": - description: Failed to communicate with database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Found subsets content: @@ -934,15 +1000,21 @@ paths: type: array items: $ref: "#/components/schemas/QueryDto" + "404": + description: Failed to find database in metadata database or query in query + store of the data database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Not allowed to find subsets content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database or query in query - store of the data database + "503": + description: Failed to communicate with database content: application/json: schema: @@ -991,8 +1063,8 @@ paths: $ref: "#/components/schemas/SubsetDto" required: true responses: - "417": - description: Failed to insert query into query store of data database + "403": + description: Not allowed to find subset content: application/json: schema: @@ -1003,21 +1075,21 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to communicate with database + "404": + description: Failed to find database in metadata database or query in query + store of the data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to find subset + "417": + description: Failed to insert query into query store of data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database or query in query - store of the data database + "406": + description: Failed to format data content: application/json: schema: @@ -1034,65 +1106,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - security: - - basicAuth: [] - - bearerAuth: [] - /api/database/{databaseId}/view/{viewId}/export: - get: - tags: - - view-endpoint - summary: Get view data - description: "Gets data from view with id as downloadable file. For tables in\ - \ private databases, the user needs to have at least *READ* access to the\ - \ associated database." - operationId: exportDataset - parameters: - - name: databaseId - in: path - required: true - schema: - type: string - format: uuid - - name: viewId - in: path - required: true - schema: - type: string - format: uuid - - name: timestamp - in: query - required: false - schema: - type: string - format: date-time - responses: - "404": - description: Failed to find view in metadata database or export dataset - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Export view data not allowed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Exported view data - content: - application/json: - schema: - type: string - format: binary - "400": - description: Request pagination or view data select query is malformed + description: Failed to communicate with database content: application/json: schema: @@ -1129,26 +1144,6 @@ paths: type: integer format: int64 responses: - "200": - description: Found table history - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/TableHistoryDto" - "404": - description: Failed to find table history in data database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "403": description: Find table history not allowed content: @@ -1161,69 +1156,26 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - security: - - basicAuth: [] - - bearerAuth: [] - /api/database/{databaseId}/table/{tableId}/export: - get: - tags: - - table-endpoint - summary: Get table data - description: "Gets data from table with id as downloadable file. For tables\ - \ in private databases, the user needs to have at least *READ* access to the\ - \ associated database." - operationId: exportDataset_1 - parameters: - - name: databaseId - in: path - required: true - schema: - type: string - format: uuid - - name: tableId - in: path - required: true - schema: - type: string - format: uuid - - name: timestamp - in: query - required: false - schema: - type: string - format: date-time - responses: - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "200": + description: Found table history content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Export table data not allowed + type: array + items: + $ref: "#/components/schemas/TableHistoryDto" + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination or table data select query is malformed + "404": + description: Failed to find table history in data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Exported table data - content: - application/json: - schema: - type: string - format: binary security: - basicAuth: [] - bearerAuth: [] @@ -1251,11 +1203,6 @@ paths: schema: type: string format: uuid - - name: Accept - in: header - required: true - schema: - type: string - name: timestamp in: query required: false @@ -1263,40 +1210,40 @@ paths: type: string format: date-time responses: - "503": - description: Failed to communicate with database + "200": + description: Found subset content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/QueryDto" + text/csv: {} "403": description: Not allowed to find subset content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "406": - description: Failed to find acceptable representation + "404": + description: Failed to find database in metadata database or query in query + store of the data database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database or query in query - store of the data database + "400": + description: Malformed select query content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found subset + "406": + description: Failed to find acceptable representation content: application/json: schema: - $ref: "#/components/schemas/QueryDto" - text/csv: {} - "400": - description: Malformed select query + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to communicate with database content: application/json: schema: @@ -2102,6 +2049,7 @@ components: - id - language - licenses + - links - owner - publication_year - publisher @@ -2117,6 +2065,8 @@ components: type: string format: uuid example: b97cd56b-66ca-4354-9e6c-f47210cfaaec + links: + $ref: "#/components/schemas/LinksDto" type: type: string example: database @@ -2448,6 +2398,21 @@ components: \ preservation of copyright and license notices. Licensed works, modifications,\ \ and larger works may be distributed under different terms and without\ \ source code." + LinksDto: + required: + - self + - self_html + type: object + properties: + self: + type: string + example: http://example.com/api/ + data: + type: string + example: http://example.com + self_html: + type: string + example: http://example.com RelatedIdentifierDto: required: - id diff --git a/.docs/.openapi/api-metadata.yaml b/.docs/.openapi/api-metadata.yaml index e4dabbdcfc4c0b4449f15dca80d41f4243c79542..e3769be04d2a9726dc40999bad56daa1c537d613 100644 --- a/.docs/.openapi/api-metadata.yaml +++ b/.docs/.openapi/api-metadata.yaml @@ -8,10 +8,10 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 - version: 1.7.0 + version: 1.7.1 externalDocs: description: Sourcecode Documentation - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.0/system-services-metadata/ + url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.1/system-services-metadata/ servers: - url: http://localhost description: Development instance @@ -36,18 +36,18 @@ paths: type: string format: uuid responses: - "200": - description: Found user - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" "404": description: User was not found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Found user + content: + application/json: + schema: + $ref: "#/components/schemas/UserDto" "403": description: Find user is not permitted content: @@ -77,20 +77,20 @@ paths: $ref: "#/components/schemas/UserUpdateDto" required: true responses: - "403": - description: Not allowed to modify user metadata + "400": + description: Modify user query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to modify user at auth service + "404": + description: Failed to find database/user in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/user in metadata database + "503": + description: Failed to modify user at auth service content: application/json: schema: @@ -101,8 +101,8 @@ paths: application/json: schema: $ref: "#/components/schemas/UserDto" - "400": - description: Modify user query is malformed + "403": + description: Not allowed to modify user metadata content: application/json: schema: @@ -127,18 +127,18 @@ paths: type: string format: uuid responses: - "200": - description: Found user - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" "404": description: User was not found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Found user + content: + application/json: + schema: + $ref: "#/components/schemas/UserDto" "403": description: Find user is not permitted content: @@ -194,20 +194,8 @@ paths: $ref: "#/components/schemas/CreateDatabaseDto" required: true responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "409": - description: Query store could not be created - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "400": + description: Database create query is malformed or image is not supported content: application/json: schema: @@ -224,8 +212,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Database create query is malformed or image is not supported + "409": + description: Query store could not be created content: application/json: schema: @@ -243,6 +231,18 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to save in search service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -303,6 +303,12 @@ paths: type: string format: uuid responses: + "200": + description: Found database access + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseAccessDto" "403": description: No access to this database content: @@ -315,12 +321,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" security: - bearerAuth: [] - basicAuth: [] @@ -351,14 +351,9 @@ paths: $ref: "#/components/schemas/CreateAccessDto" required: true responses: - "404": - description: Database or user not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Access could not be updated in the data service + "502": + description: Access could not be updated due to connection error in the + data service content: application/json: schema: @@ -372,9 +367,8 @@ paths: $ref: "#/components/schemas/ApiErrorDto" "202": description: Modified access - "502": - description: Access could not be updated due to connection error in the - data service + "503": + description: Access could not be updated in the data service content: application/json: schema: @@ -385,6 +379,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Database or user not found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -415,14 +415,20 @@ paths: $ref: "#/components/schemas/CreateAccessDto" required: true responses: + "502": + description: Access could not be created due to connection error + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "202": description: Granting access succeeded content: application/json: schema: $ref: "#/components/schemas/DatabaseAccessDto" - "404": - description: Database or user not found + "403": + description: Failed giving access content: application/json: schema: @@ -439,14 +445,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Failed giving access - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Access could not be created due to connection error + "404": + description: Database or user not found content: application/json: schema: @@ -475,6 +475,12 @@ paths: type: string format: uuid responses: + "502": + description: Access could not be created due to connection error + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Revoke of access not permitted as no access was found content: @@ -489,12 +495,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Access could not be created due to connection error - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: "User, database with access was not found" content: @@ -534,6 +534,12 @@ paths: type: string format: uuid responses: + "200": + description: Found database access + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseAccessDto" "403": description: No access to this database content: @@ -546,12 +552,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" security: - bearerAuth: [] - basicAuth: [] @@ -665,18 +665,18 @@ paths: $ref: "#/components/schemas/BannerMessageUpdateDto" required: true responses: - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "202": description: Updated message content: application/json: schema: $ref: "#/components/schemas/BannerMessageBriefDto" + "404": + description: Could not find message + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -694,16 +694,16 @@ paths: type: string format: uuid responses: - "202": - description: Deleted message - content: - application/json: {} "404": description: Could not find message content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted message + content: + application/json: {} security: - bearerAuth: [] - basicAuth: [] @@ -817,9 +817,8 @@ paths: schema: type: string responses: - "400": - description: "Identifier could not be exported, the requested style is not\ - \ known" + "403": + description: Not allowed to view identifier content: application/json: schema: @@ -830,24 +829,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "409": - description: Exported resource was not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to find in data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "410": - description: Failed to retrieve from S3 endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Found identifier successfully content: @@ -857,20 +838,26 @@ paths: application/ld+json: schema: $ref: "#/components/schemas/LdDatasetDto" - text/csv: {} text/xml: {} text/bibliography: {} text/bibliography; style=apa: {} text/bibliography; style=ieee: {} text/bibliography; style=bibtex: {} - "403": - description: Not allowed to view identifier + "410": + description: Failed to retrieve from S3 endpoint content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Identifier could not be found + "409": + description: Exported resource was not found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: "Identifier could not be exported, the requested style is not\ + \ known" content: application/json: schema: @@ -881,6 +868,18 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Identifier could not be found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to find in data service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" put: tags: - identifier-endpoint @@ -904,20 +903,20 @@ paths: $ref: "#/components/schemas/IdentifierSaveDto" required: true responses: - "502": - description: Connection to search service failed + "404": + description: "Failed to find database, table or view" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities + "202": + description: Saved identifier content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" + $ref: "#/components/schemas/IdentifierDto" + "400": + description: Identifier form contains invalid request data content: application/json: schema: @@ -928,18 +927,18 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Identifier form contains invalid request data + "403": + description: Insufficient access rights or authorities content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Saved identifier + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/IdentifierDto" + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -957,12 +956,6 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "503": description: Failed to delete in search service content: @@ -977,6 +970,12 @@ paths: $ref: "#/components/schemas/ApiErrorDto" "202": description: Deleted identifier + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Deleting identifier not permitted content: @@ -1002,42 +1001,42 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed + "404": + description: "Failed to find database, table or view" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities + "400": + description: Identifier form contains invalid request data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" + "202": + description: Published identifier content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/IdentifierDto" "503": description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Identifier form contains invalid request data + "403": + description: Insufficient access rights or authorities content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Published identifier + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/IdentifierDto" + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -1063,8 +1062,8 @@ paths: $ref: "#/components/schemas/DatabaseModifyVisibilityDto" required: true responses: - "502": - description: Connection to search service failed + "400": + description: The visibility payload is malformed content: application/json: schema: @@ -1075,12 +1074,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: The visibility payload is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "403": description: Visibility modification is not permitted content: @@ -1093,6 +1086,12 @@ paths: application/json: schema: $ref: "#/components/schemas/DatabaseBriefDto" + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "404": description: Failed to find database in metadata database content: @@ -1123,12 +1122,6 @@ paths: type: string format: uuid responses: - "403": - description: Find view is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: "Database, view or user could not be found" content: @@ -1141,6 +1134,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ViewDto" + "403": + description: Find view is not permitted + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -1171,12 +1170,6 @@ paths: $ref: "#/components/schemas/ViewUpdateDto" required: true responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: Database or View could not be found content: @@ -1201,6 +1194,12 @@ paths: '*/*': schema: $ref: "#/components/schemas/ViewBriefDto" + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "400": description: Update view query is malformed content: @@ -1230,22 +1229,22 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed + "404": + description: "Database, view or user could not be found" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": description: Delete view successfully - "503": - description: Failed to save in search service + "423": + description: Delete view resulted in an invalid query statement content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, view or user could not be found" + "503": + description: Failed to save in search service content: application/json: schema: @@ -1256,8 +1255,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "423": - description: Delete view resulted in an invalid query statement + "502": + description: Connection to search service failed content: application/json: schema: @@ -1295,18 +1294,18 @@ paths: type: string format: uuid responses: - "403": - description: Access to the database is forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Find table successfully content: application/json: schema: $ref: "#/components/schemas/TableDto" + "403": + description: Access to the database is forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "404": description: "Table, database or container could not be found" content: @@ -1342,14 +1341,8 @@ paths: $ref: "#/components/schemas/TableUpdateDto" required: true responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "400": + description: Update table visibility payload is malformed content: application/json: schema: @@ -1360,8 +1353,8 @@ paths: application/json: schema: $ref: "#/components/schemas/TableBriefDto" - "400": - description: Update table visibility payload is malformed + "503": + description: Failed to save in search service content: application/json: schema: @@ -1372,6 +1365,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Update table visibility not permitted content: @@ -1403,28 +1402,28 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed + "400": + description: Delete table query resulted in an invalid query statement content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden + "202": + description: Delete table successfully + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "403": + description: Access to the database is forbidden content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Delete table successfully - "400": - description: Delete table query resulted in an invalid query statement + "502": + description: Connection to search service failed content: application/json: schema: @@ -1461,32 +1460,32 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed + "403": + description: Not the owner content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "404": + description: Failed to find database/table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Failed to map column statistic to known columns + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not the owner + "400": + description: Failed to map column statistic to known columns content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database + "502": + description: Connection to search service failed content: application/json: schema: @@ -1532,18 +1531,12 @@ paths: $ref: "#/components/schemas/ColumnSemanticsUpdateDto" required: true responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden + "202": + description: Updated column semantics successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/ColumnDto" "404": description: Failed to find user/table/database/ontology in metadata database content: @@ -1556,12 +1549,18 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated column semantics successfully + "403": + description: Access to the database is forbidden content: application/json: schema: - $ref: "#/components/schemas/ColumnDto" + $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "400": description: Update semantic concept query is malformed or update unit of measurement query is malformed @@ -1594,18 +1593,12 @@ paths: $ref: "#/components/schemas/DatabaseTransferDto" required: true responses: - "502": - description: Connection to search service failed + "400": + description: Owner payload is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Transfer of ownership was successful - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" "503": description: Failed to save in search service content: @@ -1618,8 +1611,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Owner payload is malformed + "502": + description: Connection to search service failed content: application/json: schema: @@ -1630,6 +1623,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Transfer of ownership was successful + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseBriefDto" security: - bearerAuth: [] - basicAuth: [] @@ -1650,26 +1649,26 @@ paths: type: string format: uuid responses: - "502": - description: Connection to search service failed + "200": + description: Refreshed database views metadata content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/DatabaseBriefDto" "503": description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Refreshed database views metadata + "403": + description: Refresh view metadata is not permitted content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "403": - description: Refresh view metadata is not permitted + $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed content: application/json: schema: @@ -1700,14 +1699,8 @@ paths: type: string format: uuid responses: - "403": - description: Not allowed to refresh table metadata - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "400": + description: Failed to parse payload at search service content: application/json: schema: @@ -1724,8 +1717,14 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Failed to parse payload at search service + "403": + description: Not allowed to refresh table metadata + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed content: application/json: schema: @@ -1754,12 +1753,6 @@ paths: type: string format: uuid responses: - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: View of image was successful content: @@ -1769,6 +1762,12 @@ paths: items: type: string format: byte + "404": + description: Database or user could not be found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -1793,14 +1792,20 @@ paths: $ref: "#/components/schemas/DatabaseModifyImageDto" required: true responses: + "403": + description: Modify of image is not permitted + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "410": description: File was not found in the Storage Service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "404": + description: Database could not be found content: application/json: schema: @@ -1817,14 +1822,8 @@ paths: application/json: schema: $ref: "#/components/schemas/DatabaseBriefDto" - "404": - description: Database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Modify of image is not permitted + "502": + description: Connection to search service failed content: application/json: schema: @@ -1948,12 +1947,6 @@ paths: $ref: "#/components/schemas/ImageCreateDto" required: true responses: - "400": - description: Image specification is invalid - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "409": description: Image already exists content: @@ -1966,6 +1959,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ImageDto" + "400": + description: Image specification is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -2054,8 +2053,8 @@ paths: $ref: "#/components/schemas/CreateIdentifierDto" required: true responses: - "502": - description: Connection to search service failed + "404": + description: "Failed to find database, table or view" content: application/json: schema: @@ -2066,26 +2065,26 @@ paths: application/json: schema: $ref: "#/components/schemas/IdentifierDto" - "403": - description: Insufficient access rights or authorities + "400": + description: Identifier form contains invalid request data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "403": + description: Insufficient access rights or authorities content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Identifier form contains invalid request data + "502": + description: Connection to search service failed content: application/json: schema: @@ -2146,14 +2145,8 @@ paths: $ref: "#/components/schemas/CreateViewDto" required: true responses: - "423": - description: Create view resulted in an invalid query statement - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "404": + description: Failed to find database/user in metadata database. content: application/json: schema: @@ -2164,8 +2157,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ViewBriefDto" - "503": - description: Failed to save in search service + "423": + description: Create view resulted in an invalid query statement content: application/json: schema: @@ -2176,8 +2169,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create view query is malformed + "503": + description: Failed to save in search service content: application/json: schema: @@ -2188,8 +2181,14 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/user in metadata database. + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Create view query is malformed content: application/json: schema: @@ -2220,12 +2219,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: List tables content: @@ -2234,6 +2227,12 @@ paths: type: array items: $ref: "#/components/schemas/TableBriefDto" + "404": + description: Database could not be found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -2257,24 +2256,12 @@ paths: $ref: "#/components/schemas/CreateTableDto" required: true responses: - "403": - description: Create table not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "400": + description: Create table query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new table - content: - application/json: - schema: - $ref: "#/components/schemas/TableBriefDto" "409": description: Create table conflicts with existing table name content: @@ -2287,14 +2274,26 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "201": + description: Created a new table + content: + application/json: + schema: + $ref: "#/components/schemas/TableBriefDto" "404": description: "Database, container or user could not be found" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create table query is malformed + "403": + description: Create table not permitted + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Connection to search service failed content: application/json: schema: @@ -2338,6 +2337,12 @@ paths: $ref: "#/components/schemas/CreateContainerDto" required: true responses: + "409": + description: Container name already exists + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: "Create container not permitted, need authority `create-container`" content: @@ -2356,12 +2361,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ContainerDto" - "409": - description: Container name already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: Container image or user could not be found content: @@ -2437,26 +2436,26 @@ paths: schema: type: string responses: - "400": - description: Filter params are invalid + "200": + description: Found entities content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + type: array + items: + $ref: "#/components/schemas/EntityDto" "417": description: Generated query or uri is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found entities + "400": + description: Filter params are invalid content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/EntityDto" + $ref: "#/components/schemas/ApiErrorDto" "404": description: Could not find ontology content: @@ -2506,18 +2505,18 @@ paths: type: string format: uuid responses: - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Get messages content: application/json: schema: $ref: "#/components/schemas/BannerMessageDto" + "404": + description: Could not find message + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" /api/license: get: tags: @@ -2549,18 +2548,18 @@ paths: schema: type: string responses: - "404": - description: Failed to find metadata for identifier - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Retrieved metadata from identifier content: application/json: schema: $ref: "#/components/schemas/IdentifierDto" + "404": + description: Failed to find metadata for identifier + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" /api/database/{databaseId}: get: tags: @@ -2576,18 +2575,6 @@ paths: type: string format: uuid responses: - "403": - description: Not allowed to view database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Database found successfully headers: @@ -2604,6 +2591,18 @@ paths: application/json: schema: $ref: "#/components/schemas/DatabaseBriefDto" + "404": + description: Database could not be found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Not allowed to view database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -2635,12 +2634,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "417": - description: Generated query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Suggested table semantics successfully content: @@ -2649,8 +2642,8 @@ paths: type: array items: $ref: "#/components/schemas/EntityDto" - "422": - description: Ontology does not have rdf or sparql endpoint + "417": + description: Generated query is malformed content: application/json: schema: @@ -2667,6 +2660,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "422": + description: Ontology does not have rdf or sparql endpoint + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -2703,6 +2702,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find database/table in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "200": description: Suggested table column semantics successfully content: @@ -2717,12 +2722,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] @@ -2773,14 +2772,14 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted container "403": description: "Create container not permitted, need authority `delete-container`" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted container security: - bearerAuth: [] - basicAuth: [] @@ -2802,59 +2801,6 @@ paths: $ref: "#/components/schemas/ConceptDto" components: schemas: - UserAttributesDto: - required: - - language - - theme - type: object - properties: - theme: - type: string - example: light - orcid: - type: string - example: https://orcid.org/0000-0002-1825-0097 - affiliation: - type: string - example: Brown University - language: - type: string - example: en - UserDto: - required: - - attributes - - id - - password - - username - type: object - properties: - id: - type: string - format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - name: - type: string - example: Josiah Carberry - username: - type: string - example: username - password: - type: string - example: p4ssw0rd - attributes: - $ref: "#/components/schemas/UserAttributesDto" - last_retrieved: - type: string - format: date-time - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry ApiErrorDto: required: - code @@ -2941,6 +2887,59 @@ components: code: type: string example: error.service.code + UserAttributesDto: + required: + - language + - theme + type: object + properties: + theme: + type: string + example: light + orcid: + type: string + example: https://orcid.org/0000-0002-1825-0097 + affiliation: + type: string + example: Brown University + language: + type: string + example: en + UserDto: + required: + - attributes + - id + - password + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + name: + type: string + example: Josiah Carberry + username: + type: string + example: username + password: + type: string + example: p4ssw0rd + attributes: + $ref: "#/components/schemas/UserAttributesDto" + last_retrieved: + type: string + format: date-time + qualified_name: + type: string + example: Josiah Carberry — @jcarberry + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry CreatorBriefDto: required: - creator_name @@ -4750,6 +4749,7 @@ components: - id - language - licenses + - links - owner - publication_year - publisher @@ -4765,6 +4765,8 @@ components: type: string format: uuid example: b97cd56b-66ca-4354-9e6c-f47210cfaaec + links: + $ref: "#/components/schemas/LinksDto" type: type: string example: database @@ -5078,6 +5080,21 @@ components: award_title: type: string example: EOSC-Life + LinksDto: + required: + - self + - self_html + type: object + properties: + self: + type: string + example: http://example.com/api/ + data: + type: string + example: http://example.com + self_html: + type: string + example: http://example.com RelatedIdentifierDto: required: - id @@ -6371,14 +6388,14 @@ components: type: string resumptionToken: type: string - parametersString: - type: string fromDate: type: string format: date-time untilDate: type: string format: date-time + parametersString: + type: string BannerMessageDto: required: - id diff --git a/.docs/.openapi/api.base.yaml b/.docs/.openapi/api.base.yaml index abadb218e7fa3b74a11caea3b01d3f73f2fa988a..6cf9e007278f12039b4779d01f44eadded03dcd7 100644 --- a/.docs/.openapi/api.base.yaml +++ b/.docs/.openapi/api.base.yaml @@ -24,7 +24,7 @@ info: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 title: DBRepo REST API - version: 1.7.0 + version: 1.7.1 openapi: 3.1.0 servers: - description: Test Instance diff --git a/.docs/.openapi/api.yaml b/.docs/.openapi/api.yaml index ef09abce99a63aa56fabda90e196224b0bbebadf..0fcd84503c6bd92530804d6e3e02242fe205d689 100644 --- a/.docs/.openapi/api.yaml +++ b/.docs/.openapi/api.yaml @@ -16,7 +16,7 @@ info: name: Apache 2.0 url: 'https://www.apache.org/licenses/LICENSE-2.0' title: DBRepo REST API - version: 1.7.0 + version: 1.7.1 servers: - description: Test Instance url: 'https://test.dbrepo.tuwien.ac.at' @@ -186,6 +186,11 @@ paths: schema: type: string format: date-time + - name: Accept + in: header + required: true + schema: + type: string responses: '200': description: Retrieved view data @@ -202,6 +207,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Request pagination is malformed content: @@ -220,6 +226,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '409': description: View schema could not be mapped content: @@ -274,6 +286,11 @@ paths: schema: type: string format: date-time + - name: Accept + in: header + required: true + schema: + type: string responses: '200': description: Retrieved view data @@ -290,6 +307,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Request pagination is malformed content: @@ -308,6 +326,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '409': description: View schema could not be mapped content: @@ -365,6 +389,11 @@ paths: schema: type: integer format: int64 + - name: Accept + in: header + required: true + schema: + type: string responses: '200': description: Get table data @@ -381,6 +410,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Request pagination or table data select query is malformed content: @@ -399,6 +429,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '503': description: Failed to establish connection with the metadata service content: @@ -640,6 +676,11 @@ paths: schema: type: integer format: int64 + - name: Accept + in: header + required: true + schema: + type: string responses: '200': description: Get table data @@ -656,6 +697,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Request pagination or table data select query is malformed content: @@ -674,6 +716,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '503': description: Failed to establish connection with the metadata service content: @@ -708,6 +756,11 @@ paths: schema: type: string format: uuid + - name: Accept + in: header + required: true + schema: + type: string - name: timestamp in: query required: false @@ -748,6 +801,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Invalid pagination content: @@ -768,6 +822,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '503': description: Failed to communicate with database content: @@ -801,6 +861,11 @@ paths: schema: type: string format: uuid + - name: Accept + in: header + required: true + schema: + type: string - name: timestamp in: query required: false @@ -841,6 +906,7 @@ paths: application/json: schema: type: string + text/csv: {} '400': description: Invalid pagination content: @@ -861,6 +927,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '503': description: Failed to communicate with database content: @@ -1164,6 +1236,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '406': + description: Failed to format data + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '417': description: Failed to insert query into query store of data database content: @@ -1185,70 +1263,6 @@ paths: security: - basicAuth: [] - bearerAuth: [] - '/api/database/{databaseId}/view/{viewId}/export': - get: - tags: - - view-endpoint - summary: Get view data - description: >- - Gets data from view with id as downloadable file. For tables in private - databases, the user needs to have at least *READ* access to the - associated database. - operationId: exportDataset - parameters: - - name: databaseId - in: path - required: true - schema: - type: string - format: uuid - - name: viewId - in: path - required: true - schema: - type: string - format: uuid - - name: timestamp - in: query - required: false - schema: - type: string - format: date-time - responses: - '200': - description: Exported view data - content: - application/json: - schema: - type: string - format: binary - '400': - description: Request pagination or view data select query is malformed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Export view data not allowed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '404': - description: Failed to find view in metadata database or export dataset - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - security: - - basicAuth: [] - - bearerAuth: [] '/api/database/{databaseId}/table/{tableId}/history': get: tags: @@ -1314,70 +1328,6 @@ paths: security: - basicAuth: [] - bearerAuth: [] - '/api/database/{databaseId}/table/{tableId}/export': - get: - tags: - - table-endpoint - summary: Get table data - description: >- - Gets data from table with id as downloadable file. For tables in private - databases, the user needs to have at least *READ* access to the - associated database. - operationId: exportDataset_1 - parameters: - - name: databaseId - in: path - required: true - schema: - type: string - format: uuid - - name: tableId - in: path - required: true - schema: - type: string - format: uuid - - name: timestamp - in: query - required: false - schema: - type: string - format: date-time - responses: - '200': - description: Exported table data - content: - application/json: - schema: - type: string - format: binary - '400': - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Export table data not allowed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '404': - description: Failed to find table in metadata database - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - security: - - basicAuth: [] - - bearerAuth: [] '/api/database/{databaseId}/subset/{subsetId}': get: tags: @@ -1403,11 +1353,6 @@ paths: schema: type: string format: uuid - - name: Accept - in: header - required: true - schema: - type: string - name: timestamp in: query required: false @@ -2282,7 +2227,6 @@ paths: application/ld+json: schema: $ref: '#/components/schemas/LdDatasetDto' - text/csv: {} text/xml: {} text/bibliography: {} text/bibliography; style=apa: {} @@ -5332,6 +5276,7 @@ components: - id - language - licenses + - links - owner - publication_year - publisher @@ -5347,6 +5292,8 @@ components: type: string format: uuid example: b97cd56b-66ca-4354-9e6c-f47210cfaaec + links: + $ref: '#/components/schemas/LinksDto' type: type: string example: database @@ -5681,6 +5628,21 @@ components: preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code. + LinksDto: + required: + - self + - self_html + type: object + properties: + self: + type: string + example: 'http://example.com/api/' + data: + type: string + example: 'http://example.com' + self_html: + type: string + example: 'http://example.com' RelatedIdentifierDto: required: - id @@ -8414,14 +8376,14 @@ components: type: string resumptionToken: type: string - parametersString: - type: string fromDate: type: string format: date-time untilDate: type: string format: date-time + parametersString: + type: string BannerMessageDto: required: - id diff --git a/.docs/changelog.md b/.docs/changelog.md index e09b3c1139ff51f55fe986caf19be9b8894b9ba1..941b3ccc59758e4bf709514ac296b738e13158cc 100644 --- a/.docs/changelog.md +++ b/.docs/changelog.md @@ -2,9 +2,23 @@ author: Martin Weise --- +## v1.7.1 (2025-03-06) + +#### Features + +* Added support to download `pandas` DataFrame by PID + in [#503](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/503). +* Added the possibility to create and fill a table from a `pandas` DataFrame (or optionally just create the schema) + in [#496](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/496). + +#### Fixes + +* Fixed a bug where quick interaction with the UI caused the user to trigger the brute-force login detection + in [#501](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/501). + ## v1.7.0 (2025-03-03) -[:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.7.0) +[:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.7.1) !!! warning "Contains Breaking Changes" diff --git a/.docs/index.md b/.docs/index.md index aa9c6e7693f3758fadcddbe05cd5904c5e92b7da..6beb128e843e1bd5befb0808e99171b927b2c182 100644 --- a/.docs/index.md +++ b/.docs/index.md @@ -14,7 +14,7 @@ author: Martin Weise   -Documentation for version: [v1.7.0](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/releases). +Documentation for version: [v1.7.1](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/releases). DBRepo is a repository for data in databases that are used from the beginning until the end of a research project supporting data evolution, -citation and -versioning. It implements the query store of the diff --git a/.docs/kubernetes.md b/.docs/kubernetes.md index 9413c784dfcccf6e14f527495243e33162922f23..16f21bd991e6850175f10da5539a7423609d6d3d 100644 --- a/.docs/kubernetes.md +++ b/.docs/kubernetes.md @@ -14,7 +14,7 @@ helm upgrade --install dbrepo \ -n dbrepo \ "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" \ --values ./values.yaml \ - --version "1.7.0" \ + --version "1.7.1" \ --create-namespace \ --cleanup-on-fail ``` diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef34bf3249917a97a20c542e72f1add4ec04543e..0d4e8b145ff7629b61411f2c4438ab5fea566ca6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,9 @@ variables: SONARQUBE_VERSION: "10.0" BUN_VERSION: "1.1.40" DOC_VERSION: "1.7" - APP_VERSION: "1.7.0" - CHART_VERSION: "1.7.0" + APP_VERSION: "1.7.1" + CHART_VERSION: "1.7.1" + SUPPORTED_VERSIONS: "[\"1.7.0\",\"1.7.1\"]" CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}" # This will supress any download for dependencies and plugins or upload messages which would clutter the console log. # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. @@ -35,7 +36,7 @@ workflow: rules: - if: $CI_COMMIT_REF_NAME == "dev" variables: - BUILD_VERSION: "+git.${CI_COMMIT_SHORT_SHA}" + BUILD_VERSION: "-dev.git.${CI_COMMIT_SHORT_SHA}" - when: always stages: @@ -43,8 +44,8 @@ stages: - build - test - docs + - clean - release - - deploy - verify - scan @@ -119,7 +120,7 @@ lint-helm-readme: - ./helm/dbrepo/README.md expire_in: 1 days -lint-metadata-schema: +lint-helm-files: image: docker.io/alpine:${ALPINE_VERSION} stage: lint script: @@ -147,7 +148,6 @@ build-metadata-service: stage: build only: - merge_requests - - master script: - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages @@ -168,7 +168,6 @@ build-analyse-service: stage: build only: - merge_requests - - master variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" script: @@ -180,7 +179,6 @@ build-lib: stage: build only: - merge_requests - - master variables: PIPENV_PIPFILE: "./lib/python/Pipfile" script: @@ -192,7 +190,6 @@ build-data-service: stage: build only: - merge_requests - - master needs: - build-metadata-service dependencies: @@ -215,7 +212,6 @@ build-ui: stage: build only: - merge_requests - - master script: - "cd ./dbrepo-ui && bun install && bun run build" @@ -224,7 +220,6 @@ build-search-service: stage: build only: - merge_requests - - master before_script: - "pip install pipenv" script: @@ -235,20 +230,19 @@ build-images: stage: build only: - merge_requests - - master before_script: - "apk add --no-cache make" - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL script: - - "make build-images" + - docker build -q --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service + - docker build -q --network=host -t dbrepo-data-service:build --target build dbrepo-data-service + - docker compose build -q --parallel build-helm: image: docker.io/docker:${DOCKER_VERSION}-dind stage: build only: - - tags - merge_requests - - master before_script: - apk add --no-cache helm make - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg @@ -261,7 +255,6 @@ test-metadata-service: stage: test only: - merge_requests - - master needs: - build-metadata-service dependencies: @@ -284,7 +277,6 @@ test-data-service: stage: test only: - merge_requests - - master needs: - build-data-service dependencies: @@ -308,7 +300,6 @@ test-analyse-service: stage: test only: - merge_requests - - master variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" needs: @@ -335,7 +326,6 @@ test-auth-service-init: stage: test only: - merge_requests - - master variables: PIPENV_PIPFILE: "./dbrepo-auth-service/init/Pipfile" before_script: @@ -360,7 +350,6 @@ test-search-service: stage: test only: - merge_requests - - master variables: PIPENV_PIPFILE: "./dbrepo-search-service/Pipfile" needs: @@ -394,7 +383,6 @@ test-search-service-init: stage: test only: - merge_requests - - master variables: PIPENV_PIPFILE: "./dbrepo-search-service/init/Pipfile" needs: @@ -421,7 +409,6 @@ test-lib: stage: test only: - merge_requests - - master variables: PIPENV_PIPFILE: "./lib/python/Pipfile" needs: @@ -448,7 +435,6 @@ test-ui: stage: test only: - merge_requests - - master needs: - build-ui dependencies: @@ -461,13 +447,29 @@ test-ui: - "sleep 30" - "ENDPOINT=http://localhost:3000 bash ./dbrepo-ui/tests/test_heap.sh" +clean-images: + stage: clean + image: docker:${DOCKER_VERSION}-dind + only: + refs: + - dev + - /^release-.*/ + before_script: + - "docker logout ${CI_REGISTRY_URL}" + - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" + - "docker logout ${CI_REGISTRY2_URL}" + - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" + - "apk add --no-cache wget bash" + - "wget -O /usr/local/sbin/regctl https://github.com/regclient/regclient/releases/download/v0.8.2/regctl-linux-amd64" + - "chmod +x /usr/local/sbin/regctl" + script: + - bash ./.gitlab/remove-unsupported-images.sh + release-images: stage: release image: docker:${DOCKER_VERSION}-dind - only: - - dev - - tags dependencies: + - clean-images - test-analyse-service - test-auth-service-init - test-data-service @@ -476,21 +478,47 @@ release-images: - test-search-service - test-search-service-init - test-ui + only: + refs: + - dev + - /^release-.*/ before_script: - "docker logout ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY2_URL}" - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" - - "ifconfig eth0 mtu 1450 up" - - "apk add --no-cache make bash" script: - - "make release-images" + - docker build -q --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service + - docker build -q --network=host -t dbrepo-data-service:build --target build dbrepo-data-service + - docker compose build -q --parallel + - docker tag dbrepo-analyse-service:latest "${CI_REGISTRY2_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-dashboard-service:latest "${CI_REGISTRY2_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-ui:latest "${CI_REGISTRY2_URL}/ui:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-data-service:latest "${CI_REGISTRY2_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-auth-service-init:latest "${CI_REGISTRY2_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-metadata-service:latest "${CI_REGISTRY2_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-search-db:latest "${CI_REGISTRY2_URL}/search-db:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-search-service:latest "${CI_REGISTRY2_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-search-service-init:latest "${CI_REGISTRY2_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" + - docker tag dbrepo-storage-service-init:latest "${CI_REGISTRY2_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/ui:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/search-db:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" + - docker push "${CI_REGISTRY2_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" release-helm: stage: release image: docker:${DOCKER_VERSION}-dind only: - - tags + refs: + - /^release-.*/ + when: manual needs: - build-helm dependencies: @@ -517,7 +545,8 @@ release-docs: stage: release image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} only: - - tags + refs: + - /^release-.*/ before_script: - "apk add --no-cache alpine-sdk bash sed wget openssh jq curl" - "pip install pipenv" @@ -549,8 +578,10 @@ release-docs: release-libs: stage: release image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} + when: manual only: - - tags + refs: + - /^release-.*/ variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" before_script: @@ -565,7 +596,8 @@ verify-install-script: image: docker.io/docker:${DOCKER_VERSION}-dind stage: verify only: - - tags + refs: + - /^release-.*/ variables: SKIP_CHECKS: 1 before_script: @@ -577,37 +609,25 @@ verify-dist: image: docker.io/alpine:${ALPINE_VERSION} stage: verify only: - - tags + refs: + - /^release-.*/ before_script: - "apk add curl" script: - "curl -v --output /dev/null --fail https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/${APP_VERSION}/dist.tar.gz" -deploy-staging: - image: docker.io/alpine:${ALPINE_VERSION} - stage: deploy - only: - - dev - variables: - KUBECONFIG: ./kubecfg - environment: - name: staging/datalab - url: ${CI_ENV_STAGING_URL} - before_script: - - apk add --no-cache helm kubectl make - - echo ${CI_K8S_CONFIG} | base64 -d > ./kubecfg - - make build-helm - - helm -n ${CI_ENV_STAGING_NAMESPACE} uninstall ${CI_ENV_STAGING_RELEASE_NAME} --ignore-not-found - - kubectl -n ${CI_ENV_STAGING_NAMESPACE} delete pvc --all - - echo "${CI_K8S_VALUES}" | base64 -d > ./values.yaml - script: - - helm -n ${CI_ENV_STAGING_NAMESPACE} upgrade --install ${CI_ENV_STAGING_RELEASE_NAME} ./build/dbrepo-${CHART_VERSION}.tgz --create-namespace -f ./values.yaml - scan-sonarqube: image: sonarsource/sonar-scanner-cli:${SONARQUBE_VERSION} stage: scan only: - - master + refs: + - master + needs: + - build-data-service + - build-metadata-service + dependencies: + - build-data-service + - build-metadata-service script: - 'sonar-scanner -Dsonar.token="${CI_SONAR_TOKEN}"' allow_failure: true @@ -615,4 +635,4 @@ scan-sonarqube: policy: pull key: "${CI_COMMIT_SHORT_SHA}" paths: - - sonar-scanner/ \ No newline at end of file + - sonar-scanner/ diff --git a/.gitlab/remove-unsupported-images.sh b/.gitlab/remove-unsupported-images.sh new file mode 100755 index 0000000000000000000000000000000000000000..7c69d95191a9bcc15f6249afa0ed025c7e242979 --- /dev/null +++ b/.gitlab/remove-unsupported-images.sh @@ -0,0 +1,24 @@ +#!/bin/bash +declare -A services +services[0]=analyse-service +services[1]=auth-service-init +services[2]=dashboard-service +services[3]=data-service +services[4]=search-db +services[5]=search-service +services[6]=search-service-init +services[7]=ui + +echo "Starting registry housekeeping ..." + +for key in "${!services[@]}"; do + echo "Checking ${CI_REGISTRY2_URL}/${services[$key]} tags ..." + TAGS=$(regctl tag ls ${CI_REGISTRY2_URL}/${services[$key]}) + for tag in $TAGS; do + res=$(echo "${SUPPORTED_VERSIONS}" | grep "$tag") + if [[ -z $res ]]; then + regctl tag rm ${CI_REGISTRY2_URL}/${services[$key]}:$tag + echo "Deleted unsupported tag ${CI_REGISTRY2_URL}/${services[$key]}:$tag" + fi + done +done diff --git a/Makefile b/Makefile index e8f2553784f38ea5e656d776e34043886ed1ed4c..c7ef9b35f9a668634ea7f587fd54ed247934a1a0 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all -APP_VERSION ?= 1.7.0 -CHART_VERSION ?= 1.7.0 +APP_VERSION ?= 1.7.1 +CHART_VERSION ?= 1.7.1 REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo .PHONY: all diff --git a/dbrepo-analyse-service/Pipfile b/dbrepo-analyse-service/Pipfile index 6b144eec80011a340dbbaabc0c3bce5894e3c654..cb2c838e85fe758941d8a0fe504d99ed4d908db7 100644 --- a/dbrepo-analyse-service/Pipfile +++ b/dbrepo-analyse-service/Pipfile @@ -21,7 +21,7 @@ numpy = "*" pandas = "*" minio = "*" pydantic = "*" -dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.1.tar.gz"} opensearch-py = "*" [dev-packages] diff --git a/dbrepo-analyse-service/Pipfile.lock b/dbrepo-analyse-service/Pipfile.lock index e54efec237dc14ee3048bf0abb369eec540df337..995400fd16e50f79ff7fe5b0b4114ef6c407041e 100644 --- a/dbrepo-analyse-service/Pipfile.lock +++ b/dbrepo-analyse-service/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "0af9d522f713554dd7996401992cffddf372ade320c11d7950bdcd5888aa1a03" + "sha256": "15b4fb696eabcc9059097bb4250de1545aa9c00211e2d50386e7ceead50aee4f" }, "pipfile-spec": 6, "requires": { @@ -18,11 +18,11 @@ "default": { "aiohappyeyeballs": { "hashes": [ - "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1", - "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0" + "sha256:19728772cb12263077982d2f55453babd8bec6a052a926cd5c0c42796da8bf62", + "sha256:6cac4f5dd6e34a9644e69cf9021ef679e4394f54e58a183056d12009e42ea9e3" ], "markers": "python_version >= '3.9'", - "version": "==2.4.6" + "version": "==2.4.8" }, "aiohttp": { "hashes": [ @@ -180,20 +180,20 @@ }, "boto3": { "hashes": [ - "sha256:024c37c2f85f4b907f5fc817d0db6fda7fd6ab3c6148ee4ed35fe7cecdf7db0c", - "sha256:1bbf8bbacb3932956b7020d9a2c49d72c64e21bae9397ba6d3aadffab5e192eb" + "sha256:4c661389e68437a3fbc1f63decea24b88f7175e022c68622848d47fdf6e0144f", + "sha256:e2f4a1edb7e6dbd541c2962117e1c6fea8d5a42788c441a958700a43a3ca7c47" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==1.37.4" + "version": "==1.37.6" }, "botocore": { "hashes": [ - "sha256:7e15cd487617440e9eac3144044b6a2bd833d7f3e2bed6a2865693cc11489cc3", - "sha256:89130998c82d53f875a42646b692da507c9871b580fd1aea0f861bf9da36e41a" + "sha256:2cb121a403cbec047d76e2401a402a6b2efd3309169037fbac588e8f7125aec4", + "sha256:cd282fe9c8adbb55a08c7290982a98ac6cc4507fa1c493f48bc43fd6c8376a57" ], "markers": "python_version >= '3.8'", - "version": "==1.37.4" + "version": "==1.37.6" }, "certifi": { "hashes": [ @@ -425,9 +425,9 @@ }, "dbrepo": { "hashes": [ - "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" + "sha256:e70ea4f7030191eb80116e5d0a4b17b041c94c80359d5d8e707d62218edd9a54" ], - "path": "./lib/dbrepo-1.7.0.tar.gz" + "path": "./lib/dbrepo-1.7.1.tar.gz" }, "events": { "hashes": [ @@ -1583,11 +1583,11 @@ }, "s3transfer": { "hashes": [ - "sha256:ca855bdeb885174b5ffa95b9913622459d4ad8e331fc98eb01e6d5eb6a30655d", - "sha256:edae4977e3a122445660c7c114bba949f9d191bae3b34a096f18a1c8c354527a" + "sha256:559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679", + "sha256:ac265fa68318763a03bf2dc4f39d5cbd6a9e178d81cc9483ad27da33637e320d" ], "markers": "python_version >= '3.8'", - "version": "==0.11.3" + "version": "==0.11.4" }, "setuptools": { "hashes": [ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl deleted file mode 100644 index b58eb4bc6134164a5c99959cc35adc1160bdeff4..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz deleted file mode 100644 index 56e2f0cd8d4a18039de95dbecfeafe997baab3ce..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.1-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.7.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..61f52896c18ecbec8090177b38b8dbaeb0e1a95e Binary files /dev/null and b/dbrepo-analyse-service/lib/dbrepo-1.7.1-py3-none-any.whl differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.1.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6708e1d892771d6cdf9293a6e9f5197f4dd9e304 Binary files /dev/null and b/dbrepo-analyse-service/lib/dbrepo-1.7.1.tar.gz differ diff --git a/dbrepo-auth-service/dbrepo-realm.json b/dbrepo-auth-service/dbrepo-realm.json index 9c6049095c2501876c686b3d03a5f3f92c42017d..7453ef4e4d3c2485a61ba2ffc50327ab10a809f0 100644 --- a/dbrepo-auth-service/dbrepo-realm.json +++ b/dbrepo-auth-service/dbrepo-realm.json @@ -2535,7 +2535,7 @@ "membership.user.ldap.attribute" : [ "uid" ], "memberof.ldap.attribute" : [ "memberOf" ], "group.object.classes" : [ "groupOfNames" ], - "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], + "groups.dn" : [ "ou=users,${LDAP_ROOT}" ], "drop.non.existing.groups.during.sync" : [ "false" ], "groups.path" : [ "/" ] } @@ -2572,13 +2572,13 @@ "fullSyncPeriod" : [ "-1" ], "startTls" : [ "false" ], "connectionPooling" : [ "true" ], - "usersDn" : [ "ou=users,dc=dbrepo,dc=at" ], + "usersDn" : [ "ou=users,${LDAP_ROOT}" ], "cachePolicy" : [ "DEFAULT" ], "useKerberosForPasswordAuthentication" : [ "false" ], "importEnabled" : [ "true" ], "enabled" : [ "true" ], - "bindCredential" : [ "admin" ], - "bindDn" : [ "cn=admin,dc=dbrepo,dc=at" ], + "bindCredential" : [ "${LDAP_ADMIN_PASSWORD}" ], + "bindDn" : [ "${LDAP_ADMIN_DN}" ], "usernameLDAPAttribute" : [ "uid" ], "changedSyncPeriod" : [ "-1" ], "lastSync" : [ "1719252666" ], diff --git a/dbrepo-auth-service/listeners/target/create-event-listener.jar b/dbrepo-auth-service/listeners/target/create-event-listener.jar index e95a1e41f167192c570fe210667a3fe5dac77305..72d17863f14cc38c1fd026dd7e40e56a25fc4318 100644 Binary files a/dbrepo-auth-service/listeners/target/create-event-listener.jar and b/dbrepo-auth-service/listeners/target/create-event-listener.jar differ diff --git a/dbrepo-auth-service/master-realm.json b/dbrepo-auth-service/master-realm.json index 1cf53fe49cffabe7e5833675db95ebff6eec7034..3fd8c910b3c1c5b0021cb110c8ad9f07386315d4 100644 --- a/dbrepo-auth-service/master-realm.json +++ b/dbrepo-auth-service/master-realm.json @@ -1613,7 +1613,7 @@ "membership.user.ldap.attribute" : [ "uid" ], "preserve.group.inheritance" : [ "false" ], "membership.ldap.attribute" : [ "member" ], - "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], + "groups.dn" : [ "ou=users,${LDAP_ROOT}" ], "memberof.ldap.attribute" : [ "memberOf" ], "group.object.classes" : [ "groupOfNames" ], "drop.non.existing.groups.during.sync" : [ "false" ], @@ -1638,15 +1638,15 @@ "fullSyncPeriod" : [ "-1" ], "startTls" : [ "false" ], "connectionPooling" : [ "false" ], - "usersDn" : [ "ou=users,dc=dbrepo,dc=at" ], + "usersDn" : [ "ou=users,${LDAP_ROOT}" ], "cachePolicy" : [ "DEFAULT" ], "useKerberosForPasswordAuthentication" : [ "false" ], "importEnabled" : [ "true" ], "enabled" : [ "true" ], "changedSyncPeriod" : [ "-1" ], "usernameLDAPAttribute" : [ "uid" ], - "bindCredential" : [ "admin" ], - "bindDn" : [ "cn=admin,dc=dbrepo,dc=at" ], + "bindCredential" : [ "${LDAP_ADMIN_PASSWORD}" ], + "bindDn" : [ "${LDAP_ADMIN_DN}" ], "vendor" : [ "other" ], "uuidLDAPAttribute" : [ "entryUUID" ], "allowKerberosAuthentication" : [ "false" ], diff --git a/dbrepo-dashboard-service/Dockerfile b/dbrepo-dashboard-service/Dockerfile index e4d9d8f5056d01714c0fc15c3840f8bf05cac921..d5f64a82fb40c8823bbb7d0e5f8ac0a5426ce888 100644 --- a/dbrepo-dashboard-service/Dockerfile +++ b/dbrepo-dashboard-service/Dockerfile @@ -4,6 +4,5 @@ LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" WORKDIR /app COPY --chown=grafana:grafana ./dashboards /app/dashboards -COPY --chown=grafana:grafana ./provisioning /etc/grafana/provisioning COPY --chown=grafana:grafana ./grafana.ini /etc/grafana/grafana.ini COPY --chown=grafana:grafana ./ldap.toml /etc/grafana/ldap.toml diff --git a/dbrepo-dashboard-service/provisioning/dashboards/provider.yaml b/dbrepo-dashboard-service/provisioning/dashboards/provider.yaml deleted file mode 100644 index f54289797de349a240ede871f4d4402fa89214b3..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/provisioning/dashboards/provider.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: 1 - -providers: - # <string> an unique provider name. Required - - name: 'dbrepo' - # <int> Org id. Default to 1 - orgId: 1 - # <string> name of the dashboard folder. - folder: '/app/dashboards' - # <string> folder UID. will be automatically generated if not specified - folderUid: '' - # <string> provider type. Default to 'file' - type: file - # <bool> disable dashboard deletion - disableDeletion: false - # <int> how often Grafana will scan for changed dashboards - updateIntervalSeconds: 10 - # <bool> allow updating provisioned dashboards from the UI - allowUiUpdates: false - options: - # <string, required> path to dashboard files on disk. Required when using the 'file' type - path: /app/dashboards - # <bool> use folder names from filesystem to create folders in Grafana - foldersFromFilesStructure: true \ No newline at end of file diff --git a/dbrepo-dashboard-service/provisioning/datasources/prometheus.yaml b/dbrepo-dashboard-service/provisioning/datasources/prometheus.yaml deleted file mode 100644 index a46c561957abfd2093e275f213f29f0db7d3fe5c..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/provisioning/datasources/prometheus.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: 1 - -datasources: - - name: dbrepo-metric-db - type: prometheus - uid: P18F45E9DC7E75912 - url: http://metric-db:9090 diff --git a/dbrepo-data-service/pom.xml b/dbrepo-data-service/pom.xml index 35784c7d1f3167925a43cdab5104ab676189c950..519f3a613b550f33e166fa4414df86b4b0af6ad1 100644 --- a/dbrepo-data-service/pom.xml +++ b/dbrepo-data-service/pom.xml @@ -16,7 +16,7 @@ <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> <name>dbrepo-data-service</name> - <version>1.7.0</version> + <version>1.7.1</version> <description>Service that manages the data</description> diff --git a/dbrepo-data-service/querystore/pom.xml b/dbrepo-data-service/querystore/pom.xml index 1aa138f611c7fa5ec2fc4f6dc98beb8a177f24b5..12c1688ff501c9302c9aa6713c81b59c01d11622 100644 --- a/dbrepo-data-service/querystore/pom.xml +++ b/dbrepo-data-service/querystore/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-data-service-querystore</artifactId> <name>dbrepo-data-service-querystore</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies/> diff --git a/dbrepo-data-service/report/pom.xml b/dbrepo-data-service/report/pom.xml index 98536501d3beb70b5c05f632e673a401b03ae2cd..5944f7cb39ee14d9f46182c541eb11c80f90aa76 100644 --- a/dbrepo-data-service/report/pom.xml +++ b/dbrepo-data-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>report</artifactId> <name>dbrepo-data-service-report</name> - <version>1.7.0</version> + <version>1.7.1</version> <description> This module is only intended for the pipeline coverage report. See the detailed report in the respective modules diff --git a/dbrepo-data-service/rest-service/pom.xml b/dbrepo-data-service/rest-service/pom.xml index 434c423ef056566305e2d72db984781e7b1429fc..4bc6e196144862161c4d7375d45840cfd6352103 100644 --- a/dbrepo-data-service/rest-service/pom.xml +++ b/dbrepo-data-service/rest-service/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>rest-service</artifactId> <name>dbrepo-data-service-rest-service</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>services</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java index 4ca4810f770651d39351f039ecd8588562a0fd16..7bf598db0b878b619db6c04537da6084d7cb79eb 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java @@ -11,7 +11,6 @@ import at.tuwien.api.error.ApiErrorDto; import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; import at.tuwien.mapper.MariaDbMapper; -import at.tuwien.mapper.MetadataMapper; import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import at.tuwien.service.StorageService; @@ -33,10 +32,7 @@ import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; +import org.springframework.http.*; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -44,7 +40,6 @@ import java.security.Principal; import java.sql.SQLException; import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.UUID; @Log4j2 @@ -56,7 +51,6 @@ public class SubsetEndpoint extends RestEndpoint { private final CacheService cacheService; private final MariaDbMapper mariaDbMapper; private final SubsetService subsetService; - private final MetadataMapper metadataMapper; private final StorageService storageService; private final DatabaseService databaseService; private final EndpointValidator endpointValidator; @@ -64,12 +58,11 @@ public class SubsetEndpoint extends RestEndpoint { @Autowired public SubsetEndpoint(CacheService cacheService, MariaDbMapper mariaDbMapper, SubsetService subsetService, - MetadataMapper metadataMapper, StorageService storageService, DatabaseService databaseService, + StorageService storageService, DatabaseService databaseService, EndpointValidator endpointValidator, MetadataServiceGateway metadataServiceGateway) { this.cacheService = cacheService; this.mariaDbMapper = mariaDbMapper; this.subsetService = subsetService; - this.metadataMapper = metadataMapper; this.storageService = storageService; this.databaseService = databaseService; this.endpointValidator = endpointValidator; @@ -110,7 +103,15 @@ public class SubsetEndpoint extends RestEndpoint { QueryNotFoundException, NotAllowedException, MetadataServiceException { log.debug("endpoint find subsets in database, databaseId={}, filterPersisted={}", databaseId, filterPersisted); final DatabaseDto database = cacheService.getDatabase(databaseId); - endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); + if (!database.getIsPublic()) { + if (principal == null) { + log.error("Failed to list queries: no authentication found"); + throw new NotAllowedException("Failed to list queries: no authentication found"); + } + if (!isSystem(principal)) { + endpointValidator.validateOnlyAccess(database, principal, false); + } + } final List<QueryDto> queries; try { queries = subsetService.findAll(database, filterPersisted); @@ -162,19 +163,26 @@ public class SubsetEndpoint extends RestEndpoint { }) public ResponseEntity<?> findById(@NotNull @PathVariable("databaseId") UUID databaseId, @NotNull @PathVariable("subsetId") UUID subsetId, - @NotNull @RequestHeader("Accept") String accept, @RequestParam(required = false) Instant timestamp, Principal principal) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, - QueryNotFoundException, FormatNotAvailableException, StorageUnavailableException, UserNotFoundException, - MetadataServiceException, TableNotFoundException, QueryMalformedException, NotAllowedException { - log.debug("endpoint find subset in database, databaseId={}, subsetId={}, accept={}, timestamp={}", databaseId, - subsetId, accept, timestamp); + QueryNotFoundException, UserNotFoundException, MetadataServiceException, NotAllowedException { + log.debug("endpoint find subset in database, databaseId={}, subsetId={}, timestamp={}", databaseId, + subsetId, timestamp); final DatabaseDto database = cacheService.getDatabase(databaseId); - endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); + if (!database.getIsPublic()) { + if (principal == null) { + log.error("Failed to find query: no authentication found"); + throw new NotAllowedException("Failed to find query: no authentication found"); + } + if (!isSystem(principal)) { + endpointValidator.validateOnlyAccess(database, principal, false); + } + } final QueryDto subset; try { subset = subsetService.findById(database, subsetId); + subset.setIdentifiers(metadataServiceGateway.getIdentifiers(database.getId(), subset.getId())); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); @@ -184,27 +192,7 @@ public class SubsetEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } - if (accept == null || accept.isBlank()) { - accept = MediaType.APPLICATION_JSON_VALUE; - log.debug("accept header not set: default to {}", accept); - } - switch (accept) { - case MediaType.APPLICATION_JSON_VALUE: - log.trace("accept header matches json"); - return ResponseEntity.ok(subset); - case "text/csv": - log.trace("accept header matches csv"); - final String query = mariaDbMapper.rawSelectQuery(subset.getQuery(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(database, query); - final ExportResourceDto resource = storageService.transformDataset(dataset); - final HttpHeaders headers = new HttpHeaders(); - headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); - log.trace("export table resulted in resource {}", resource); - return ResponseEntity.ok() - .headers(headers) - .body(resource.getResource()); - } - throw new FormatNotAvailableException("Must provide either application/json or text/csv value for header 'Accept': provided " + accept + " instead"); + return ResponseEntity.ok(subset); } @PostMapping @@ -233,6 +221,11 @@ public class SubsetEndpoint extends RestEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "406", + description = "Failed to format data", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "417", description = "Failed to insert query into query store of data database", content = {@Content( @@ -249,18 +242,18 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> create(@NotNull @PathVariable("databaseId") UUID databaseId, - @Valid @RequestBody SubsetDto data, - Principal principal, - @NotNull HttpServletRequest request, - @RequestParam(required = false) Instant timestamp, - @RequestParam(required = false) Long page, - @RequestParam(required = false) Long size) + public ResponseEntity<?> create(@NotNull @PathVariable("databaseId") UUID databaseId, + @Valid @RequestBody SubsetDto data, + Principal principal, + @NotNull HttpServletRequest request, + @RequestParam(required = false) Instant timestamp, + @RequestParam(required = false) Long page, + @RequestParam(required = false) Long size) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, QueryNotFoundException, StorageUnavailableException, QueryMalformedException, StorageNotFoundException, QueryStoreInsertException, TableMalformedException, PaginationException, QueryNotSupportedException, NotAllowedException, UserNotFoundException, MetadataServiceException, TableNotFoundException, - ViewMalformedException, ViewNotFoundException, ImageNotFoundException { + ViewMalformedException, ViewNotFoundException, ImageNotFoundException, FormatNotAvailableException { log.debug("endpoint create subset in database, databaseId={}, page={}, size={}, timestamp={}", databaseId, page, size, timestamp); /* check */ @@ -287,10 +280,18 @@ public class SubsetEndpoint extends RestEndpoint { } /* create */ final DatabaseDto database = cacheService.getDatabase(databaseId); - endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); + if (!database.getIsSchemaPublic()) { + if (principal == null) { + log.error("Failed to create subset: no authentication found"); + throw new NotAllowedException("Failed to create subset: no authentication found"); + } + if (!isSystem(principal)) { + endpointValidator.validateOnlyAccess(database, principal, false); + } + } try { final UUID subsetId = subsetService.create(database, data, timestamp, userId); - return getData(databaseId, subsetId, principal, request, timestamp, page, size); + return getData(databaseId, subsetId, principal, "application/json", request, timestamp, page, size); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); @@ -311,7 +312,8 @@ public class SubsetEndpoint extends RestEndpoint { @Header(name = "Access-Control-Expose-Headers", description = "Reverse proxy exposing of custom headers", schema = @Schema(implementation = String.class), required = true)}, content = {@Content( mediaType = "application/json", - schema = @Schema(implementation = List.class))}), + schema = @Schema(implementation = List.class)), + @Content(mediaType = "text/csv")}), @ApiResponse(responseCode = "400", description = "Invalid pagination", content = {@Content( @@ -327,24 +329,31 @@ public class SubsetEndpoint extends RestEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "406", + description = "Failed to format data", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "503", description = "Failed to communicate with database", content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, - @NotNull @PathVariable("subsetId") UUID subsetId, - Principal principal, - @NotNull HttpServletRequest request, - @RequestParam(required = false) Instant timestamp, - @RequestParam(required = false) Long page, - @RequestParam(required = false) Long size) + public ResponseEntity<?> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("subsetId") UUID subsetId, + Principal principal, + @NotNull @RequestHeader("Accept") String accept, + @NotNull HttpServletRequest request, + @RequestParam(required = false) Instant timestamp, + @RequestParam(required = false) Long page, + @RequestParam(required = false) Long size) throws PaginationException, DatabaseNotFoundException, RemoteUnavailableException, NotAllowedException, QueryNotFoundException, DatabaseUnavailableException, QueryMalformedException, UserNotFoundException, - MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { - log.debug("endpoint get subset data, databaseId={}, subsetId={}, principal.name={} page={}, size={}", - databaseId, subsetId, principal != null ? principal.getName() : null, page, size); + MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException, + FormatNotAvailableException, StorageUnavailableException { + log.debug("endpoint get subset data, databaseId={}, subsetId={}, accept={} page={}, size={}", databaseId, + subsetId, accept, page, size); endpointValidator.validateDataParams(page, size); final DatabaseDto database = cacheService.getDatabase(databaseId); if (!database.getIsPublic()) { @@ -352,7 +361,9 @@ public class SubsetEndpoint extends RestEndpoint { log.error("Failed to re-execute query: no authentication found"); throw new NotAllowedException("Failed to re-execute query: no authentication found"); } - cacheService.getAccess(databaseId, getId(principal)); + if (!isSystem(principal)) { + cacheService.getAccess(databaseId, getId(principal)); + } } log.trace("visibility for database: is_public={}, is_schema_public={}", database.getIsPublic(), database.getIsSchemaPublic()); /* parameters */ @@ -368,6 +379,10 @@ public class SubsetEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } + if (accept == null || accept.isBlank()) { + accept = MediaType.APPLICATION_JSON_VALUE; + log.debug("accept header not set: default to {}", accept); + } try { final HttpHeaders headers = new HttpHeaders(); headers.set("X-Id", "" + subsetId); @@ -381,16 +396,32 @@ public class SubsetEndpoint extends RestEndpoint { .build(); } subset.setIdentifiers(metadataServiceGateway.getIdentifiers(database.getId(), subset.getId())); - final String query = mariaDbMapper.rawSelectQuery(subset.getQuery(), timestamp, page, size); + final String query = mariaDbMapper.rawSelectQuery(subset.getQuery(), timestamp, + accept.equals("text/csv") ? null : page, + accept.equals("text/csv") ? null : size); final Dataset<Row> dataset = subsetService.getData(database, query); - final String viewName = metadataMapper.queryDtoToViewName(subset); + final String viewName = subset.getQueryHash(); databaseService.createView(database, viewName, subset.getQuery()); final ViewDto view = databaseService.inspectView(database, viewName); headers.set("Access-Control-Expose-Headers", "X-Id X-Headers"); headers.set("X-Headers", String.join(",", view.getColumns().stream().map(ViewColumnDto::getInternalName).toList())); - return ResponseEntity.status(request.getMethod().equals("POST") ? HttpStatus.CREATED : HttpStatus.OK) - .headers(headers) - .body(transform(dataset)); + final HttpStatusCode statusCode = request.getMethod().equals("POST") ? HttpStatus.CREATED : HttpStatus.OK; + switch (accept) { + case MediaType.APPLICATION_JSON_VALUE: + log.trace("accept header matches json"); + return ResponseEntity.status(statusCode) + .headers(headers) + .body(transform(dataset)); + case "text/csv": + log.trace("accept header matches csv"); + final ExportResourceDto resource = storageService.transformDataset(dataset); + headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); + return ResponseEntity.status(statusCode) + .headers(headers) + .body(storageService.transformDataset(dataset) + .getResource()); + } + throw new FormatNotAvailableException("Must provide either application/json or text/csv value for header 'Accept': provided " + accept + " instead"); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); @@ -444,7 +475,9 @@ public class SubsetEndpoint extends RestEndpoint { log.debug("endpoint persist query, databaseId={}, queryId={}, data.persist={}, principal.name={}", databaseId, queryId, data.getPersist(), principal.getName()); final DatabaseDto database = cacheService.getDatabase(databaseId); - cacheService.getAccess(databaseId, getId(principal)); + if (!isSystem(principal)) { + cacheService.getAccess(databaseId, getId(principal)); + } try { subsetService.persist(database, queryId, data.getPersist()); final QueryDto dto = subsetService.findById(database, queryId); diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java index 6914726cb84a886d97210dce9f1f60ac19db53b5..8e1fef5bac3d5451b0938f337e623d7e0e39ab56 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java @@ -29,9 +29,9 @@ import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.InputStreamResource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -40,7 +40,6 @@ import java.security.Principal; import java.sql.SQLException; import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.UUID; @Log4j2 @@ -228,7 +227,8 @@ public class TableEndpoint extends RestEndpoint { @Header(name = "Access-Control-Expose-Headers", description = "Expose `X-Count` custom header", schema = @Schema(implementation = String.class), required = true)}, content = {@Content( mediaType = "application/json", - schema = @Schema(implementation = List.class))}), + schema = @Schema(implementation = List.class)), + @Content(mediaType = "text/csv")}), @ApiResponse(responseCode = "400", description = "Request pagination or table data select query is malformed", content = {@Content( @@ -244,23 +244,30 @@ public class TableEndpoint extends RestEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "406", + description = "Failed to format data", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "503", description = "Failed to establish connection with the metadata service", content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, - @NotNull @PathVariable("tableId") UUID tableId, - @RequestParam(required = false) Instant timestamp, - @RequestParam(required = false) Long page, - @RequestParam(required = false) Long size, - @NotNull HttpServletRequest request, - Principal principal) + public ResponseEntity<?> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, + @RequestParam(required = false) Instant timestamp, + @RequestParam(required = false) Long page, + @RequestParam(required = false) Long size, + @NotNull @RequestHeader("Accept") String accept, + @NotNull HttpServletRequest request, + Principal principal) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, - PaginationException, MetadataServiceException, NotAllowedException, DatabaseNotFoundException { - log.debug("endpoint get table data, databaseId={}, tableId={}, timestamp={}, page={}, size={}", databaseId, - tableId, timestamp, page, size); + PaginationException, MetadataServiceException, NotAllowedException, DatabaseNotFoundException, + FormatNotAvailableException, StorageUnavailableException { + log.debug("endpoint get table data, databaseId={}, tableId={}, timestamp={}, page={}, size={}, accept={}", + databaseId, tableId, timestamp, page, size, accept); endpointValidator.validateDataParams(page, size); /* parameters */ if (page == null) { @@ -281,7 +288,9 @@ public class TableEndpoint extends RestEndpoint { log.error("Failed find table data: authentication required"); throw new NotAllowedException("Failed to find table data: authentication required"); } - cacheService.getAccess(databaseId, getId(principal)); + if (!isSystem(principal)) { + cacheService.getAccess(databaseId, getId(principal)); + } } final DatabaseDto database = cacheService.getDatabase(databaseId); try { @@ -296,11 +305,26 @@ public class TableEndpoint extends RestEndpoint { headers.set("Access-Control-Expose-Headers", "X-Headers"); headers.set("X-Headers", String.join(",", table.getColumns().stream().map(ColumnDto::getInternalName).toList())); final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), - table.getInternalName(), timestamp, page, size); + table.getInternalName(), timestamp, + accept.equals("text/csv") ? null : page, + accept.equals("text/csv") ? null : size); final Dataset<Row> dataset = subsetService.getData(database, query); - return ResponseEntity.ok() - .headers(headers) - .body(transform(dataset)); + switch (accept) { + case MediaType.APPLICATION_JSON_VALUE: + log.trace("accept header matches json"); + return ResponseEntity.ok() + .headers(headers) + .body(transform(dataset)); + case "text/csv": + log.trace("accept header matches csv"); + final ExportResourceDto resource = storageService.transformDataset(dataset); + headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); + return ResponseEntity.status(HttpStatus.OK) + .headers(headers) + .body(storageService.transformDataset(dataset) + .getResource()); + } + throw new FormatNotAvailableException("Must provide either application/json or text/csv value for header 'Accept': provided " + accept + " instead"); } catch (SQLException | QueryMalformedException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); @@ -586,72 +610,6 @@ public class TableEndpoint extends RestEndpoint { } } - @GetMapping("/{tableId}/export") - @Observed(name = "dbrepo_table_data_export") - @Operation(summary = "Get table data", - description = "Gets data from table with id as downloadable file. For tables in private databases, the user needs to have at least *READ* access to the associated database.", - security = {@SecurityRequirement(name = "basicAuth"), @SecurityRequirement(name = "bearerAuth")}) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", - description = "Exported table data", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = InputStreamResource.class))}), - @ApiResponse(responseCode = "400", - description = "Request pagination or table data select query is malformed", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "403", - description = "Export table data not allowed", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "404", - description = "Failed to find table in metadata database", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "503", - description = "Failed to establish connection with the metadata service", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - }) - public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") UUID databaseId, - @NotNull @PathVariable("tableId") UUID tableId, - @RequestParam(required = false) Instant timestamp, - Principal principal) - throws RemoteUnavailableException, TableNotFoundException, NotAllowedException, StorageUnavailableException, - QueryMalformedException, MetadataServiceException, DatabaseNotFoundException { - log.debug("endpoint export table data, databaseId={}, tableId={}, timestamp={}", databaseId, tableId, timestamp); - /* parameters */ - if (timestamp == null) { - timestamp = Instant.now(); - log.debug("timestamp not set: default to {}", timestamp); - } - final TableDto table = cacheService.getTable(databaseId, tableId); - if (!table.getIsPublic()) { - if (principal == null) { - log.error("Failed to export private table: principal is null"); - throw new NotAllowedException("Failed to export private table: principal is null"); - } - cacheService.getAccess(databaseId, getId(principal)); - } - final DatabaseDto database = cacheService.getDatabase(databaseId); - final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), - table.getInternalName(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(table.getDatabaseId()), - query); - final ExportResourceDto resource = storageService.transformDataset(dataset); - final HttpHeaders headers = new HttpHeaders(); - headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); - log.trace("export table resulted in resource {}", resource); - return ResponseEntity.ok() - .headers(headers) - .body(resource.getResource()); - } - @PostMapping("/{tableId}/data/import") @Observed(name = "dbrepo_table_data_import") @PreAuthorize("hasAuthority('insert-table-data')") diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java index 5c1fdb57dbc30b428d104e4c145f4a0064105f78..b4c7fa715f667d7edf2727e7248af696266bf5e5 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java @@ -25,9 +25,9 @@ import lombok.extern.log4j.Log4j2; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.InputStreamResource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -36,7 +36,6 @@ import java.security.Principal; import java.sql.SQLException; import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.UUID; @Log4j2 @@ -225,7 +224,8 @@ public class ViewEndpoint extends RestEndpoint { @Header(name = "Access-Control-Expose-Headers", description = "Expose `X-Count` custom header", schema = @Schema(implementation = String.class), required = true)}, content = {@Content( mediaType = "application/json", - schema = @Schema(implementation = List.class))}), + schema = @Schema(implementation = List.class)), + @Content(mediaType = "text/csv")}), @ApiResponse(responseCode = "400", description = "Request pagination is malformed", content = {@Content( @@ -241,6 +241,11 @@ public class ViewEndpoint extends RestEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "406", + description = "Failed to format data", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "409", description = "View schema could not be mapped", content = {@Content( @@ -252,17 +257,20 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, - @NotNull @PathVariable("viewId") UUID viewId, - @RequestParam(required = false) Long page, - @RequestParam(required = false) Long size, - @RequestParam(required = false) Instant timestamp, - @NotNull HttpServletRequest request, - Principal principal) + public ResponseEntity<?> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, + @RequestParam(required = false) Long page, + @RequestParam(required = false) Long size, + @RequestParam(required = false) Instant timestamp, + @NotNull HttpServletRequest request, + @NotNull @RequestHeader("Accept") String accept, + Principal principal) throws DatabaseUnavailableException, RemoteUnavailableException, ViewNotFoundException, PaginationException, - QueryMalformedException, NotAllowedException, MetadataServiceException, TableNotFoundException, DatabaseNotFoundException { - log.debug("endpoint get view data, databaseId={}, viewId={}, page={}, size={}, timestamp={}", databaseId, - viewId, page, size, timestamp); + QueryMalformedException, NotAllowedException, MetadataServiceException, TableNotFoundException, + DatabaseNotFoundException, ViewMalformedException, StorageUnavailableException, + FormatNotAvailableException { + log.debug("endpoint get view data, databaseId={}, viewId={}, page={}, size={}, accept={}, timestamp={}", + databaseId, viewId, page, size, accept, timestamp); endpointValidator.validateDataParams(page, size); /* parameters */ if (page == null) { @@ -283,7 +291,9 @@ public class ViewEndpoint extends RestEndpoint { log.error("Failed to get data from view: unauthorized"); throw new NotAllowedException("Failed to get data from view: unauthorized"); } - cacheService.getAccess(databaseId, getId(principal)); + if (!isSystem(principal)) { + cacheService.getAccess(databaseId, getId(principal)); + } } final DatabaseDto database = cacheService.getDatabase(databaseId); try { @@ -297,84 +307,32 @@ public class ViewEndpoint extends RestEndpoint { } headers.set("Access-Control-Expose-Headers", "X-Headers"); headers.set("X-Headers", String.join(",", view.getColumns().stream().map(ViewColumnDto::getInternalName).toList())); - final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), - view.getInternalName(), timestamp, page, size); - final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(databaseId), - query); - return ResponseEntity.ok() - .headers(headers) - .body(transform(dataset)); + final String query = mariaDbMapper.rawSelectQuery(view.getQuery(), timestamp, + accept.equals("text/csv") ? null : page, + accept.equals("text/csv") ? null : size); + final Dataset<Row> dataset = subsetService.getData(database, query); + final String viewName = view.getQueryHash(); + databaseService.createView(database, viewName, view.getQuery()); + switch (accept) { + case MediaType.APPLICATION_JSON_VALUE: + log.trace("accept header matches json"); + return ResponseEntity.ok() + .headers(headers) + .body(transform(dataset)); + case "text/csv": + log.trace("accept header matches csv"); + final ExportResourceDto resource = storageService.transformDataset(dataset); + headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); + return ResponseEntity.ok() + .headers(headers) + .body(storageService.transformDataset(dataset) + .getResource()); + } + throw new FormatNotAvailableException("Must provide either application/json or text/csv value for header 'Accept': provided " + accept + " instead"); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); } } - @GetMapping("/{viewId}/export") - @Observed(name = "dbrepo_view_data_export") - @Operation(summary = "Get view data", - description = "Gets data from view with id as downloadable file. For tables in private databases, the user needs to have at least *READ* access to the associated database.", - security = {@SecurityRequirement(name = "basicAuth"), @SecurityRequirement(name = "bearerAuth")}) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", - description = "Exported view data", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = InputStreamResource.class))}), - @ApiResponse(responseCode = "400", - description = "Request pagination or view data select query is malformed", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "403", - description = "Export view data not allowed", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "404", - description = "Failed to find view in metadata database or export dataset", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "503", - description = "Failed to establish connection with the metadata service", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - }) - public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") UUID databaseId, - @NotNull @PathVariable("viewId") UUID viewId, - @RequestParam(required = false) Instant timestamp, - Principal principal) - throws RemoteUnavailableException, ViewNotFoundException, NotAllowedException, MetadataServiceException, - StorageUnavailableException, QueryMalformedException, TableNotFoundException, DatabaseNotFoundException { - log.debug("endpoint export view data, databaseId={}, viewId={}", databaseId, viewId); - /* parameters */ - if (timestamp == null) { - timestamp = Instant.now(); - log.debug("timestamp not set: default to {}", timestamp); - } - /* parameters */ - final ViewDto view = cacheService.getView(databaseId, viewId); - if (!view.getIsPublic()) { - if (principal == null) { - log.error("Failed to export private view: principal is null"); - throw new NotAllowedException("Failed to export private view: principal is null"); - } - cacheService.getAccess(databaseId, getId(principal)); - } - final DatabaseDto database = cacheService.getDatabase(databaseId); - final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), - view.getInternalName(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(databaseId), - query); - final ExportResourceDto resource = storageService.transformDataset(dataset); - final HttpHeaders headers = new HttpHeaders(); - headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); - log.trace("export table resulted in resource {}", resource); - return ResponseEntity.ok() - .headers(headers) - .body(resource.getResource()); - } - } diff --git a/dbrepo-data-service/rest-service/src/main/resources/application.yml b/dbrepo-data-service/rest-service/src/main/resources/application.yml index b5f592d570cb73677baaa00666af945901e1d256..53c0858bbd98acd3bb250b0def751534bc920548 100644 --- a/dbrepo-data-service/rest-service/src/main/resources/application.yml +++ b/dbrepo-data-service/rest-service/src/main/resources/application.yml @@ -74,6 +74,7 @@ dbrepo: default: read: "${GRANT_DEFAULT_READ:SELECT}" write: "${GRANT_DEFAULT_WRITE:SELECT, CREATE, CREATE VIEW, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, INDEX, TRIGGER, INSERT, UPDATE, DELETE}" + website: "${BASE_URL:http://localhost}" credentialCacheTimeout: "${CREDENTIAL_CACHE_TIMEOUT:60}" minConcurrent: "${MIN_CONCURRENT_CONSUMERS:2}" maxConcurrent: "${MAX_CONCURRENT_CONSUMERS:6}" diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java index 9cdb0d99c82e399c1d8297c1c71dd1f6dd963a31..33248abbdaddf6cdba3b0eacbccb0f67cdd07323 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java @@ -33,7 +33,6 @@ import java.security.Principal; import java.sql.SQLException; import java.time.Instant; import java.util.List; -import java.util.Map; import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; @@ -76,17 +75,16 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser - public void list_publicDataPrivateSchemaAnonymous_fails() throws QueryNotFoundException, DatabaseNotFoundException, - RemoteUnavailableException, SQLException, MetadataServiceException { + public void list_publicDataPrivateSchemaAnonymous_succeeds() throws QueryNotFoundException, + DatabaseNotFoundException, RemoteUnavailableException, SQLException, MetadataServiceException, + DatabaseUnavailableException, NotAllowedException { /* mock */ when(subsetService.findAll(DATABASE_3_PRIVILEGED_DTO, null)) - .thenReturn(List.of(QUERY_1_DTO, QUERY_2_DTO, QUERY_3_DTO, QUERY_4_DTO, QUERY_5_DTO, QUERY_6_DTO)); + .thenReturn(List.of(QUERY_3_DTO, QUERY_4_DTO, QUERY_5_DTO)); /* test */ - assertThrows(NotAllowedException.class, () -> { - generic_list(DATABASE_3_ID, DATABASE_3_PRIVILEGED_DTO, null); - }); + generic_list(DATABASE_3_ID, DATABASE_3_PRIVILEGED_DTO, null); } @Test @@ -145,16 +143,15 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - generic_findById(DATABASE_1_ID, QUERY_1_ID, "application/json", null, null); + generic_findById(DATABASE_1_ID, QUERY_1_ID, null, null); }); } @Test @WithMockUser(username = USER_1_USERNAME) public void findById_privateDataPrivateSchema_succeeds() throws DatabaseNotFoundException, SQLException, - RemoteUnavailableException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, - DatabaseUnavailableException, TableNotFoundException, StorageUnavailableException, NotAllowedException, - QueryMalformedException, FormatNotAvailableException { + RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, + QueryNotFoundException, MetadataServiceException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) @@ -163,15 +160,14 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(QUERY_1_DTO); /* test */ - generic_findById(DATABASE_1_ID, QUERY_1_ID, "application/json", null, USER_1_PRINCIPAL); + generic_findById(DATABASE_1_ID, QUERY_1_ID, null, USER_1_PRINCIPAL); } @Test @WithMockUser(username = USER_1_USERNAME) public void findById_privateDataPrivateSchemaAcceptEmpty_succeeds() throws DatabaseNotFoundException, SQLException, - RemoteUnavailableException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, - DatabaseUnavailableException, TableNotFoundException, StorageUnavailableException, NotAllowedException, - QueryMalformedException, FormatNotAvailableException { + RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, + QueryNotFoundException, MetadataServiceException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) @@ -180,15 +176,14 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(QUERY_1_DTO); /* test */ - generic_findById(DATABASE_1_ID, QUERY_1_ID, null, null, USER_1_PRINCIPAL); + generic_findById(DATABASE_1_ID, QUERY_1_ID, null, USER_1_PRINCIPAL); } @Test @WithMockUser(username = USER_3_USERNAME) public void findById_publicDataPrivateSchema_succeeds() throws DatabaseNotFoundException, SQLException, RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, - StorageUnavailableException, QueryMalformedException, QueryNotFoundException, - FormatNotAvailableException, TableNotFoundException, MetadataServiceException { + QueryNotFoundException, MetadataServiceException { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) @@ -197,74 +192,53 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(QUERY_5_DTO); /* test */ - generic_findById(DATABASE_3_ID, QUERY_5_ID, "application/json", null, USER_3_PRINCIPAL); - } - - @Test - @WithAnonymousUser - public void findById_format_fails() throws DatabaseNotFoundException, RemoteUnavailableException, SQLException, - UserNotFoundException, QueryNotFoundException, MetadataServiceException { - - /* mock */ - when(credentialService.getDatabase(DATABASE_4_ID)) - .thenReturn(DATABASE_4_PRIVILEGED_DTO); - when(subsetService.findById(DATABASE_4_PRIVILEGED_DTO, QUERY_7_ID)) - .thenReturn(QUERY_7_DTO); - - /* test */ - assertThrows(FormatNotAvailableException.class, () -> { - generic_findById(DATABASE_4_ID, QUERY_7_ID, "application/pdf", null, null); - }); + generic_findById(DATABASE_3_ID, QUERY_5_ID, null, USER_3_PRINCIPAL); } @Test @WithMockUser(username = USER_1_USERNAME) - public void findById_privateDataPrivateSchemaAcceptCsv_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, - UserNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, - QueryNotFoundException, FormatNotAvailableException, SQLException, MetadataServiceException, - TableNotFoundException, NotAllowedException { - final Dataset<Row> mock = sparkSession.emptyDataFrame(); + public void findById_privateDataPrivateSchemaAcceptCsv_succeeds() throws DatabaseNotFoundException, + RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, + QueryNotFoundException, SQLException, MetadataServiceException, NotAllowedException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(subsetService.findById(DATABASE_1_PRIVILEGED_DTO, QUERY_1_ID)) .thenReturn(QUERY_5_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString())) - .thenReturn(mock); - when(storageService.transformDataset(any(Dataset.class))) - .thenReturn(EXPORT_RESOURCE_DTO); /* test */ - generic_findById(DATABASE_1_ID, QUERY_1_ID, "text/csv", null, USER_1_PRINCIPAL); + generic_findById(DATABASE_1_ID, QUERY_1_ID, null, USER_1_PRINCIPAL); } @Test @WithAnonymousUser - public void findById_publicDataPrivateSchemaAnonymous_fails() throws DatabaseNotFoundException, - RemoteUnavailableException, MetadataServiceException { + public void findById_publicDataPrivateSchemaAnonymous_succeeds() throws DatabaseNotFoundException, + RemoteUnavailableException, MetadataServiceException, UserNotFoundException, DatabaseUnavailableException, + NotAllowedException, QueryNotFoundException, SQLException { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) .thenReturn(DATABASE_3_PRIVILEGED_DTO); + when(subsetService.findById(DATABASE_3_PRIVILEGED_DTO, QUERY_5_ID)) + .thenReturn(QUERY_5_DTO); /* test */ - assertThrows(NotAllowedException.class, () -> { - generic_findById(DATABASE_3_ID, QUERY_5_ID, "text/csv", Instant.now(), null); - }); + generic_findById(DATABASE_3_ID, QUERY_5_ID, Instant.now(), null); } @Test @WithAnonymousUser - public void findById_publicDataPublicSchemaAnonymous_fails() throws DatabaseNotFoundException, SQLException, + public void findById_publicDataPublicSchemaAnonymous_succeeds() throws DatabaseNotFoundException, SQLException, RemoteUnavailableException, UserNotFoundException, QueryMalformedException, StorageUnavailableException, - QueryNotFoundException, MetadataServiceException, TableNotFoundException { + QueryNotFoundException, MetadataServiceException, TableNotFoundException, DatabaseUnavailableException, + NotAllowedException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.findById(DATABASE_4_PRIVILEGED_DTO, QUERY_5_ID)) + when(subsetService.findById(DATABASE_3_PRIVILEGED_DTO, QUERY_5_ID)) .thenReturn(QUERY_5_DTO); when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); @@ -272,9 +246,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(EXPORT_RESOURCE_DTO); /* test */ - assertThrows(NotAllowedException.class, () -> { - generic_findById(DATABASE_3_ID, QUERY_5_ID, "text/csv", Instant.now(), null); - }); + generic_findById(DATABASE_3_ID, QUERY_5_ID, Instant.now(), null); } @Test @@ -289,7 +261,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(DatabaseNotFoundException.class, () -> { - generic_findById(DATABASE_3_ID, QUERY_5_ID, "application/json", null, null); + generic_findById(DATABASE_3_ID, QUERY_5_ID, null, null); }); } @@ -307,7 +279,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(DatabaseUnavailableException.class, () -> { - generic_findById(DATABASE_3_ID, QUERY_5_ID, "application/json", null, USER_3_PRINCIPAL); + generic_findById(DATABASE_3_ID, QUERY_5_ID, null, USER_3_PRINCIPAL); }); } @@ -318,7 +290,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { StorageNotFoundException, DatabaseUnavailableException, StorageUnavailableException, SQLException, QueryMalformedException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException, TableNotFoundException, ViewMalformedException, ViewNotFoundException, - ImageNotFoundException { + ImageNotFoundException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -348,7 +320,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { PaginationException, StorageNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, SQLException, MetadataServiceException, TableNotFoundException, ViewMalformedException, - ViewNotFoundException, ImageNotFoundException { + ViewNotFoundException, ImageNotFoundException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -398,7 +370,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { TableMalformedException, NotAllowedException, SQLException, QueryNotFoundException, PaginationException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotSupportedException, StorageNotFoundException, TableNotFoundException, ViewMalformedException, - ViewNotFoundException, ImageNotFoundException { + ViewNotFoundException, ImageNotFoundException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -426,7 +398,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { NotAllowedException, SQLException, QueryNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotSupportedException, PaginationException, StorageNotFoundException, TableNotFoundException, ViewMalformedException, ViewNotFoundException, - ImageNotFoundException { + ImageNotFoundException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -478,7 +450,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { public void getData_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, NotAllowedException, SQLException, QueryNotFoundException, QueryMalformedException, DatabaseUnavailableException, PaginationException, MetadataServiceException, TableNotFoundException, - ViewNotFoundException, ViewMalformedException { + ViewNotFoundException, ViewMalformedException, StorageUnavailableException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -498,16 +470,17 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = subsetEndpoint.getData(DATABASE_3_ID, QUERY_5_ID, null, httpServletRequest, null, null, null); + final ResponseEntity<?> response = subsetEndpoint.getData(DATABASE_3_ID, QUERY_5_ID, + null, "application/json", httpServletRequest, null, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); } @Test public void getData_head_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, - UserNotFoundException, NotAllowedException, SQLException, QueryNotFoundException, TableMalformedException, - QueryMalformedException, DatabaseUnavailableException, PaginationException, MetadataServiceException, - TableNotFoundException, ViewNotFoundException, ViewMalformedException { + UserNotFoundException, NotAllowedException, SQLException, QueryNotFoundException, QueryMalformedException, + DatabaseUnavailableException, PaginationException, MetadataServiceException, TableNotFoundException, + ViewNotFoundException, ViewMalformedException, StorageUnavailableException, FormatNotAvailableException { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) @@ -520,7 +493,8 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn("HEAD"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = subsetEndpoint.getData(DATABASE_3_ID, QUERY_5_ID, null, httpServletRequest, null, null, null); + final ResponseEntity<?> response = subsetEndpoint.getData(DATABASE_3_ID, QUERY_5_ID, + null, "application/json", httpServletRequest, null, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getHeaders().get("X-Count")); assertEquals(1, response.getHeaders().get("X-Count").size()); @@ -532,7 +506,8 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { public void getData_private_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, QueryMalformedException, QueryNotFoundException, PaginationException, SQLException, MetadataServiceException, - TableNotFoundException, ViewNotFoundException, ViewMalformedException { + TableNotFoundException, ViewNotFoundException, ViewMalformedException, StorageUnavailableException, + FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -552,7 +527,8 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + final ResponseEntity<?> response = subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, + USER_1_PRINCIPAL, "application/json", httpServletRequest, null, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); } @@ -568,7 +544,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, null, httpServletRequest, null, null, null); + subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, null, "application/json", httpServletRequest, null, null, null); }); } @@ -586,7 +562,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, "application/json", httpServletRequest, null, null, null); }); } @@ -595,7 +571,8 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { public void getData_privateHead_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, QueryMalformedException, QueryNotFoundException, PaginationException, SQLException, MetadataServiceException, - TableNotFoundException, ViewNotFoundException, ViewMalformedException { + TableNotFoundException, ViewNotFoundException, ViewMalformedException, StorageUnavailableException, + FormatNotAvailableException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) @@ -608,7 +585,8 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn("HEAD"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + final ResponseEntity<?> response = subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, + USER_1_PRINCIPAL, "GET", httpServletRequest, null, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getHeaders().get("X-Count")); assertEquals(1, response.getHeaders().get("X-Count").size()); @@ -734,14 +712,12 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { return response.getBody(); } - protected void generic_findById(UUID databaseId, UUID subsetId, String accept, Instant timestamp, - Principal principal) throws UserNotFoundException, DatabaseUnavailableException, - StorageUnavailableException, NotAllowedException, QueryMalformedException, QueryNotFoundException, - DatabaseNotFoundException, RemoteUnavailableException, FormatNotAvailableException, - MetadataServiceException, TableNotFoundException { + protected void generic_findById(UUID databaseId, UUID subsetId, Instant timestamp, Principal principal) + throws UserNotFoundException, DatabaseUnavailableException, NotAllowedException, QueryNotFoundException, + DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException { /* test */ - final ResponseEntity<?> response = subsetEndpoint.findById(databaseId, subsetId, accept, timestamp, principal); + final ResponseEntity<?> response = subsetEndpoint.findById(databaseId, subsetId, timestamp, principal); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java index 25f3b60ceac1f47225e73c237cefc215c21f1696..3a5a62731bc595c2e971a382cf6c3a1c1b5791aa 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java @@ -39,7 +39,6 @@ import java.sql.SQLException; import java.time.Instant; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.*; @@ -292,7 +291,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void getData_publicDataPrivateSchema_succeeds() throws DatabaseUnavailableException, TableNotFoundException, QueryMalformedException, RemoteUnavailableException, PaginationException, MetadataServiceException, NotAllowedException, - DatabaseNotFoundException { + DatabaseNotFoundException, StorageUnavailableException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -306,7 +305,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_4_ID, null, null, null, httpServletRequest, null); + final ResponseEntity<?> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_4_ID, null, null, null, "application/json", httpServletRequest, null); assertEquals(HttpStatus.OK, response.getStatusCode()); } @@ -315,7 +314,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void getData_head_succeeds() throws DatabaseUnavailableException, TableNotFoundException, SQLException, QueryMalformedException, RemoteUnavailableException, PaginationException, - MetadataServiceException, NotAllowedException, DatabaseNotFoundException { + MetadataServiceException, NotAllowedException, DatabaseNotFoundException, StorageUnavailableException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -331,7 +330,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .thenReturn("HEAD"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, httpServletRequest, null); + final ResponseEntity<?> response = tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, "application/json", httpServletRequest, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getHeaders().get("Access-Control-Expose-Headers")); assertEquals("X-Count", response.getHeaders().get("Access-Control-Expose-Headers").get(0)); @@ -351,7 +350,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "application/json", httpServletRequest, null); }); } @@ -369,14 +368,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, httpServletRequest, USER_2_PRINCIPAL); + tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "application/json", httpServletRequest, USER_2_PRINCIPAL); }); } @Test @WithAnonymousUser public void getData_notAllowed_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException{ + MetadataServiceException { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) @@ -386,7 +385,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, "application/json", httpServletRequest, null); }); } @@ -408,7 +407,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(DatabaseUnavailableException.class, () -> { - tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, "application/json", httpServletRequest, null); }); } @@ -426,7 +425,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(RemoteUnavailableException.class, () -> { - tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, httpServletRequest, USER_2_PRINCIPAL); + tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "application/json", httpServletRequest, USER_2_PRINCIPAL); }); } @@ -435,7 +434,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @MethodSource("anyAccess_parameters") public void getData_private_succeeds(String name, DatabaseAccessDto access) throws DatabaseUnavailableException, TableNotFoundException, QueryMalformedException, RemoteUnavailableException, PaginationException, - MetadataServiceException, NotAllowedException, DatabaseNotFoundException { + MetadataServiceException, NotAllowedException, DatabaseNotFoundException, StorageUnavailableException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -451,7 +450,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, httpServletRequest, USER_2_PRINCIPAL); + final ResponseEntity<?> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "application/json", httpServletRequest, USER_2_PRINCIPAL); assertEquals(HttpStatus.OK, response.getStatusCode()); } @@ -467,7 +466,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(TableNotFoundException.class, () -> { - tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, "application/json", httpServletRequest, null); }); } @@ -1323,8 +1322,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser - public void exportData_publicDataPrivateSchema_succeeds() throws TableNotFoundException, NotAllowedException, StorageUnavailableException, - QueryMalformedException, RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { + public void getData_publicDataPrivateSchemaTextCsv_succeeds() throws TableNotFoundException, NotAllowedException, + StorageUnavailableException, QueryMalformedException, RemoteUnavailableException, MetadataServiceException, + DatabaseNotFoundException, DatabaseUnavailableException, FormatNotAvailableException, PaginationException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -1334,18 +1334,21 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); + when(httpServletRequest.getMethod()) + .thenReturn("GET"); /* test */ - final ResponseEntity<InputStreamResource> response = tableEndpoint.exportDataset(DATABASE_1_ID, TABLE_4_ID, null, null); + final ResponseEntity<?> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_4_ID, null, null, null, "text/csv", httpServletRequest, null); assertEquals(HttpStatus.OK, response.getStatusCode()); } @ParameterizedTest @WithMockUser(username = USER_2_USERNAME) @MethodSource("anyAccess_parameters") - public void exportData_privateDataPrivateSchema_succeeds(String name, DatabaseAccessDto access) + public void getData_privateDataPrivateSchemaTextCsv_succeeds(String name, DatabaseAccessDto access) throws TableNotFoundException, NotAllowedException, StorageUnavailableException, QueryMalformedException, - RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { + RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException, + DatabaseUnavailableException, FormatNotAvailableException, PaginationException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -1359,9 +1362,11 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_1_DTO); when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); + when(httpServletRequest.getMethod()) + .thenReturn("GET"); /* test */ - final ResponseEntity<InputStreamResource> response = tableEndpoint.exportDataset(DATABASE_1_ID, TABLE_1_ID, null, USER_2_PRINCIPAL); + final ResponseEntity<?> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "text/csv", httpServletRequest, USER_2_PRINCIPAL); assertEquals(HttpStatus.OK, response.getStatusCode()); } @@ -1381,7 +1386,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - tableEndpoint.exportDataset(DATABASE_1_ID, TABLE_1_ID, null, null); + tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "text/csv", httpServletRequest, null); }); } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java index 0393be3dad8da280f29cc1be9133ffa42c9f6cb2..23ad1b73e3db99c355d08aa8011ab658fb48e728 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java @@ -29,7 +29,6 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.SQLException; import java.time.Instant; import java.util.List; -import java.util.Map; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.anyString; @@ -253,7 +252,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_1_PRIVILEGED_DTO); doNothing() .when(viewService) - .delete(DATABASE_1_PRIVILEGED_DTO,VIEW_1_DTO); + .delete(DATABASE_1_PRIVILEGED_DTO, VIEW_1_DTO); /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { @@ -281,7 +280,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) public void getData_privateDataPrivateSchema_succeeds() throws RemoteUnavailableException, ViewNotFoundException, DatabaseUnavailableException, QueryMalformedException, PaginationException, NotAllowedException, - MetadataServiceException, TableNotFoundException, DatabaseNotFoundException { + MetadataServiceException, TableNotFoundException, DatabaseNotFoundException, ViewMalformedException, StorageUnavailableException, FormatNotAvailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -297,7 +296,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, USER_1_PRINCIPAL); + final ResponseEntity<?> response = viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "application/json", USER_1_PRINCIPAL); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); } @@ -323,7 +322,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, null); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "application/json", null); }); } @@ -331,7 +330,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) public void getData_privateHead_succeeds() throws RemoteUnavailableException, ViewNotFoundException, SQLException, DatabaseUnavailableException, QueryMalformedException, PaginationException, - NotAllowedException, MetadataServiceException, TableNotFoundException, DatabaseNotFoundException { + NotAllowedException, MetadataServiceException, TableNotFoundException, DatabaseNotFoundException, ViewMalformedException, StorageUnavailableException, FormatNotAvailableException { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_3_ID)) @@ -346,7 +345,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { .thenReturn(VIEW_3_DATA_COUNT); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = viewEndpoint.getData(DATABASE_1_ID, VIEW_3_ID, null, null, null, httpServletRequest, USER_1_PRINCIPAL); + final ResponseEntity<?> response = viewEndpoint.getData(DATABASE_1_ID, VIEW_3_ID, null, null, null, httpServletRequest, "application/json", USER_1_PRINCIPAL); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getHeaders().get("X-Count")); assertEquals(1, response.getHeaders().get("X-Count").size()); @@ -373,13 +372,13 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, USER_4_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "application/json", USER_4_PRINCIPAL); }); } @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) - public void getData_viewNotFound_fails() throws RemoteUnavailableException, ViewNotFoundException, + public void getData_viewNotFoundTextCsv_fails() throws RemoteUnavailableException, ViewNotFoundException, MetadataServiceException { /* mock */ @@ -389,7 +388,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(ViewNotFoundException.class, () -> { - viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, USER_4_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "text/csv", USER_4_PRINCIPAL); }); } @@ -407,13 +406,13 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, USER_4_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "application/json", USER_4_PRINCIPAL); }); } @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"view-database-view-data"}) - public void exportDataset_privateNoAccess_fails() throws RemoteUnavailableException, ViewNotFoundException, + public void getData_privateNoAccessTextCsv_fails() throws RemoteUnavailableException, ViewNotFoundException, NotAllowedException, MetadataServiceException { /* mock */ @@ -425,13 +424,13 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - viewEndpoint.exportDataset(DATABASE_1_ID, VIEW_1_ID, null, USER_4_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "text/csv", USER_4_PRINCIPAL); }); } @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) - public void exportDataset_viewNotFound_fails() throws RemoteUnavailableException, ViewNotFoundException, + public void getData_viewNotFound_fails() throws RemoteUnavailableException, ViewNotFoundException, MetadataServiceException { /* mock */ @@ -441,25 +440,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(ViewNotFoundException.class, () -> { - viewEndpoint.exportDataset(DATABASE_1_ID, VIEW_1_ID, null, USER_4_PRINCIPAL); - }); - } - - @Test - @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) - public void exportDataset_privateNoAccess_succeeds() throws RemoteUnavailableException, ViewNotFoundException, - NotAllowedException, MetadataServiceException { - - /* mock */ - when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_DTO); - doThrow(NotAllowedException.class) - .when(credentialService) - .getAccess(DATABASE_1_ID, USER_4_ID); - - /* test */ - assertThrows(NotAllowedException.class, () -> { - viewEndpoint.exportDataset(DATABASE_1_ID, VIEW_1_ID, null, USER_4_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, "application/json", USER_4_PRINCIPAL); }); } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java index ae03fdbf68cefc1db05455d0ec228ea00be1c12f..de1c875e0aef96a54f283e31a8ef90d9e8468de0 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java @@ -1,8 +1,6 @@ package at.tuwien.mvc; -import at.tuwien.api.database.query.ExecuteStatementDto; import at.tuwien.api.database.query.ImportDto; -import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.query.QueryPersistDto; import at.tuwien.api.database.table.TupleDeleteDto; import at.tuwien.api.database.table.TupleDto; @@ -116,7 +114,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* ignore */ } try { - subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); + subsetEndpoint.getData(DATABASE_1_ID, QUERY_1_ID, USER_1_PRINCIPAL, "application/json", httpServletRequest, null, 0L, 10L); } catch (Exception e) { /* ignore */ } @@ -126,7 +124,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* ignore */ } try { - subsetEndpoint.findById(DATABASE_1_ID, QUERY_1_ID, "application/json", null, USER_1_PRINCIPAL); + subsetEndpoint.findById(DATABASE_1_ID, QUERY_1_ID, null, USER_1_PRINCIPAL); } catch (Exception e) { /* ignore */ } @@ -145,7 +143,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* mock */ try { - tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_1_ID, TABLE_1_ID, null, null, null, "application/json", httpServletRequest, null); } catch (Exception e) { /* ignore */ } @@ -169,11 +167,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { } catch (Exception e) { /* ignore */ } - try { - tableEndpoint.exportDataset(DATABASE_1_ID, TABLE_1_ID, null, USER_1_PRINCIPAL); - } catch (Exception e) { - /* ignore */ - } try { tableEndpoint.importDataset(DATABASE_1_ID, TABLE_1_ID, ImportDto.builder().build(), USER_1_PRINCIPAL, TOKEN_ACCESS_TOKEN); } catch (Exception e) { @@ -182,8 +175,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* test */ for (String metric : List.of("dbrepo_table_data_list", "dbrepo_table_data_create", "dbrepo_table_data_update", - "dbrepo_table_data_delete", "dbrepo_table_data_history", "dbrepo_table_data_export", - "dbrepo_table_data_import")) { + "dbrepo_table_data_delete", "dbrepo_table_data_history", "dbrepo_table_data_import")) { assertThat(registry) .hasObservationWithNameEqualTo(metric); } @@ -195,7 +187,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* mock */ try { - viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, 0L, 10L, null, httpServletRequest, USER_1_PRINCIPAL); + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, 0L, 10L, null, httpServletRequest, "application/json", USER_1_PRINCIPAL); } catch (Exception e) { /* ignore */ } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/SubsetEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/SubsetEndpointMvcTest.java index 158c6743a4e7bac049cae0211fe764030ab4a3f0..f3f0cb9799660a3a9f2db1bb949cd2983c66d79f 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/SubsetEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/SubsetEndpointMvcTest.java @@ -37,22 +37,7 @@ public class SubsetEndpointMvcTest extends AbstractUnitTest { private MockMvc mockMvc; @Test - public void findById_noAcceptHeader_fails() throws Exception { - - /* mock */ - when(metadataServiceGateway.getDatabaseById(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.findById(DATABASE_3_PRIVILEGED_DTO, QUERY_5_ID)) - .thenReturn(QUERY_5_DTO); - - /* test */ - this.mockMvc.perform(get("/api/database/" + DATABASE_3_ID + "/subset/" + QUERY_5_ID)) - .andDo(print()) - .andExpect(status().isBadRequest()); - } - - @Test - public void findById_privateDataPublicSchema_jsonAcceptHeader_fails() throws Exception { + public void findById_privateDataPublicSchema_jsonAcceptHeader_succeeds() throws Exception { /* mock */ when(metadataServiceGateway.getDatabaseById(DATABASE_3_ID)) @@ -64,7 +49,7 @@ public class SubsetEndpointMvcTest extends AbstractUnitTest { this.mockMvc.perform(get("/api/database/" + DATABASE_3_ID + "/subset/" + QUERY_5_ID) .accept(MediaType.APPLICATION_JSON)) .andDo(print()) - .andExpect(status().isForbidden()); + .andExpect(status().isOk()); } @Test diff --git a/dbrepo-data-service/services/pom.xml b/dbrepo-data-service/services/pom.xml index 5252e6a3d30439671d085b9ac2d6bca81bf462c0..57d2b2a7f6c9abcc47e436215b3027c540adc985 100644 --- a/dbrepo-data-service/services/pom.xml +++ b/dbrepo-data-service/services/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>services</artifactId> <name>dbrepo-data-service-services</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service-querystore</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java index f7f51c0b0d5eab1d06d5e83cc93256cf5211c911..7af0e8cab0d6f7726954eb807c8b95e5d58b006e 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java @@ -1,7 +1,7 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; @@ -15,18 +15,18 @@ import org.springframework.stereotype.Component; @Component public class BasicAuthenticationProvider implements AuthenticationManager { + private final CredentialService credentialService; private final AuthTokenFilter authTokenFilter; - private final KeycloakGateway keycloakGateway; @Autowired - public BasicAuthenticationProvider(AuthTokenFilter authTokenFilter, KeycloakGateway keycloakGateway) { + public BasicAuthenticationProvider(CredentialService credentialService, AuthTokenFilter authTokenFilter) { + this.credentialService = credentialService; this.authTokenFilter = authTokenFilter; - this.keycloakGateway = keycloakGateway; } @Override public Authentication authenticate(Authentication auth) throws AuthenticationException { - final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); + final TokenDto tokenDto = credentialService.getAccessToken(auth.getName(), auth.getCredentials().toString()); final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java index b0edc929ed0097ce94e65153707dc47406f0f3c9..5ba81ea4b37212eee6e370a8779618d0b8be8a3d 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java @@ -2,8 +2,9 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; import at.tuwien.config.GatewayConfig; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRequest; import org.springframework.http.MediaType; @@ -17,12 +18,13 @@ import java.util.List; @Log4j2 public class InternalRequestInterceptor implements ClientHttpRequestInterceptor { + private final CredentialService credentialService; private final GatewayConfig gatewayConfig; - private final KeycloakGateway keycloakGateway; - public InternalRequestInterceptor(GatewayConfig gatewayConfig, KeycloakGateway keycloakGateway) { + @Autowired + public InternalRequestInterceptor(CredentialService credentialService, GatewayConfig gatewayConfig) { + this.credentialService = credentialService; this.gatewayConfig = gatewayConfig; - this.keycloakGateway = keycloakGateway; } @Override @@ -30,7 +32,7 @@ public class InternalRequestInterceptor implements ClientHttpRequestInterceptor throws IOException { final HttpHeaders headers = request.getHeaders(); headers.setAccept(List.of(MediaType.APPLICATION_JSON)); - final TokenDto token = keycloakGateway.obtainUserToken(gatewayConfig.getSystemUsername(), + final TokenDto token = credentialService.getAccessToken(gatewayConfig.getSystemUsername(), gatewayConfig.getSystemPassword()); headers.setBearerAuth(token.getAccessToken()); log.trace("set bearer token for internal user: {}", gatewayConfig.getSystemUsername()); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java index 6fc7e7250cad33f8d2b9f81f3e2ec95f9fa934b9..603491c97005a2633885d7bff2be1b75a8625507 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java @@ -5,6 +5,7 @@ import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableDto; +import at.tuwien.api.keycloak.TokenDto; import at.tuwien.api.user.UserDto; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; @@ -51,6 +52,11 @@ public class CacheConfig { return new ExpiryCache<UUID, ContainerDto>().build(); } + @Bean + public Cache<String, TokenDto> tokenCache() { + return new ExpiryCache<String, TokenDto>().build(); + } + class ExpiryCache<K, T> { Cache<K, T> build() { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java index 1a92faf86f39c5568b9fd927499a61874aacc09c..26f181c39d67fb81e37557f59bbd3522cc5d2278 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java @@ -1,11 +1,10 @@ package at.tuwien.config; import at.tuwien.auth.InternalRequestInterceptor; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -29,11 +28,11 @@ public class GatewayConfig { @Value("${dbrepo.system.password}") private String systemPassword; - private final KeycloakGateway keycloakGateway; + private final CredentialService credentialService; @Autowired - public GatewayConfig(KeycloakGateway keycloakGateway) { - this.keycloakGateway = keycloakGateway; + public GatewayConfig(CredentialService credentialService) { + this.credentialService = credentialService; } @Bean @@ -41,7 +40,7 @@ public class GatewayConfig { final RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(metadataEndpoint)); restTemplate.getInterceptors() - .add(new InternalRequestInterceptor(this, keycloakGateway)); + .add(new InternalRequestInterceptor(credentialService, this)); return restTemplate; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java index e1f763b3b7924748fe80f4485bbef2d3b05cfa23..8dce6c3691a3f8523104f913cce9052833c5fd21 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java @@ -2,7 +2,7 @@ package at.tuwien.config; import at.tuwien.auth.AuthTokenFilter; import at.tuwien.auth.BasicAuthenticationProvider; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; import io.swagger.v3.oas.annotations.security.SecurityScheme; import jakarta.servlet.http.HttpServletResponse; @@ -43,7 +43,7 @@ public class WebSecurityConfig { } @Bean - public SecurityFilterChain filterChain(HttpSecurity http, KeycloakGateway keycloakGateway) + public SecurityFilterChain filterChain(HttpSecurity http, CredentialService credentialService) throws Exception { final OrRequestMatcher internalEndpoints = new OrRequestMatcher( new AntPathRequestMatcher("/actuator/**", "GET"), @@ -86,8 +86,8 @@ public class WebSecurityConfig { http.addFilterBefore(authTokenFilter(), UsernamePasswordAuthenticationFilter.class ); - http.addFilterBefore(new BasicAuthenticationFilter(new BasicAuthenticationProvider(authTokenFilter(), - keycloakGateway)), + http.addFilterBefore(new BasicAuthenticationFilter(new BasicAuthenticationProvider(credentialService, + authTokenFilter())), UsernamePasswordAuthenticationFilter.class ); return http.build(); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java index 7bdf8fa14118f7f6cca621cf01e7567ce608dfdc..0bd399d454d4427440684a57d3f2611079279bca 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java @@ -6,7 +6,6 @@ import at.tuwien.api.database.DatabaseBriefDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewColumnDto; import at.tuwien.api.database.ViewDto; -import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.table.TableBriefDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.columns.ColumnDto; @@ -27,10 +26,6 @@ public interface MetadataMapper { org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MetadataMapper.class); - default String queryDtoToViewName(QueryDto subset) { - return subset.getQueryHash(); - } - ContainerDto containerDtoToContainerDto(ContainerDto data); DatabaseBriefDto databaseDtoToDatabaseBriefDto(DatabaseDto data); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java index c5ffcc1638253a942d7a04b562314082e94865dc..c61b1e1c917056194a67817573b40f01cf6491ba 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java @@ -5,6 +5,7 @@ import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableDto; +import at.tuwien.api.keycloak.TokenDto; import at.tuwien.api.user.UserDto; import at.tuwien.exception.*; diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java new file mode 100644 index 0000000000000000000000000000000000000000..b1c28cf1701772eb16f3c79a8f155faf6e8261a9 --- /dev/null +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java @@ -0,0 +1,16 @@ +package at.tuwien.service; + +import at.tuwien.api.keycloak.TokenDto; + +public interface CredentialService { + + /** + * Gets credentials for a user with given id in a database with given id either from the cache (if not expired) or + * retrieves them from the Metadata Service. + * + * @param username The username. + * @param password The user password. + * @return The credentials. + */ + TokenDto getAccessToken(String username, String password); +} diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java index c23f77edd68af67fbe09d3d9c5b4746b3eebbd83..4abfc453e52e6f086572d32c193b35af36225506 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java @@ -5,6 +5,7 @@ import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableDto; +import at.tuwien.api.keycloak.TokenDto; import at.tuwien.api.user.UserDto; import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..7cf7d1eff4394ae174b0e724fa8e34455b363578 --- /dev/null +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java @@ -0,0 +1,44 @@ +package at.tuwien.service.impl; + +import at.tuwien.api.keycloak.TokenDto; +import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; +import com.github.benmanes.caffeine.cache.Cache; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Log4j2 +@Service +public class CredentialServiceImpl implements CredentialService { + + private final KeycloakGateway keycloakGateway; + private final Cache<String, TokenDto> tokenCache; + + @Autowired + public CredentialServiceImpl(KeycloakGateway keycloakGateway, Cache<String, TokenDto> tokenCache) { + this.tokenCache = tokenCache; + this.keycloakGateway = keycloakGateway; + } + + @Override + public TokenDto getAccessToken(String username, String password) { + final TokenDto cacheAccessToken = tokenCache.getIfPresent(username); + if (cacheAccessToken != null) { + log.trace("found access token for user with username {} in cache", username); + return cacheAccessToken; + } + log.debug("access token for user with username {} not it cache (anymore): request new", username); + final TokenDto token = keycloakGateway.obtainUserToken(username, password); + tokenCache.put(username, token); + return token; + } + + /** + * Method for test cases to remove all caches. + */ + public void invalidateAll() { + tokenCache.invalidateAll(); + } + +} diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java index a646de02b3b560a7dc6967c108a4f7369e33fd65..4ca226ffdee8d9abe9023c540c46b2917d4a7458 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java @@ -79,7 +79,6 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .filter(column -> !MariaDbUtil.numericDataTypes.contains(column.getColumnType())) .forEach(column -> statistic.getColumns().put(column.getInternalName(), new ColumnStatisticDto())); log.info("Obtained statistics for the table and {} column(s)", statistic.getColumns().size()); - log.trace("obtained statistics: {}", statistic); } } catch (SQLException e) { connection.rollback(); diff --git a/dbrepo-gateway-service/dbrepo.conf b/dbrepo-gateway-service/dbrepo.conf index 165aba7643fcda32b94784d757d93e253814a1e0..f181fdf7a70945280453f345f6a639921967abca 100644 --- a/dbrepo-gateway-service/dbrepo.conf +++ b/dbrepo-gateway-service/dbrepo.conf @@ -123,7 +123,7 @@ server { proxy_read_timeout 90; } - location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/table/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|history|export)" { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/table/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|history)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -132,7 +132,7 @@ server { proxy_read_timeout 90; } - location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|export)" { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/data" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -168,6 +168,15 @@ server { proxy_read_timeout 90; } + location ~ "/api/identifier/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})" { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://metadata; + proxy_read_timeout 90; + } + location ~ "/pid/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})" { rewrite /pid/(.*) /api/identifier/$1 break; proxy_set_header Host $host; diff --git a/dbrepo-metadata-service/api/pom.xml b/dbrepo-metadata-service/api/pom.xml index 6c3b1aa13fbe0ccac21e0e0ce1ede0a78e6f340d..37662b64cbb9c65d104871a349ed2d6f127f89b1 100644 --- a/dbrepo-metadata-service/api/pom.xml +++ b/dbrepo-metadata-service/api/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-api</artifactId> <name>dbrepo-metadata-service-api</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service-entities</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> <scope>compile</scope> </dependency> </dependencies> diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java index 57ecb5ad625017fec1571a1da53a83cbd5fcf852..0bc16d61cd9a1dc45c129184ec18cfb49ed0d754 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java @@ -46,6 +46,9 @@ public class IdentifierDto { @Schema(example = "null") private UUID viewId; + @NotNull + private LinksDto links; + @NotNull @Schema(example = "database") private IdentifierTypeDto type; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/LinksDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/LinksDto.java new file mode 100644 index 0000000000000000000000000000000000000000..fcef2a659750d9cf6b78bdc54b4a627dbcc0935d --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/LinksDto.java @@ -0,0 +1,32 @@ +package at.tuwien.api.identifier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.*; +import lombok.extern.jackson.Jacksonized; + + +@Getter +@Setter +@Builder +@EqualsAndHashCode +@NoArgsConstructor +@AllArgsConstructor +@Jacksonized +@ToString +public class LinksDto { + + @NotNull + @Schema(example = "http://example.com/api/") + private String self; + + @NotNull + @JsonProperty("self_html") + @Schema(example = "http://example.com") + private String selfHtml; + + @Schema(example = "http://example.com") + private String data; + +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/keycloak/TokenDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/keycloak/TokenDto.java index c20af4cc36e9064c70bc81906badc413e29af593..dcd14c4d2a469b0bdfe88166aae9afba8048ba4c 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/keycloak/TokenDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/keycloak/TokenDto.java @@ -1,10 +1,14 @@ package at.tuwien.api.keycloak; +import at.tuwien.api.CacheableDto; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.time.Instant; + @Getter @Setter @Builder @@ -12,7 +16,7 @@ import lombok.extern.jackson.Jacksonized; @AllArgsConstructor @Jacksonized @ToString -public class TokenDto { +public class TokenDto extends CacheableDto { @NotNull @JsonProperty("access_token") @@ -49,4 +53,10 @@ public class TokenDto { @JsonProperty("not-before-policy") private Long notBeforePolicy; + /* lombok limitations prevent from convenient builder functions */ + + @JsonProperty("last_retrieved") + @Schema(example = "2025-01-23T12:09:01") + private Instant lastRetrieved; + } diff --git a/dbrepo-metadata-service/entities/pom.xml b/dbrepo-metadata-service/entities/pom.xml index 313309e18831501558a149cab52920bb90e89e91..76ef98f9f1f7100d5360326d9413466a35bf0add 100644 --- a/dbrepo-metadata-service/entities/pom.xml +++ b/dbrepo-metadata-service/entities/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-entities</artifactId> <name>dbrepo-metadata-service-entity</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies/> diff --git a/dbrepo-metadata-service/oai/pom.xml b/dbrepo-metadata-service/oai/pom.xml index 54c464b11a31cea0e588f797fa38012c573a1d02..7a5df8b329e3ac371f65d28b2bae4a1532a329f0 100644 --- a/dbrepo-metadata-service/oai/pom.xml +++ b/dbrepo-metadata-service/oai/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-oai</artifactId> <name>dbrepo-metadata-service-oai</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies/> diff --git a/dbrepo-metadata-service/pom.xml b/dbrepo-metadata-service/pom.xml index dec6e42b20ea0aa7c7c26d5ef3e08ff24f08c9fa..53198bb0dead1ab4c2975b6cbf02d18584dd5688 100644 --- a/dbrepo-metadata-service/pom.xml +++ b/dbrepo-metadata-service/pom.xml @@ -16,7 +16,7 @@ <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> <name>dbrepo-metadata-service</name> - <version>1.7.0</version> + <version>1.7.1</version> <description>Service that manages the metadata</description> diff --git a/dbrepo-metadata-service/report/pom.xml b/dbrepo-metadata-service/report/pom.xml index 6bcb8d579b67439ad4bcd590cf5af3819f70218e..dc6186ed9c30a034c9a18360c365a50c5771e51d 100644 --- a/dbrepo-metadata-service/report/pom.xml +++ b/dbrepo-metadata-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-report</artifactId> <name>dbrepo-metadata-service-report</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/repositories/pom.xml b/dbrepo-metadata-service/repositories/pom.xml index 4d3b5f933d2c39674b2f9e58461387c0a2cffdb8..273740f1d07c4c0575dd9b59754d27eb4335eaa8 100644 --- a/dbrepo-metadata-service/repositories/pom.xml +++ b/dbrepo-metadata-service/repositories/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-repositories</artifactId> <name>dbrepo-metadata-service-repositories</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java index 2d18ca0c49124539a6b9aa6072396aa247eb8167..74284789247ee20deac7df99c49a4f60e8cfa765 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java @@ -318,10 +318,27 @@ public interface MetadataMapper { Identifier identifierDtoToIdentifier(IdentifierDto data); @Mappings({ - @Mapping(target = "databaseId", source = "database.id") + @Mapping(target = "databaseId", source = "database.id"), + @Mapping(target = "links", expression = "java(identifierToLinksDto(data))"), }) IdentifierDto identifierToIdentifierDto(Identifier data); + default LinksDto identifierToLinksDto(Identifier data) { + final LinksDto links = LinksDto.builder() + .self("/api/identifier/" + data.getId()) + .selfHtml("/pid/" + data.getId()) + .build(); + switch (data.getType()) { + case VIEW -> + links.setData("/api/database/" + data.getDatabase().getId() + "/view/" + data.getViewId() + "/data"); + case TABLE -> + links.setData("/api/database/" + data.getDatabase().getId() + "/table/" + data.getTableId() + "/data"); + case SUBSET -> + links.setData("/api/database/" + data.getDatabase().getId() + "/subset/" + data.getQueryId() + "/data"); + } + return links; + } + @Mappings({ @Mapping(target = "databaseId", source = "database.id"), @Mapping(target = "ownedBy", source = "owner.id") diff --git a/dbrepo-metadata-service/rest-service/pom.xml b/dbrepo-metadata-service/rest-service/pom.xml index 9e9f23d11fdbab4fc2308bead597a7626272ceb1..6427153b504248bda78827974eedae242e6e6c08 100644 --- a/dbrepo-metadata-service/rest-service/pom.xml +++ b/dbrepo-metadata-service/rest-service/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-rest-service</artifactId> <name>dbrepo-metadata-service-rest</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java index 31dd1e542d53112ff42b49a6e5f6269255088ac6..96deaea775defd1562aba3601d9ba513b771f401 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java @@ -9,7 +9,6 @@ import at.tuwien.entities.database.Database; import at.tuwien.entities.database.DatabaseAccess; import at.tuwien.entities.identifier.Identifier; import at.tuwien.entities.identifier.IdentifierStatusType; -import at.tuwien.entities.identifier.IdentifierType; import at.tuwien.entities.user.User; import at.tuwien.exception.*; import at.tuwien.mapper.MetadataMapper; @@ -126,7 +125,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { } @GetMapping(value = "/{identifierId}", produces = {MediaType.APPLICATION_JSON_VALUE, "application/ld+json", - MediaType.TEXT_XML_VALUE, "text/csv", "text/bibliography", "text/bibliography; style=apa", + MediaType.TEXT_XML_VALUE, "text/bibliography", "text/bibliography; style=apa", "text/bibliography; style=ieee", "text/bibliography; style=bibtex"}) @Transactional(readOnly = true) @Observed(name = "dbrepo_identifier_find") @@ -138,7 +137,6 @@ public class IdentifierEndpoint extends AbstractEndpoint { content = { @Content(mediaType = "application/json", schema = @Schema(implementation = IdentifierDto.class)), @Content(mediaType = "application/ld+json", schema = @Schema(implementation = LdDatasetDto.class)), - @Content(mediaType = "text/csv"), @Content(mediaType = "text/xml"), @Content(mediaType = "text/bibliography"), @Content(mediaType = "text/bibliography; style=apa"), @@ -190,7 +188,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { @RequestHeader(HttpHeaders.ACCEPT) String accept, Principal principal) throws IdentifierNotFoundException, DataServiceException, DataServiceConnectionException, MalformedException, FormatNotAvailableException, - QueryNotFoundException, NotAllowedException { + QueryNotFoundException, NotAllowedException, TableNotFoundException, ViewNotFoundException { log.debug("endpoint find identifier, identifierId={}, accept={}", identifierId, accept); if (accept == null) { accept = ""; @@ -212,13 +210,6 @@ public class IdentifierEndpoint extends AbstractEndpoint { case "application/ld+json": log.trace("accept header matches json-ld"); return ResponseEntity.ok(metadataMapper.identifierToLdDatasetDto(identifier, endpointConfig.getWebsiteUrl())); - case "text/csv": - log.trace("accept header matches csv"); - if (identifier.getType().equals(IdentifierType.DATABASE)) { - log.error("Failed to export dataset: identifier type is database"); - throw new FormatNotAvailableException("Failed to export dataset: identifier type is database"); - } - return ResponseEntity.ok(identifierService.exportResource(identifier)); case "text/xml": log.trace("accept header matches xml"); return ResponseEntity.ok(identifierService.exportMetadata(identifier)); diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java index 432b84d50f125895287516e0e628110e207f1a83..2cc187c884e658a6d6dae8a76ce6ffdeb94a2d61 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java @@ -146,7 +146,7 @@ public class ViewEndpoint extends AbstractEndpoint { MalformedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, UserNotFoundException, SearchServiceException, SearchServiceConnectionException, TableNotFoundException, ImageNotFoundException, ViewExistsException { - log.debug("endpoint create view, databaseId={}, data={}", databaseId, data); + log.debug("endpoint create view, databaseId={}, data.name={}", databaseId, data.getName()); final Database database = databaseService.findById(databaseId); if (!database.getOwner().getId().equals(getId(principal))) { log.error("Failed to create view: not the database owner"); @@ -156,7 +156,6 @@ public class ViewEndpoint extends AbstractEndpoint { log.error("Failed to create view: name exists"); throw new ViewExistsException("Failed to create view: name exists"); } - log.trace("create view for database {}", database); return ResponseEntity.status(HttpStatus.CREATED) .body(metadataMapper.viewToViewBriefDto( viewService.create(database, userService.findById(getId(principal)), data))); diff --git a/dbrepo-metadata-service/rest-service/src/main/resources/application.yml b/dbrepo-metadata-service/rest-service/src/main/resources/application.yml index 01d2de7d8a0f73dcc667b69ed499ae350a81d317..a8a16759829dcf376b75b1de02029cfb16fddc80 100644 --- a/dbrepo-metadata-service/rest-service/src/main/resources/application.yml +++ b/dbrepo-metadata-service/rest-service/src/main/resources/application.yml @@ -73,6 +73,7 @@ dbrepo: password: "${AUTH_SERVICE_ADMIN_PASSWORD:admin}" client: "${AUTH_SERVICE_CLIENT:dbrepo-client}" clientSecret: "${AUTH_SERVICE_CLIENT_SECRET:MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG}" + credentialCacheTimeout: "${CREDENTIAL_CACHE_TIMEOUT:60}" website: "${BASE_URL:http://localhost}" repository-name: "${REPOSITORY_NAME:Database Repository}" base-url: "${BASE_URL:http://localhost}" diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java index 1e003041027ed22072d167eae81fab3a5d32c813..59aca6a405cf0086fb1cc39e033d4865a33df082 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java @@ -365,20 +365,6 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { assertEquals(1, identifiers.size()); } - @Test - @WithAnonymousUser - public void find_textCsvDatabase_fails() throws IdentifierNotFoundException { - - /* mock */ - when(identifierService.find(IDENTIFIER_1_ID)) - .thenReturn(IDENTIFIER_1); - - /* test */ - assertThrows(FormatNotAvailableException.class, () -> { - identifierEndpoint.find(IDENTIFIER_1_ID, "text/csv", null); - }); - } - @Test @WithAnonymousUser public void find_draft_fails() throws IdentifierNotFoundException { @@ -410,7 +396,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_2_USERNAME) public void find_draft_succeeds() throws IdentifierNotFoundException, MalformedException, NotAllowedException, - DataServiceException, QueryNotFoundException, DataServiceConnectionException, FormatNotAvailableException { + DataServiceException, QueryNotFoundException, DataServiceConnectionException, FormatNotAvailableException, + TableNotFoundException, ViewNotFoundException { /* mock */ when(identifierService.find(IDENTIFIER_5_ID)) @@ -424,7 +411,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_defaultHtmlRespondsJson_succeeds() throws IdentifierNotFoundException, MalformedException, NotAllowedException, DataServiceException, QueryNotFoundException, DataServiceConnectionException, - FormatNotAvailableException { + FormatNotAvailableException, TableNotFoundException, ViewNotFoundException { /* mock */ when(identifierService.find(IDENTIFIER_1_ID)) @@ -438,7 +425,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_4_USERNAME) public void find_json0_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "application/json"; final IdentifierDto compare = objectMapper.readValue(FileUtils.readFileToString(new File("src/test/resources/json/metadata0.json"), StandardCharsets.UTF_8), IdentifierDto.class); @@ -468,7 +455,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_json1_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "application/json"; final IdentifierDto compare = objectMapper.readValue(FileUtils.readFileToString(new File("src/test/resources/json/metadata1.json"), StandardCharsets.UTF_8), IdentifierDto.class); @@ -514,34 +501,11 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { assertEquals(compare.getCreators().get(0).getNameIdentifierScheme(), creator0.getNameIdentifierScheme()); } - @Test - @WithAnonymousUser - public void find_csv_succeeds() throws IOException, MalformedException, DataServiceException, - DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { - final String accept = "text/csv"; - final InputStreamResource compare = new InputStreamResource(FileUtils.openInputStream(new File("src/test/resources/csv/keyboard.csv"))); - final InputStreamResource mock = new InputStreamResource(FileUtils.openInputStream(new File("src/test/resources/csv/keyboard.csv"))); - - /* mock */ - when(identifierService.find(IDENTIFIER_2_ID)) - .thenReturn(IDENTIFIER_2); - when(identifierService.exportResource(IDENTIFIER_2)) - .thenReturn(mock); - - /* test */ - final ResponseEntity<?> response = identifierEndpoint.find(IDENTIFIER_2_ID, accept, null); - assertEquals(HttpStatus.OK, response.getStatusCode()); - final InputStreamResource body = (InputStreamResource) response.getBody(); - assertNotNull(body); - assertEquals(inputStreamToString(compare.getInputStream()), inputStreamToString(body.getInputStream())); - } - @Test @WithAnonymousUser public void find_bibliography_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa1.txt"), StandardCharsets.UTF_8); @@ -584,7 +548,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_4_USERNAME) public void find_bibliographyApa0_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=apa"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa0.txt"), StandardCharsets.UTF_8); @@ -607,7 +571,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyApa1_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=apa"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa1.txt"), StandardCharsets.UTF_8); @@ -630,7 +594,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_2_USERNAME) public void find_draftBibliographyApa2_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=apa"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa2.txt"), StandardCharsets.UTF_8); @@ -653,7 +617,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyApa3_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=apa"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa3.txt"), StandardCharsets.UTF_8); @@ -676,7 +640,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyApa4_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=apa"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_apa4.txt"), StandardCharsets.UTF_8); @@ -699,7 +663,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_4_USERNAME) public void find_bibliographyIeee0_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=ieee"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_ieee0.txt"), StandardCharsets.UTF_8); @@ -722,7 +686,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyIeee1_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=ieee"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_ieee1.txt"), StandardCharsets.UTF_8); @@ -745,7 +709,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_2_USERNAME) public void find_bibliographyIeee2_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=ieee"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_ieee2.txt"), StandardCharsets.UTF_8); @@ -768,7 +732,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyIeee3_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=ieee"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_ieee3.txt"), StandardCharsets.UTF_8); @@ -791,7 +755,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_4_USERNAME) public void find_bibliographyBibtex0_succeeds() throws IOException, MalformedException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=bibtex"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_bibtex0.txt"), StandardCharsets.UTF_8); @@ -814,7 +778,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyBibtex1_succeeds() throws MalformedException, IOException, DataServiceException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=bibtex"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_bibtex1.txt"), StandardCharsets.UTF_8); @@ -837,7 +801,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_2_USERNAME) public void find_bibliographyBibtex2_succeeds() throws MalformedException, DataServiceException, IOException, DataServiceConnectionException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=bibtex"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_bibtex2.txt"), StandardCharsets.UTF_8); @@ -860,7 +824,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_bibliographyBibtex3_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, IOException, QueryNotFoundException, IdentifierNotFoundException, - FormatNotAvailableException, NotAllowedException { + FormatNotAvailableException, NotAllowedException, TableNotFoundException, ViewNotFoundException { final String accept = "text/bibliography; style=bibtex"; final String compare = FileUtils.readFileToString(new File("src/test/resources/bibliography/style_bibtex3.txt"), StandardCharsets.UTF_8); @@ -882,7 +846,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void find_jsonLd_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, - QueryNotFoundException, IdentifierNotFoundException, FormatNotAvailableException, NotAllowedException { + QueryNotFoundException, IdentifierNotFoundException, FormatNotAvailableException, NotAllowedException, + TableNotFoundException, ViewNotFoundException { final String accept = "application/ld+json"; /* mock */ @@ -914,7 +879,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void find_move_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, - QueryNotFoundException, IdentifierNotFoundException, FormatNotAvailableException, NotAllowedException { + QueryNotFoundException, IdentifierNotFoundException, FormatNotAvailableException, NotAllowedException, + TableNotFoundException, ViewNotFoundException { /* mock */ when(identifierService.find(IDENTIFIER_1_ID)) @@ -1065,7 +1031,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void find_json_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, - FormatNotAvailableException, QueryNotFoundException, IdentifierNotFoundException, NotAllowedException { + FormatNotAvailableException, QueryNotFoundException, IdentifierNotFoundException, NotAllowedException, + TableNotFoundException, ViewNotFoundException { final String accept = "application/json"; /* mock */ @@ -1093,7 +1060,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithAnonymousUser public void find_xml_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, IOException, QueryNotFoundException, IdentifierNotFoundException, FormatNotAvailableException, - NotAllowedException { + NotAllowedException, TableNotFoundException, ViewNotFoundException { final InputStreamResource resource = new InputStreamResource(FileUtils.openInputStream( new File("src/test/resources/xml/datacite-example-dataset-v4.xml"))); @@ -1108,9 +1075,9 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser - public void find_httpRedirect_succeeds() throws MalformedException, DataServiceException, - DataServiceConnectionException, FormatNotAvailableException, QueryNotFoundException, - IdentifierNotFoundException, NotAllowedException { + public void find_httpRedirect_succeeds() throws MalformedException, DataServiceException, QueryNotFoundException, + DataServiceConnectionException, FormatNotAvailableException, IdentifierNotFoundException, + NotAllowedException, TableNotFoundException, ViewNotFoundException { /* test */ final ResponseEntity<?> response = generic_find(null, null); @@ -1509,14 +1476,13 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { protected ResponseEntity<?> generic_find(String accept, InputStreamResource resource) throws MalformedException, DataServiceException, DataServiceConnectionException, FormatNotAvailableException, - QueryNotFoundException, IdentifierNotFoundException, NotAllowedException { + QueryNotFoundException, IdentifierNotFoundException, NotAllowedException, TableNotFoundException, + ViewNotFoundException { /* mock */ when(identifierService.find(IDENTIFIER_1_ID)) .thenReturn(IDENTIFIER_1); if (resource != null) { - when(identifierService.exportResource(IDENTIFIER_1)) - .thenReturn(resource); when(identifierService.exportMetadata(IDENTIFIER_1)) .thenReturn(resource); } @@ -1525,10 +1491,6 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { return identifierEndpoint.find(IDENTIFIER_1_ID, accept, null); } - protected static String inputStreamToString(InputStream inputStream) throws IOException { - return IOUtils.toString(inputStream, StandardCharsets.UTF_8); - } - protected void generic_delete() throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, IdentifierNotFoundException, SearchServiceException, SearchServiceConnectionException { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java index 5508a6245e40021cf307d474bc056dfc64861920..af1ecc9f1c69b6f2acaf3176575045bf14ad8322 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java @@ -1,6 +1,5 @@ package at.tuwien.gateway; -import at.tuwien.ExportResourceDto; import at.tuwien.api.database.AccessTypeDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; @@ -812,75 +811,6 @@ public class DataServiceGatewayUnitTest extends AbstractUnitTest { }); } - @Test - public void exportQuery_succeeds() throws DataServiceException, DataServiceConnectionException, - QueryNotFoundException { - - /* mock */ - when(dataServiceRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ExportResourceDto.class))) - .thenReturn(ResponseEntity.status(HttpStatus.OK) - .build()); - - /* test */ - dataServiceGateway.exportQuery(DATABASE_1_ID, QUERY_1_ID); - } - - @Test - public void exportQuery_connection_fails() { - - /* mock */ - doThrow(HttpServerErrorException.class) - .when(dataServiceRestTemplate) - .exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ExportResourceDto.class)); - - /* test */ - assertThrows(DataServiceConnectionException.class, () -> { - dataServiceGateway.exportQuery(DATABASE_1_ID, QUERY_1_ID); - }); - } - - @Test - public void exportQuery_unauthorized_fails() { - - /* mock */ - doThrow(HttpClientErrorException.Unauthorized.class) - .when(dataServiceRestTemplate) - .exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ExportResourceDto.class)); - - /* test */ - assertThrows(DataServiceException.class, () -> { - dataServiceGateway.exportQuery(DATABASE_1_ID, QUERY_1_ID); - }); - } - - @Test - public void exportQuery_notFound_fails() { - - /* mock */ - doThrow(HttpClientErrorException.NotFound.class) - .when(dataServiceRestTemplate) - .exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ExportResourceDto.class)); - - /* test */ - assertThrows(QueryNotFoundException.class, () -> { - dataServiceGateway.exportQuery(DATABASE_1_ID, QUERY_1_ID); - }); - } - - @Test - public void exportQuery_responseCode_fails() { - - /* mock */ - when(dataServiceRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ExportResourceDto.class))) - .thenReturn(ResponseEntity.status(HttpStatus.NO_CONTENT) - .build()); - - /* test */ - assertThrows(DataServiceException.class, () -> { - dataServiceGateway.exportQuery(DATABASE_1_ID, QUERY_1_ID); - }); - } - @Test public void getTableSchemas_succeeds() throws DataServiceException, DataServiceConnectionException, TableNotFoundException { diff --git a/dbrepo-metadata-service/services/pom.xml b/dbrepo-metadata-service/services/pom.xml index 906fa5258b02807565c4acc0e361d5c65bd65b77..f06002c2bad12d8ed2307167dff0478c8ac98222 100644 --- a/dbrepo-metadata-service/services/pom.xml +++ b/dbrepo-metadata-service/services/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-services</artifactId> <name>dbrepo-metadata-service-services</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java index 27a1c271af871b6253540674e9777368afa42e4a..963249b393895781f38c1770ca5392e09fa47d66 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java @@ -1,7 +1,7 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; @@ -15,18 +15,18 @@ import org.springframework.stereotype.Component; @Component public class BasicAuthenticationProvider implements AuthenticationManager { + private final CredentialService credentialService; private final AuthTokenFilter authTokenFilter; - private final KeycloakGateway keycloakGateway; @Autowired - public BasicAuthenticationProvider(AuthTokenFilter authTokenFilter, KeycloakGateway keycloakGateway) { + public BasicAuthenticationProvider(CredentialService credentialService, AuthTokenFilter authTokenFilter) { + this.credentialService = credentialService; this.authTokenFilter = authTokenFilter; - this.keycloakGateway = keycloakGateway; } @Override public Authentication authenticate(Authentication auth) throws AuthenticationException { - final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); + final TokenDto tokenDto = credentialService.getAccessToken(auth.getName(), auth.getCredentials().toString()); final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); log.debug("set basic auth principal: {}", userDetails); return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java index b0edc929ed0097ce94e65153707dc47406f0f3c9..6d7480ba8034a9108492ab0816005f4a92f8046c 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java @@ -2,7 +2,7 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; import at.tuwien.config.GatewayConfig; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.extern.log4j.Log4j2; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRequest; @@ -17,20 +17,22 @@ import java.util.List; @Log4j2 public class InternalRequestInterceptor implements ClientHttpRequestInterceptor { + private final CredentialService credentialService; private final GatewayConfig gatewayConfig; - private final KeycloakGateway keycloakGateway; - public InternalRequestInterceptor(GatewayConfig gatewayConfig, KeycloakGateway keycloakGateway) { + public InternalRequestInterceptor(CredentialService credentialService, GatewayConfig gatewayConfig) { + this.credentialService = credentialService; this.gatewayConfig = gatewayConfig; - this.keycloakGateway = keycloakGateway; } @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { final HttpHeaders headers = request.getHeaders(); - headers.setAccept(List.of(MediaType.APPLICATION_JSON)); - final TokenDto token = keycloakGateway.obtainUserToken(gatewayConfig.getSystemUsername(), + if (headers.get("Accept") == null) { + headers.setAccept(List.of(MediaType.APPLICATION_JSON)); + } + final TokenDto token = credentialService.getAccessToken(gatewayConfig.getSystemUsername(), gatewayConfig.getSystemPassword()); headers.setBearerAuth(token.getAccessToken()); log.trace("set bearer token for internal user: {}", gatewayConfig.getSystemUsername()); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/CacheConfig.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/CacheConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..9229927e83c19a8b73ca66f100a38091289750fb --- /dev/null +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/CacheConfig.java @@ -0,0 +1,33 @@ +package at.tuwien.config; + +import at.tuwien.api.keycloak.TokenDto; +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.concurrent.TimeUnit; + +@Configuration +public class CacheConfig { + + @Value("${dbrepo.credentialCacheTimeout}") + private Integer credentialCacheTimeout; + + @Bean + public Cache<String, TokenDto> tokenCache() { + return new ExpiryCache<String, TokenDto>().build(); + } + + class ExpiryCache<K, T> { + + Cache<K, T> build() { + return Caffeine.newBuilder() + .expireAfterWrite(credentialCacheTimeout, TimeUnit.SECONDS) + .build(); + } + + } + +} diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/GatewayConfig.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/GatewayConfig.java index 0bcace730e7753b1dd21d2e1d4a91f47bda6b9f3..34b0acbcb7dfc9164dda5b0408463a8c742b01d1 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/GatewayConfig.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/GatewayConfig.java @@ -1,7 +1,7 @@ package at.tuwien.config; import at.tuwien.auth.InternalRequestInterceptor; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -44,12 +44,12 @@ public class GatewayConfig { @Value("${dbrepo.system.password}") private String systemPassword; - - private final KeycloakGateway keycloakGateway; + + private final CredentialService credentialService; @Autowired - public GatewayConfig(KeycloakGateway keycloakGateway) { - this.keycloakGateway = keycloakGateway; + public GatewayConfig(CredentialService credentialService) { + this.credentialService = credentialService; } @Profile("!junit") @@ -58,7 +58,7 @@ public class GatewayConfig { final RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(brokerEndpoint)); restTemplate.getInterceptors() - .add(new InternalRequestInterceptor(this, keycloakGateway)); + .add(new InternalRequestInterceptor(credentialService, this)); return restTemplate; } @@ -67,7 +67,7 @@ public class GatewayConfig { final RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(dataEndpoint)); restTemplate.getInterceptors() - .add(new InternalRequestInterceptor(this, keycloakGateway)); + .add(new InternalRequestInterceptor(credentialService, this)); return restTemplate; } @@ -76,7 +76,7 @@ public class GatewayConfig { final RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(analyseEndpoint)); restTemplate.getInterceptors() - .add(new InternalRequestInterceptor(this, keycloakGateway)); + .add(new InternalRequestInterceptor(credentialService, this)); return restTemplate; } @@ -85,7 +85,7 @@ public class GatewayConfig { final RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(searchEndpoint)); restTemplate.getInterceptors() - .add(new InternalRequestInterceptor(this, keycloakGateway)); + .add(new InternalRequestInterceptor(credentialService, this)); return restTemplate; } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java index ae15c9df2d3406a09ec6aeafbfebf571a0325a78..24133846961d340df4e04a3cf425470d68519a74 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java @@ -2,7 +2,7 @@ package at.tuwien.config; import at.tuwien.auth.AuthTokenFilter; import at.tuwien.auth.BasicAuthenticationProvider; -import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; import io.swagger.v3.oas.annotations.security.SecurityScheme; import jakarta.servlet.http.HttpServletResponse; @@ -43,7 +43,7 @@ public class WebSecurityConfig { } @Bean - public SecurityFilterChain filterChain(HttpSecurity http, KeycloakGateway keycloakGateway) + public SecurityFilterChain filterChain(HttpSecurity http, CredentialService credentialService) throws Exception { final OrRequestMatcher internalEndpoints = new OrRequestMatcher( new AntPathRequestMatcher("/actuator/**", "GET"), @@ -88,8 +88,7 @@ public class WebSecurityConfig { http.addFilterBefore(authTokenFilter(), UsernamePasswordAuthenticationFilter.class ); - http.addFilterBefore(new BasicAuthenticationFilter(new BasicAuthenticationProvider(authTokenFilter(), - keycloakGateway)), + http.addFilterBefore(new BasicAuthenticationFilter(new BasicAuthenticationProvider(credentialService, authTokenFilter())), UsernamePasswordAuthenticationFilter.class ); return http.build(); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java index 5bb0303e16c14145f1e08ee913b4c4dcabdead61..3996448d212bed80364bdc2ac4d5ab62da3e1863 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java @@ -1,9 +1,8 @@ package at.tuwien.gateway; -import at.tuwien.ExportResourceDto; import at.tuwien.api.database.AccessTypeDto; -import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.CreateViewDto; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.internal.CreateDatabaseDto; import at.tuwien.api.database.query.QueryDto; @@ -145,19 +144,6 @@ public interface DataServiceGateway { QueryDto findQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, DataServiceException, QueryNotFoundException; - /** - * Exports a given query. - * - * @param databaseId The database id. - * @param queryId The query id. - * @return The exported resource, if successful. - * @throws DataServiceConnectionException The connection to the data service could not be established. - * @throws DataServiceException The data service responded unexpectedly. - * @throws QueryNotFoundException The given query was not found in the query store. - */ - ExportResourceDto exportQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, - DataServiceException, QueryNotFoundException; - /** * Obtain table schemas from a given database. * diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java index 8feed3b291444ea674317673d74fa59bba4b5cad..ba855feda32000f1c4f0265c2b194c7e9e4e8237 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java @@ -1,6 +1,5 @@ package at.tuwien.gateway.impl; -import at.tuwien.ExportResourceDto; import at.tuwien.api.database.*; import at.tuwien.api.database.internal.CreateDatabaseDto; import at.tuwien.api.database.query.QueryDto; @@ -315,31 +314,6 @@ public class DataServiceGatewayImpl implements DataServiceGateway { return response.getBody(); } - @Override - public ExportResourceDto exportQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, - DataServiceException, QueryNotFoundException { - final ResponseEntity<ExportResourceDto> response; - final String path = "/api/database/" + databaseId + "/subset/" + queryId; - log.trace("export subset at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); - try { - response = restTemplate.exchange(path, HttpMethod.GET, HttpEntity.EMPTY, ExportResourceDto.class); - } catch (HttpServerErrorException e) { - log.error("Failed to export query: {}", e.getMessage()); - throw new DataServiceConnectionException("Failed to export query: " + e.getMessage(), e); - } catch (HttpClientErrorException.NotFound e) { - log.error("Failed to export query: not found: {}", e.getMessage()); - throw new QueryNotFoundException("Failed to export query: not found: " + e.getMessage(), e); - } catch (HttpClientErrorException.Unauthorized e) { - log.error("Failed to export query: {}", e.getMessage()); - throw new DataServiceException("Failed to export query: " + e.getMessage(), e); - } - if (!response.getStatusCode().equals(HttpStatus.OK)) { - log.error("Failed to export query: wrong http code: {}", response.getStatusCode()); - throw new DataServiceException("Failed to export query: wrong http code: " + response.getStatusCode()); - } - return response.getBody(); - } - @Override public List<TableDto> getTableSchemas(UUID databaseId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException { diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/CredentialService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/CredentialService.java new file mode 100644 index 0000000000000000000000000000000000000000..b1c28cf1701772eb16f3c79a8f155faf6e8261a9 --- /dev/null +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/CredentialService.java @@ -0,0 +1,16 @@ +package at.tuwien.service; + +import at.tuwien.api.keycloak.TokenDto; + +public interface CredentialService { + + /** + * Gets credentials for a user with given id in a database with given id either from the cache (if not expired) or + * retrieves them from the Metadata Service. + * + * @param username The username. + * @param password The user password. + * @return The credentials. + */ + TokenDto getAccessToken(String username, String password); +} diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java index 605ded7d37faad52fc7119f4dd0a958c199b68b8..8c9a3088fe96844df0628ba95d71c0356ebc2b33 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java @@ -161,19 +161,6 @@ public interface IdentifierService { */ String exportBibliography(Identifier identifier, BibliographyTypeDto style) throws MalformedException; - /** - * Exports an identifier to XML - * - * @param identifier The identifier. - * @return The XML resource, if successful. - * @throws DataServiceException - * @throws DataServiceConnectionException - * @throws IdentifierNotFoundException - * @throws QueryNotFoundException - */ - InputStreamResource exportResource(Identifier identifier) throws DataServiceException, DataServiceConnectionException, - IdentifierNotFoundException, QueryNotFoundException; - /** * Soft-deletes an identifier for a given id in the metadata database. Does not actually remove the entity from the * database, but sets it as deleted. diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..7cf7d1eff4394ae174b0e724fa8e34455b363578 --- /dev/null +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java @@ -0,0 +1,44 @@ +package at.tuwien.service.impl; + +import at.tuwien.api.keycloak.TokenDto; +import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.service.CredentialService; +import com.github.benmanes.caffeine.cache.Cache; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Log4j2 +@Service +public class CredentialServiceImpl implements CredentialService { + + private final KeycloakGateway keycloakGateway; + private final Cache<String, TokenDto> tokenCache; + + @Autowired + public CredentialServiceImpl(KeycloakGateway keycloakGateway, Cache<String, TokenDto> tokenCache) { + this.tokenCache = tokenCache; + this.keycloakGateway = keycloakGateway; + } + + @Override + public TokenDto getAccessToken(String username, String password) { + final TokenDto cacheAccessToken = tokenCache.getIfPresent(username); + if (cacheAccessToken != null) { + log.trace("found access token for user with username {} in cache", username); + return cacheAccessToken; + } + log.debug("access token for user with username {} not it cache (anymore): request new", username); + final TokenDto token = keycloakGateway.obtainUserToken(username, password); + tokenCache.put(username, token); + return token; + } + + /** + * Method for test cases to remove all caches. + */ + public void invalidateAll() { + tokenCache.invalidateAll(); + } + +} diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java index 0c8ce27d1214b1ac47c6756d7f5d3fbe4c77adcd..5ab9cc26a226374d817966e880a684393c36cf08 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java @@ -196,13 +196,6 @@ public class DataCiteIdentifierServiceImpl implements IdentifierService { return identifierService.exportBibliography(identifier, style); } - @Override - @Transactional(readOnly = true) - public InputStreamResource exportResource(Identifier identifier) throws DataServiceException, - DataServiceConnectionException, IdentifierNotFoundException, QueryNotFoundException { - return identifierService.exportResource(identifier); - } - @Override @Transactional public void delete(Identifier identifier) throws DataServiceException, DataServiceConnectionException, diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java index b1d1f45932c61bb755a615f22a6a919297ffec46..8af7023c8cb48b64078457c409b8e14ece6187b7 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java @@ -1,6 +1,5 @@ package at.tuwien.service.impl; -import at.tuwien.ExportResourceDto; import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.identifier.BibliographyTypeDto; import at.tuwien.api.identifier.CreateIdentifierDto; @@ -356,14 +355,6 @@ public class IdentifierServiceImpl implements IdentifierService { return body; } - @Override - @Transactional(readOnly = true) - public InputStreamResource exportResource(Identifier identifier) throws DataServiceException, - DataServiceConnectionException, QueryNotFoundException { - final ExportResourceDto exportResource = dataServiceGateway.exportQuery(identifier.getDatabase().getId(), identifier.getQueryId()); - return exportResource.getResource(); - } - @Override @Transactional public void delete(Identifier identifier) throws DataServiceException, DataServiceConnectionException, diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java index f5e2821f2663b0ce18df27784638eda4a9cef767..3b0a530e52ea65ad79b118f309353d14c0141dd1 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java @@ -322,7 +322,6 @@ public class TableServiceImpl implements TableService { /* update in open search service */ searchServiceGateway.update(database); log.info("Updated statistics for the table and {} column(s)", table.getColumns().size()); - log.trace("updated statistics: {}", table); } } diff --git a/dbrepo-metadata-service/test/pom.xml b/dbrepo-metadata-service/test/pom.xml index 792523227eaa968b3dd8c340779bece2323cb461..3f68c6efdeebcebaea5f897aac65d6c22a43e2d6 100644 --- a/dbrepo-metadata-service/test/pom.xml +++ b/dbrepo-metadata-service/test/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.7.0</version> + <version>1.7.1</version> </parent> <artifactId>dbrepo-metadata-service-test</artifactId> <name>dbrepo-metadata-service-test</name> - <version>1.7.0</version> + <version>1.7.1</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java index 1f4cc4e6691c5108f2fb61e806dc9e488b926f68..490c902295d9c50977caa0ab2b66a462ba6d514b 100644 --- a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java +++ b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java @@ -6201,6 +6201,10 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_1_DTO = IdentifierDto.builder() .id(IDENTIFIER_1_ID) .databaseId(DATABASE_1_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_1_ID) + .selfHtml("/pid/" + IDENTIFIER_1_ID) + .build()) .queryId(QUERY_1_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_1_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1_DTO, IDENTIFIER_1_TITLE_2_DTO))) @@ -6488,6 +6492,11 @@ public abstract class BaseTest { .id(IDENTIFIER_5_ID) .databaseId(DATABASE_2_ID) .queryId(QUERY_2_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_5_ID) + .selfHtml("/pid/" + IDENTIFIER_5_ID) + .data("/api/database/" + DATABASE_2_ID + "/subset/" + QUERY_2_ID + "/data") + .build()) .descriptions(new LinkedList<>(List.of(IDENTIFIER_5_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_5_TITLE_1_DTO))) .doi(IDENTIFIER_5_DOI) @@ -6769,6 +6778,11 @@ public abstract class BaseTest { .id(IDENTIFIER_6_ID) .databaseId(DATABASE_3_ID) .queryId(QUERY_3_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_6_ID) + .selfHtml("/pid/" + IDENTIFIER_6_ID) + .data("/api/database/" + DATABASE_3_ID + "/subset/" + QUERY_3_ID + "/data") + .build()) .descriptions(new LinkedList<>(List.of(IDENTIFIER_6_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_6_TITLE_1_DTO))) .doi(IDENTIFIER_6_DOI) @@ -6878,6 +6892,10 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_7_DTO = IdentifierDto.builder() .id(IDENTIFIER_7_ID) .databaseId(DATABASE_4_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_7_ID) + .selfHtml("/pid/" + IDENTIFIER_7_ID) + .build()) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_7_DOI) @@ -6986,6 +7004,11 @@ public abstract class BaseTest { .id(IDENTIFIER_2_ID) .queryId(QUERY_1_ID) .databaseId(DATABASE_1_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_2_ID) + .selfHtml("/pid/" + IDENTIFIER_2_ID) + .data("/api/database/" + DATABASE_1_ID + "/subset/" + QUERY_1_ID + "/data") + .build()) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_2_DOI) @@ -7085,6 +7108,11 @@ public abstract class BaseTest { .id(IDENTIFIER_3_ID) .databaseId(DATABASE_1_ID) .viewId(VIEW_1_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_3_ID) + .selfHtml("/pid/" + IDENTIFIER_3_ID) + .data("/api/database/" + DATABASE_1_ID + "/view/" + VIEW_1_ID + "/data") + .build()) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_3_DOI) @@ -7185,6 +7213,11 @@ public abstract class BaseTest { .id(IDENTIFIER_4_ID) .databaseId(DATABASE_1_ID) .tableId(TABLE_1_ID) + .links(LinksDto.builder() + .self("/api/identifier/" + IDENTIFIER_4_ID) + .selfHtml("/pid/" + IDENTIFIER_4_ID) + .data("/api/database/" + DATABASE_1_ID + "/table/" + TABLE_1_ID + "/data") + .build()) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_4_DOI) diff --git a/dbrepo-search-service/Pipfile b/dbrepo-search-service/Pipfile index 6284708cc1d7f99f10843ad47c05b35a25916bf4..605020f3ef6702ee9706a3cd87d34c3ad90cd424 100644 --- a/dbrepo-search-service/Pipfile +++ b/dbrepo-search-service/Pipfile @@ -18,7 +18,7 @@ jwt = "~=1.3" testcontainers-opensearch = "*" pytest = "*" rdflib = "*" -dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.1.tar.gz"} gunicorn = "*" [dev-packages] diff --git a/dbrepo-search-service/Pipfile.lock b/dbrepo-search-service/Pipfile.lock index 10925ebd2c296a21a9144c85d7dc5424e61c2296..e520c5d0f8890461117ca6d7ab6645de932c2261 100644 --- a/dbrepo-search-service/Pipfile.lock +++ b/dbrepo-search-service/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "30aa6fefdbdbb9f57d58ebc8660eee64445a831cea44c6ca1fa605f2a2e1adc3" + "sha256": "26523c9bb9e0fc013fddc72cf725c325312b536cb9ea8440b3870b9ebd263b7b" }, "pipfile-spec": 6, "requires": { @@ -18,11 +18,11 @@ "default": { "aiohappyeyeballs": { "hashes": [ - "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1", - "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0" + "sha256:19728772cb12263077982d2f55453babd8bec6a052a926cd5c0c42796da8bf62", + "sha256:6cac4f5dd6e34a9644e69cf9021ef679e4394f54e58a183056d12009e42ea9e3" ], "markers": "python_version >= '3.9'", - "version": "==2.4.6" + "version": "==2.4.8" }, "aiohttp": { "hashes": [ @@ -373,9 +373,9 @@ }, "dbrepo": { "hashes": [ - "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" + "sha256:e70ea4f7030191eb80116e5d0a4b17b041c94c80359d5d8e707d62218edd9a54" ], - "path": "./lib/dbrepo-1.7.0.tar.gz" + "path": "./lib/dbrepo-1.7.1.tar.gz" }, "docker": { "hashes": [ diff --git a/dbrepo-search-service/init/Pipfile b/dbrepo-search-service/init/Pipfile index fb1215f57667a4a54c344b54b047ebb4b00e8ad9..9a5559cf98006683941ab9dbf7bfe2309c43adcb 100644 --- a/dbrepo-search-service/init/Pipfile +++ b/dbrepo-search-service/init/Pipfile @@ -9,7 +9,7 @@ opensearch-py = "~=2.2" python-dotenv = "~=1.0" testcontainers-opensearch = "*" pytest = "*" -dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.1.tar.gz"} rdflib = "*" [dev-packages] diff --git a/dbrepo-search-service/init/Pipfile.lock b/dbrepo-search-service/init/Pipfile.lock index dd9eaacb19ded48cc4d82a416b6b4c7d94ded1b9..7e637809c29b2223d18dc64896ae84432efbf7c5 100644 --- a/dbrepo-search-service/init/Pipfile.lock +++ b/dbrepo-search-service/init/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f2b08da6e7efe0ce8db0dd5a4a7d2ba9b2992b391f191cf60db744d0e353f614" + "sha256": "ed0f513080ab2ba2ac3f24121f21348ea1265e6722066cb6d9a0240fae2e76ae" }, "pipfile-spec": 6, "requires": { @@ -18,11 +18,11 @@ "default": { "aiohappyeyeballs": { "hashes": [ - "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1", - "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0" + "sha256:19728772cb12263077982d2f55453babd8bec6a052a926cd5c0c42796da8bf62", + "sha256:6cac4f5dd6e34a9644e69cf9021ef679e4394f54e58a183056d12009e42ea9e3" ], "markers": "python_version >= '3.9'", - "version": "==2.4.6" + "version": "==2.4.8" }, "aiohttp": { "hashes": [ @@ -259,9 +259,9 @@ }, "dbrepo": { "hashes": [ - "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" + "sha256:e70ea4f7030191eb80116e5d0a4b17b041c94c80359d5d8e707d62218edd9a54" ], - "path": "./lib/dbrepo-1.7.0.tar.gz" + "path": "./lib/dbrepo-1.7.1.tar.gz" }, "docker": { "hashes": [ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl deleted file mode 100644 index b58eb4bc6134164a5c99959cc35adc1160bdeff4..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz b/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz deleted file mode 100644 index 56e2f0cd8d4a18039de95dbecfeafe997baab3ce..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.1-py3-none-any.whl b/dbrepo-search-service/init/lib/dbrepo-1.7.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..61f52896c18ecbec8090177b38b8dbaeb0e1a95e Binary files /dev/null and b/dbrepo-search-service/init/lib/dbrepo-1.7.1-py3-none-any.whl differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.1.tar.gz b/dbrepo-search-service/init/lib/dbrepo-1.7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6708e1d892771d6cdf9293a6e9f5197f4dd9e304 Binary files /dev/null and b/dbrepo-search-service/init/lib/dbrepo-1.7.1.tar.gz differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl deleted file mode 100644 index b58eb4bc6134164a5c99959cc35adc1160bdeff4..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz b/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz deleted file mode 100644 index 56e2f0cd8d4a18039de95dbecfeafe997baab3ce..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.1-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.7.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..61f52896c18ecbec8090177b38b8dbaeb0e1a95e Binary files /dev/null and b/dbrepo-search-service/lib/dbrepo-1.7.1-py3-none-any.whl differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.1.tar.gz b/dbrepo-search-service/lib/dbrepo-1.7.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6708e1d892771d6cdf9293a6e9f5197f4dd9e304 Binary files /dev/null and b/dbrepo-search-service/lib/dbrepo-1.7.1.tar.gz differ diff --git a/dbrepo-storage-service/init/init.sh b/dbrepo-storage-service/init/init.sh index 50ead671dba3a1f2058ee861e0d8569dc43f167f..91a1c41aada823caf661380b765c9fbcd709ad8f 100644 --- a/dbrepo-storage-service/init/init.sh +++ b/dbrepo-storage-service/init/init.sh @@ -9,4 +9,9 @@ use_https = False # Enable S3 v4 signature APIs signature_v2 = False EOF +s3cmd --config=/app/config/.s3cfg ls | grep "s3://${S3_BUCKET}" +if s3cmd --config=/app/config/.s3cfg ls | grep -q "s3://${S3_BUCKET}"; then + echo "Bucket s3://${S3_BUCKET} already exists, skip." + exit 0 +fi s3cmd --config=/app/config/.s3cfg mb s3://${S3_BUCKET} \ No newline at end of file diff --git a/dbrepo-ui/composables/query-service.ts b/dbrepo-ui/composables/query-service.ts index 5a86c09d1b1b7017e362a62c0cc5df33c545fd6c..2b33fa8849c6d7bba4509720c2083f4d65562ff1 100644 --- a/dbrepo-ui/composables/query-service.ts +++ b/dbrepo-ui/composables/query-service.ts @@ -64,7 +64,7 @@ export const useQueryService = (): any => { } console.debug('export query with id', queryId, 'in database with id', databaseId) return new Promise<any>((resolve, reject) => { - axios.get<any>(`/api/database/${databaseId}/subset/${queryId}`, config) + axios.get<any>(`/api/database/${databaseId}/subset/${queryId}/data`, config) .then((response) => { console.info('Exported query with id', queryId, 'in database with id', databaseId) resolve(response.data) diff --git a/dbrepo-ui/composables/table-service.ts b/dbrepo-ui/composables/table-service.ts index 45ee0a7b934cb92c2d275b3cb1a23738d4fc0809..c9dfeb62fcd42c603ef86d67b52332fea04ac2a2 100644 --- a/dbrepo-ui/composables/table-service.ts +++ b/dbrepo-ui/composables/table-service.ts @@ -132,7 +132,7 @@ export const useTableService = (): any => { } console.debug('export data for table with id', tableId, 'in database with id', databaseId); return new Promise<QueryResultDto>((resolve, reject) => { - axios.get<QueryResultDto>(`/api/database/${databaseId}/table/${tableId}/export`, config) + axios.get<QueryResultDto>(`/api/database/${databaseId}/table/${tableId}/data`, config) .then((response) => { console.info('Exported data for table') resolve(response.data) diff --git a/dbrepo-ui/composables/view-service.ts b/dbrepo-ui/composables/view-service.ts index 9029a553ac782248d33707380f2ed72efcfc8032..3e775e2b14d51b83c7332bf7311de99a7a25d24e 100644 --- a/dbrepo-ui/composables/view-service.ts +++ b/dbrepo-ui/composables/view-service.ts @@ -114,7 +114,7 @@ export const useViewService = (): any => { } console.debug('export data for view with id', viewId, 'in database with id', databaseId); return new Promise<QueryResultDto>((resolve, reject) => { - axios.get<QueryResultDto>(`/api/database/${databaseId}/view/${viewId}/export`, config) + axios.get<QueryResultDto>(`/api/database/${databaseId}/view/${viewId}/data`, config) .then((response) => { console.info('Exported data for view with id', viewId, 'in database with id', databaseId) resolve(response.data) diff --git a/dbrepo-ui/pages/database/[database_id]/subset/index.vue b/dbrepo-ui/pages/database/[database_id]/subset/index.vue index d98a8ba2afc6f26466c50e31acfc10ed0f32acd3..d7127d90af180e7f70f497bbdeae395de5fe776a 100644 --- a/dbrepo-ui/pages/database/[database_id]/subset/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/subset/index.vue @@ -1,6 +1,6 @@ <template> <div - v-if="canViewSchema"> + v-if="canView"> <DatabaseToolbar /> <SubsetList /> <v-breadcrumbs :items="items" class="pa-0 mt-2" /> @@ -42,11 +42,11 @@ export default { access () { return this.cacheStore.getAccess }, - canViewSchema () { + canView () { if (!this.database) { return false } - if (this.database.is_schema_public) { + if (this.database.is_public || this.database.is_schema_public) { return true } if (!this.access) { diff --git a/dbrepo-ui/pages/database/[database_id]/table/index.vue b/dbrepo-ui/pages/database/[database_id]/table/index.vue index c2a2b76206918a0882c7e041aa3f38fb19ccfe12..2ff2a96a81cf9f13ff37d45c6440c0697f167f12 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/index.vue @@ -1,6 +1,6 @@ <template> <div - v-if="canViewSchema"> + v-if="canView"> <DatabaseToolbar /> <v-window v-model="tab"> @@ -51,11 +51,11 @@ export default { access () { return this.cacheStore.getAccess }, - canViewSchema () { + canView () { if (!this.database) { return false } - if (this.database.is_schema_public) { + if (this.database.is_public || this.database.is_schema_public) { return true } const userService = useUserService() diff --git a/dbrepo-ui/pages/database/[database_id]/view/index.vue b/dbrepo-ui/pages/database/[database_id]/view/index.vue index b2a2c17a1afe0553777e21e593b8865bfb63efc9..0e452aaa61b3000a5b997add3e1f1ef498a40a3a 100644 --- a/dbrepo-ui/pages/database/[database_id]/view/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/view/index.vue @@ -1,6 +1,6 @@ <template> <div - v-if="canViewSchema"> + v-if="canView"> <DatabaseToolbar /> <v-window v-model="tab"> @@ -51,11 +51,11 @@ export default { access () { return this.cacheStore.getAccess }, - canViewSchema () { + canView () { if (!this.database) { return false } - if (this.database.is_schema_public) { + if (this.database.is_public || this.database.is_schema_public) { return true } const userService = useUserService() diff --git a/docker-compose.yml b/docker-compose.yml index 8f0d77334e466a512a7bd66d438a61f1149c5ddc..84905a7d057f6ea27dae62f7402eaa53f0d92cb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,9 @@ services: ports: - "8080:8080" environment: + LDAP_ROOT: "${IDENTITY_SERVICE_ROOT:-dc=dbrepo,dc=at}" + LDAP_ADMIN_DN: "${IDENTITY_SERVICE_ADMIN_DN:-cn=admin,dc=dbrepo,dc=at}" + LDAP_ADMIN_PASSWORD: "${IDENTITY_SERVICE_ADMIN_PASSWORD:-admin}" KEYCLOAK_ENABLE_HEALTH_ENDPOINTS: "true" KEYCLOAK_ENABLE_HTTPS: "false" KEYCLOAK_ENABLE_STATISTICS: "true" @@ -536,6 +539,7 @@ services: AUTH_SERVICE_CLIENT: "${AUTH_SERVICE_CLIENT:-dbrepo-client}" AUTH_SERVICE_CLIENT_SECRET: "${AUTH_SERVICE_CLIENT:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG}" AUTH_SERVICE_ENDPOINT: "${AUTH_SERVICE_ENDPOINT:-http://auth-service:8080}" + BASE_URL: "${BASE_URL:-http://localhost}" BROKER_EXCHANGE_NAME: "${BROKER_EXCHANGE_NAME:-dbrepo}" BROKER_QUEUE_NAME: "${BROKER_QUEUE_NAME:-dbrepo}" BROKER_HOST: "${BROKER_ENDPOINT:-broker-service}" diff --git a/helm/dbrepo/Chart.yaml b/helm/dbrepo/Chart.yaml index 6af1965b3f2f93250717913ce464ca975decc341..ddcbbcc3431d01f7d52cc435a2261b0800677d2a 100644 --- a/helm/dbrepo/Chart.yaml +++ b/helm/dbrepo/Chart.yaml @@ -7,8 +7,8 @@ description: Helm Chart for installing DBRepo sources: - https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services type: application -version: "1.7.0" -appVersion: "1.7.0" +version: "1.7.1" +appVersion: "1.7.1" keywords: - dbrepo maintainers: diff --git a/helm/dbrepo/README.md b/helm/dbrepo/README.md index c827d39943f2ce3b2cb262abee51842f4a572d74..a1ba96733100f8b70c22c2764ae5d48486466a74 100644 --- a/helm/dbrepo/README.md +++ b/helm/dbrepo/README.md @@ -11,7 +11,7 @@ sample [ for your deployment and update the variables, especially `hostname`. ```bash -helm install my-release "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" --values ./values.yaml --version "1.7.0" +helm install my-release "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" --values ./values.yaml --version "1.7.1" ``` ## Prerequisites @@ -34,7 +34,7 @@ variable when you increase the available Pod memory for performance. To install the chart with the release name `my-release`: ```bash -helm install my-release "oci://oci://registry.datalab.tuwien.ac.at/dbrepo/helm" --values ./values.yaml --version "1.7.0" +helm install my-release "oci://oci://registry.datalab.tuwien.ac.at/dbrepo/helm" --values ./values.yaml --version "1.7.1" ``` The command deploys DBRepo on the Kubernetes cluster in the default configuration. The Parameters section lists the @@ -98,7 +98,7 @@ The command removes all the Kubernetes components associated with the chart and | `authservice.resourcesPreset` | The container resource presets | `small` | | `authservice.jwt.pubkey` | The JWT public key from the `dbrepo-client`. | `MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQAB` | | `authservice.tls.enabled` | Enable TLS/SSL communication. Required for HTTPS. | `true` | -| `authservice.tls.existingSecret` | The secret containing the `tls.crt`, `tls.key` and `ca.crt`. | `ingress-cert` | +| `authservice.tls.existingSecret` | The secret containing the `tls.crt`, `tls.key` and `ca.crt`. | `auth-service-secret` | | `authservice.client.id` | The client id for the microservices. | `dbrepo-client` | | `authservice.client.secret` | The client secret for the microservices. | `MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG` | | `authservice.setupJob.resourcesPreset` | The container resource preset | `nano` | diff --git a/helm/dbrepo/charts/seaweedfs-4.2.1.tgz b/helm/dbrepo/charts/seaweedfs-4.2.1.tgz index e978b16ed1a15b9e052e68c9306005164219b311..b26358e59779d3206d9c834f59b08e7f2f84149b 100644 Binary files a/helm/dbrepo/charts/seaweedfs-4.2.1.tgz and b/helm/dbrepo/charts/seaweedfs-4.2.1.tgz differ diff --git a/helm/dbrepo/files/create-event-listener.jar b/helm/dbrepo/files/create-event-listener.jar index e95a1e41f167192c570fe210667a3fe5dac77305..72d17863f14cc38c1fd026dd7e40e56a25fc4318 100644 Binary files a/helm/dbrepo/files/create-event-listener.jar and b/helm/dbrepo/files/create-event-listener.jar differ diff --git a/helm/dbrepo/files/dbrepo-realm.json b/helm/dbrepo/files/dbrepo-realm.json new file mode 100644 index 0000000000000000000000000000000000000000..7453ef4e4d3c2485a61ba2ffc50327ab10a809f0 --- /dev/null +++ b/helm/dbrepo/files/dbrepo-realm.json @@ -0,0 +1,3224 @@ +{ + "id" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "realm" : "dbrepo", + "notBefore" : 0, + "defaultSignatureAlgorithm" : "RS256", + "revokeRefreshToken" : false, + "refreshTokenMaxReuse" : 1, + "accessTokenLifespan" : 900, + "accessTokenLifespanForImplicitFlow" : 900, + "ssoSessionIdleTimeout" : 864000, + "ssoSessionMaxLifespan" : 2592000, + "ssoSessionIdleTimeoutRememberMe" : 0, + "ssoSessionMaxLifespanRememberMe" : 0, + "offlineSessionIdleTimeout" : 2592000, + "offlineSessionMaxLifespanEnabled" : false, + "offlineSessionMaxLifespan" : 5184000, + "clientSessionIdleTimeout" : 0, + "clientSessionMaxLifespan" : 0, + "clientOfflineSessionIdleTimeout" : 0, + "clientOfflineSessionMaxLifespan" : 0, + "accessCodeLifespan" : 60, + "accessCodeLifespanUserAction" : 300, + "accessCodeLifespanLogin" : 1800, + "actionTokenGeneratedByAdminLifespan" : 43200, + "actionTokenGeneratedByUserLifespan" : 1800, + "oauth2DeviceCodeLifespan" : 600, + "oauth2DevicePollingInterval" : 5, + "enabled" : true, + "sslRequired" : "none", + "registrationAllowed" : true, + "registrationEmailAsUsername" : false, + "rememberMe" : false, + "verifyEmail" : true, + "loginWithEmailAllowed" : false, + "duplicateEmailsAllowed" : false, + "resetPasswordAllowed" : false, + "editUsernameAllowed" : false, + "bruteForceProtected" : true, + "permanentLockout" : false, + "maxTemporaryLockouts" : 0, + "bruteForceStrategy" : "MULTIPLE", + "maxFailureWaitSeconds" : 900, + "minimumQuickLoginWaitSeconds" : 60, + "waitIncrementSeconds" : 60, + "quickLoginCheckMilliSeconds" : 1, + "maxDeltaTimeSeconds" : 1036800, + "failureFactor" : 10, + "roles" : { + "realm" : [ { + "id" : "48f38342-1e3f-427a-995d-c436eaee65cb", + "name" : "default-user-handling", + "description" : "${default-user-handling}", + "composite" : true, + "composites" : { + "realm" : [ "modify-user-theme", "modify-user-information" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "9bb4a8dc-28e0-4645-b62f-cc94425f0cb0", + "name" : "default-maintenance-handling", + "description" : "${default-maintenance-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-maintenance-message", "find-maintenance-message", "update-maintenance-message", "delete-maintenance-message", "list-maintenance-messages" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "74648f9a-777e-4ef9-b97b-4c5d749d862f", + "name" : "update-search-index", + "description" : "${update-search-index}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "22492b64-c633-48a0-9678-b28669f2885b", + "name" : "execute-semantic-query", + "description" : "${execute-semantic-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "4ed919fa-edc5-44e5-9411-607786e4a86d", + "name" : "view-table-history", + "description" : "${view-table-history}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fe4a01f3-6590-4df6-9ade-5a9c1fae4736", + "name" : "create-semantic-unit", + "description" : "${create-semantic-unit}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "be4e1aba-e276-4241-b6ea-01dce6c52f8b", + "name" : "find-container", + "description" : "${find-container}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "3a801b48-f3c2-4bc6-aa25-c7a91d5b32a7", + "name" : "default-researcher-roles", + "description" : "${default-researcher-roles}", + "composite" : true, + "composites" : { + "realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-storage-roles", "default-view-handling" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "3d8104fb-8307-40f0-b4b2-c3e518957110", + "name" : "view-table-data", + "description" : "${view-table-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fe71b907-7020-44ab-9964-da2b87264582", + "name" : "create-database", + "description" : "${create-database}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e51b63c2-48dd-4bd6-95fb-d257d21b26ba", + "name" : "import-database-data", + "description" : "${import-database-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "1f0a9b13-c2b8-474c-bc08-59dbd71835a6", + "name" : "modify-database-image", + "description" : "${modify-database-image}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a7ad038c-5c06-42fc-951c-15ac09d4df66", + "name" : "modify-database-owner", + "description" : "${modify-database-owner}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "22449528-00c9-4e86-9400-4b8ae6fd8f4d", + "name" : "modify-view-visibility", + "description" : "${modify-view-visibility}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "c12c1f4e-186f-4153-a795-26e79fb623d6", + "name" : "create-ontology", + "description" : "${create-ontology}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b60a5694-4099-4f7d-a7e9-4c433e0eb9c9", + "name" : "update-semantic-unit", + "description" : "${update-semantic-unit}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "535f1484-4514-4d24-8d97-e3f6c11a426b", + "name" : "create-container", + "description" : "${create-container}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e1383fb7-d54c-4732-9146-93030eb2ca50", + "name" : "escalated-query-handling", + "description" : "${escalated-query-handling}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e4cfdc4d-2373-477b-a8df-161db99aba00", + "name" : "create-foreign-identifier", + "description" : "${create-foreign-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "be051d45-cd74-4b13-8a45-f2d3351bd995", + "name" : "table-semantic-analyse", + "description" : "${table-semantic-analyse}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "272a79a7-e282-4261-8f7d-5d5d1364243a", + "name" : "update-maintenance-message", + "description" : "${update-maintenance-message}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b05e9b2b-748d-490b-949b-e78655bf7805", + "name" : "check-foreign-database-access", + "description" : "${check-foreign-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "c047d521-cec3-4444-86c4-aef098489b7b", + "name" : "delete-maintenance-message", + "description" : "${delete-maintenance-message}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76", + "name" : "update-database-view", + "description" : "${update-database-view}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "88f82262-be80-4d18-9fb4-5529da031f33", + "name" : "system", + "description" : "${system}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e14ab76b-1c24-484d-ae2d-478b8457edea", + "name" : "list-licenses", + "description" : "${list-licenses}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd", + "name" : "modify-foreign-table-column-semantics", + "description" : "${modify-foreign-table-column-semantics}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8", + "name" : "list-database-views", + "description" : "${list-database-views}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", + "name" : "default-roles-dbrepo", + "description" : "${role_default-roles}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443", + "name" : "update-ontology", + "description" : "${update-ontology}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d", + "name" : "export-query-data", + "description" : "${export-query-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a", + "name" : "default-broker-handling", + "description" : "${default-broker-handling}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "71874bde-64a5-4a69-8685-d8998303a80c", + "name" : "delete-table-data", + "description" : "${delete-table-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829", + "name" : "delete-container", + "description" : "${delete-container}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e", + "name" : "list-containers", + "description" : "${list-containers}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7", + "name" : "list-identifiers", + "description" : "${list-identifiers}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e", + "name" : "create-semantic-concept", + "description" : "${create-semantic-concept}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5", + "name" : "insert-table-data", + "description" : "${insert-table-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a0942e33-441b-4343-9f02-4353d03f7bbb", + "name" : "find-database", + "description" : "${find-database}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "7f3652c7-3073-4566-ab63-25385495ebc3", + "name" : "modify-database-visibility", + "description" : "${modify-database-visibility}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1", + "name" : "create-table", + "description" : "${create-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8", + "name" : "find-foreign-user", + "description" : "${find-foreign-user}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b", + "name" : "modify-identifier-metadata", + "description" : "${modify-identifier-metadata}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "64c2b8f2-1527-4928-81ea-b2651512d028", + "name" : "delete-ontology", + "description" : "${delete-ontology}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c", + "name" : "check-database-access", + "description" : "${check-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a", + "name" : "modify-user-information", + "description" : "${modify-user-information}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "ba1ad8f2-39aa-487d-987f-645e8a459559", + "name" : "delete-table", + "description" : "${delete-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501", + "name" : "update-database-access", + "description" : "${update-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6f044bad-6651-4408-bffa-20c2d8f92eee", + "name" : "create-identifier", + "description" : "${create-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "be91195a-e30a-4d15-a8da-0aca0a68782f", + "name" : "escalated-table-handling", + "description" : "${escalated-table-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-foreign-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c", + "name" : "re-execute-query", + "description" : "${re-execute-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c", + "name" : "default-system-roles", + "description" : "${default-system-roles}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "default-storage-roles", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "143ba359-5fa2-451e-8296-43ecf20bb251", + "name" : "update-semantic-concept", + "description" : "${update-semantic-concept}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c", + "name" : "escalated-container-handling", + "description" : "${escalated-container-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-container", "delete-container" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe", + "name" : "list-tables", + "description" : "${list-tables}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3", + "name" : "default-database-handling", + "description" : "${default-database-handling}", + "composite" : true, + "composites" : { + "realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d89a2881-b642-4abb-b990-196e71372f6b", + "name" : "default-table-handling", + "description" : "${default-table-handling}", + "composite" : true, + "composites" : { + "realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44", + "name" : "create-database-view", + "description" : "${create-database-view}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7", + "name" : "default-semantics-handling", + "description" : "${default-semantics-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8", + "name" : "update-table-statistic", + "description" : "${update-table-statistic}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a", + "name" : "escalated-user-handling", + "description" : "${escalated-user-handling}", + "composite" : true, + "composites" : { + "realm" : [ "find-user" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e9854bbb-4580-4757-b1ae-305934173249", + "name" : "create-database-access", + "description" : "${create-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e", + "name" : "list-databases", + "description" : "${list-databases}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a", + "name" : "default-view-handling", + "description" : "${default-view-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558", + "name" : "create-maintenance-message", + "description" : "${create-maintenance-message}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "973f0999-cc70-4b28-9f43-979c470bea8e", + "name" : "default-data-steward-roles", + "description" : "${default-data-steward-roles}", + "composite" : true, + "composites" : { + "realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling", "default-storage-roles" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2", + "name" : "find-user", + "description" : "${find-user}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df", + "name" : "escalated-semantics-handling", + "description" : "${escalated-semantics-handling}", + "composite" : true, + "composites" : { + "realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "09147c48-273b-450b-8b11-7ef9b9245244", + "name" : "export-table-data", + "description" : "${export-table-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d14af590-60a8-4d75-b864-40ee0165bd7f", + "name" : "delete-database-access", + "description" : "${delete-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77", + "name" : "update-table", + "description" : "${update-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "64c16bfb-2015-48ad-a23f-637ff24419cb", + "name" : "default-query-handling", + "description" : "${default-query-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b372f8f7-d203-4293-b991-ad93fb505917", + "name" : "escalated-database-handling", + "description" : "${escalated-database-handling}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "3293799a-82b9-4f47-8f25-1aad2e0222fd", + "name" : "find-identifier", + "description" : "${find-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "aaa3f804-38a0-4474-b8e9-f1020c4b3f62", + "name" : "list-queries", + "description" : "${list-queries}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "11f7973e-d1eb-42cb-a35d-c59dfc122775", + "name" : "modify-user-theme", + "description" : "${modify-user-theme}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "da493b7e-fb9b-43ca-82a5-e274ad2e6b39", + "name" : "find-query", + "description" : "${find-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a4d4a788-ebcf-4d32-baed-4a85616ca037", + "name" : "escalated-identifier-handling", + "description" : "${escalated-identifier-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-foreign-identifier", "modify-identifier-metadata" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "ea38d69d-17b8-4c65-95e8-1c3501b83618", + "name" : "default-container-handling", + "description" : "${default-container-handling}", + "composite" : true, + "composites" : { + "realm" : [ "find-container" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "8b8813e0-af07-4d04-a8c1-e3f37192bace", + "name" : "publish-identifier", + "description" : "${publish-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "7c0306fc-3b03-4c64-87d1-9a34f2073977", + "name" : "modify-table-column-semantics", + "description" : "${modify-table-column-semantics}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "795c7bb8-3502-414a-a97b-2ba1cfd6a79c", + "name" : "persist-query", + "description" : "${persist-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e4bfaf36-9a5d-43e0-9fa3-0f4ea7bad8d0", + "name" : "default-developer-roles", + "description" : "${default-developer-roles}", + "composite" : true, + "composites" : { + "realm" : [ "escalated-query-handling", "escalated-broker-handling", "escalated-database-handling", "default-query-handling", "default-user-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling", "default-storage-roles", "default-table-handling", "default-container-handling", "default-database-handling", "default-maintenance-handling" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "674ea174-a165-441e-a01c-6b0010354474", + "name" : "upload-file", + "description" : "${upload-file}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6a0bb740-4448-49be-aee8-6dd183325be5", + "name" : "delete-foreign-table", + "description" : "${delete-foreign-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "4a5df51d-f14d-41a2-ad70-6521df5a5b4f", + "name" : "offline_access", + "description" : "${role_offline-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fd41c4c3-d2f8-4f49-84c7-dba84e9a5575", + "name" : "execute-query", + "description" : "${execute-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d6e38368-b40f-423b-82e4-e8aa595237c9", + "name" : "find-maintenance-message", + "description" : "${find-maintenance-message}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "74013867-e426-46cc-ab98-2f4a9225ad1e", + "name" : "find-table", + "description" : "${find-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "c367241f-b5b5-491f-84d5-07fe1bef3877", + "name" : "default-identifier-handling", + "description" : "${default-identifier-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-identifier", "list-identifiers", "create-identifier", "find-identifier", "publish-identifier" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "09f7bdb0-296f-46c8-a3a3-8f9254fb17e4", + "name" : "list-maintenance-messages", + "description" : "${list-maintenance-messages}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f43e86ed-76de-4ca8-9b5e-c292c9359bfe", + "name" : "escalated-broker-handling", + "description" : "${escalated-broker-handling}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "916b1e65-f60c-42cd-96e4-5c98ffc1ba3c", + "name" : "uma_authorization", + "description" : "${role_uma_authorization}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d1afa3ed-bf4f-469a-a061-ad7325fb8d9e", + "name" : "delete-database-view", + "description" : "${delete-database-view}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "98bee7d6-d78c-4e7f-b6a3-3705968b248c", + "name" : "list-ontologies", + "description" : "${list-ontologies}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a4645bb5-e0b8-43a7-9a76-21ac252a0ac1", + "name" : "default-storage-roles", + "description" : "${default-storage-roles}", + "composite" : true, + "composites" : { + "realm" : [ "upload-file" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a9b5181a-8135-41d3-9862-ef80af42211d", + "name" : "delete-identifier", + "description" : "${delete-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "469c2e63-cda6-48d4-ab8f-eb59a2c69798", + "name" : "find-database-view", + "description" : "${find-database-view}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + } ], + "client" : { + "realm-management" : [ { + "id" : "4628f654-f8f3-483b-8f92-2a7fc5930b14", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "95c2cc47-12f5-4d73-8b74-67e270c45ade", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "824791f3-c345-42f8-b103-b7e6d7e40114", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "1f840202-b7e2-4195-bac9-64e64dad2037", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "3c32c096-bb13-44c9-a080-d756a48a9ea3", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "e4b85a68-7f31-4fcf-89a2-f10d7df358e9", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "7d317752-ae56-46f2-a2ce-67c64d1b35f6", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-users", "query-groups" ] + } + }, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "28824208-976e-4622-b4d7-3d18efbb46fa", + "name" : "realm-admin", + "description" : "${role_realm-admin}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-realms", "manage-authorization", "manage-identity-providers", "view-identity-providers", "query-clients", "view-authorization", "view-users", "manage-users", "view-realm", "query-users", "view-clients", "create-client", "query-groups", "impersonation", "manage-clients", "manage-events", "view-events", "manage-realm" ] + } + }, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "57e846a2-930d-4621-819d-c35086507146", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "7fad9cde-bf96-475a-9174-14a87da51f95", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "bbcac294-d78a-4ea1-a4bf-0384266d2fe1", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "480e1437-ab9e-47de-b47a-edc6b6e285de", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "b9a9a8f5-f91e-4e73-9e88-1cdf42bd49f9", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "4d1397fb-247c-436f-b26f-124cd89afb08", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "e31f522b-b283-4ae1-b875-52afcd98b1d2", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "51822d02-fa28-4a49-89da-bc534719d8a8", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "b2743ce5-0ce8-4157-ae00-f693560f0b39", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "7ea3d7e0-9bf4-438a-b773-243daf622aaa", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + }, { + "id" : "fb73f6f5-0ed5-41d0-852c-0eb3b195b15a", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "attributes" : { } + } ], + "security-admin-console" : [ ], + "dbrepo-client" : [ ], + "admin-cli" : [ ], + "rabbitmq-client" : [ ], + "account-console" : [ ], + "broker" : [ { + "id" : "de0cfd5e-c2fe-4082-ac39-e3b092139a0f", + "name" : "read-token", + "description" : "${role_read-token}", + "composite" : false, + "clientRole" : true, + "containerId" : "88694c91-753d-4c44-9740-ec9ac06bba45", + "attributes" : { } + } ], + "account" : [ { + "id" : "acd78c04-eefc-4344-a5b4-3fc83d848936", + "name" : "delete-account", + "description" : "${role_delete-account}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "939be844-8c49-45b3-9ca1-4b10a454b346", + "name" : "view-profile", + "description" : "${role_view-profile}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "e52fdf00-3e73-4c17-bc1c-643493710a6b", + "name" : "view-applications", + "description" : "${role_view-applications}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "b02a822e-a708-420a-bddc-1a315033fd7c", + "name" : "view-consent", + "description" : "${role_view-consent}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "c590e5f5-2cbf-4151-b1dc-96c454f1f654", + "name" : "view-groups", + "description" : "${role_view-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "15974151-6c13-426b-8cc3-7683dd1311e1", + "name" : "manage-account-links", + "description" : "${role_manage-account-links}", + "composite" : false, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "c12d8d94-c2df-498e-bbe4-2f934a83ae92", + "name" : "manage-consent", + "description" : "${role_manage-consent}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "view-consent" ] + } + }, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + }, { + "id" : "55f85811-bded-4d6b-8f7b-45844b963875", + "name" : "manage-account", + "description" : "${role_manage-account}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "manage-account-links" ] + } + }, + "clientRole" : true, + "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "attributes" : { } + } ] + } + }, + "groups" : [ { + "id" : "f2ce17fe-7b15-47a4-bbf8-86f415298fa9", + "name" : "data-stewards", + "path" : "/data-stewards", + "subGroups" : [ ], + "attributes" : { }, + "realmRoles" : [ "default-data-steward-roles" ], + "clientRoles" : { } + }, { + "id" : "124d9888-0b6e-46aa-8225-077dcedaf16e", + "name" : "developers", + "path" : "/developers", + "subGroups" : [ ], + "attributes" : { }, + "realmRoles" : [ "default-developer-roles" ], + "clientRoles" : { } + }, { + "id" : "f467c38e-9041-4faa-ae0b-39cec65ff4db", + "name" : "researchers", + "path" : "/researchers", + "subGroups" : [ ], + "attributes" : { }, + "realmRoles" : [ "default-researcher-roles" ], + "clientRoles" : { } + }, { + "id" : "2b9f94b4-d434-4a98-8eab-25678cfee983", + "name" : "system", + "path" : "/system", + "subGroups" : [ ], + "attributes" : { }, + "realmRoles" : [ "default-system-roles" ], + "clientRoles" : { } + } ], + "defaultRole" : { + "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", + "name" : "default-roles-dbrepo", + "description" : "${role_default-roles}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0" + }, + "defaultGroups" : [ "/researchers" ], + "requiredCredentials" : [ "password" ], + "passwordPolicy" : "length(8) and maxLength(64) and specialChars(1) and lowerCase(1) and upperCase(1) and digits(1)", + "otpPolicyType" : "totp", + "otpPolicyAlgorithm" : "HmacSHA1", + "otpPolicyInitialCounter" : 0, + "otpPolicyDigits" : 6, + "otpPolicyLookAheadWindow" : 1, + "otpPolicyPeriod" : 30, + "otpPolicyCodeReusable" : false, + "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], + "localizationTexts" : { }, + "webAuthnPolicyRpEntityName" : "keycloak", + "webAuthnPolicySignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyRpId" : "", + "webAuthnPolicyAttestationConveyancePreference" : "not specified", + "webAuthnPolicyAuthenticatorAttachment" : "not specified", + "webAuthnPolicyRequireResidentKey" : "not specified", + "webAuthnPolicyUserVerificationRequirement" : "not specified", + "webAuthnPolicyCreateTimeout" : 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyAcceptableAaguids" : [ ], + "webAuthnPolicyExtraOrigins" : [ ], + "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyPasswordlessRpId" : "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", + "webAuthnPolicyPasswordlessCreateTimeout" : 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], + "webAuthnPolicyPasswordlessExtraOrigins" : [ ], + "scopeMappings" : [ { + "clientScope" : "rabbitmq.tag:administrator", + "roles" : [ "escalated-broker-handling" ] + }, { + "clientScope" : "rabbitmq.tag:management", + "roles" : [ "default-broker-handling" ] + } ], + "clientScopeMappings" : { + "account" : [ { + "client" : "account-console", + "roles" : [ "manage-account", "view-groups" ] + } ] + }, + "clients" : [ { + "id" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", + "clientId" : "account", + "name" : "${client_account}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/dbrepo/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/dbrepo/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "d3c4a04e-39ce-4549-a34a-11e25774cd96", + "clientId" : "account-console", + "name" : "${client_account-console}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/dbrepo/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/dbrepo/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "22d90d9c-9881-474c-8dfd-a62c808a9f1c", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "81ef0f59-a5ca-4be4-a1d1-0c32edf1cfd6", + "clientId" : "admin-cli", + "name" : "${client_admin-cli}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : false, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "client.use.lightweight.access.token.enabled" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "88694c91-753d-4c44-9740-ec9ac06bba45", + "clientId" : "broker", + "name" : "${client_broker}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "6b7ef364-4132-4831-b4e2-b6e9e9dc63ee", + "clientId" : "dbrepo-client", + "name" : "${dbrepo-client}", + "description" : "", + "rootUrl" : "", + "adminUrl" : "", + "baseUrl" : "", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : true, + "clientAuthenticatorType" : "client-secret", + "secret" : "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG", + "redirectUris" : [ "*" ], + "webOrigins" : [ "*" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : true, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "oidc.ciba.grant.enabled" : "false", + "client.secret.creation.time" : "1680085365", + "backchannel.logout.session.required" : "true", + "post.logout.redirect.uris" : "*", + "oauth2.device.authorization.grant.enabled" : "false", + "backchannel.logout.revoke.offline.tokens" : "false" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : -1, + "protocolMappers" : [ { + "id" : "266edf62-a19a-483b-b594-81428e4af792", + "name" : "orcid", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "ORCID", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "orcid", + "jsonType.label" : "String" + } + }, { + "id" : "1a21798a-38b6-4df5-89f0-86942415246f", + "name" : "theme", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "THEME", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "theme", + "jsonType.label" : "String" + } + }, { + "id" : "da0b27c1-ae2e-4baa-bf78-db233e15c78d", + "name" : "preferred_username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "preferred_username", + "userinfo.token.claim" : "true" + } + }, { + "id" : "1bc6a1f4-4be2-439c-8c7f-b3fb0bb9956a", + "name" : "affiliation", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "AFFILIATION", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "affiliation", + "jsonType.label" : "String" + } + }, { + "id" : "7cbf6dc6-653e-40a9-9974-0e5bf7a363c3", + "name" : "given name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "firstName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "given_name", + "jsonType.label" : "String" + } + }, { + "id" : "70bbd779-d085-4204-ac4b-3a40abab9d88", + "name" : "language", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "LANGUAGE", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "language", + "jsonType.label" : "String" + } + }, { + "id" : "9bdc3e60-09b8-4241-915e-29f083434026", + "name" : "provider", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "identity_provider", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "identity_provider", + "jsonType.label" : "String", + "access.tokenResponse.claim" : "false" + } + }, { + "id" : "e567cb5c-8856-4124-8b86-f19cd53d7c71", + "name" : "setup_finished", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "SETUP_FINISHED", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "setup_finished", + "jsonType.label" : "boolean" + } + }, { + "id" : "b817424d-7f91-43d8-b7d0-6a32582377fb", + "name" : "family name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "lastName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "family_name", + "jsonType.label" : "String" + } + }, { + "id" : "030a1cd9-53d1-4a62-a375-94d50a2dc6fc", + "name" : "uid", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "aggregate.attrs" : "false", + "multivalued" : "false", + "userinfo.token.claim" : "true", + "user.attribute" : "LDAP_ID", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "uid" + } + }, { + "id" : "c304ed2f-5952-4772-838d-91998a45f154", + "name" : "aud", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-hardcoded-claim-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "claim.value" : "account", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "aud", + "jsonType.label" : "String", + "access.tokenResponse.claim" : "false" + } + } ], + "defaultClientScopes" : [ "roles", "basic" ], + "optionalClientScopes" : [ "rabbitmq.read:*/*", "web-origins", "acr", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "attributes", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] + }, { + "id" : "25741f6b-4867-4138-8238-6345c6ba8702", + "clientId" : "rabbitmq-client", + "name" : "${rabbitmq-client}", + "description" : "", + "rootUrl" : "", + "adminUrl" : "", + "baseUrl" : "", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "secret" : "JEC2FexxrX4N65fLeDGukAl6R3Lc9y0u", + "redirectUris" : [ "*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : true, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "oidc.ciba.grant.enabled" : "false", + "client.secret.creation.time" : "1680000860", + "backchannel.logout.session.required" : "true", + "post.logout.redirect.uris" : "*", + "oauth2.device.authorization.grant.enabled" : "false", + "backchannel.logout.revoke.offline.tokens" : "false" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : -1, + "protocolMappers" : [ { + "id" : "01a937ed-f0e8-4137-80f3-3be3c447f7fb", + "name" : "username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "username", + "id.token.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "client_id", + "jsonType.label" : "String", + "userinfo.token.claim" : "false" + } + }, { + "id" : "f1afc22d-f595-403b-ba2e-6ab19d98205e", + "name" : "Audience", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-hardcoded-claim-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "aud", + "claim.value" : "rabbitmq", + "userinfo.token.claim" : "false", + "access.tokenResponse.claim" : "false" + } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "rabbitmq.tag:management", "basic" ], + "optionalClientScopes" : [ "rabbitmq.read:*/*", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "roles", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] + }, { + "id" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", + "clientId" : "realm-management", + "name" : "${client_realm-management}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "f205c451-9524-4380-acc3-947f7ecb6b7c", + "clientId" : "security-admin-console", + "name" : "${client_security-admin-console}", + "rootUrl" : "${authAdminUrl}", + "baseUrl" : "/admin/dbrepo/console/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/admin/dbrepo/console/*" ], + "webOrigins" : [ "+" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "client.use.lightweight.access.token.enabled" : "true", + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "c4d54410-3f22-4259-9571-94da2c43b752", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + } ], + "clientScopes" : [ { + "id" : "69f4ecf0-4165-49ab-bf0d-38409b15b706", + "name" : "rabbitmq.tag:administrator", + "description" : "administrator", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "gui.order" : "", + "consent.screen.text" : "" + } + }, { + "id" : "7f6e9b44-e2eb-417d-b0fe-db820c9a6564", + "name" : "email", + "description" : "OpenID Connect built-in scope: email", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${emailScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "782819fe-ba5d-4ddb-9f95-cabb69d79c8d", + "name" : "email verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "emailVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email_verified", + "jsonType.label" : "boolean", + "userinfo.token.claim" : "true" + } + }, { + "id" : "ca613fc8-bbf2-4240-8b33-a1874f1559f3", + "name" : "email", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "email", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "b9da268f-6745-49dc-a764-3c54e385accc", + "name" : "profile", + "description" : "OpenID Connect built-in scope: profile", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${profileScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "84f0487a-1d7d-470c-9b8e-5835294ae235", + "name" : "username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "preferred_username", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "bbdcdb36-3ec0-443d-b1af-9993d40f0567", + "name" : "gender", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "gender", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "gender", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "9faa870b-5491-4ce9-b27d-c9ce07d6a95e", + "name" : "birthdate", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "birthdate", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "birthdate", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "f0e3c012-9523-4076-83ae-e466e2d08220", + "name" : "full name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-full-name-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + }, { + "id" : "f757d8ec-e181-429c-9287-9ad0600b061f", + "name" : "profile", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "profile", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "profile", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "18cfbf4b-0a8e-45c7-a832-c0f72c92f3f3", + "name" : "updated at", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "updatedAt", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "updated_at", + "jsonType.label" : "long", + "userinfo.token.claim" : "true" + } + }, { + "id" : "841ea785-26ab-429a-a420-09ce3948924d", + "name" : "family name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "lastName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "family_name", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "bfba13ff-f952-4e89-bbb1-a693fdebfae8", + "name" : "website", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "website", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "website", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "475f071d-5149-4379-b928-76482f5f519c", + "name" : "zoneinfo", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "zoneinfo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "zoneinfo", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "b8bebfed-b5e9-4604-a0ee-9817f7d439ac", + "name" : "middle name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "middleName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "middle_name", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "445232c8-6830-476c-a6f1-8bbef167595a", + "name" : "picture", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "picture", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "picture", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "65f2e474-6ede-4872-86e4-e49504dd0f2a", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "16cd5a27-ccf3-453c-ae1e-8621813ab73c", + "name" : "given name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "firstName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "given_name", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "f9efedfc-3388-457c-b10a-1dff4525ff9b", + "name" : "nickname", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "nickname", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "nickname", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "627fa054-08eb-4206-af71-9e838e984b8b", + "name" : "microprofile-jwt", + "description" : "Microprofile - JWT built-in scope", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "e6cc53e5-5d7e-468e-88c8-0737dd3dc759", + "name" : "groups", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "multivalued" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "foo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "groups", + "jsonType.label" : "String" + } + }, { + "id" : "83b4444c-10fc-44e8-a0c0-0c1da1f9bba3", + "name" : "upn", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "upn", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "4122ff9e-ad3c-4142-afc6-9aefdecfc86d", + "name" : "role_list", + "description" : "SAML role list", + "protocol" : "saml", + "attributes" : { + "consent.screen.text" : "${samlRoleListScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "bb0747fa-c008-4af3-93be-e7739650ebd5", + "name" : "role list", + "protocol" : "saml", + "protocolMapper" : "saml-role-list-mapper", + "consentRequired" : false, + "config" : { + "single" : "false", + "attribute.nameformat" : "Basic", + "attribute.name" : "Role" + } + } ] + }, { + "id" : "2e76447d-fbe7-4fa7-a16c-54a381b960ae", + "name" : "rabbitmq.configure:*/*", + "description" : "", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false", + "gui.order" : "", + "consent.screen.text" : "" + } + }, { + "id" : "52aad832-c6c4-49df-8a04-6ad4a406fdfa", + "name" : "phone", + "description" : "OpenID Connect built-in scope: phone", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${phoneScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "dae802fb-9138-408a-b80e-a40eb0f56814", + "name" : "phone number", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "phoneNumber", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number", + "jsonType.label" : "String", + "userinfo.token.claim" : "true" + } + }, { + "id" : "feb06a8d-b0eb-4911-8464-368d93f566fa", + "name" : "phone number verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "phoneNumberVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number_verified", + "jsonType.label" : "boolean", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "f64d64e8-57ce-4eb2-b99e-9f02fdbd99f9", + "name" : "web-origins", + "description" : "OpenID Connect scope for add allowed web origins to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "consent.screen.text" : "", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "c6411e3b-6478-453d-b530-5fe175a4d786", + "name" : "allowed web origins", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-allowed-origins-mapper", + "consentRequired" : false, + "config" : { } + } ] + }, { + "id" : "55341d34-0086-4173-ae61-d9b175b179d8", + "name" : "acr", + "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "58ea3217-0fff-4207-9d08-919f5493b629", + "name" : "acr loa level", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-acr-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "a02c2c38-923c-46ec-9899-321412b388e5", + "name" : "attributes", + "description" : "User Attributes", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false", + "gui.order" : "", + "consent.screen.text" : "" + }, + "protocolMappers" : [ { + "id" : "78c461c1-f3f9-4d10-8835-097f13bdcd60", + "name" : "Theme", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "aggregate.attrs" : "false", + "multivalued" : "false", + "userinfo.token.claim" : "true", + "user.attribute" : "theme_dark", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "attributes.theme_dark" + } + } ] + }, { + "id" : "06062e22-89c0-4e1d-a25b-2483903b02d5", + "name" : "rabbitmq.write:*/*", + "description" : "", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false", + "gui.order" : "", + "consent.screen.text" : "" + } + }, { + "id" : "db63e03b-7918-492f-997b-f2dda98f3b39", + "name" : "rabbitmq.tag:management", + "description" : "management", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "gui.order" : "", + "consent.screen.text" : "" + } + }, { + "id" : "aa5c6ca7-812d-4fff-80b9-f5095ca82ce6", + "name" : "service_account", + "description" : "Specific scope for a client enabled for service accounts", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "bb359b0f-97dc-4d6a-9a2f-89458b53c512", + "name" : "Client IP Address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "clientAddress", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "clientAddress", + "jsonType.label" : "String" + } + }, { + "id" : "7aa3a4d2-3dd1-48dd-8886-562906eadb2a", + "name" : "Client Host", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "clientHost", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "clientHost", + "jsonType.label" : "String" + } + }, { + "id" : "c4882d39-e815-49f5-8a73-eb8b83572eae", + "name" : "Client ID", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "client_id", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "client_id", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "210cc792-6c07-45a6-a77e-827cdf3b41ba", + "name" : "offline_access", + "description" : "OpenID Connect built-in scope: offline_access", + "protocol" : "openid-connect", + "attributes" : { + "consent.screen.text" : "${offlineAccessScopeConsentText}", + "display.on.consent.screen" : "true" + } + }, { + "id" : "c96f0b73-ea79-4b46-93ef-d1092297f855", + "name" : "rabbitmq.read:*/*", + "description" : "", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false", + "gui.order" : "", + "consent.screen.text" : "" + } + }, { + "id" : "ba11267a-478b-4b32-872f-4eb2d125d116", + "name" : "basic", + "description" : "OpenID Connect scope for add all basic claims to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "1445e14f-49b0-4666-8ddc-691493c24ad9", + "name" : "sub", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-sub-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + }, { + "id" : "846f1ef0-2b86-4e07-9d25-691d25af5fce", + "name" : "auth_time", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "AUTH_TIME", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "auth_time", + "jsonType.label" : "long" + } + } ] + }, { + "id" : "425abf4a-2ee2-431d-aa92-e373a36fe556", + "name" : "address", + "description" : "OpenID Connect built-in scope: address", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${addressScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30", + "name" : "address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-address-mapper", + "consentRequired" : false, + "config" : { + "user.attribute.formatted" : "formatted", + "user.attribute.country" : "country", + "user.attribute.postal_code" : "postal_code", + "userinfo.token.claim" : "true", + "user.attribute.street" : "street", + "id.token.claim" : "true", + "user.attribute.region" : "region", + "access.token.claim" : "true", + "user.attribute.locality" : "locality" + } + } ] + }, { + "id" : "37f61543-dad7-4a82-8e10-77acdd1eefdc", + "name" : "roles", + "description" : "OpenID Connect scope for add user roles to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "consent.screen.text" : "${rolesScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "3b6b6914-8ad1-4a71-88ec-444f754aaacb", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { } + }, { + "id" : "2defedf5-9af3-4531-822c-a879dedcd29d", + "name" : "realm roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "false", + "multivalued" : "true", + "user.attribute" : "foo", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "realm_access.roles", + "jsonType.label" : "String" + } + }, { + "id" : "a7bd6723-e58e-47f7-95c0-2925ce99283d", + "name" : "client roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-client-role-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "foo", + "access.token.claim" : "true", + "claim.name" : "resource_access.${client_id}.roles", + "jsonType.label" : "String", + "multivalued" : "true" + } + } ] + } ], + "defaultDefaultClientScopes" : [ "rabbitmq.tag:administrator", "rabbitmq.tag:management", "basic" ], + "defaultOptionalClientScopes" : [ "rabbitmq.write:*/*", "offline_access", "rabbitmq.configure:*/*", "roles", "role_list", "address", "phone", "acr", "microprofile-jwt", "email", "attributes", "profile", "rabbitmq.read:*/*", "web-origins" ], + "browserSecurityHeaders" : { + "contentSecurityPolicyReportOnly" : "", + "xContentTypeOptions" : "nosniff", + "referrerPolicy" : "no-referrer", + "xRobotsTag" : "none", + "xFrameOptions" : "SAMEORIGIN", + "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection" : "1; mode=block", + "strictTransportSecurity" : "max-age=31536000; includeSubDomains" + }, + "smtpServer" : { }, + "loginTheme" : "keycloak.v2", + "accountTheme" : "", + "adminTheme" : "", + "emailTheme" : "", + "eventsEnabled" : false, + "eventsListeners" : [ "create-event-listener", "jboss-logging" ], + "enabledEventTypes" : [ "SEND_RESET_PASSWORD", "UPDATE_CONSENT_ERROR", "GRANT_CONSENT", "VERIFY_PROFILE_ERROR", "REMOVE_TOTP", "REVOKE_GRANT", "UPDATE_TOTP", "LOGIN_ERROR", "CLIENT_LOGIN", "RESET_PASSWORD_ERROR", "IMPERSONATE_ERROR", "CODE_TO_TOKEN_ERROR", "CUSTOM_REQUIRED_ACTION", "OAUTH2_DEVICE_CODE_TO_TOKEN_ERROR", "RESTART_AUTHENTICATION", "IMPERSONATE", "UPDATE_PROFILE_ERROR", "LOGIN", "OAUTH2_DEVICE_VERIFY_USER_CODE", "UPDATE_PASSWORD_ERROR", "CLIENT_INITIATED_ACCOUNT_LINKING", "TOKEN_EXCHANGE", "AUTHREQID_TO_TOKEN", "LOGOUT", "REGISTER", "DELETE_ACCOUNT_ERROR", "CLIENT_REGISTER", "IDENTITY_PROVIDER_LINK_ACCOUNT", "DELETE_ACCOUNT", "UPDATE_PASSWORD", "CLIENT_DELETE", "FEDERATED_IDENTITY_LINK_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN", "CLIENT_DELETE_ERROR", "VERIFY_EMAIL", "CLIENT_LOGIN_ERROR", "RESTART_AUTHENTICATION_ERROR", "EXECUTE_ACTIONS", "REMOVE_FEDERATED_IDENTITY_ERROR", "TOKEN_EXCHANGE_ERROR", "PERMISSION_TOKEN", "SEND_IDENTITY_PROVIDER_LINK_ERROR", "EXECUTE_ACTION_TOKEN_ERROR", "SEND_VERIFY_EMAIL", "OAUTH2_DEVICE_AUTH", "EXECUTE_ACTIONS_ERROR", "REMOVE_FEDERATED_IDENTITY", "OAUTH2_DEVICE_CODE_TO_TOKEN", "IDENTITY_PROVIDER_POST_LOGIN", "IDENTITY_PROVIDER_LINK_ACCOUNT_ERROR", "OAUTH2_DEVICE_VERIFY_USER_CODE_ERROR", "UPDATE_EMAIL", "REGISTER_ERROR", "REVOKE_GRANT_ERROR", "EXECUTE_ACTION_TOKEN", "LOGOUT_ERROR", "UPDATE_EMAIL_ERROR", "CLIENT_UPDATE_ERROR", "AUTHREQID_TO_TOKEN_ERROR", "UPDATE_PROFILE", "CLIENT_REGISTER_ERROR", "FEDERATED_IDENTITY_LINK", "SEND_IDENTITY_PROVIDER_LINK", "SEND_VERIFY_EMAIL_ERROR", "RESET_PASSWORD", "CLIENT_INITIATED_ACCOUNT_LINKING_ERROR", "OAUTH2_DEVICE_AUTH_ERROR", "UPDATE_CONSENT", "REMOVE_TOTP_ERROR", "VERIFY_EMAIL_ERROR", "SEND_RESET_PASSWORD_ERROR", "CLIENT_UPDATE", "CUSTOM_REQUIRED_ACTION_ERROR", "IDENTITY_PROVIDER_POST_LOGIN_ERROR", "UPDATE_TOTP_ERROR", "CODE_TO_TOKEN", "VERIFY_PROFILE", "GRANT_CONSENT_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN_ERROR" ], + "adminEventsEnabled" : false, + "adminEventsDetailsEnabled" : false, + "identityProviders" : [ ], + "identityProviderMappers" : [ ], + "components" : { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { + "id" : "4d3f9f14-f5d2-4b0c-8ea7-e6d078aa2191", + "name" : "Max Clients Limit", + "providerId" : "max-clients", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "max-clients" : [ "200" ] + } + }, { + "id" : "f35bce67-1e75-408b-b065-52183368d4fd", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "0efa669d-1017-4b4a-82e1-c2eaf72de2c9", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "528fb423-d66e-472e-9120-1f03ba9e0f18", + "name" : "Consent Required", + "providerId" : "consent-required", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "3ab11d74-5e76-408a-b85a-26bf8950f979", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "oidc-address-mapper", "oidc-usermodel-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper" ] + } + }, { + "id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1", + "name" : "Trusted Hosts", + "providerId" : "trusted-hosts", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "host-sending-registration-request-must-match" : [ "true" ], + "client-uris-must-match" : [ "true" ] + } + }, { + "id" : "f565cb47-3bcf-4078-8f94-eb4179c375b8", + "name" : "Full Scope Disabled", + "providerId" : "scope", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "104ec5a9-025b-4c44-8ac0-82d22887ca3e", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper" ] + } + } ], + "org.keycloak.userprofile.UserProfileProvider" : [ { + "id" : "a407a1d6-a7f6-4a72-ba3a-149de03d5a43", + "providerId" : "declarative-user-profile", + "subComponents" : { }, + "config" : { + "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}],\"unmanagedAttributePolicy\":\"ENABLED\"}" ] + } + } ], + "org.keycloak.storage.UserStorageProvider" : [ { + "id" : "c109d473-5ce1-4032-af7b-02e5442f5c07", + "name" : "Identity Service", + "providerId" : "ldap", + "subComponents" : { + "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" : [ { + "id" : "db9963a3-03d1-468e-998c-9f3338fdb493", + "name" : "creation date", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "createTimestamp" ], + "is.mandatory.in.ldap" : [ "false" ], + "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "true" ], + "user.model.attribute" : [ "createTimestamp" ] + } + }, { + "id" : "9d7b9abc-321e-4674-ba36-b104b9990641", + "name" : "last name", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "sn" ], + "is.mandatory.in.ldap" : [ "true" ], + "read.only" : [ "false" ], + "always.read.value.from.ldap" : [ "true" ], + "user.model.attribute" : [ "lastName" ] + } + }, { + "id" : "b5b7253b-984e-4aa3-b862-20dbe06e4cf9", + "name" : "first name", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "cn" ], + "is.mandatory.in.ldap" : [ "true" ], + "read.only" : [ "false" ], + "always.read.value.from.ldap" : [ "true" ], + "user.model.attribute" : [ "firstName" ] + } + }, { + "id" : "ea383c2f-3bfe-4117-a8fd-f012d6ebbf9e", + "name" : "email", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "mail" ], + "is.mandatory.in.ldap" : [ "false" ], + "read.only" : [ "false" ], + "always.read.value.from.ldap" : [ "false" ], + "user.model.attribute" : [ "email" ] + } + }, { + "id" : "5692d060-55b8-4cb1-b68f-0ae123cd9d02", + "name" : "system", + "providerId" : "group-ldap-mapper", + "subComponents" : { }, + "config" : { + "mode" : [ "LDAP_ONLY" ], + "membership.attribute.type" : [ "DN" ], + "user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ], + "group.name.ldap.attribute" : [ "cn" ], + "membership.ldap.attribute" : [ "member" ], + "ignore.missing.groups" : [ "false" ], + "preserve.group.inheritance" : [ "false" ], + "membership.user.ldap.attribute" : [ "uid" ], + "memberof.ldap.attribute" : [ "memberOf" ], + "group.object.classes" : [ "groupOfNames" ], + "groups.dn" : [ "ou=users,${LDAP_ROOT}" ], + "drop.non.existing.groups.during.sync" : [ "false" ], + "groups.path" : [ "/" ] + } + }, { + "id" : "b6ff3285-35af-4e86-8bb4-d94b8e0d70bb", + "name" : "modify date", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "modifyTimestamp" ], + "is.mandatory.in.ldap" : [ "false" ], + "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "true" ], + "user.model.attribute" : [ "modifyTimestamp" ] + } + }, { + "id" : "b5d08699-ba3a-4ffd-bf2e-36d1bcac48d9", + "name" : "username", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "uid" ], + "attribute.force.default" : [ "false" ], + "is.mandatory.in.ldap" : [ "true" ], + "is.binary.attribute" : [ "false" ], + "always.read.value.from.ldap" : [ "false" ], + "read.only" : [ "false" ], + "user.model.attribute" : [ "username" ] + } + } ] + }, + "config" : { + "pagination" : [ "false" ], + "fullSyncPeriod" : [ "-1" ], + "startTls" : [ "false" ], + "connectionPooling" : [ "true" ], + "usersDn" : [ "ou=users,${LDAP_ROOT}" ], + "cachePolicy" : [ "DEFAULT" ], + "useKerberosForPasswordAuthentication" : [ "false" ], + "importEnabled" : [ "true" ], + "enabled" : [ "true" ], + "bindCredential" : [ "${LDAP_ADMIN_PASSWORD}" ], + "bindDn" : [ "${LDAP_ADMIN_DN}" ], + "usernameLDAPAttribute" : [ "uid" ], + "changedSyncPeriod" : [ "-1" ], + "lastSync" : [ "1719252666" ], + "vendor" : [ "other" ], + "uuidLDAPAttribute" : [ "entryUUID" ], + "connectionUrl" : [ "ldap://identity-service:1389" ], + "allowKerberosAuthentication" : [ "false" ], + "syncRegistrations" : [ "true" ], + "authType" : [ "simple" ], + "useTruststoreSpi" : [ "always" ], + "usePasswordModifyExtendedOp" : [ "false" ], + "trustEmail" : [ "false" ], + "userObjectClasses" : [ "inetOrgPerson, organizationalPerson, person" ], + "rdnLDAPAttribute" : [ "uid" ], + "editMode" : [ "WRITABLE" ], + "validatePasswordPolicy" : [ "false" ] + } + } ], + "org.keycloak.keys.KeyProvider" : [ { + "id" : "2f53ccf3-37b0-4d34-83e7-ed497499ee51", + "name" : "rsa-enc-generated", + "providerId" : "rsa-enc-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEowIBAAKCAQEA3b1tNLfcjFLUw9UShVDNf+ZD8sQqb4YBaIXcSJTX/zDQUPiCp176BBGI3s4VplDArnOW+LumozmKogeoHEnGEIDW8ovgK5uMU9tSA2p0qqGBUMOdR8YATTIfCJe7qGiiuGa3WZy3sQLM70SuRzx02YU8gvUcvl2Js4KyqAziOUX/w3Wa59H9jjGNUXYyqaPWJp73eHzbVYWySzyLG22mVlcUtBx5siL5T2/Xu0p9z4l7/bapwwmOVi1ZrcHjbEAwdGEiSMGI/uWqAF+r1BRpmJLR7HNXcL3eK4/56VYLaiwSejfyYeRFMITEn/UxGYhcXZ5xMUUCG0TxjBhLYpTBuwIDAQABAoIBAA4dwebcxkrH99Poa8+WkiE7JgaS9sahx9OBI2xwJANoIU2TpzGuNLQZ76uLgB+rPWZTD9Xm5a1iJjwOyQ9/937TzPCk91D0tpgcusRikb8jx/6TGB9acL4kBjYUVCCHr3BA2G75MKKGtJ2OMvAbCQSosZj+r2VDwYFEPUkV2jheE5JHSBkwyIRrus3JCwu8gu5fyCg9z8ljcxJxI5HIsi4v8Z21aCw/cLj7h5cMt44wCjQz4rOfYNBEFeHDtlfR1QtWKgjm4ZHHJbKrzf9b2kQXclziceEbSM0tYbROEXKi+s0Zc+z3HEG89vv0vfN400clmzzIAijKY6gg3pPRWdECgYEA+lnWYbSlXDMNYx6RBXm1RnlMUYIm4oy4/9ljgnoGJ6WCn3SjFkgaDtiKfGIG1BSB85r04pAPANgcWHf5tWDnq0ARvBVG0BX2bKd++7B3D4d3CRYKCwm88SslJXv9dfHVhq4+zViFPiUWwT20A72jCuUCvL88y5fh/YBecfdh+jECgYEA4r5RD0NB9dMaeg5/jk/GEHIo4Z9KLc6FrSoOFo2xFkPOy1sgDpDOiNtypuWvniO7k7Ose3DS3hlfTMsKzIW/CgQJ20+Y4cvBWDaOsRxfjj7w3d+jH5OSJdKKSzTrgLKc9ZhlRzVXy0J0hipIA6HG5kdVdLXmh85ITmf1CbJhE6sCgYBjPVeBNbXTHZ2x6/z62aslO5IoQVqetb/kE82hfDOSZcao5Ph9Lam+ttH2ynkAevykj4mBgi+gWwqpey2uW7KaLPSaxShj9kDQA3mP1fzsV/u0y1rB02Nlin/YIxVvOqU1FT9p8SwoXVVu1sHUNck62VtDbN9xqUx5S/ikXrclEQKBgQCoTssOwEcK+Vty9KYcdfy4onTUHZBLdjxl8Iyqkxy7QTQUYRznkvesQPDXEDGO+kk3dyx2KKZt9Hl4IFNww2quPZcvcuMx4DQxjbXXpA8OIIxcta95NepLJwA+mRai3nKCH1A2TlNP7pFeMa5o+8IPly3Ix2lKr4Wepa4PN5i1pwKBgCZ1QP6XAOERl9NznNmU0rXVcvYNP4PIIfQWfvGsldZ4QKkmjjAGiS0/oYqdWs+UDRZyCRChaVjDXO9fk0PEG5OGKAj9nyiYCT/M8xtJ3UeP5ffZZvJ/vnye3QdDIo1e38ZzsWwJHmLYw7fRqY9W5Vxo0Vsy22U3CJY70KTxVdTy" ], + "keyUse" : [ "ENC" ], + "certificate" : [ "MIICmzCCAYMCBgGG3GWycDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdvW00t9yMUtTD1RKFUM1/5kPyxCpvhgFohdxIlNf/MNBQ+IKnXvoEEYjezhWmUMCuc5b4u6ajOYqiB6gcScYQgNbyi+Arm4xT21IDanSqoYFQw51HxgBNMh8Il7uoaKK4ZrdZnLexAszvRK5HPHTZhTyC9Ry+XYmzgrKoDOI5Rf/DdZrn0f2OMY1RdjKpo9Ymnvd4fNtVhbJLPIsbbaZWVxS0HHmyIvlPb9e7Sn3PiXv9tqnDCY5WLVmtweNsQDB0YSJIwYj+5aoAX6vUFGmYktHsc1dwvd4rj/npVgtqLBJ6N/Jh5EUwhMSf9TEZiFxdnnExRQIbRPGMGEtilMG7AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAK3kQ1VkQrzvSWvmXmazmNoA1ZiPzRDs1XhGUWxgsxzgPylr3dGBuqQbKvgnLUBQLSqlJHpI4fZflHswu1qrvVZYtekPcGef4WhcKAu2i1RwxrKa6RJQ1tRbrLuVYCzPv5p/DWgltWVn88aoLnqQn0SK/0PB/o4a4Cm7Kq2ZzCr1dACBr06LvOHsc7249OySmbG4HH+pLK6jVURhZ9VaObqAHe2FJBVVoIzURbdiRRURqumrIvbnpeaU1aFyg6ED5wTnXvmMPmVPt9F79mcB33bASO5wyu00X8t1hyN2Show2l2vxLACGUzVkTQt15s7uDLKE7qLmKSR3EuSGXWv3wA=" ], + "priority" : [ "100" ], + "algorithm" : [ "RSA-OAEP" ] + } + }, { + "id" : "28ca0b6d-b2e2-4785-b04b-2391e6344e30", + "name" : "aes-generated", + "providerId" : "aes-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "6dc4834f-a1de-4cfe-a29d-e84ac8e9b1a8" ], + "secret" : [ "HpuzG_jWYKwypLeoPEMC4A" ], + "priority" : [ "100" ] + } + }, { + "id" : "bd7945cf-6d35-4e03-9c3a-197f2dc76973", + "name" : "hmac-generated", + "providerId" : "hmac-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "7f9f9054-5697-4f60-bdc8-67e3bd0f4db6" ], + "secret" : [ "1SCIY20z3AbAHCL28LuJfBU-7zfsZv5dacgliUeGdRW_WK3vH9fJUpPu1f7iDrdlhF7YQmHxLXsWjxhQId4ShI7QBdgKCArHWqi0GeH37oNXfZFg_uv-K_3JSfxfGBRu5jpRQhhSBxESZWsFVkskhxWUvNe6b5l9dFbMIif72rI" ], + "priority" : [ "100" ], + "algorithm" : [ "HS256" ] + } + }, { + "id" : "2293ff99-3c6d-46d1-8635-5e679d5b134a", + "name" : "rsa-generated", + "providerId" : "rsa-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEpAIBAAKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQABAoIBADNcMt6hAHub4JTAYS6Mra0EPRBO2XhWmACBrv3+8ETClXd5475KPLDewgRVtlmtbwU8G8awUXESQgPS9lfiqvQhPreA3cHlm6oP2WMKOEtakr2s8I+frsTBLCo0Ini9RaSzjoVVgS0zofyhASKi+T970MafSj5P3XNb8YBFdXgoYDiA7FXLH6a/+m7LScL+wGcFMAAeYESxZbMQLfH3v8L+4EcTraiwjLG17ZdlF3dpybMyUSse6ZQ/PdlyvBuzzLXhN6Ce2gd9ATfS+YWTzo7Yf+GU+ex5bIpVOfHqtuM/hyq7YGKENClsXwNZIAoFnvGCbvECAfgyapVrD30IfykCgYEA0rgsSZ82pxT40NxwgBD1g9lbNVBKXphRB/3S078qusUzJjT7AldEj4imGPhAbI7bI8gAeWJsp1XJWkjM8ktaVrh+NQl7p8e9OPh0pQF/5Bdg8ajbjXESpjnaU66pVYRQy/d+jNli/YRAHX5RUfsBl+6W4+WSVMGmKBiqJsur+ecCgYEAz1YVXClcmUnyZem5B+2E9noIzjF6ROE+jIb6rawM85P3Xd0lXtECQavtxw+Qk7I32qOwrxl1UpK2foVel3pazi+4OpMfmqtYGenRP1Zk1cZwrDo0cIemTDGjj3kJ8tYn12CGolFQpJZgK6OHzvG0tOxI5VZgjIViWNPe1PGWXtUCgYEAxXGNDe8BZs1f11S2lUlOw5yGug3hoYFXbAWJ5p7Ziuf8ZXB/QlJDC7se54a11wKEk6Jzz0lKRgE8CjzszJuOqnN0zn10QGIIC7nCklo1W6QMUmPGVWH994N976tZP6gbjQL6sT+AYcvpx7j0ubxYYeRNvnz+ACzzY964kGGHY0ECgYEAumlwPPNnMN7+VEjGNm2D7UMdJZ3wi3tkjF5ThdA5uMohTsAk+FG80KSu3RmOaGyEsUwY7+VYyYvlDm4E9PZqLBVVczyR3rMNPAcwPd0EPfvzk7WlLkOX7ct3fehaXH3VRlyfz9KCSeh1wOZ/lT1VtpD2nVOC7PSDzs92+kfXZZ0CgYAnrD1y4skgXkdwolZ3unn3EFyGm2d+X5aMTHwQPdWxqoNIAl/9wdghlzihwnPhhsxq1WzlxuC3V2IMrNPtRx70Mi+FbSmR5m4Xx5RptgMtMlwno+L40PzNJgMjHGjt0wcx3Vel8wuohDtnqMyS7P5nG1/TQx0Cyzwn7QOXlNpgbQ==" ], + "keyUse" : [ "SIG" ], + "certificate" : [ "MIICmzCCAYMCBgGG3GWyBTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqqcdDYFZZb28M0tEJzEP77FmD/Xqioyj9zWX6VwUSOMAgmMmn8eqs9hT9T0a+q4YTo9tUW1PNbUpwprA5b4Uk04DcIajxDVMUR/PjcHytmkqwVskq9AZW/Vngdoo+8tSbuIybwe/3Vwt266hbHpDcM97a+DXcYooRl7tQWCEX7RP27wQrMD9epDQ6IgKayZg9vC9/03dsIqwH9jXQRiZlFvwiEKhX2aY7lPGBaCK414JO00K/Z49iov9TRa/IYVbSt5qwgrx6DcqsBSPwOnI6A85UGfeUEZ/7coVJiL7RvBlsllapsL9eWTbQajVh94k9Ei3sibEPbtH+U2OAM78zAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAASnN1Cuif1sdfEK2kWAURSXGJCohCROLWdKFjaeHPRaEfpbFJsgxW0Yj3nwX5O3bUlOWoTyENwnXSsXMQsqnNi+At32CKaKO8+AkhAbgQL9F0B+KeJwmYv3cUj5N/LYkJjBvZBzUZ4Ugu5dcxH0k7AktLAIwimkyEnxTNolOA3UyrGGpREr8MCKWVr10RFuOpF/0CsJNNwbHXzalO9D756EUcRWZ9VSg6QVNso0YYRKTnILWDn9hcTRnqGy3SHo3anFTqQZ+BB57YbgFWy6udC0LYRB3zdp6zNti87eu/VEymiDY/mmo1AB8Tm0b6vxFz4AKcL3ax5qS6YnZ9efSzk=" ], + "priority" : [ "100" ] + } + }, { + "id" : "addbae10-c6ae-4735-851f-7a5ea035ce25", + "name" : "hmac-generated-hs512", + "providerId" : "hmac-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "352d0ea1-8218-42b5-ab78-e2ca56cf6a95" ], + "secret" : [ "_kr6EZOZ8IKqPWgJltHAAsQ34wCIGPs8oOQLYWwJrSIH7Qie3CEVKZnICyBP1goR-QgUtg25tR8Qu5MkvYkb8assJ8Iok5x_8iYCR4Txkf_mS-emrlAtQajlIjmOfNBtx704dTnZlP9rWzqpW6mrpeiOaiCw1K0XCpY5C_ZjXKw" ], + "priority" : [ "100" ], + "algorithm" : [ "HS512" ] + } + } ] + }, + "internationalizationEnabled" : false, + "supportedLocales" : [ ], + "authenticationFlows" : [ { + "id" : "259dd7b6-01b7-433a-bda4-028857151ecd", + "alias" : "Account verification options", + "description" : "Method with which to verity the existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-email-verification", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Verify Existing Account by Re-authentication", + "userSetupAllowed" : false + } ] + }, { + "id" : "542ca1d7-9627-4102-b843-98837ce433fb", + "alias" : "Browser - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "4f153b98-6851-440b-a022-0a14e67a9b2f", + "alias" : "Direct Grant - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "3d791b35-d35c-40b2-bb3e-e806d72b27ee", + "alias" : "First broker login - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "9b746104-9371-4c3f-b69f-9322cead1b08", + "alias" : "Handle Existing Account", + "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-confirm-link", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Account verification options", + "userSetupAllowed" : false + } ] + }, { + "id" : "7a164efe-c97b-4fbb-950d-7745359ba9a4", + "alias" : "Reset - Conditional OTP", + "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "4fdc5e1b-1b55-4662-8360-67d75fa22677", + "alias" : "User creation or linking", + "description" : "Flow for the existing/non-existing user alternatives", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "create unique user config", + "authenticator" : "idp-create-user-if-unique", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Handle Existing Account", + "userSetupAllowed" : false + } ] + }, { + "id" : "75893341-c338-44d8-ae27-a3fc7bfe8f2d", + "alias" : "Verify Existing Account by Re-authentication", + "description" : "Reauthentication of existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "First broker login - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "89626b76-f4cf-4c46-934c-4408c225a44b", + "alias" : "browser", + "description" : "browser based authentication", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-cookie", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-spnego", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "identity-provider-redirector", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 25, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "forms", + "userSetupAllowed" : false + } ] + }, { + "id" : "4112115a-e7a7-44c2-9af5-65d538e4ba0d", + "alias" : "clients", + "description" : "Base authentication for clients", + "providerId" : "client-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "client-secret", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-secret-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-x509", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 40, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "f82a9b0a-2c0a-4cb1-96b2-6c78b0b1f14f", + "alias" : "direct grant", + "description" : "OpenID Connect Resource Owner Grant", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "direct-grant-validate-username", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "Direct Grant - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "3614e155-e8ce-4958-98fb-a27e4706cc70", + "alias" : "docker auth", + "description" : "Used by Docker clients to authenticate against the IDP", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "docker-http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "506f9b96-5002-47c0-96e3-3830a0fcfa26", + "alias" : "first broker login", + "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "review profile config", + "authenticator" : "idp-review-profile", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "User creation or linking", + "userSetupAllowed" : false + } ] + }, { + "id" : "4b7a7e91-36db-4b27-8e2d-01a04a822980", + "alias" : "forms", + "description" : "Username, password, otp and other auth forms.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Browser - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "04c2fe01-5076-4aa4-9596-4efb4004195f", + "alias" : "registration", + "description" : "registration flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-page-form", + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : true, + "flowAlias" : "registration form", + "userSetupAllowed" : false + } ] + }, { + "id" : "d12f77e1-7733-44a2-98ff-fd75c784d721", + "alias" : "registration form", + "description" : "registration form", + "providerId" : "form-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-user-creation", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-password-action", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 50, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-recaptcha-action", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 60, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "91f6048c-a376-4809-8f37-c8d7a517830c", + "alias" : "reset credentials", + "description" : "Reset credentials for a user if they forgot their password or something", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "reset-credentials-choose-user", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-credential-email", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 40, + "autheticatorFlow" : true, + "flowAlias" : "Reset - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "7b8fb487-53b8-4533-a696-76bc05256cb1", + "alias" : "saml ecp", + "description" : "SAML ECP Profile Authentication Flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + } ], + "authenticatorConfig" : [ { + "id" : "48372696-0579-45e5-b074-5e8dbdbbe7d6", + "alias" : "create unique user config", + "config" : { + "require.password.update.after.registration" : "false" + } + }, { + "id" : "08df3b83-e522-42a7-9e24-9028b960bf39", + "alias" : "review profile config", + "config" : { + "update.profile.on.first.login" : "missing" + } + } ], + "requiredActions" : [ { + "alias" : "CONFIGURE_TOTP", + "name" : "Configure OTP", + "providerId" : "CONFIGURE_TOTP", + "enabled" : true, + "defaultAction" : false, + "priority" : 10, + "config" : { } + }, { + "alias" : "TERMS_AND_CONDITIONS", + "name" : "Terms and Conditions", + "providerId" : "TERMS_AND_CONDITIONS", + "enabled" : false, + "defaultAction" : false, + "priority" : 20, + "config" : { } + }, { + "alias" : "UPDATE_PASSWORD", + "name" : "Update Password", + "providerId" : "UPDATE_PASSWORD", + "enabled" : false, + "defaultAction" : false, + "priority" : 30, + "config" : { } + }, { + "alias" : "UPDATE_PROFILE", + "name" : "Update Profile", + "providerId" : "UPDATE_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 40, + "config" : { } + }, { + "alias" : "VERIFY_EMAIL", + "name" : "Verify Email", + "providerId" : "VERIFY_EMAIL", + "enabled" : false, + "defaultAction" : false, + "priority" : 50, + "config" : { } + }, { + "alias" : "delete_account", + "name" : "Delete Account", + "providerId" : "delete_account", + "enabled" : false, + "defaultAction" : false, + "priority" : 60, + "config" : { } + }, { + "alias" : "webauthn-register", + "name" : "Webauthn Register", + "providerId" : "webauthn-register", + "enabled" : true, + "defaultAction" : false, + "priority" : 70, + "config" : { } + }, { + "alias" : "webauthn-register-passwordless", + "name" : "Webauthn Register Passwordless", + "providerId" : "webauthn-register-passwordless", + "enabled" : true, + "defaultAction" : false, + "priority" : 80, + "config" : { } + }, { + "alias" : "delete_credential", + "name" : "Delete Credential", + "providerId" : "delete_credential", + "enabled" : true, + "defaultAction" : false, + "priority" : 100, + "config" : { } + }, { + "alias" : "update_user_locale", + "name" : "Update User Locale", + "providerId" : "update_user_locale", + "enabled" : true, + "defaultAction" : false, + "priority" : 1000, + "config" : { } + } ], + "browserFlow" : "browser", + "registrationFlow" : "registration", + "directGrantFlow" : "direct grant", + "resetCredentialsFlow" : "reset credentials", + "clientAuthenticationFlow" : "clients", + "dockerAuthenticationFlow" : "docker auth", + "firstBrokerLoginFlow" : "first broker login", + "attributes" : { + "cibaBackchannelTokenDeliveryMode" : "poll", + "cibaAuthRequestedUserHint" : "login_hint", + "clientOfflineSessionMaxLifespan" : "0", + "oauth2DevicePollingInterval" : "5", + "clientSessionIdleTimeout" : "0", + "actionTokenGeneratedByUserLifespan-execute-actions" : "", + "actionTokenGeneratedByUserLifespan-verify-email" : "", + "clientOfflineSessionIdleTimeout" : "0", + "actionTokenGeneratedByUserLifespan-reset-credentials" : "", + "cibaInterval" : "5", + "realmReusableOtpCode" : "false", + "cibaExpiresIn" : "120", + "oauth2DeviceCodeLifespan" : "600", + "actionTokenGeneratedByUserLifespan-idp-verify-account-via-email" : "", + "parRequestUriLifespan" : "60", + "clientSessionMaxLifespan" : "0", + "organizationsEnabled" : "false", + "shortVerificationUri" : "" + }, + "keycloakVersion" : "26.0.4", + "userManagedAccessAllowed" : false, + "organizationsEnabled" : false, + "clientProfiles" : { + "profiles" : [ ] + }, + "clientPolicies" : { + "policies" : [ ] + } +} \ No newline at end of file diff --git a/helm/dbrepo/files/master-realm.json b/helm/dbrepo/files/master-realm.json new file mode 100644 index 0000000000000000000000000000000000000000..3fd8c910b3c1c5b0021cb110c8ad9f07386315d4 --- /dev/null +++ b/helm/dbrepo/files/master-realm.json @@ -0,0 +1,2290 @@ +{ + "id" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "realm" : "master", + "displayName" : "Keycloak", + "displayNameHtml" : "", + "notBefore" : 0, + "defaultSignatureAlgorithm" : "RS256", + "revokeRefreshToken" : false, + "refreshTokenMaxReuse" : 0, + "accessTokenLifespan" : 60, + "accessTokenLifespanForImplicitFlow" : 900, + "ssoSessionIdleTimeout" : 1800, + "ssoSessionMaxLifespan" : 36000, + "ssoSessionIdleTimeoutRememberMe" : 0, + "ssoSessionMaxLifespanRememberMe" : 0, + "offlineSessionIdleTimeout" : 2592000, + "offlineSessionMaxLifespanEnabled" : false, + "offlineSessionMaxLifespan" : 5184000, + "clientSessionIdleTimeout" : 0, + "clientSessionMaxLifespan" : 0, + "clientOfflineSessionIdleTimeout" : 0, + "clientOfflineSessionMaxLifespan" : 0, + "accessCodeLifespan" : 60, + "accessCodeLifespanUserAction" : 300, + "accessCodeLifespanLogin" : 1800, + "actionTokenGeneratedByAdminLifespan" : 43200, + "actionTokenGeneratedByUserLifespan" : 300, + "oauth2DeviceCodeLifespan" : 600, + "oauth2DevicePollingInterval" : 5, + "enabled" : true, + "sslRequired" : "external", + "registrationAllowed" : false, + "registrationEmailAsUsername" : false, + "rememberMe" : false, + "verifyEmail" : false, + "loginWithEmailAllowed" : true, + "duplicateEmailsAllowed" : false, + "resetPasswordAllowed" : false, + "editUsernameAllowed" : false, + "bruteForceProtected" : false, + "permanentLockout" : false, + "maxTemporaryLockouts" : 0, + "bruteForceStrategy" : "MULTIPLE", + "maxFailureWaitSeconds" : 900, + "minimumQuickLoginWaitSeconds" : 60, + "waitIncrementSeconds" : 60, + "quickLoginCheckMilliSeconds" : 1000, + "maxDeltaTimeSeconds" : 43200, + "failureFactor" : 30, + "roles" : { + "realm" : [ { + "id" : "01178d3c-65eb-406b-87a1-e7144f488028", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "composites" : { + "realm" : [ "offline_access", "uma_authorization" ], + "client" : { + "account" : [ "view-profile", "manage-account" ] + } + }, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + }, { + "id" : "646cda2d-911d-459e-8522-b28ba3126341", + "name" : "uma_authorization", + "description" : "${role_uma_authorization}", + "composite" : false, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + }, { + "id" : "344b3b83-99f7-43f7-8533-76f64195eab6", + "name" : "offline_access", + "description" : "${role_offline-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + }, { + "id" : "9ca176f3-c0c8-4ba1-8364-c38f3ce4f88b", + "name" : "admin", + "description" : "${role_admin}", + "composite" : true, + "composites" : { + "realm" : [ "create-realm" ], + "client" : { + "master-realm" : [ "manage-realm", "view-events", "view-authorization", "manage-authorization", "query-realms", "query-clients", "manage-clients", "view-clients", "create-client", "impersonation", "query-users", "view-identity-providers", "manage-users", "manage-events", "view-realm", "query-groups", "manage-identity-providers", "view-users" ], + "dbrepo-realm" : [ "manage-users", "query-realms", "query-groups", "manage-identity-providers", "manage-events", "manage-authorization", "query-users", "manage-clients", "view-users", "view-events", "view-authorization", "query-clients", "view-identity-providers", "view-realm", "view-clients", "create-client", "manage-realm", "impersonation" ] + } + }, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + }, { + "id" : "6e765f03-5dee-4061-b027-c3ec41114329", + "name" : "default-system-roles", + "description" : "${default-system-roles}", + "composite" : true, + "composites" : { + "realm" : [ "create-realm", "default-roles-master", "default-system-roles", "offline_access", "admin", "uma_authorization" ] + }, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + }, { + "id" : "3da4e842-c3cc-4bcd-a2f0-dec1ec36f3c5", + "name" : "create-realm", + "description" : "${role_create-realm}", + "composite" : false, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", + "attributes" : { } + } ], + "client" : { + "security-admin-console" : [ ], + "admin-cli" : [ ], + "account-console" : [ ], + "broker" : [ { + "id" : "07de46e9-cc5c-4b50-8904-14443ed4d1f1", + "name" : "read-token", + "description" : "${role_read-token}", + "composite" : false, + "clientRole" : true, + "containerId" : "217563ea-11c7-4c96-969b-af076d740f7c", + "attributes" : { } + } ], + "master-realm" : [ { + "id" : "5c8f38f8-0a16-4f92-8fa2-81a6301f6215", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "d0ab2e61-c7e4-49f3-9af2-965f20ec725a", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "89d438ee-957d-435c-b201-5be06aee01fd", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "664a9190-f73f-4f83-83bc-a2185cea334c", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "b3c0e4db-5a09-4d1e-9ced-96a34efb6398", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "5cd61b20-da2b-4fed-b0c3-2fb5819ab06b", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "94ceae4b-2cb8-4d10-bf11-8ce5c1ec9c55", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "77072e30-3941-4b32-a8c8-76993fc507bb", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "ea00baa8-f64d-409d-936d-ecf0adec5a57", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "fb2c167e-fb6b-4db5-b0bf-d2c8454ceee5", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "f0370bc0-15d6-43f1-82bc-7d31f37b19e4", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "f0448680-b803-471e-8d0a-ec3e34a24228", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "dfdf768b-ac34-4491-b5d2-0938242e7e48", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "d5ff044b-c4e0-4197-8f51-833e8a956396", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "aaf73aa0-52a3-4833-8521-1eb1312b9f33", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "fa08c54a-1f0c-4392-bf6a-a698bf3d164b", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "master-realm" : [ "query-groups", "query-users" ] + } + }, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "fd317e90-0b34-4263-8906-caa9d6000b28", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + }, { + "id" : "162f12db-6d7f-4c53-905c-3f4bbd80fd58", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "master-realm" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "attributes" : { } + } ], + "account" : [ { + "id" : "50c2778e-15fa-4c14-9414-5937649eb89f", + "name" : "delete-account", + "description" : "${role_delete-account}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "083c3506-866a-4b85-ae57-bab1c29ac33e", + "name" : "view-groups", + "description" : "${role_view-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "a1942880-1a32-402c-b9bb-e8f5edf2ba1a", + "name" : "view-profile", + "description" : "${role_view-profile}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "a69f73d6-ce42-41e6-b341-30a2d99caba8", + "name" : "manage-account-links", + "description" : "${role_manage-account-links}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "ac22aeec-062a-4fc0-ac79-aa849ee55d84", + "name" : "manage-consent", + "description" : "${role_manage-consent}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "view-consent" ] + } + }, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "ad45329d-0efa-4505-906a-5a69b6c8414a", + "name" : "view-applications", + "description" : "${role_view-applications}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "8c0bfbdf-1914-4522-9024-ef0e6e91be9d", + "name" : "view-consent", + "description" : "${role_view-consent}", + "composite" : false, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + }, { + "id" : "f34de6ff-a5aa-41a7-a8d2-87bdfa850c50", + "name" : "manage-account", + "description" : "${role_manage-account}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "manage-account-links" ] + } + }, + "clientRole" : true, + "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "attributes" : { } + } ], + "dbrepo-realm" : [ { + "id" : "89292ccf-3b12-4c8b-a615-966ddcf14556", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "784f2fdf-a090-4452-8a02-d9cc8227df8f", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "57a70a96-bc56-4629-8d2b-86c68ac1c6f6", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "60349d70-ba29-426d-9c05-df0b11e1a73b", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "c07819ae-8951-4dc4-af4d-bca93c60eb5a", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "86842bf0-7f63-4053-8389-2ec5401cb2a9", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "0a1579a0-76c5-4ee3-90cc-c924827b7492", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "4eb0d05c-38c7-4d45-b858-ad7011df0ac0", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "d4ff5a03-21e8-440c-9ccb-690ecbb89684", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "00d523c3-e9c7-45c3-8221-0b6d6c82cd5d", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "c441f018-7113-4fcb-8208-10ab4bd4bb27", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "dbrepo-realm" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "a146533f-fbf3-4513-8505-cf44473f5459", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "d3d0ed01-05a5-4812-8fa7-9231f71e61fa", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "fcaed53d-022a-416d-b207-a6ae694a9384", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "cefdb023-0eec-4c05-93d7-8b557bb28a81", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "dbrepo-realm" : [ "query-users", "query-groups" ] + } + }, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "44d13b2a-a2b5-4f3b-bea1-4ab550205e12", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "17378e7a-9a78-4e92-ae0b-6bdfadede2d5", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + }, { + "id" : "7810ab39-c546-456c-81eb-7ee09492da92", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "attributes" : { } + } ] + } + }, + "groups" : [ { + "id" : "1fcdbec1-9c86-4a14-a859-425b43cf73cb", + "name" : "system", + "path" : "/system", + "subGroups" : [ ], + "attributes" : { }, + "realmRoles" : [ "default-roles-master", "default-system-roles", "admin", "create-realm" ], + "clientRoles" : { } + } ], + "defaultRole" : { + "id" : "01178d3c-65eb-406b-87a1-e7144f488028", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "clientRole" : false, + "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd" + }, + "requiredCredentials" : [ "password" ], + "otpPolicyType" : "totp", + "otpPolicyAlgorithm" : "HmacSHA1", + "otpPolicyInitialCounter" : 0, + "otpPolicyDigits" : 6, + "otpPolicyLookAheadWindow" : 1, + "otpPolicyPeriod" : 30, + "otpPolicyCodeReusable" : false, + "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], + "localizationTexts" : { }, + "webAuthnPolicyRpEntityName" : "keycloak", + "webAuthnPolicySignatureAlgorithms" : [ "ES256", "RS256" ], + "webAuthnPolicyRpId" : "", + "webAuthnPolicyAttestationConveyancePreference" : "not specified", + "webAuthnPolicyAuthenticatorAttachment" : "not specified", + "webAuthnPolicyRequireResidentKey" : "not specified", + "webAuthnPolicyUserVerificationRequirement" : "not specified", + "webAuthnPolicyCreateTimeout" : 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyAcceptableAaguids" : [ ], + "webAuthnPolicyExtraOrigins" : [ ], + "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256", "RS256" ], + "webAuthnPolicyPasswordlessRpId" : "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", + "webAuthnPolicyPasswordlessCreateTimeout" : 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], + "webAuthnPolicyPasswordlessExtraOrigins" : [ ], + "scopeMappings" : [ { + "clientScope" : "offline_access", + "roles" : [ "offline_access" ] + } ], + "clientScopeMappings" : { + "account" : [ { + "client" : "account-console", + "roles" : [ "manage-account", "view-groups" ] + } ] + }, + "clients" : [ { + "id" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", + "clientId" : "account", + "name" : "${client_account}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + }, { + "id" : "1af255f9-7eee-415c-9096-3a717d2c5150", + "clientId" : "account-console", + "name" : "${client_account-console}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "63d1e47d-6e61-4f36-8a5b-98384a782d60", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + }, { + "id" : "65ce3e14-5e30-424a-a6bd-0b194da203ef", + "clientId" : "admin-cli", + "name" : "${client_admin-cli}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : false, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "client.use.lightweight.access.token.enabled" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + }, { + "id" : "217563ea-11c7-4c96-969b-af076d740f7c", + "clientId" : "broker", + "name" : "${client_broker}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + }, { + "id" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", + "clientId" : "dbrepo-realm", + "name" : "dbrepo Realm", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ ], + "optionalClientScopes" : [ ] + }, { + "id" : "9a451e5c-a55a-4872-bee1-58af763101a1", + "clientId" : "master-realm", + "name" : "master Realm", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "true", + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + }, { + "id" : "b2a24dc7-01d2-4a5a-8385-8b06d2b8a3fb", + "clientId" : "security-admin-console", + "name" : "${client_security-admin-console}", + "rootUrl" : "${authAdminUrl}", + "baseUrl" : "/admin/master/console/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/admin/master/console/*" ], + "webOrigins" : [ "+" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "realm_client" : "false", + "client.use.lightweight.access.token.enabled" : "true", + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "54d1c74b-4eb6-483b-88b5-261964dd182a", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], + "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] + } ], + "clientScopes" : [ { + "id" : "12ce4fa5-b53e-47dc-b70f-caf2110e31cd", + "name" : "address", + "description" : "OpenID Connect built-in scope: address", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${addressScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "4aed5e41-0d8d-4c24-80a0-cd9822072756", + "name" : "address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-address-mapper", + "consentRequired" : false, + "config" : { + "user.attribute.formatted" : "formatted", + "user.attribute.country" : "country", + "introspection.token.claim" : "true", + "user.attribute.postal_code" : "postal_code", + "userinfo.token.claim" : "true", + "user.attribute.street" : "street", + "id.token.claim" : "true", + "user.attribute.region" : "region", + "access.token.claim" : "true", + "user.attribute.locality" : "locality" + } + } ] + }, { + "id" : "a7683fe7-1c8b-44f8-9be7-a28acdffa61e", + "name" : "organization", + "description" : "Additional claims about the organization a subject belongs to", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${organizationScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "5e80a7d2-c9d0-48e1-aadc-d8848ff90f92", + "name" : "organization", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-organization-membership-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "organization", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "1be1e284-2749-4bbb-890a-2d519cc1531c", + "name" : "service_account", + "description" : "Specific scope for a client enabled for service accounts", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "c913a673-cf66-4493-a2ed-14556c07617c", + "name" : "Client ID", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "client_id", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "client_id", + "jsonType.label" : "String" + } + }, { + "id" : "5c244d68-5c63-4356-ac71-5a586f40c77e", + "name" : "Client IP Address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "clientAddress", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "clientAddress", + "jsonType.label" : "String" + } + }, { + "id" : "600285d4-ae51-4b39-a7be-bb83cf5870db", + "name" : "Client Host", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "clientHost", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "clientHost", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "0411ea86-a074-4781-850d-ea3ca94590a2", + "name" : "offline_access", + "description" : "OpenID Connect built-in scope: offline_access", + "protocol" : "openid-connect", + "attributes" : { + "consent.screen.text" : "${offlineAccessScopeConsentText}", + "display.on.consent.screen" : "true" + } + }, { + "id" : "4363ea0f-c7e9-43f3-8611-146514c37b47", + "name" : "basic", + "description" : "OpenID Connect scope for add all basic claims to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "0b691845-92b7-47b8-82d3-6fea760d885a", + "name" : "sub", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-sub-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + }, { + "id" : "15db8f91-12c9-444c-8661-5a795856e884", + "name" : "auth_time", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "AUTH_TIME", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "auth_time", + "jsonType.label" : "long" + } + } ] + }, { + "id" : "5f9da2a4-b8d2-48cd-9343-5c8ff42ef637", + "name" : "profile", + "description" : "OpenID Connect built-in scope: profile", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${profileScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "2d1400be-4053-4393-ba87-91b64f699054", + "name" : "full name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-full-name-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + }, { + "id" : "6b12336d-589e-4023-9c51-1da3a4114a62", + "name" : "website", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "website", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "website", + "jsonType.label" : "String" + } + }, { + "id" : "13a7a453-3862-40b4-8a81-550172a06dc0", + "name" : "zoneinfo", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "zoneinfo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "zoneinfo", + "jsonType.label" : "String" + } + }, { + "id" : "43c149fc-aaf4-486a-a279-df624d2eb47e", + "name" : "given name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "firstName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "given_name", + "jsonType.label" : "String" + } + }, { + "id" : "8bba390c-543b-4fe3-98db-e020184e5014", + "name" : "birthdate", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "birthdate", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "birthdate", + "jsonType.label" : "String" + } + }, { + "id" : "dc5a7474-c62a-42d6-ba98-f2b2a7a7328c", + "name" : "nickname", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "nickname", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "nickname", + "jsonType.label" : "String" + } + }, { + "id" : "9e02395e-5c37-46fb-8d30-0ebe6da3b7f0", + "name" : "gender", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "gender", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "gender", + "jsonType.label" : "String" + } + }, { + "id" : "d2f3d16d-21a8-4128-b60b-55e55046fa29", + "name" : "profile", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "profile", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "profile", + "jsonType.label" : "String" + } + }, { + "id" : "825cafb6-3392-491a-bb34-e607330f5170", + "name" : "family name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "lastName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "family_name", + "jsonType.label" : "String" + } + }, { + "id" : "c44ac799-cac2-4200-b71b-badab4b48d92", + "name" : "updated at", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "updatedAt", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "updated_at", + "jsonType.label" : "long" + } + }, { + "id" : "402b2c5f-0a7b-4520-9015-03fa9a1e2e4a", + "name" : "picture", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "picture", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "picture", + "jsonType.label" : "String" + } + }, { + "id" : "f34812b0-28b3-486c-8911-9394890be4f6", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + }, { + "id" : "3fe6f4f2-c881-4b84-87db-8e9b9243a7f0", + "name" : "middle name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "middleName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "middle_name", + "jsonType.label" : "String" + } + }, { + "id" : "4d1465b2-c408-4a62-9821-afce35a55f12", + "name" : "username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "preferred_username", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "9b03908f-dac3-4bbd-8e93-ef29e64a59ad", + "name" : "role_list", + "description" : "SAML role list", + "protocol" : "saml", + "attributes" : { + "consent.screen.text" : "${samlRoleListScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "d6678801-a0f1-4385-ae11-5dee90a9e3b4", + "name" : "role list", + "protocol" : "saml", + "protocolMapper" : "saml-role-list-mapper", + "consentRequired" : false, + "config" : { + "single" : "false", + "attribute.nameformat" : "Basic", + "attribute.name" : "Role" + } + } ] + }, { + "id" : "fa13fc44-16f6-4f82-965d-b86dfad2a984", + "name" : "microprofile-jwt", + "description" : "Microprofile - JWT built-in scope", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "f70938d7-e91f-4c45-bfed-3b974d0e4697", + "name" : "groups", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "foo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "groups", + "jsonType.label" : "String" + } + }, { + "id" : "1636d5e3-2af1-4d54-a60f-9db1f562b009", + "name" : "upn", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "upn", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "1124b695-1319-45aa-bc1b-ec0b2cf99b9e", + "name" : "acr", + "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "0e17d8d7-fb11-4b31-8023-d29611f7d492", + "name" : "acr loa level", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-acr-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "cc53d998-1eac-4574-9bec-58110d92d282", + "name" : "web-origins", + "description" : "OpenID Connect scope for add allowed web origins to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "consent.screen.text" : "", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "635cbac1-7cab-43bd-99fc-f7084aca2fa2", + "name" : "allowed web origins", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-allowed-origins-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + }, { + "id" : "2c901d49-bb6d-44a7-8835-1229b655ccfa", + "name" : "saml_organization", + "description" : "Organization Membership", + "protocol" : "saml", + "attributes" : { + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "60ad6a87-646d-4c9e-932e-34ab1ac51fcb", + "name" : "organization", + "protocol" : "saml", + "protocolMapper" : "saml-organization-membership-mapper", + "consentRequired" : false, + "config" : { } + } ] + }, { + "id" : "943d1441-ee61-4ab5-b5bd-de3c5f8ff25f", + "name" : "roles", + "description" : "OpenID Connect scope for add user roles to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "consent.screen.text" : "${rolesScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "2b5a3df4-1adb-402d-bc28-2bd43224e682", + "name" : "realm roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "foo", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "realm_access.roles", + "jsonType.label" : "String", + "multivalued" : "true" + } + }, { + "id" : "f3b60071-ef26-48a7-9554-67f62f84d543", + "name" : "client roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-client-role-mapper", + "consentRequired" : false, + "config" : { + "user.attribute" : "foo", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "resource_access.${client_id}.roles", + "jsonType.label" : "String", + "multivalued" : "true" + } + }, { + "id" : "b757200e-494a-4585-857e-e4c18aef7a0c", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + }, { + "id" : "4509fb3c-a899-49ad-b690-b031f9568888", + "name" : "email", + "description" : "OpenID Connect built-in scope: email", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${emailScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "e18769b3-778b-47d8-be52-dd2769deebd1", + "name" : "email", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "email", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email", + "jsonType.label" : "String" + } + }, { + "id" : "d98c5037-5178-4cc5-8e22-ca6cf0cb169e", + "name" : "email verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "emailVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email_verified", + "jsonType.label" : "boolean" + } + } ] + }, { + "id" : "6e14db34-285a-47ae-8b43-b3dcf10ae7f8", + "name" : "phone", + "description" : "OpenID Connect built-in scope: phone", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${phoneScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "98cc724c-3f53-47f7-bf9f-baf2f7e08026", + "name" : "phone number verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumberVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number_verified", + "jsonType.label" : "boolean" + } + }, { + "id" : "716a7b58-dcf4-4557-9f84-d21ca19630fb", + "name" : "phone number", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumber", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number", + "jsonType.label" : "String" + } + } ] + } ], + "defaultDefaultClientScopes" : [ "role_list", "saml_organization", "profile", "email", "roles", "web-origins", "acr", "basic" ], + "defaultOptionalClientScopes" : [ "offline_access", "address", "phone", "microprofile-jwt", "organization" ], + "browserSecurityHeaders" : { + "contentSecurityPolicyReportOnly" : "", + "xContentTypeOptions" : "nosniff", + "referrerPolicy" : "no-referrer", + "xRobotsTag" : "none", + "xFrameOptions" : "SAMEORIGIN", + "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection" : "1; mode=block", + "strictTransportSecurity" : "max-age=31536000; includeSubDomains" + }, + "smtpServer" : { }, + "eventsEnabled" : false, + "eventsListeners" : [ "jboss-logging" ], + "enabledEventTypes" : [ ], + "adminEventsEnabled" : false, + "adminEventsDetailsEnabled" : false, + "identityProviders" : [ ], + "identityProviderMappers" : [ ], + "components" : { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { + "id" : "f2a52e27-5582-4ca4-b20c-1864b8339b16", + "name" : "Trusted Hosts", + "providerId" : "trusted-hosts", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "host-sending-registration-request-must-match" : [ "true" ], + "client-uris-must-match" : [ "true" ] + } + }, { + "id" : "95b33704-ec30-4988-b018-f73d8bcf71b5", + "name" : "Full Scope Disabled", + "providerId" : "scope", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "d1114c75-d0b0-4584-a89f-a4e70eab2cd7", + "name" : "Consent Required", + "providerId" : "consent-required", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "6b0202cc-e70e-46da-869b-36ad59907239", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-usermodel-property-mapper", "saml-role-list-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-full-name-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper", "oidc-address-mapper", "saml-user-property-mapper" ] + } + }, { + "id" : "4b976576-c880-48a0-9b4d-2956cfd19b4a", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-attribute-mapper" ] + } + }, { + "id" : "e1861ec9-2761-46fb-8048-149492269ff0", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "51b3aa61-e453-4e0b-bfe1-aefd8353ea06", + "name" : "Max Clients Limit", + "providerId" : "max-clients", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "max-clients" : [ "200" ] + } + }, { + "id" : "851cf8c2-ffe8-4a37-8a12-df04f724c90b", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + } ], + "org.keycloak.userprofile.UserProfileProvider" : [ { + "id" : "34049725-5a66-456c-b895-87ca7c11bb6b", + "providerId" : "declarative-user-profile", + "subComponents" : { }, + "config" : { + "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}]}" ] + } + } ], + "org.keycloak.storage.UserStorageProvider" : [ { + "id" : "3a6f24e8-128b-4ac1-b3ab-694836db82fd", + "name" : "Identity Service", + "providerId" : "ldap", + "subComponents" : { + "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" : [ { + "id" : "bf97cfab-4d53-4994-b3a8-0c771a70467b", + "name" : "email", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "mail" ], + "is.mandatory.in.ldap" : [ "false" ], + "always.read.value.from.ldap" : [ "false" ], + "read.only" : [ "false" ], + "user.model.attribute" : [ "email" ] + } + }, { + "id" : "cddffa16-0aff-4e0c-99a2-021f0495de03", + "name" : "last name", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "sn" ], + "is.mandatory.in.ldap" : [ "true" ], + "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "false" ], + "user.model.attribute" : [ "lastName" ] + } + }, { + "id" : "4eaae3fa-d280-4605-b09d-1caeb881322c", + "name" : "modify date", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "modifyTimestamp" ], + "is.mandatory.in.ldap" : [ "false" ], + "read.only" : [ "true" ], + "always.read.value.from.ldap" : [ "true" ], + "user.model.attribute" : [ "modifyTimestamp" ] + } + }, { + "id" : "98c4a2c1-d509-443b-8475-fc971c193324", + "name" : "first name", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "cn" ], + "is.mandatory.in.ldap" : [ "true" ], + "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "false" ], + "user.model.attribute" : [ "firstName" ] + } + }, { + "id" : "74dbebb4-9881-4be1-8b30-6b0f2a718c86", + "name" : "username", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "uid" ], + "is.mandatory.in.ldap" : [ "true" ], + "always.read.value.from.ldap" : [ "false" ], + "read.only" : [ "false" ], + "user.model.attribute" : [ "username" ] + } + }, { + "id" : "5692d060-55b8-4cb1-b68f-0ae123cd9d03", + "name" : "system", + "providerId" : "group-ldap-mapper", + "subComponents" : { }, + "config" : { + "mode" : [ "LDAP_ONLY" ], + "membership.attribute.type" : [ "DN" ], + "user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ], + "group.name.ldap.attribute" : [ "cn" ], + "ignore.missing.groups" : [ "false" ], + "membership.user.ldap.attribute" : [ "uid" ], + "preserve.group.inheritance" : [ "false" ], + "membership.ldap.attribute" : [ "member" ], + "groups.dn" : [ "ou=users,${LDAP_ROOT}" ], + "memberof.ldap.attribute" : [ "memberOf" ], + "group.object.classes" : [ "groupOfNames" ], + "drop.non.existing.groups.during.sync" : [ "false" ], + "groups.path" : [ "/" ] + } + }, { + "id" : "0453ae29-3cdc-4e09-800e-0117e7a2fb68", + "name" : "creation date", + "providerId" : "user-attribute-ldap-mapper", + "subComponents" : { }, + "config" : { + "ldap.attribute" : [ "createTimestamp" ], + "is.mandatory.in.ldap" : [ "false" ], + "read.only" : [ "true" ], + "always.read.value.from.ldap" : [ "true" ], + "user.model.attribute" : [ "createTimestamp" ] + } + } ] + }, + "config" : { + "pagination" : [ "false" ], + "fullSyncPeriod" : [ "-1" ], + "startTls" : [ "false" ], + "connectionPooling" : [ "false" ], + "usersDn" : [ "ou=users,${LDAP_ROOT}" ], + "cachePolicy" : [ "DEFAULT" ], + "useKerberosForPasswordAuthentication" : [ "false" ], + "importEnabled" : [ "true" ], + "enabled" : [ "true" ], + "changedSyncPeriod" : [ "-1" ], + "usernameLDAPAttribute" : [ "uid" ], + "bindCredential" : [ "${LDAP_ADMIN_PASSWORD}" ], + "bindDn" : [ "${LDAP_ADMIN_DN}" ], + "vendor" : [ "other" ], + "uuidLDAPAttribute" : [ "entryUUID" ], + "allowKerberosAuthentication" : [ "false" ], + "connectionUrl" : [ "ldap://identity-service:1389" ], + "syncRegistrations" : [ "true" ], + "authType" : [ "simple" ], + "krbPrincipalAttribute" : [ "krb5PrincipalName" ], + "searchScope" : [ "1" ], + "useTruststoreSpi" : [ "always" ], + "usePasswordModifyExtendedOp" : [ "false" ], + "trustEmail" : [ "false" ], + "userObjectClasses" : [ "inetOrgPerson, organizationalPerson, person" ], + "rdnLDAPAttribute" : [ "uid" ], + "editMode" : [ "READ_ONLY" ], + "validatePasswordPolicy" : [ "false" ] + } + } ], + "org.keycloak.keys.KeyProvider" : [ { + "id" : "5b1052d2-fb71-47d2-86f9-908c869c8d1b", + "name" : "hmac-generated-hs512", + "providerId" : "hmac-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "dff6ccc5-bd9b-467c-8e93-0fe51d353eaf" ], + "secret" : [ "Q8srw06SZoVO9ZJtKsfKPZyg8O7w01pLMv-CVMbxhBNXJ2lldqKmDgYxHBWnyeIYjXsp2M_Q-SQh1MZc7THyJJpFpRvqN8q9ZgUyWv3GZ-TH7Cez7aeg-WEQrWywBTFfacu_VjmDxucinZoJTWLaH9NNdCcZSMeuBHyM1V__BeE" ], + "priority" : [ "100" ], + "algorithm" : [ "HS512" ] + } + }, { + "id" : "fd48cdb1-8be8-4ac9-9347-dc3e91db95d7", + "name" : "rsa-enc-generated", + "providerId" : "rsa-enc-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEpAIBAAKCAQEA3ZslFoBBYiRi9ZF9uMllfkL6ZDheVTSDTPgQar/ueThttbnovNEJ5W2xIJrSPJkN5yuq55zycwr8IzMjBPt9DLbKxqHmaUm2YkO3MMPdQGLoI8j8no6IB74qKBxpyUoEDXmmUaE02u+QkuBohhBuBSyvzktWzv25giXVxzwFqzmRx6aJXvZSKuE6fBqbIA+hxit6Wm35OkLNl6UKDDI1WmhAuaNwV/UUsJvOWW2QFAosLCr7bevrIX+mHWUimiTcBQC/hW6K391dA0LczHHGJ//74r/OeXvF4ODBdFSl1NuamgRGZnRD7pjTtp57mutwWm+bSWo2/DrCFQfjfVKhkQIDAQABAoIBAA+zk+ult7w/7sEOh3Vl06qgDUS3l7t6xojYFLWzlq6BGIjlPL/QId7fKEsynQ3NHGaSOgBCJw2OrDHESElslj4l33U2eHBiWClbOeobHpyWxXLvpTKIz8uYpj0EUlyAQYxA389t2CRhEAHQI6fIFzuHoIdB4Es3QAMgMib1MkOg5VGsuV1LE8HcK44uFBOWXeQmEuasMQqmvAwj9M2yS6xjsxq0nS381PY1JYR7suhmOyvyZas/YvmltOVvQczwzW/MfMGga14YoJyAAz/7VZXCgVTs1ffHg9ET6s1PkNwVNTDAGriMG7GtN40UFEukS5cb2SRIJdg89DnHxHoNQ3cCgYEA+QIaUDuzgN+0D1ydYnCbTDwolHtBce7EUkOpaJRXyfwsrf/m8/bx302JSQLXs9zd9B3VwHWQIDQElAKcE/nbqUJPZLvjAWuSU/viLljGab5++mLKQ537UEV74msFj5rxwulzvQQ0owPsf/gHgTQ27ds/fWufywWpSCr/0+aE+NsCgYEA49QShQ1LakkAtckJYJ5W5TycDHMj1WV5GHUy9SX6fDNK9HpL1RQv5RY2yNa5nlpy5Izv5LzQb+6vAGZcfdd3WXv934k5qwAh+prmorWS2gXEbQJAan1BsApjFgtbJqyxLjhHywlG3W9Eh+HImlLTUKnx/3tr3Yn4vP7YAA1ZVQMCgYB+uZQ8qvWCq9aOTtsGAzr1xFP+pO+8lQAywZ6Qy5YWBJGUh/y4wj98HpC0qI6wScJnf1uOVAZibTa7QMy/2dPxwv52zKwNx/ozZahJYAKyRDGJKge3+8mvo30V0NOGrxtEz9yIIIDNSaztv4PKPJGL4Z3hLYmoIBxzzvZdmB6qKwKBgQDKqOYEduwD0oaQLhFqYc8YQU7qgC168LXEfNRkX3EutA3T5Um5dCialqULCH67Dugux/PJO/AJ8X64U1WpF1ZyQip1gsLKiuau3sWULQJBcGnnMd6NG3ioGMVFYbqmb214mNW8FTd1WDnUyZJBPLX+hf3fbjFoMwgRTnxjp3w0cwKBgQDxnYNXZqVPJsDDqW23+uj66b0n1oamhe/hl6zm2uhhq5hXXIRbRPqCWznZvm6eD/kcvknrNYopsb90RkJYjl9povaIFrSWH28QEaTHIzJmW0tKOxL0bQo05AmRXLnW2vlBafno6ZQGFAotnIIJLwzU9Tu2PwRQ83ypP1mvWowXzA==" ], + "certificate" : [ "MIICmzCCAYMCBgGUfz5NvjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjUwMTE5MTU0NDM3WhcNMzUwMTE5MTU0NjE3WjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdmyUWgEFiJGL1kX24yWV+QvpkOF5VNINM+BBqv+55OG21uei80QnlbbEgmtI8mQ3nK6rnnPJzCvwjMyME+30MtsrGoeZpSbZiQ7cww91AYugjyPyejogHviooHGnJSgQNeaZRoTTa75CS4GiGEG4FLK/OS1bO/bmCJdXHPAWrOZHHpole9lIq4Tp8GpsgD6HGK3pabfk6Qs2XpQoMMjVaaEC5o3BX9RSwm85ZbZAUCiwsKvtt6+shf6YdZSKaJNwFAL+Fborf3V0DQtzMccYn//viv855e8Xg4MF0VKXU25qaBEZmdEPumNO2nnua63Bab5tJajb8OsIVB+N9UqGRAgMBAAEwDQYJKoZIhvcNAQELBQADggEBALGWVRlB9zbRWtv9fgxyWEzPqcZeyILAp0//bC4Y+EEe1fS5EfgP/J5U7j0DNt2Sc87uVkGCOGjTx7du6a/9uPA4ULMLUQO0Xusz41YrntjLWdWveLDmcqEYfF52qJQRhX7iYGGGG1Iq6Ju/1dfiX3nBD/RnVVHHf5s8QY0v0V/AnfWVaj3eFA8tybx1VsD7A8Whm7jgcQTOqu2L5F4gw4BwDDkCIYhkJcfPu1pvM+R3eDmXN8rTEVnNcCtvLFtTlBcmHhYnCYJaNHiSquKs5wDuDE6crBPgWfzzk2XHKLpmamdFyjzL8WFUmhnypQfwBNjnsgAl2U059bQz1fyBIlM=" ], + "priority" : [ "100" ], + "algorithm" : [ "RSA-OAEP" ] + } + }, { + "id" : "0ff03eb6-b43b-4065-b583-9e310f53a573", + "name" : "rsa-generated", + "providerId" : "rsa-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEogIBAAKCAQEAsetSXQJDd0r9Cv6hB/QyQ7DlVXAQeRuwasOTF5Eoez0mTuW1DGraTIttZwPOYMxvDOs4c9/+0QA9DNUtc4PHGXPB0WxuKDSikkVlPtyqOnrcaSYYArhHkYU727M+8r+vIhtToYB/g88mlMH4JfL0tUJQGlnOrDxUUP7RiWAbzQ33JDAAyV6HUOm1SgNH61V6z8a06m9NL//trN2PeILqNt/DT7iwTd+bmNQZzw+wSVTGR4K3O5sjWjRHvihAxvOCKvyzpYnbQ5AM/GpXOmahpuOQ45LebSYHlU7YSUVXH8Q2yLefjRCZ0H0mkRDx+yBr/vkKhF5vqv+lH3qKA6H6jQIDAQABAoIBAFdLSWb/BFEUhuENG79GTh8uPOdVi4+QSVeoy5PFkeIdl50gUVtdVew2gKAJmwmdZGMnSdR4s5KiFlIkih9iKZ7QT+lL1SR+5sDzsYBNTmxQ+bHRkfhLqDm68CqUYK9D407Nr5PO80GdsqVMIk+kS/JfLeQv6hpRo2D2FaLcd+d8Pzp72qgCcRTLGKzjPEv+ffA9eL6smP+E3/m54YS7e3jwMyVdl4IXAKBjPMkdtKMWnuGxHnPrZ71A1LJjL4un4N8HjIMGDCyFFkCvPE7FhzpdN249VF29QTfU+QHjiKC0O6nej/A+4kIbWjDF+YmmSEJRSKfk7SVuzs4XnBfsz7UCgYEA6zW+Sud2qos5/DQUUWTleKfqhaEzVvy2pWMXUqaHzvPu7NsaLl+DbEIRvoxJzqdWfwwnWIrD6kGU8GVa1I8RLKK3JS681R6Pw/Ih5JKw9n5lkD+gIpE5ryENQ5jGdwFRUTpJxKY2aPUve7PsyM5flau2d3eo/4SXIRy1pCMcAgMCgYEAwaU44XDH54rLVFuSpg6ck7uSxb15987AECW1z6n/oIAw0reVvCvp8tInk6owKRqvxVCM3W/B0UQONGDmcCcK1GoaO+hJZV/t+c9NAHrna2t10+bHRHwYLG9FUu/hWKtLsxqathsEXdS02m6y6jX3UWuR6Qwz2XYH7PWS3/EHNC8CgYA//qxapuVTe3P4WZcZmjERBea6GuTkCvgKwY4r76FNvnLIQMi7y0Lvpn47cOH39vGCuaTO41pwlw1V5s2yvYY3tcHMvQ2lkp4c+vkbvomlVzh86cLBBPBD5OM9/AgrgtFEH27IsUxmfCdCKe8Hp5a8Gy8XDBiQBNw1pyEImoDZTwKBgCU+nwMVSw2or1TpS/puYwUzFZa8y8Gy3VP9vMtVOhpnrXxJ3R3VIGkYrI4FNMAjJt1/kahhf1i9izHd1VSK3dVfFu6gzcUWv1HF4lyORwZtI7t+7qKob4nUWPQLuT7xq1ymaE1QQvW9HI/KrNTJTmk1lFnLhAl2Xy3fScGSvTz3AoGABYA6e1Ksiex2Iv37f16l6lo6hfbUKIoAooyrTKjwqpWGaFtDBQxTNaOR93APjg1rX+wtcwMpl1ABpsf2a1DoRJBItH1oE7q6ZDJ/qz2BnJkH8TvDy89Cbe/8R2vwQIsE7rDzW3Ivfx2KN//iKHAA6BEqf3m2p4u2Dqient5XC9M=" ], + "certificate" : [ "MIICmzCCAYMCBgGUfz5OEDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjUwMTE5MTU0NDM3WhcNMzUwMTE5MTU0NjE3WjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx61JdAkN3Sv0K/qEH9DJDsOVVcBB5G7Bqw5MXkSh7PSZO5bUMatpMi21nA85gzG8M6zhz3/7RAD0M1S1zg8cZc8HRbG4oNKKSRWU+3Ko6etxpJhgCuEeRhTvbsz7yv68iG1OhgH+DzyaUwfgl8vS1QlAaWc6sPFRQ/tGJYBvNDfckMADJXodQ6bVKA0frVXrPxrTqb00v/+2s3Y94guo238NPuLBN35uY1BnPD7BJVMZHgrc7myNaNEe+KEDG84Iq/LOlidtDkAz8alc6ZqGm45Djkt5tJgeVTthJRVcfxDbIt5+NEJnQfSaREPH7IGv++QqEXm+q/6UfeooDofqNAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADmCns7tVOSdgo8sdJ/pviO1wjbmsNdg8vwn2uTsPesYLTya9iaIXVfjvhM2jOqoglIGp2/udjphOJvJapmpPmr7v6jPSrzW6phW4NP75scWR61gr9a+HKGA2imA/UwRPbb4gV3sIkIZtzlAiBJ7mItQ3C4gg3UpzwFkCxeUVPira0zq87T0p3c8b2QaUdsqhnpHUlB1KeSKstGgrUShZbOh0/Qzu+Fkw+CPsbshlRpCzpL5gwz8YolLeAl9E+qXH2fbugc+gvJyxciN6bn5tMa8QwV833jYSUdt3f+P+BwVCWG1XbkbzLTxd3JWB5JNXtEzXpylnRgtTydLDTZyC3c=" ], + "priority" : [ "100" ] + } + }, { + "id" : "df28b561-7463-4927-974d-615618056b41", + "name" : "aes-generated", + "providerId" : "aes-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "04a0e3ff-030f-4d22-a125-449f1541b83c" ], + "secret" : [ "uhC2E9sCbuigVhRLbnCmCQ" ], + "priority" : [ "100" ] + } + } ] + }, + "internationalizationEnabled" : false, + "supportedLocales" : [ ], + "authenticationFlows" : [ { + "id" : "2e13d5a8-b0fb-475b-8991-66d1cc8e99f1", + "alias" : "Account verification options", + "description" : "Method with which to verity the existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-email-verification", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Verify Existing Account by Re-authentication", + "userSetupAllowed" : false + } ] + }, { + "id" : "0bf3a099-5ef5-4ea9-b325-5bc9699180a6", + "alias" : "Browser - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "88ca29ab-cbe0-4e3f-938a-e6c5327748ab", + "alias" : "Direct Grant - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "789e7d43-bc05-44d2-8c09-de7fee9d56de", + "alias" : "First broker login - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "ee145b84-2b30-438e-9cee-6fe90909af1a", + "alias" : "Handle Existing Account", + "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-confirm-link", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Account verification options", + "userSetupAllowed" : false + } ] + }, { + "id" : "853d891a-0009-443c-91c3-a7f1ad1dd0dc", + "alias" : "Reset - Conditional OTP", + "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "d7f13a9b-a13c-4236-ae41-df8da7e5fa8d", + "alias" : "User creation or linking", + "description" : "Flow for the existing/non-existing user alternatives", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "create unique user config", + "authenticator" : "idp-create-user-if-unique", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Handle Existing Account", + "userSetupAllowed" : false + } ] + }, { + "id" : "3cb699ee-11d4-44be-878b-a183b9e96b59", + "alias" : "Verify Existing Account by Re-authentication", + "description" : "Reauthentication of existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "First broker login - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "61d5a1e2-7074-41ad-97bf-e5c41c70989e", + "alias" : "browser", + "description" : "Browser based authentication", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-cookie", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-spnego", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "identity-provider-redirector", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 25, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "forms", + "userSetupAllowed" : false + } ] + }, { + "id" : "21dabcf1-8817-4f2d-981a-13239e160b56", + "alias" : "clients", + "description" : "Base authentication for clients", + "providerId" : "client-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "client-secret", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-secret-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-x509", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 40, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "a349aeb2-9373-47ec-9381-0c379df56c71", + "alias" : "direct grant", + "description" : "OpenID Connect Resource Owner Grant", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "direct-grant-validate-username", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "Direct Grant - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "39b3aa37-4ece-4e31-acbc-79889994713e", + "alias" : "docker auth", + "description" : "Used by Docker clients to authenticate against the IDP", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "docker-http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "18561349-cc5e-4e5b-bcb2-979645118f96", + "alias" : "first broker login", + "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "review profile config", + "authenticator" : "idp-review-profile", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "User creation or linking", + "userSetupAllowed" : false + } ] + }, { + "id" : "9933f082-3d53-4575-b011-90e6933fb2a1", + "alias" : "forms", + "description" : "Username, password, otp and other auth forms.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Browser - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "00285357-456a-4fd4-b449-ed25253e6364", + "alias" : "registration", + "description" : "Registration flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-page-form", + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : true, + "flowAlias" : "registration form", + "userSetupAllowed" : false + } ] + }, { + "id" : "b9131fa9-5614-42b4-8353-c6c15e66c2ce", + "alias" : "registration form", + "description" : "Registration form", + "providerId" : "form-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-user-creation", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-password-action", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 50, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-recaptcha-action", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 60, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-terms-and-conditions", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 70, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "424642cc-3a71-4732-ba38-b737179ce37f", + "alias" : "reset credentials", + "description" : "Reset credentials for a user if they forgot their password or something", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "reset-credentials-choose-user", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-credential-email", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 40, + "autheticatorFlow" : true, + "flowAlias" : "Reset - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "c8c9c4dc-a39d-4ba6-ad4b-9447a8125349", + "alias" : "saml ecp", + "description" : "SAML ECP Profile Authentication Flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + } ], + "authenticatorConfig" : [ { + "id" : "49d63952-ca6e-450c-a65f-70388169cb90", + "alias" : "create unique user config", + "config" : { + "require.password.update.after.registration" : "false" + } + }, { + "id" : "5b4f58fc-aff7-4e12-8c48-40aeb3db1432", + "alias" : "review profile config", + "config" : { + "update.profile.on.first.login" : "missing" + } + } ], + "requiredActions" : [ { + "alias" : "CONFIGURE_TOTP", + "name" : "Configure OTP", + "providerId" : "CONFIGURE_TOTP", + "enabled" : true, + "defaultAction" : false, + "priority" : 10, + "config" : { } + }, { + "alias" : "TERMS_AND_CONDITIONS", + "name" : "Terms and Conditions", + "providerId" : "TERMS_AND_CONDITIONS", + "enabled" : false, + "defaultAction" : false, + "priority" : 20, + "config" : { } + }, { + "alias" : "UPDATE_PASSWORD", + "name" : "Update Password", + "providerId" : "UPDATE_PASSWORD", + "enabled" : true, + "defaultAction" : false, + "priority" : 30, + "config" : { } + }, { + "alias" : "UPDATE_PROFILE", + "name" : "Update Profile", + "providerId" : "UPDATE_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 40, + "config" : { } + }, { + "alias" : "VERIFY_EMAIL", + "name" : "Verify Email", + "providerId" : "VERIFY_EMAIL", + "enabled" : true, + "defaultAction" : false, + "priority" : 50, + "config" : { } + }, { + "alias" : "delete_account", + "name" : "Delete Account", + "providerId" : "delete_account", + "enabled" : false, + "defaultAction" : false, + "priority" : 60, + "config" : { } + }, { + "alias" : "webauthn-register", + "name" : "Webauthn Register", + "providerId" : "webauthn-register", + "enabled" : true, + "defaultAction" : false, + "priority" : 70, + "config" : { } + }, { + "alias" : "webauthn-register-passwordless", + "name" : "Webauthn Register Passwordless", + "providerId" : "webauthn-register-passwordless", + "enabled" : true, + "defaultAction" : false, + "priority" : 80, + "config" : { } + }, { + "alias" : "VERIFY_PROFILE", + "name" : "Verify Profile", + "providerId" : "VERIFY_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 90, + "config" : { } + }, { + "alias" : "delete_credential", + "name" : "Delete Credential", + "providerId" : "delete_credential", + "enabled" : true, + "defaultAction" : false, + "priority" : 100, + "config" : { } + }, { + "alias" : "update_user_locale", + "name" : "Update User Locale", + "providerId" : "update_user_locale", + "enabled" : true, + "defaultAction" : false, + "priority" : 1000, + "config" : { } + } ], + "browserFlow" : "browser", + "registrationFlow" : "registration", + "directGrantFlow" : "direct grant", + "resetCredentialsFlow" : "reset credentials", + "clientAuthenticationFlow" : "clients", + "dockerAuthenticationFlow" : "docker auth", + "firstBrokerLoginFlow" : "first broker login", + "attributes" : { + "cibaBackchannelTokenDeliveryMode" : "poll", + "cibaAuthRequestedUserHint" : "login_hint", + "clientOfflineSessionMaxLifespan" : "0", + "oauth2DevicePollingInterval" : "5", + "clientSessionIdleTimeout" : "0", + "clientOfflineSessionIdleTimeout" : "0", + "cibaInterval" : "5", + "realmReusableOtpCode" : "false", + "cibaExpiresIn" : "120", + "oauth2DeviceCodeLifespan" : "600", + "parRequestUriLifespan" : "60", + "clientSessionMaxLifespan" : "0", + "frontendUrl" : "", + "organizationsEnabled" : "false", + "acr.loa.map" : "{}" + }, + "keycloakVersion" : "26.0.4", + "userManagedAccessAllowed" : false, + "organizationsEnabled" : false, + "clientProfiles" : { + "profiles" : [ ] + }, + "clientPolicies" : { + "policies" : [ ] + } +} \ No newline at end of file diff --git a/helm/dbrepo/templates/analyse-deployment.yaml b/helm/dbrepo/templates/analyse-deployment.yaml index b2e069322b0ef05e11b80dbf2727d5590748389e..d3e6b699c0b66e1100bdae7aab6a560380a6f19e 100644 --- a/helm/dbrepo/templates/analyse-deployment.yaml +++ b/helm/dbrepo/templates/analyse-deployment.yaml @@ -44,7 +44,7 @@ spec: - /bin/bash - -ec - "curl -sSL localhost:8080/health | grep 'UP' || exit 1" - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: exec: diff --git a/helm/dbrepo/templates/auth-configmap.yaml b/helm/dbrepo/templates/auth-configmap.yaml index 01f83a092cb7c326d4719135ef0c34db80556216..6fe5b9ed1df612dee53a095413d9d48183383f42 100644 --- a/helm/dbrepo/templates/auth-configmap.yaml +++ b/helm/dbrepo/templates/auth-configmap.yaml @@ -8,5468 +8,18 @@ binaryData: create-event-listener.jar: |- {{ .Files.Get "files/create-event-listener.jar" | b64enc }} data: - dbrepo-realm.json: |- - { - "id" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "realm" : "dbrepo", - "notBefore" : 0, - "defaultSignatureAlgorithm" : "RS256", - "revokeRefreshToken" : false, - "refreshTokenMaxReuse" : 1, - "accessTokenLifespan" : 900, - "accessTokenLifespanForImplicitFlow" : 900, - "ssoSessionIdleTimeout" : 864000, - "ssoSessionMaxLifespan" : 2592000, - "ssoSessionIdleTimeoutRememberMe" : 0, - "ssoSessionMaxLifespanRememberMe" : 0, - "offlineSessionIdleTimeout" : 2592000, - "offlineSessionMaxLifespanEnabled" : false, - "offlineSessionMaxLifespan" : 5184000, - "clientSessionIdleTimeout" : 0, - "clientSessionMaxLifespan" : 0, - "clientOfflineSessionIdleTimeout" : 0, - "clientOfflineSessionMaxLifespan" : 0, - "accessCodeLifespan" : 60, - "accessCodeLifespanUserAction" : 300, - "accessCodeLifespanLogin" : 1800, - "actionTokenGeneratedByAdminLifespan" : 43200, - "actionTokenGeneratedByUserLifespan" : 1800, - "oauth2DeviceCodeLifespan" : 600, - "oauth2DevicePollingInterval" : 5, - "enabled" : true, - "sslRequired" : "none", - "registrationAllowed" : true, - "registrationEmailAsUsername" : false, - "rememberMe" : false, - "verifyEmail" : true, - "loginWithEmailAllowed" : false, - "duplicateEmailsAllowed" : false, - "resetPasswordAllowed" : false, - "editUsernameAllowed" : false, - "bruteForceProtected" : true, - "permanentLockout" : false, - "maxTemporaryLockouts" : 0, - "bruteForceStrategy" : "MULTIPLE", - "maxFailureWaitSeconds" : 900, - "minimumQuickLoginWaitSeconds" : 60, - "waitIncrementSeconds" : 60, - "quickLoginCheckMilliSeconds" : 1000, - "maxDeltaTimeSeconds" : 1036800, - "failureFactor" : 10, - "roles" : { - "realm" : [ { - "id" : "48f38342-1e3f-427a-995d-c436eaee65cb", - "name" : "default-user-handling", - "description" : "${default-user-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-user-theme", "modify-user-information" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "9bb4a8dc-28e0-4645-b62f-cc94425f0cb0", - "name" : "default-maintenance-handling", - "description" : "${default-maintenance-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-maintenance-message", "find-maintenance-message", "update-maintenance-message", "delete-maintenance-message", "list-maintenance-messages" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c", - "name" : "default-system-roles", - "description" : "${default-system-roles}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "143ba359-5fa2-451e-8296-43ecf20bb251", - "name" : "update-semantic-concept", - "description" : "${update-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c", - "name" : "escalated-container-handling", - "description" : "${escalated-container-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-container", "delete-container" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe", - "name" : "list-tables", - "description" : "${list-tables}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3", - "name" : "default-database-handling", - "description" : "${default-database-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "74648f9a-777e-4ef9-b97b-4c5d749d862f", - "name" : "update-search-index", - "description" : "${update-search-index}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "22492b64-c633-48a0-9678-b28669f2885b", - "name" : "execute-semantic-query", - "description" : "${execute-semantic-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "4ed919fa-edc5-44e5-9411-607786e4a86d", - "name" : "view-table-history", - "description" : "${view-table-history}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d89a2881-b642-4abb-b990-196e71372f6b", - "name" : "default-table-handling", - "description" : "${default-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44", - "name" : "create-database-view", - "description" : "${create-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7", - "name" : "default-semantics-handling", - "description" : "${default-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe4a01f3-6590-4df6-9ade-5a9c1fae4736", - "name" : "create-semantic-unit", - "description" : "${create-semantic-unit}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8", - "name" : "update-table-statistic", - "description" : "${update-table-statistic}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a", - "name" : "escalated-user-handling", - "description" : "${escalated-user-handling}", - "composite" : true, - "composites" : { - "realm" : [ "find-user" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be4e1aba-e276-4241-b6ea-01dce6c52f8b", - "name" : "find-container", - "description" : "${find-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3a801b48-f3c2-4bc6-aa25-c7a91d5b32a7", - "name" : "default-researcher-roles", - "description" : "${default-researcher-roles}", - "composite" : true, - "composites" : { - "realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-view-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3d8104fb-8307-40f0-b4b2-c3e518957110", - "name" : "view-table-data", - "description" : "${view-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe71b907-7020-44ab-9964-da2b87264582", - "name" : "create-database", - "description" : "${create-database}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e51b63c2-48dd-4bd6-95fb-d257d21b26ba", - "name" : "import-database-data", - "description" : "${import-database-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "1f0a9b13-c2b8-474c-bc08-59dbd71835a6", - "name" : "modify-database-image", - "description" : "${modify-database-image}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a7ad038c-5c06-42fc-951c-15ac09d4df66", - "name" : "modify-database-owner", - "description" : "${modify-database-owner}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "22449528-00c9-4e86-9400-4b8ae6fd8f4d", - "name" : "modify-view-visibility", - "description" : "${modify-view-visibility}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c12c1f4e-186f-4153-a795-26e79fb623d6", - "name" : "create-ontology", - "description" : "${create-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b60a5694-4099-4f7d-a7e9-4c433e0eb9c9", - "name" : "update-semantic-unit", - "description" : "${update-semantic-unit}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e9854bbb-4580-4757-b1ae-305934173249", - "name" : "create-database-access", - "description" : "${create-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e", - "name" : "list-databases", - "description" : "${list-databases}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a", - "name" : "default-view-handling", - "description" : "${default-view-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "535f1484-4514-4d24-8d97-e3f6c11a426b", - "name" : "create-container", - "description" : "${create-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558", - "name" : "create-maintenance-message", - "description" : "${create-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "973f0999-cc70-4b28-9f43-979c470bea8e", - "name" : "default-data-steward-roles", - "description" : "${default-data-steward-roles}", - "composite" : true, - "composites" : { - "realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e1383fb7-d54c-4732-9146-93030eb2ca50", - "name" : "escalated-query-handling", - "description" : "${escalated-query-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2", - "name" : "find-user", - "description" : "${find-user}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e4cfdc4d-2373-477b-a8df-161db99aba00", - "name" : "create-foreign-identifier", - "description" : "${create-foreign-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df", - "name" : "escalated-semantics-handling", - "description" : "${escalated-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "09147c48-273b-450b-8b11-7ef9b9245244", - "name" : "export-table-data", - "description" : "${export-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d14af590-60a8-4d75-b864-40ee0165bd7f", - "name" : "delete-database-access", - "description" : "${delete-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be051d45-cd74-4b13-8a45-f2d3351bd995", - "name" : "table-semantic-analyse", - "description" : "${table-semantic-analyse}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "272a79a7-e282-4261-8f7d-5d5d1364243a", - "name" : "update-maintenance-message", - "description" : "${update-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77", - "name" : "update-table", - "description" : "${update-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "64c16bfb-2015-48ad-a23f-637ff24419cb", - "name" : "default-query-handling", - "description" : "${default-query-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b05e9b2b-748d-490b-949b-e78655bf7805", - "name" : "check-foreign-database-access", - "description" : "${check-foreign-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c047d521-cec3-4444-86c4-aef098489b7b", - "name" : "delete-maintenance-message", - "description" : "${delete-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76", - "name" : "update-database-view", - "description" : "${update-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "88f82262-be80-4d18-9fb4-5529da031f33", - "name" : "system", - "description" : "${system}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e14ab76b-1c24-484d-ae2d-478b8457edea", - "name" : "list-licenses", - "description" : "${list-licenses}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd", - "name" : "modify-foreign-table-column-semantics", - "description" : "${modify-foreign-table-column-semantics}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8", - "name" : "list-database-views", - "description" : "${list-database-views}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b372f8f7-d203-4293-b991-ad93fb505917", - "name" : "escalated-database-handling", - "description" : "${escalated-database-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", - "name" : "default-roles-dbrepo", - "description" : "${role_default-roles}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3293799a-82b9-4f47-8f25-1aad2e0222fd", - "name" : "find-identifier", - "description" : "${find-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "aaa3f804-38a0-4474-b8e9-f1020c4b3f62", - "name" : "list-queries", - "description" : "${list-queries}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443", - "name" : "update-ontology", - "description" : "${update-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "11f7973e-d1eb-42cb-a35d-c59dfc122775", - "name" : "modify-user-theme", - "description" : "${modify-user-theme}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d", - "name" : "export-query-data", - "description" : "${export-query-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "da493b7e-fb9b-43ca-82a5-e274ad2e6b39", - "name" : "find-query", - "description" : "${find-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a4d4a788-ebcf-4d32-baed-4a85616ca037", - "name" : "escalated-identifier-handling", - "description" : "${escalated-identifier-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-foreign-identifier", "modify-identifier-metadata" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "ea38d69d-17b8-4c65-95e8-1c3501b83618", - "name" : "default-container-handling", - "description" : "${default-container-handling}", - "composite" : true, - "composites" : { - "realm" : [ "find-container" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "8b8813e0-af07-4d04-a8c1-e3f37192bace", - "name" : "publish-identifier", - "description" : "${publish-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a", - "name" : "default-broker-handling", - "description" : "${default-broker-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "71874bde-64a5-4a69-8685-d8998303a80c", - "name" : "delete-table-data", - "description" : "${delete-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7c0306fc-3b03-4c64-87d1-9a34f2073977", - "name" : "modify-table-column-semantics", - "description" : "${modify-table-column-semantics}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829", - "name" : "delete-container", - "description" : "${delete-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e", - "name" : "list-containers", - "description" : "${list-containers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "795c7bb8-3502-414a-a97b-2ba1cfd6a79c", - "name" : "persist-query", - "description" : "${persist-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7", - "name" : "list-identifiers", - "description" : "${list-identifiers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e4bfaf36-9a5d-43e0-9fa3-0f4ea7bad8d0", - "name" : "default-developer-roles", - "description" : "${default-developer-roles}", - "composite" : true, - "composites" : { - "realm" : [ "escalated-query-handling", "escalated-broker-handling", "default-table-handling", "escalated-database-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-maintenance-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e", - "name" : "create-semantic-concept", - "description" : "${create-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5", - "name" : "insert-table-data", - "description" : "${insert-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a0942e33-441b-4343-9f02-4353d03f7bbb", - "name" : "find-database", - "description" : "${find-database}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6a0bb740-4448-49be-aee8-6dd183325be5", - "name" : "delete-foreign-table", - "description" : "${delete-foreign-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7f3652c7-3073-4566-ab63-25385495ebc3", - "name" : "modify-database-visibility", - "description" : "${modify-database-visibility}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "4a5df51d-f14d-41a2-ad70-6521df5a5b4f", - "name" : "offline_access", - "description" : "${role_offline-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fd41c4c3-d2f8-4f49-84c7-dba84e9a5575", - "name" : "execute-query", - "description" : "${execute-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1", - "name" : "create-table", - "description" : "${create-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8", - "name" : "find-foreign-user", - "description" : "${find-foreign-user}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b", - "name" : "modify-identifier-metadata", - "description" : "${modify-identifier-metadata}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "64c2b8f2-1527-4928-81ea-b2651512d028", - "name" : "delete-ontology", - "description" : "${delete-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d6e38368-b40f-423b-82e4-e8aa595237c9", - "name" : "find-maintenance-message", - "description" : "${find-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c", - "name" : "check-database-access", - "description" : "${check-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "74013867-e426-46cc-ab98-2f4a9225ad1e", - "name" : "find-table", - "description" : "${find-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a", - "name" : "modify-user-information", - "description" : "${modify-user-information}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c367241f-b5b5-491f-84d5-07fe1bef3877", - "name" : "default-identifier-handling", - "description" : "${default-identifier-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-identifier", "list-identifiers", "create-identifier", "find-identifier", "publish-identifier" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "ba1ad8f2-39aa-487d-987f-645e8a459559", - "name" : "delete-table", - "description" : "${delete-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "09f7bdb0-296f-46c8-a3a3-8f9254fb17e4", - "name" : "list-maintenance-messages", - "description" : "${list-maintenance-messages}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501", - "name" : "update-database-access", - "description" : "${update-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f43e86ed-76de-4ca8-9b5e-c292c9359bfe", - "name" : "escalated-broker-handling", - "description" : "${escalated-broker-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "916b1e65-f60c-42cd-96e4-5c98ffc1ba3c", - "name" : "uma_authorization", - "description" : "${role_uma_authorization}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d1afa3ed-bf4f-469a-a061-ad7325fb8d9e", - "name" : "delete-database-view", - "description" : "${delete-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6f044bad-6651-4408-bffa-20c2d8f92eee", - "name" : "create-identifier", - "description" : "${create-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be91195a-e30a-4d15-a8da-0aca0a68782f", - "name" : "escalated-table-handling", - "description" : "${escalated-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-foreign-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "98bee7d6-d78c-4e7f-b6a3-3705968b248c", - "name" : "list-ontologies", - "description" : "${list-ontologies}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c", - "name" : "re-execute-query", - "description" : "${re-execute-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a9b5181a-8135-41d3-9862-ef80af42211d", - "name" : "delete-identifier", - "description" : "${delete-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "469c2e63-cda6-48d4-ab8f-eb59a2c69798", - "name" : "find-database-view", - "description" : "${find-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - } ], - "client" : { - "realm-management" : [ { - "id" : "4628f654-f8f3-483b-8f92-2a7fc5930b14", - "name" : "query-realms", - "description" : "${role_query-realms}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "95c2cc47-12f5-4d73-8b74-67e270c45ade", - "name" : "manage-authorization", - "description" : "${role_manage-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "824791f3-c345-42f8-b103-b7e6d7e40114", - "name" : "manage-identity-providers", - "description" : "${role_manage-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "1f840202-b7e2-4195-bac9-64e64dad2037", - "name" : "view-identity-providers", - "description" : "${role_view-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "3c32c096-bb13-44c9-a080-d756a48a9ea3", - "name" : "query-clients", - "description" : "${role_query-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "e4b85a68-7f31-4fcf-89a2-f10d7df358e9", - "name" : "view-authorization", - "description" : "${role_view-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7d317752-ae56-46f2-a2ce-67c64d1b35f6", - "name" : "view-users", - "description" : "${role_view-users}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-users", "query-groups" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "28824208-976e-4622-b4d7-3d18efbb46fa", - "name" : "realm-admin", - "description" : "${role_realm-admin}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-realms", "manage-authorization", "manage-identity-providers", "view-identity-providers", "query-clients", "view-authorization", "view-users", "manage-users", "view-realm", "query-users", "view-clients", "create-client", "query-groups", "impersonation", "manage-clients", "manage-events", "view-events", "manage-realm" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "57e846a2-930d-4621-819d-c35086507146", - "name" : "manage-users", - "description" : "${role_manage-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7fad9cde-bf96-475a-9174-14a87da51f95", - "name" : "view-realm", - "description" : "${role_view-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "bbcac294-d78a-4ea1-a4bf-0384266d2fe1", - "name" : "query-users", - "description" : "${role_query-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "480e1437-ab9e-47de-b47a-edc6b6e285de", - "name" : "view-clients", - "description" : "${role_view-clients}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-clients" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "b9a9a8f5-f91e-4e73-9e88-1cdf42bd49f9", - "name" : "create-client", - "description" : "${role_create-client}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "4d1397fb-247c-436f-b26f-124cd89afb08", - "name" : "query-groups", - "description" : "${role_query-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "e31f522b-b283-4ae1-b875-52afcd98b1d2", - "name" : "impersonation", - "description" : "${role_impersonation}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "51822d02-fa28-4a49-89da-bc534719d8a8", - "name" : "manage-clients", - "description" : "${role_manage-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "b2743ce5-0ce8-4157-ae00-f693560f0b39", - "name" : "manage-events", - "description" : "${role_manage-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7ea3d7e0-9bf4-438a-b773-243daf622aaa", - "name" : "view-events", - "description" : "${role_view-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "fb73f6f5-0ed5-41d0-852c-0eb3b195b15a", - "name" : "manage-realm", - "description" : "${role_manage-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - } ], - "security-admin-console" : [ ], - "dbrepo-client" : [ ], - "admin-cli" : [ ], - "rabbitmq-client" : [ ], - "account-console" : [ ], - "broker" : [ { - "id" : "de0cfd5e-c2fe-4082-ac39-e3b092139a0f", - "name" : "read-token", - "description" : "${role_read-token}", - "composite" : false, - "clientRole" : true, - "containerId" : "88694c91-753d-4c44-9740-ec9ac06bba45", - "attributes" : { } - } ], - "account" : [ { - "id" : "acd78c04-eefc-4344-a5b4-3fc83d848936", - "name" : "delete-account", - "description" : "${role_delete-account}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "939be844-8c49-45b3-9ca1-4b10a454b346", - "name" : "view-profile", - "description" : "${role_view-profile}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "e52fdf00-3e73-4c17-bc1c-643493710a6b", - "name" : "view-applications", - "description" : "${role_view-applications}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "b02a822e-a708-420a-bddc-1a315033fd7c", - "name" : "view-consent", - "description" : "${role_view-consent}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "c590e5f5-2cbf-4151-b1dc-96c454f1f654", - "name" : "view-groups", - "description" : "${role_view-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "15974151-6c13-426b-8cc3-7683dd1311e1", - "name" : "manage-account-links", - "description" : "${role_manage-account-links}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "c12d8d94-c2df-498e-bbe4-2f934a83ae92", - "name" : "manage-consent", - "description" : "${role_manage-consent}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "view-consent" ] - } - }, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "55f85811-bded-4d6b-8f7b-45844b963875", - "name" : "manage-account", - "description" : "${role_manage-account}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "manage-account-links" ] - } - }, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - } ] - } - }, - "groups" : [ { - "id" : "f2ce17fe-7b15-47a4-bbf8-86f415298fa9", - "name" : "data-stewards", - "path" : "/data-stewards", - "subGroups" : [ ], - "attributes" : { }, - "realmRoles" : [ "default-data-steward-roles" ], - "clientRoles" : { } - }, { - "id" : "124d9888-0b6e-46aa-8225-077dcedaf16e", - "name" : "developers", - "path" : "/developers", - "subGroups" : [ ], - "attributes" : { }, - "realmRoles" : [ "default-developer-roles" ], - "clientRoles" : { } - }, { - "id" : "f467c38e-9041-4faa-ae0b-39cec65ff4db", - "name" : "researchers", - "path" : "/researchers", - "subGroups" : [ ], - "attributes" : { }, - "realmRoles" : [ "default-researcher-roles" ], - "clientRoles" : { } - }, { - "id" : "2b9f94b4-d434-4a98-8eab-25678cfee983", - "name" : "system", - "path" : "/system", - "subGroups" : [ ], - "attributes" : { }, - "realmRoles" : [ "default-system-roles" ], - "clientRoles" : { } - } ], - "defaultRole" : { - "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", - "name" : "default-roles-dbrepo", - "description" : "${role_default-roles}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0" - }, - "defaultGroups" : [ "/researchers" ], - "requiredCredentials" : [ "password" ], - "otpPolicyType" : "totp", - "otpPolicyAlgorithm" : "HmacSHA1", - "otpPolicyInitialCounter" : 0, - "otpPolicyDigits" : 6, - "otpPolicyLookAheadWindow" : 1, - "otpPolicyPeriod" : 30, - "otpPolicyCodeReusable" : false, - "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], - "localizationTexts" : { }, - "webAuthnPolicyRpEntityName" : "keycloak", - "webAuthnPolicySignatureAlgorithms" : [ "ES256" ], - "webAuthnPolicyRpId" : "", - "webAuthnPolicyAttestationConveyancePreference" : "not specified", - "webAuthnPolicyAuthenticatorAttachment" : "not specified", - "webAuthnPolicyRequireResidentKey" : "not specified", - "webAuthnPolicyUserVerificationRequirement" : "not specified", - "webAuthnPolicyCreateTimeout" : 0, - "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyAcceptableAaguids" : [ ], - "webAuthnPolicyExtraOrigins" : [ ], - "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", - "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ], - "webAuthnPolicyPasswordlessRpId" : "", - "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", - "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", - "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", - "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", - "webAuthnPolicyPasswordlessCreateTimeout" : 0, - "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], - "webAuthnPolicyPasswordlessExtraOrigins" : [ ], - "scopeMappings" : [ { - "clientScope" : "rabbitmq.tag:administrator", - "roles" : [ "escalated-broker-handling" ] - }, { - "clientScope" : "rabbitmq.tag:management", - "roles" : [ "default-broker-handling" ] - } ], - "clientScopeMappings" : { - "account" : [ { - "client" : "account-console", - "roles" : [ "manage-account", "view-groups" ] - } ] - }, - "clients" : [ { - "id" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "clientId" : "account", - "name" : "${client_account}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/dbrepo/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/dbrepo/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "d3c4a04e-39ce-4549-a34a-11e25774cd96", - "clientId" : "account-console", - "name" : "${client_account-console}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/dbrepo/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/dbrepo/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "22d90d9c-9881-474c-8dfd-a62c808a9f1c", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "81ef0f59-a5ca-4be4-a1d1-0c32edf1cfd6", - "clientId" : "admin-cli", - "name" : "${client_admin-cli}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : false, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "client.use.lightweight.access.token.enabled" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "88694c91-753d-4c44-9740-ec9ac06bba45", - "clientId" : "broker", - "name" : "${client_broker}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "6b7ef364-4132-4831-b4e2-b6e9e9dc63ee", - "clientId" : "dbrepo-client", - "name" : "${dbrepo-client}", - "description" : "", - "rootUrl" : "", - "adminUrl" : "", - "baseUrl" : "", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : true, - "clientAuthenticatorType" : "client-secret", - "secret" : "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG", - "redirectUris" : [ "*" ], - "webOrigins" : [ "*" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : true, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "oidc.ciba.grant.enabled" : "false", - "client.secret.creation.time" : "1680085365", - "backchannel.logout.session.required" : "true", - "post.logout.redirect.uris" : "*", - "oauth2.device.authorization.grant.enabled" : "false", - "backchannel.logout.revoke.offline.tokens" : "false" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : -1, - "protocolMappers" : [ { - "id" : "266edf62-a19a-483b-b594-81428e4af792", - "name" : "orcid", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "ORCID", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "orcid", - "jsonType.label" : "String" - } - }, { - "id" : "1a21798a-38b6-4df5-89f0-86942415246f", - "name" : "theme", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "THEME", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "theme", - "jsonType.label" : "String" - } - }, { - "id" : "da0b27c1-ae2e-4baa-bf78-db233e15c78d", - "name" : "preferred_username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "userinfo.token.claim" : "true" - } - }, { - "id" : "1bc6a1f4-4be2-439c-8c7f-b3fb0bb9956a", - "name" : "affiliation", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "AFFILIATION", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "affiliation", - "jsonType.label" : "String" - } - }, { - "id" : "7cbf6dc6-653e-40a9-9974-0e5bf7a363c3", - "name" : "given name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "firstName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "given_name", - "jsonType.label" : "String" - } - }, { - "id" : "70bbd779-d085-4204-ac4b-3a40abab9d88", - "name" : "language", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "LANGUAGE", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "language", - "jsonType.label" : "String" - } - }, { - "id" : "b817424d-7f91-43d8-b7d0-6a32582377fb", - "name" : "family name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "lastName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "family_name", - "jsonType.label" : "String" - } - }, { - "id" : "030a1cd9-53d1-4a62-a375-94d50a2dc6fc", - "name" : "uid", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "aggregate.attrs" : "false", - "multivalued" : "false", - "userinfo.token.claim" : "true", - "user.attribute" : "LDAP_ID", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "uid" - } - }, { - "id" : "c304ed2f-5952-4772-838d-91998a45f154", - "name" : "aud", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-hardcoded-claim-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "claim.value" : "account", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "aud", - "jsonType.label" : "String", - "access.tokenResponse.claim" : "false" - } - } ], - "defaultClientScopes" : [ "roles", "basic" ], - "optionalClientScopes" : [ "rabbitmq.read:*/*", "web-origins", "acr", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "attributes", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] - }, { - "id" : "25741f6b-4867-4138-8238-6345c6ba8702", - "clientId" : "rabbitmq-client", - "name" : "${rabbitmq-client}", - "description" : "", - "rootUrl" : "", - "adminUrl" : "", - "baseUrl" : "", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "secret" : "JEC2FexxrX4N65fLeDGukAl6R3Lc9y0u", - "redirectUris" : [ "*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : true, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "oidc.ciba.grant.enabled" : "false", - "client.secret.creation.time" : "1680000860", - "backchannel.logout.session.required" : "true", - "post.logout.redirect.uris" : "*", - "oauth2.device.authorization.grant.enabled" : "false", - "backchannel.logout.revoke.offline.tokens" : "false" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : -1, - "protocolMappers" : [ { - "id" : "01a937ed-f0e8-4137-80f3-3be3c447f7fb", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "username", - "id.token.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "client_id", - "jsonType.label" : "String", - "userinfo.token.claim" : "false" - } - }, { - "id" : "f1afc22d-f595-403b-ba2e-6ab19d98205e", - "name" : "Audience", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-hardcoded-claim-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "aud", - "claim.value" : "rabbitmq", - "userinfo.token.claim" : "false", - "access.tokenResponse.claim" : "false" - } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "rabbitmq.tag:management", "basic" ], - "optionalClientScopes" : [ "rabbitmq.read:*/*", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "roles", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] - }, { - "id" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "clientId" : "realm-management", - "name" : "${client_realm-management}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "f205c451-9524-4380-acc3-947f7ecb6b7c", - "clientId" : "security-admin-console", - "name" : "${client_security-admin-console}", - "rootUrl" : "${authAdminUrl}", - "baseUrl" : "/admin/dbrepo/console/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/admin/dbrepo/console/*" ], - "webOrigins" : [ "+" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "client.use.lightweight.access.token.enabled" : "true", - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "c4d54410-3f22-4259-9571-94da2c43b752", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - } ], - "clientScopes" : [ { - "id" : "69f4ecf0-4165-49ab-bf0d-38409b15b706", - "name" : "rabbitmq.tag:administrator", - "description" : "administrator", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "7f6e9b44-e2eb-417d-b0fe-db820c9a6564", - "name" : "email", - "description" : "OpenID Connect built-in scope: email", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${emailScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "782819fe-ba5d-4ddb-9f95-cabb69d79c8d", - "name" : "email verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "emailVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email_verified", - "jsonType.label" : "boolean", - "userinfo.token.claim" : "true" - } - }, { - "id" : "ca613fc8-bbf2-4240-8b33-a1874f1559f3", - "name" : "email", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "email", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "b9da268f-6745-49dc-a764-3c54e385accc", - "name" : "profile", - "description" : "OpenID Connect built-in scope: profile", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${profileScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "84f0487a-1d7d-470c-9b8e-5835294ae235", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "bbdcdb36-3ec0-443d-b1af-9993d40f0567", - "name" : "gender", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "gender", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "gender", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "9faa870b-5491-4ce9-b27d-c9ce07d6a95e", - "name" : "birthdate", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "birthdate", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "birthdate", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "f0e3c012-9523-4076-83ae-e466e2d08220", - "name" : "full name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-full-name-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - }, { - "id" : "f757d8ec-e181-429c-9287-9ad0600b061f", - "name" : "profile", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "profile", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "profile", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "18cfbf4b-0a8e-45c7-a832-c0f72c92f3f3", - "name" : "updated at", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "updatedAt", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "updated_at", - "jsonType.label" : "long", - "userinfo.token.claim" : "true" - } - }, { - "id" : "841ea785-26ab-429a-a420-09ce3948924d", - "name" : "family name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "lastName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "family_name", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "bfba13ff-f952-4e89-bbb1-a693fdebfae8", - "name" : "website", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "website", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "website", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "475f071d-5149-4379-b928-76482f5f519c", - "name" : "zoneinfo", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "zoneinfo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "zoneinfo", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "b8bebfed-b5e9-4604-a0ee-9817f7d439ac", - "name" : "middle name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "middleName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "middle_name", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "445232c8-6830-476c-a6f1-8bbef167595a", - "name" : "picture", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "picture", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "picture", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "65f2e474-6ede-4872-86e4-e49504dd0f2a", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "16cd5a27-ccf3-453c-ae1e-8621813ab73c", - "name" : "given name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "firstName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "given_name", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "f9efedfc-3388-457c-b10a-1dff4525ff9b", - "name" : "nickname", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "nickname", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "nickname", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "627fa054-08eb-4206-af71-9e838e984b8b", - "name" : "microprofile-jwt", - "description" : "Microprofile - JWT built-in scope", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "e6cc53e5-5d7e-468e-88c8-0737dd3dc759", - "name" : "groups", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "multivalued" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "foo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "groups", - "jsonType.label" : "String" - } - }, { - "id" : "83b4444c-10fc-44e8-a0c0-0c1da1f9bba3", - "name" : "upn", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "upn", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "4122ff9e-ad3c-4142-afc6-9aefdecfc86d", - "name" : "role_list", - "description" : "SAML role list", - "protocol" : "saml", - "attributes" : { - "consent.screen.text" : "${samlRoleListScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "bb0747fa-c008-4af3-93be-e7739650ebd5", - "name" : "role list", - "protocol" : "saml", - "protocolMapper" : "saml-role-list-mapper", - "consentRequired" : false, - "config" : { - "single" : "false", - "attribute.nameformat" : "Basic", - "attribute.name" : "Role" - } - } ] - }, { - "id" : "2e76447d-fbe7-4fa7-a16c-54a381b960ae", - "name" : "rabbitmq.configure:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "52aad832-c6c4-49df-8a04-6ad4a406fdfa", - "name" : "phone", - "description" : "OpenID Connect built-in scope: phone", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${phoneScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "dae802fb-9138-408a-b80e-a40eb0f56814", - "name" : "phone number", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "phoneNumber", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number", - "jsonType.label" : "String", - "userinfo.token.claim" : "true" - } - }, { - "id" : "feb06a8d-b0eb-4911-8464-368d93f566fa", - "name" : "phone number verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "phoneNumberVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number_verified", - "jsonType.label" : "boolean", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "f64d64e8-57ce-4eb2-b99e-9f02fdbd99f9", - "name" : "web-origins", - "description" : "OpenID Connect scope for add allowed web origins to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "consent.screen.text" : "", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "c6411e3b-6478-453d-b530-5fe175a4d786", - "name" : "allowed web origins", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-allowed-origins-mapper", - "consentRequired" : false, - "config" : { } - } ] - }, { - "id" : "55341d34-0086-4173-ae61-d9b175b179d8", - "name" : "acr", - "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "58ea3217-0fff-4207-9d08-919f5493b629", - "name" : "acr loa level", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-acr-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "a02c2c38-923c-46ec-9899-321412b388e5", - "name" : "attributes", - "description" : "User Attributes", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - }, - "protocolMappers" : [ { - "id" : "78c461c1-f3f9-4d10-8835-097f13bdcd60", - "name" : "Theme", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "aggregate.attrs" : "false", - "multivalued" : "false", - "userinfo.token.claim" : "true", - "user.attribute" : "theme_dark", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "attributes.theme_dark" - } - } ] - }, { - "id" : "06062e22-89c0-4e1d-a25b-2483903b02d5", - "name" : "rabbitmq.write:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "db63e03b-7918-492f-997b-f2dda98f3b39", - "name" : "rabbitmq.tag:management", - "description" : "management", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "aa5c6ca7-812d-4fff-80b9-f5095ca82ce6", - "name" : "service_account", - "description" : "Specific scope for a client enabled for service accounts", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "bb359b0f-97dc-4d6a-9a2f-89458b53c512", - "name" : "Client IP Address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "clientAddress", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "clientAddress", - "jsonType.label" : "String" - } - }, { - "id" : "7aa3a4d2-3dd1-48dd-8886-562906eadb2a", - "name" : "Client Host", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "clientHost", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "clientHost", - "jsonType.label" : "String" - } - }, { - "id" : "c4882d39-e815-49f5-8a73-eb8b83572eae", - "name" : "Client ID", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "client_id", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "client_id", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "210cc792-6c07-45a6-a77e-827cdf3b41ba", - "name" : "offline_access", - "description" : "OpenID Connect built-in scope: offline_access", - "protocol" : "openid-connect", - "attributes" : { - "consent.screen.text" : "${offlineAccessScopeConsentText}", - "display.on.consent.screen" : "true" - } - }, { - "id" : "425abf4a-2ee2-431d-aa92-e373a36fe556", - "name" : "address", - "description" : "OpenID Connect built-in scope: address", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${addressScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30", - "name" : "address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-address-mapper", - "consentRequired" : false, - "config" : { - "user.attribute.formatted" : "formatted", - "user.attribute.country" : "country", - "user.attribute.postal_code" : "postal_code", - "userinfo.token.claim" : "true", - "user.attribute.street" : "street", - "id.token.claim" : "true", - "user.attribute.region" : "region", - "access.token.claim" : "true", - "user.attribute.locality" : "locality" - } - } ] - }, { - "id" : "c96f0b73-ea79-4b46-93ef-d1092297f855", - "name" : "rabbitmq.read:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "ba11267a-478b-4b32-872f-4eb2d125d116", - "name" : "basic", - "description" : "OpenID Connect scope for add all basic claims to the token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "1445e14f-49b0-4666-8ddc-691493c24ad9", - "name" : "sub", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-sub-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "access.token.claim" : "true" - } - }, { - "id" : "846f1ef0-2b86-4e07-9d25-691d25af5fce", - "name" : "auth_time", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "AUTH_TIME", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "auth_time", - "jsonType.label" : "long" - } - } ] - }, { - "id" : "37f61543-dad7-4a82-8e10-77acdd1eefdc", - "name" : "roles", - "description" : "OpenID Connect scope for add user roles to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "consent.screen.text" : "${rolesScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "3b6b6914-8ad1-4a71-88ec-444f754aaacb", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { } - }, { - "id" : "2defedf5-9af3-4531-822c-a879dedcd29d", - "name" : "realm roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "false", - "multivalued" : "true", - "user.attribute" : "foo", - "id.token.claim" : "true", - "lightweight.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "realm_access.roles", - "jsonType.label" : "String" - } - }, { - "id" : "a7bd6723-e58e-47f7-95c0-2925ce99283d", - "name" : "client roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-client-role-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "foo", - "access.token.claim" : "true", - "claim.name" : "resource_access.${client_id}.roles", - "jsonType.label" : "String", - "multivalued" : "true" - } - } ] - } ], - "defaultDefaultClientScopes" : [ "rabbitmq.tag:administrator", "rabbitmq.tag:management", "basic" ], - "defaultOptionalClientScopes" : [ "rabbitmq.write:*/*", "offline_access", "rabbitmq.configure:*/*", "roles", "role_list", "address", "phone", "acr", "microprofile-jwt", "email", "attributes", "profile", "rabbitmq.read:*/*", "web-origins" ], - "browserSecurityHeaders" : { - "contentSecurityPolicyReportOnly" : "", - "xContentTypeOptions" : "nosniff", - "referrerPolicy" : "no-referrer", - "xRobotsTag" : "none", - "xFrameOptions" : "SAMEORIGIN", - "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "xXSSProtection" : "1; mode=block", - "strictTransportSecurity" : "max-age=31536000; includeSubDomains" - }, - "smtpServer" : { }, - "loginTheme" : "keycloak.v2", - "accountTheme" : "", - "adminTheme" : "", - "emailTheme" : "", - "eventsEnabled" : false, - "eventsListeners" : [ "create-event-listener", "jboss-logging" ], - "enabledEventTypes" : [ "SEND_RESET_PASSWORD", "UPDATE_CONSENT_ERROR", "GRANT_CONSENT", "VERIFY_PROFILE_ERROR", "REMOVE_TOTP", "REVOKE_GRANT", "UPDATE_TOTP", "LOGIN_ERROR", "CLIENT_LOGIN", "RESET_PASSWORD_ERROR", "IMPERSONATE_ERROR", "CODE_TO_TOKEN_ERROR", "CUSTOM_REQUIRED_ACTION", "OAUTH2_DEVICE_CODE_TO_TOKEN_ERROR", "RESTART_AUTHENTICATION", "IMPERSONATE", "UPDATE_PROFILE_ERROR", "LOGIN", "OAUTH2_DEVICE_VERIFY_USER_CODE", "UPDATE_PASSWORD_ERROR", "CLIENT_INITIATED_ACCOUNT_LINKING", "TOKEN_EXCHANGE", "AUTHREQID_TO_TOKEN", "LOGOUT", "REGISTER", "DELETE_ACCOUNT_ERROR", "CLIENT_REGISTER", "IDENTITY_PROVIDER_LINK_ACCOUNT", "DELETE_ACCOUNT", "UPDATE_PASSWORD", "CLIENT_DELETE", "FEDERATED_IDENTITY_LINK_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN", "CLIENT_DELETE_ERROR", "VERIFY_EMAIL", "CLIENT_LOGIN_ERROR", "RESTART_AUTHENTICATION_ERROR", "EXECUTE_ACTIONS", "REMOVE_FEDERATED_IDENTITY_ERROR", "TOKEN_EXCHANGE_ERROR", "PERMISSION_TOKEN", "SEND_IDENTITY_PROVIDER_LINK_ERROR", "EXECUTE_ACTION_TOKEN_ERROR", "SEND_VERIFY_EMAIL", "OAUTH2_DEVICE_AUTH", "EXECUTE_ACTIONS_ERROR", "REMOVE_FEDERATED_IDENTITY", "OAUTH2_DEVICE_CODE_TO_TOKEN", "IDENTITY_PROVIDER_POST_LOGIN", "IDENTITY_PROVIDER_LINK_ACCOUNT_ERROR", "OAUTH2_DEVICE_VERIFY_USER_CODE_ERROR", "UPDATE_EMAIL", "REGISTER_ERROR", "REVOKE_GRANT_ERROR", "EXECUTE_ACTION_TOKEN", "LOGOUT_ERROR", "UPDATE_EMAIL_ERROR", "CLIENT_UPDATE_ERROR", "AUTHREQID_TO_TOKEN_ERROR", "UPDATE_PROFILE", "CLIENT_REGISTER_ERROR", "FEDERATED_IDENTITY_LINK", "SEND_IDENTITY_PROVIDER_LINK", "SEND_VERIFY_EMAIL_ERROR", "RESET_PASSWORD", "CLIENT_INITIATED_ACCOUNT_LINKING_ERROR", "OAUTH2_DEVICE_AUTH_ERROR", "UPDATE_CONSENT", "REMOVE_TOTP_ERROR", "VERIFY_EMAIL_ERROR", "SEND_RESET_PASSWORD_ERROR", "CLIENT_UPDATE", "CUSTOM_REQUIRED_ACTION_ERROR", "IDENTITY_PROVIDER_POST_LOGIN_ERROR", "UPDATE_TOTP_ERROR", "CODE_TO_TOKEN", "VERIFY_PROFILE", "GRANT_CONSENT_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN_ERROR" ], - "adminEventsEnabled" : false, - "adminEventsDetailsEnabled" : false, - "identityProviders" : [ ], - "identityProviderMappers" : [ ], - "components" : { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { - "id" : "4d3f9f14-f5d2-4b0c-8ea7-e6d078aa2191", - "name" : "Max Clients Limit", - "providerId" : "max-clients", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "max-clients" : [ "200" ] - } - }, { - "id" : "f35bce67-1e75-408b-b065-52183368d4fd", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - }, { - "id" : "0efa669d-1017-4b4a-82e1-c2eaf72de2c9", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - }, { - "id" : "528fb423-d66e-472e-9120-1f03ba9e0f18", - "name" : "Consent Required", - "providerId" : "consent-required", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "3ab11d74-5e76-408a-b85a-26bf8950f979", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-usermodel-property-mapper", "saml-user-property-mapper", "saml-user-attribute-mapper", "saml-role-list-mapper", "oidc-full-name-mapper", "oidc-usermodel-attribute-mapper", "oidc-address-mapper", "oidc-sha256-pairwise-sub-mapper" ] - } - }, { - "id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1", - "name" : "Trusted Hosts", - "providerId" : "trusted-hosts", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "host-sending-registration-request-must-match" : [ "true" ], - "client-uris-must-match" : [ "true" ] - } - }, { - "id" : "f565cb47-3bcf-4078-8f94-eb4179c375b8", - "name" : "Full Scope Disabled", - "providerId" : "scope", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "104ec5a9-025b-4c44-8ac0-82d22887ca3e", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-usermodel-property-mapper", "oidc-usermodel-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "oidc-address-mapper", "saml-user-property-mapper", "saml-user-attribute-mapper", "oidc-sha256-pairwise-sub-mapper" ] - } - } ], - "org.keycloak.userprofile.UserProfileProvider" : [ { - "id" : "a407a1d6-a7f6-4a72-ba3a-149de03d5a43", - "providerId" : "declarative-user-profile", - "subComponents" : { }, - "config" : { - "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"required\":{\"roles\":[\"user\"]},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}],\"unmanagedAttributePolicy\":\"ENABLED\"}" ] - } - } ], - "org.keycloak.storage.UserStorageProvider" : [ { - "id" : "c109d473-5ce1-4032-af7b-02e5442f5c07", - "name" : "Identity Service", - "providerId" : "ldap", - "subComponents" : { - "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" : [ { - "id" : "db9963a3-03d1-468e-998c-9f3338fdb493", - "name" : "creation date", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "createTimestamp" ], - "is.mandatory.in.ldap" : [ "false" ], - "always.read.value.from.ldap" : [ "true" ], - "read.only" : [ "true" ], - "user.model.attribute" : [ "createTimestamp" ] - } - }, { - "id" : "9d7b9abc-321e-4674-ba36-b104b9990641", - "name" : "last name", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "sn" ], - "is.mandatory.in.ldap" : [ "true" ], - "read.only" : [ "false" ], - "always.read.value.from.ldap" : [ "true" ], - "user.model.attribute" : [ "lastName" ] - } - }, { - "id" : "b5b7253b-984e-4aa3-b862-20dbe06e4cf9", - "name" : "first name", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "cn" ], - "is.mandatory.in.ldap" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "firstName" ] - } - }, { - "id" : "ea383c2f-3bfe-4117-a8fd-f012d6ebbf9e", - "name" : "email", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "mail" ], - "is.mandatory.in.ldap" : [ "false" ], - "always.read.value.from.ldap" : [ "false" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "email" ] - } - }, { - "id" : "5692d060-55b8-4cb1-b68f-0ae123cd9d02", - "name" : "system", - "providerId" : "group-ldap-mapper", - "subComponents" : { }, - "config" : { - "mode" : [ "LDAP_ONLY" ], - "membership.attribute.type" : [ "DN" ], - "user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ], - "group.name.ldap.attribute" : [ "cn" ], - "membership.user.ldap.attribute" : [ "uid" ], - "ignore.missing.groups" : [ "false" ], - "preserve.group.inheritance" : [ "false" ], - "membership.ldap.attribute" : [ "member" ], - "memberof.ldap.attribute" : [ "memberOf" ], - "group.object.classes" : [ "groupOfNames" ], - "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], - "groups.path" : [ "/" ], - "drop.non.existing.groups.during.sync" : [ "false" ] - } - }, { - "id" : "b6ff3285-35af-4e86-8bb4-d94b8e0d70bb", - "name" : "modify date", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "modifyTimestamp" ], - "is.mandatory.in.ldap" : [ "false" ], - "read.only" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "user.model.attribute" : [ "modifyTimestamp" ] - } - }, { - "id" : "b5d08699-ba3a-4ffd-bf2e-36d1bcac48d9", - "name" : "username", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "uid" ], - "is.mandatory.in.ldap" : [ "true" ], - "attribute.force.default" : [ "false" ], - "is.binary.attribute" : [ "false" ], - "always.read.value.from.ldap" : [ "false" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "username" ] - } - } ] - }, - "config" : { - "fullSyncPeriod" : [ "-1" ], - "pagination" : [ "false" ], - "startTls" : [ "false" ], - "connectionPooling" : [ "true" ], - "usersDn" : [ "ou=users,{{ .Values.identityservice.global.ldapDomain }}" ], - "cachePolicy" : [ "DEFAULT" ], - "useKerberosForPasswordAuthentication" : [ "false" ], - "importEnabled" : [ "true" ], - "enabled" : [ "true" ], - "bindCredential" : [ "{{ .Values.identityservice.global.adminPassword }}" ], - "changedSyncPeriod" : [ "-1" ], - "usernameLDAPAttribute" : [ "uid" ], - "bindDn" : [ "cn={{ .Values.identityservice.global.adminUser }},{{ .Values.identityservice.global.ldapDomain }}" ], - "lastSync" : [ "1719252666" ], - "vendor" : [ "other" ], - "uuidLDAPAttribute" : [ "entryUUID" ], - "allowKerberosAuthentication" : [ "false" ], - "connectionUrl" : [ "ldap://identity-service:389" ], - "syncRegistrations" : [ "true" ], - "authType" : [ "simple" ], - "useTruststoreSpi" : [ "always" ], - "usePasswordModifyExtendedOp" : [ "false" ], - "trustEmail" : [ "false" ], - "userObjectClasses" : [ "inetOrgPerson, organizationalPerson, person" ], - "rdnLDAPAttribute" : [ "uid" ], - "editMode" : [ "WRITABLE" ], - "validatePasswordPolicy" : [ "false" ] - } - } ], - "org.keycloak.keys.KeyProvider" : [ { - "id" : "2f53ccf3-37b0-4d34-83e7-ed497499ee51", - "name" : "rsa-enc-generated", - "providerId" : "rsa-enc-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEowIBAAKCAQEA3b1tNLfcjFLUw9UShVDNf+ZD8sQqb4YBaIXcSJTX/zDQUPiCp176BBGI3s4VplDArnOW+LumozmKogeoHEnGEIDW8ovgK5uMU9tSA2p0qqGBUMOdR8YATTIfCJe7qGiiuGa3WZy3sQLM70SuRzx02YU8gvUcvl2Js4KyqAziOUX/w3Wa59H9jjGNUXYyqaPWJp73eHzbVYWySzyLG22mVlcUtBx5siL5T2/Xu0p9z4l7/bapwwmOVi1ZrcHjbEAwdGEiSMGI/uWqAF+r1BRpmJLR7HNXcL3eK4/56VYLaiwSejfyYeRFMITEn/UxGYhcXZ5xMUUCG0TxjBhLYpTBuwIDAQABAoIBAA4dwebcxkrH99Poa8+WkiE7JgaS9sahx9OBI2xwJANoIU2TpzGuNLQZ76uLgB+rPWZTD9Xm5a1iJjwOyQ9/937TzPCk91D0tpgcusRikb8jx/6TGB9acL4kBjYUVCCHr3BA2G75MKKGtJ2OMvAbCQSosZj+r2VDwYFEPUkV2jheE5JHSBkwyIRrus3JCwu8gu5fyCg9z8ljcxJxI5HIsi4v8Z21aCw/cLj7h5cMt44wCjQz4rOfYNBEFeHDtlfR1QtWKgjm4ZHHJbKrzf9b2kQXclziceEbSM0tYbROEXKi+s0Zc+z3HEG89vv0vfN400clmzzIAijKY6gg3pPRWdECgYEA+lnWYbSlXDMNYx6RBXm1RnlMUYIm4oy4/9ljgnoGJ6WCn3SjFkgaDtiKfGIG1BSB85r04pAPANgcWHf5tWDnq0ARvBVG0BX2bKd++7B3D4d3CRYKCwm88SslJXv9dfHVhq4+zViFPiUWwT20A72jCuUCvL88y5fh/YBecfdh+jECgYEA4r5RD0NB9dMaeg5/jk/GEHIo4Z9KLc6FrSoOFo2xFkPOy1sgDpDOiNtypuWvniO7k7Ose3DS3hlfTMsKzIW/CgQJ20+Y4cvBWDaOsRxfjj7w3d+jH5OSJdKKSzTrgLKc9ZhlRzVXy0J0hipIA6HG5kdVdLXmh85ITmf1CbJhE6sCgYBjPVeBNbXTHZ2x6/z62aslO5IoQVqetb/kE82hfDOSZcao5Ph9Lam+ttH2ynkAevykj4mBgi+gWwqpey2uW7KaLPSaxShj9kDQA3mP1fzsV/u0y1rB02Nlin/YIxVvOqU1FT9p8SwoXVVu1sHUNck62VtDbN9xqUx5S/ikXrclEQKBgQCoTssOwEcK+Vty9KYcdfy4onTUHZBLdjxl8Iyqkxy7QTQUYRznkvesQPDXEDGO+kk3dyx2KKZt9Hl4IFNww2quPZcvcuMx4DQxjbXXpA8OIIxcta95NepLJwA+mRai3nKCH1A2TlNP7pFeMa5o+8IPly3Ix2lKr4Wepa4PN5i1pwKBgCZ1QP6XAOERl9NznNmU0rXVcvYNP4PIIfQWfvGsldZ4QKkmjjAGiS0/oYqdWs+UDRZyCRChaVjDXO9fk0PEG5OGKAj9nyiYCT/M8xtJ3UeP5ffZZvJ/vnye3QdDIo1e38ZzsWwJHmLYw7fRqY9W5Vxo0Vsy22U3CJY70KTxVdTy" ], - "keyUse" : [ "ENC" ], - "certificate" : [ "MIICmzCCAYMCBgGG3GWycDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdvW00t9yMUtTD1RKFUM1/5kPyxCpvhgFohdxIlNf/MNBQ+IKnXvoEEYjezhWmUMCuc5b4u6ajOYqiB6gcScYQgNbyi+Arm4xT21IDanSqoYFQw51HxgBNMh8Il7uoaKK4ZrdZnLexAszvRK5HPHTZhTyC9Ry+XYmzgrKoDOI5Rf/DdZrn0f2OMY1RdjKpo9Ymnvd4fNtVhbJLPIsbbaZWVxS0HHmyIvlPb9e7Sn3PiXv9tqnDCY5WLVmtweNsQDB0YSJIwYj+5aoAX6vUFGmYktHsc1dwvd4rj/npVgtqLBJ6N/Jh5EUwhMSf9TEZiFxdnnExRQIbRPGMGEtilMG7AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAK3kQ1VkQrzvSWvmXmazmNoA1ZiPzRDs1XhGUWxgsxzgPylr3dGBuqQbKvgnLUBQLSqlJHpI4fZflHswu1qrvVZYtekPcGef4WhcKAu2i1RwxrKa6RJQ1tRbrLuVYCzPv5p/DWgltWVn88aoLnqQn0SK/0PB/o4a4Cm7Kq2ZzCr1dACBr06LvOHsc7249OySmbG4HH+pLK6jVURhZ9VaObqAHe2FJBVVoIzURbdiRRURqumrIvbnpeaU1aFyg6ED5wTnXvmMPmVPt9F79mcB33bASO5wyu00X8t1hyN2Show2l2vxLACGUzVkTQt15s7uDLKE7qLmKSR3EuSGXWv3wA=" ], - "priority" : [ "100" ], - "algorithm" : [ "RSA-OAEP" ] - } - }, { - "id" : "28ca0b6d-b2e2-4785-b04b-2391e6344e30", - "name" : "aes-generated", - "providerId" : "aes-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "6dc4834f-a1de-4cfe-a29d-e84ac8e9b1a8" ], - "secret" : [ "HpuzG_jWYKwypLeoPEMC4A" ], - "priority" : [ "100" ] - } - }, { - "id" : "bd7945cf-6d35-4e03-9c3a-197f2dc76973", - "name" : "hmac-generated", - "providerId" : "hmac-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "7f9f9054-5697-4f60-bdc8-67e3bd0f4db6" ], - "secret" : [ "1SCIY20z3AbAHCL28LuJfBU-7zfsZv5dacgliUeGdRW_WK3vH9fJUpPu1f7iDrdlhF7YQmHxLXsWjxhQId4ShI7QBdgKCArHWqi0GeH37oNXfZFg_uv-K_3JSfxfGBRu5jpRQhhSBxESZWsFVkskhxWUvNe6b5l9dFbMIif72rI" ], - "priority" : [ "100" ], - "algorithm" : [ "HS256" ] - } - }, { - "id" : "2293ff99-3c6d-46d1-8635-5e679d5b134a", - "name" : "rsa-generated", - "providerId" : "rsa-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEpAIBAAKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQABAoIBADNcMt6hAHub4JTAYS6Mra0EPRBO2XhWmACBrv3+8ETClXd5475KPLDewgRVtlmtbwU8G8awUXESQgPS9lfiqvQhPreA3cHlm6oP2WMKOEtakr2s8I+frsTBLCo0Ini9RaSzjoVVgS0zofyhASKi+T970MafSj5P3XNb8YBFdXgoYDiA7FXLH6a/+m7LScL+wGcFMAAeYESxZbMQLfH3v8L+4EcTraiwjLG17ZdlF3dpybMyUSse6ZQ/PdlyvBuzzLXhN6Ce2gd9ATfS+YWTzo7Yf+GU+ex5bIpVOfHqtuM/hyq7YGKENClsXwNZIAoFnvGCbvECAfgyapVrD30IfykCgYEA0rgsSZ82pxT40NxwgBD1g9lbNVBKXphRB/3S078qusUzJjT7AldEj4imGPhAbI7bI8gAeWJsp1XJWkjM8ktaVrh+NQl7p8e9OPh0pQF/5Bdg8ajbjXESpjnaU66pVYRQy/d+jNli/YRAHX5RUfsBl+6W4+WSVMGmKBiqJsur+ecCgYEAz1YVXClcmUnyZem5B+2E9noIzjF6ROE+jIb6rawM85P3Xd0lXtECQavtxw+Qk7I32qOwrxl1UpK2foVel3pazi+4OpMfmqtYGenRP1Zk1cZwrDo0cIemTDGjj3kJ8tYn12CGolFQpJZgK6OHzvG0tOxI5VZgjIViWNPe1PGWXtUCgYEAxXGNDe8BZs1f11S2lUlOw5yGug3hoYFXbAWJ5p7Ziuf8ZXB/QlJDC7se54a11wKEk6Jzz0lKRgE8CjzszJuOqnN0zn10QGIIC7nCklo1W6QMUmPGVWH994N976tZP6gbjQL6sT+AYcvpx7j0ubxYYeRNvnz+ACzzY964kGGHY0ECgYEAumlwPPNnMN7+VEjGNm2D7UMdJZ3wi3tkjF5ThdA5uMohTsAk+FG80KSu3RmOaGyEsUwY7+VYyYvlDm4E9PZqLBVVczyR3rMNPAcwPd0EPfvzk7WlLkOX7ct3fehaXH3VRlyfz9KCSeh1wOZ/lT1VtpD2nVOC7PSDzs92+kfXZZ0CgYAnrD1y4skgXkdwolZ3unn3EFyGm2d+X5aMTHwQPdWxqoNIAl/9wdghlzihwnPhhsxq1WzlxuC3V2IMrNPtRx70Mi+FbSmR5m4Xx5RptgMtMlwno+L40PzNJgMjHGjt0wcx3Vel8wuohDtnqMyS7P5nG1/TQx0Cyzwn7QOXlNpgbQ==" ], - "keyUse" : [ "SIG" ], - "certificate" : [ "MIICmzCCAYMCBgGG3GWyBTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqqcdDYFZZb28M0tEJzEP77FmD/Xqioyj9zWX6VwUSOMAgmMmn8eqs9hT9T0a+q4YTo9tUW1PNbUpwprA5b4Uk04DcIajxDVMUR/PjcHytmkqwVskq9AZW/Vngdoo+8tSbuIybwe/3Vwt266hbHpDcM97a+DXcYooRl7tQWCEX7RP27wQrMD9epDQ6IgKayZg9vC9/03dsIqwH9jXQRiZlFvwiEKhX2aY7lPGBaCK414JO00K/Z49iov9TRa/IYVbSt5qwgrx6DcqsBSPwOnI6A85UGfeUEZ/7coVJiL7RvBlsllapsL9eWTbQajVh94k9Ei3sibEPbtH+U2OAM78zAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAASnN1Cuif1sdfEK2kWAURSXGJCohCROLWdKFjaeHPRaEfpbFJsgxW0Yj3nwX5O3bUlOWoTyENwnXSsXMQsqnNi+At32CKaKO8+AkhAbgQL9F0B+KeJwmYv3cUj5N/LYkJjBvZBzUZ4Ugu5dcxH0k7AktLAIwimkyEnxTNolOA3UyrGGpREr8MCKWVr10RFuOpF/0CsJNNwbHXzalO9D756EUcRWZ9VSg6QVNso0YYRKTnILWDn9hcTRnqGy3SHo3anFTqQZ+BB57YbgFWy6udC0LYRB3zdp6zNti87eu/VEymiDY/mmo1AB8Tm0b6vxFz4AKcL3ax5qS6YnZ9efSzk=" ], - "priority" : [ "100" ] - } - }, { - "id" : "addbae10-c6ae-4735-851f-7a5ea035ce25", - "name" : "hmac-generated-hs512", - "providerId" : "hmac-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "352d0ea1-8218-42b5-ab78-e2ca56cf6a95" ], - "secret" : [ "_kr6EZOZ8IKqPWgJltHAAsQ34wCIGPs8oOQLYWwJrSIH7Qie3CEVKZnICyBP1goR-QgUtg25tR8Qu5MkvYkb8assJ8Iok5x_8iYCR4Txkf_mS-emrlAtQajlIjmOfNBtx704dTnZlP9rWzqpW6mrpeiOaiCw1K0XCpY5C_ZjXKw" ], - "priority" : [ "100" ], - "algorithm" : [ "HS512" ] - } - } ] - }, - "internationalizationEnabled" : false, - "supportedLocales" : [ ], - "authenticationFlows" : [ { - "id" : "259dd7b6-01b7-433a-bda4-028857151ecd", - "alias" : "Account verification options", - "description" : "Method with which to verity the existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-email-verification", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Verify Existing Account by Re-authentication", - "userSetupAllowed" : false - } ] - }, { - "id" : "542ca1d7-9627-4102-b843-98837ce433fb", - "alias" : "Browser - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "4f153b98-6851-440b-a022-0a14e67a9b2f", - "alias" : "Direct Grant - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "3d791b35-d35c-40b2-bb3e-e806d72b27ee", - "alias" : "First broker login - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "9b746104-9371-4c3f-b69f-9322cead1b08", - "alias" : "Handle Existing Account", - "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-confirm-link", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Account verification options", - "userSetupAllowed" : false - } ] - }, { - "id" : "7a164efe-c97b-4fbb-950d-7745359ba9a4", - "alias" : "Reset - Conditional OTP", - "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "4fdc5e1b-1b55-4662-8360-67d75fa22677", - "alias" : "User creation or linking", - "description" : "Flow for the existing/non-existing user alternatives", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "create unique user config", - "authenticator" : "idp-create-user-if-unique", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Handle Existing Account", - "userSetupAllowed" : false - } ] - }, { - "id" : "75893341-c338-44d8-ae27-a3fc7bfe8f2d", - "alias" : "Verify Existing Account by Re-authentication", - "description" : "Reauthentication of existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "First broker login - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "89626b76-f4cf-4c46-934c-4408c225a44b", - "alias" : "browser", - "description" : "browser based authentication", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-cookie", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-spnego", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "identity-provider-redirector", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 25, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "forms", - "userSetupAllowed" : false - } ] - }, { - "id" : "4112115a-e7a7-44c2-9af5-65d538e4ba0d", - "alias" : "clients", - "description" : "Base authentication for clients", - "providerId" : "client-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "client-secret", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-secret-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-x509", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 40, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "f82a9b0a-2c0a-4cb1-96b2-6c78b0b1f14f", - "alias" : "direct grant", - "description" : "OpenID Connect Resource Owner Grant", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "direct-grant-validate-username", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "Direct Grant - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "3614e155-e8ce-4958-98fb-a27e4706cc70", - "alias" : "docker auth", - "description" : "Used by Docker clients to authenticate against the IDP", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "docker-http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "506f9b96-5002-47c0-96e3-3830a0fcfa26", - "alias" : "first broker login", - "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "review profile config", - "authenticator" : "idp-review-profile", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "User creation or linking", - "userSetupAllowed" : false - } ] - }, { - "id" : "4b7a7e91-36db-4b27-8e2d-01a04a822980", - "alias" : "forms", - "description" : "Username, password, otp and other auth forms.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Browser - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "04c2fe01-5076-4aa4-9596-4efb4004195f", - "alias" : "registration", - "description" : "registration flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-page-form", - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : true, - "flowAlias" : "registration form", - "userSetupAllowed" : false - } ] - }, { - "id" : "d12f77e1-7733-44a2-98ff-fd75c784d721", - "alias" : "registration form", - "description" : "registration form", - "providerId" : "form-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-user-creation", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-password-action", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 50, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-recaptcha-action", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 60, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "91f6048c-a376-4809-8f37-c8d7a517830c", - "alias" : "reset credentials", - "description" : "Reset credentials for a user if they forgot their password or something", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "reset-credentials-choose-user", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-credential-email", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 40, - "autheticatorFlow" : true, - "flowAlias" : "Reset - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "7b8fb487-53b8-4533-a696-76bc05256cb1", - "alias" : "saml ecp", - "description" : "SAML ECP Profile Authentication Flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - } ], - "authenticatorConfig" : [ { - "id" : "48372696-0579-45e5-b074-5e8dbdbbe7d6", - "alias" : "create unique user config", - "config" : { - "require.password.update.after.registration" : "false" - } - }, { - "id" : "08df3b83-e522-42a7-9e24-9028b960bf39", - "alias" : "review profile config", - "config" : { - "update.profile.on.first.login" : "missing" - } - } ], - "requiredActions" : [ { - "alias" : "CONFIGURE_TOTP", - "name" : "Configure OTP", - "providerId" : "CONFIGURE_TOTP", - "enabled" : true, - "defaultAction" : false, - "priority" : 10, - "config" : { } - }, { - "alias" : "TERMS_AND_CONDITIONS", - "name" : "Terms and Conditions", - "providerId" : "TERMS_AND_CONDITIONS", - "enabled" : false, - "defaultAction" : false, - "priority" : 20, - "config" : { } - }, { - "alias" : "UPDATE_PASSWORD", - "name" : "Update Password", - "providerId" : "UPDATE_PASSWORD", - "enabled" : false, - "defaultAction" : false, - "priority" : 30, - "config" : { } - }, { - "alias" : "UPDATE_PROFILE", - "name" : "Update Profile", - "providerId" : "UPDATE_PROFILE", - "enabled" : true, - "defaultAction" : false, - "priority" : 40, - "config" : { } - }, { - "alias" : "VERIFY_EMAIL", - "name" : "Verify Email", - "providerId" : "VERIFY_EMAIL", - "enabled" : false, - "defaultAction" : false, - "priority" : 50, - "config" : { } - }, { - "alias" : "delete_account", - "name" : "Delete Account", - "providerId" : "delete_account", - "enabled" : false, - "defaultAction" : false, - "priority" : 60, - "config" : { } - }, { - "alias" : "webauthn-register", - "name" : "Webauthn Register", - "providerId" : "webauthn-register", - "enabled" : true, - "defaultAction" : false, - "priority" : 70, - "config" : { } - }, { - "alias" : "webauthn-register-passwordless", - "name" : "Webauthn Register Passwordless", - "providerId" : "webauthn-register-passwordless", - "enabled" : true, - "defaultAction" : false, - "priority" : 80, - "config" : { } - }, { - "alias" : "delete_credential", - "name" : "Delete Credential", - "providerId" : "delete_credential", - "enabled" : true, - "defaultAction" : false, - "priority" : 100, - "config" : { } - }, { - "alias" : "update_user_locale", - "name" : "Update User Locale", - "providerId" : "update_user_locale", - "enabled" : true, - "defaultAction" : false, - "priority" : 1000, - "config" : { } - } ], - "browserFlow" : "browser", - "registrationFlow" : "registration", - "directGrantFlow" : "direct grant", - "resetCredentialsFlow" : "reset credentials", - "clientAuthenticationFlow" : "clients", - "dockerAuthenticationFlow" : "docker auth", - "firstBrokerLoginFlow" : "first broker login", - "attributes" : { - "cibaBackchannelTokenDeliveryMode" : "poll", - "cibaAuthRequestedUserHint" : "login_hint", - "clientOfflineSessionMaxLifespan" : "0", - "oauth2DevicePollingInterval" : "5", - "clientSessionIdleTimeout" : "0", - "actionTokenGeneratedByUserLifespan-execute-actions" : "", - "actionTokenGeneratedByUserLifespan-verify-email" : "", - "clientOfflineSessionIdleTimeout" : "0", - "actionTokenGeneratedByUserLifespan-reset-credentials" : "", - "cibaInterval" : "5", - "realmReusableOtpCode" : "false", - "cibaExpiresIn" : "120", - "oauth2DeviceCodeLifespan" : "600", - "actionTokenGeneratedByUserLifespan-idp-verify-account-via-email" : "", - "parRequestUriLifespan" : "60", - "clientSessionMaxLifespan" : "0", - "organizationsEnabled" : "false", - "shortVerificationUri" : "" - }, - "keycloakVersion" : "26.0.4", - "userManagedAccessAllowed" : false, - "organizationsEnabled" : false, - "clientProfiles" : { - "profiles" : [ ] - }, - "clientPolicies" : { - "policies" : [ ] - } - } - master-realm.json: |- - { - "id" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "realm" : "master", - "displayName" : "Keycloak", - "displayNameHtml" : "", - "notBefore" : 0, - "defaultSignatureAlgorithm" : "RS256", - "revokeRefreshToken" : false, - "refreshTokenMaxReuse" : 0, - "accessTokenLifespan" : 60, - "accessTokenLifespanForImplicitFlow" : 900, - "ssoSessionIdleTimeout" : 1800, - "ssoSessionMaxLifespan" : 36000, - "ssoSessionIdleTimeoutRememberMe" : 0, - "ssoSessionMaxLifespanRememberMe" : 0, - "offlineSessionIdleTimeout" : 2592000, - "offlineSessionMaxLifespanEnabled" : false, - "offlineSessionMaxLifespan" : 5184000, - "clientSessionIdleTimeout" : 0, - "clientSessionMaxLifespan" : 0, - "clientOfflineSessionIdleTimeout" : 0, - "clientOfflineSessionMaxLifespan" : 0, - "accessCodeLifespan" : 60, - "accessCodeLifespanUserAction" : 300, - "accessCodeLifespanLogin" : 1800, - "actionTokenGeneratedByAdminLifespan" : 43200, - "actionTokenGeneratedByUserLifespan" : 300, - "oauth2DeviceCodeLifespan" : 600, - "oauth2DevicePollingInterval" : 5, - "enabled" : true, - "sslRequired" : "external", - "registrationAllowed" : false, - "registrationEmailAsUsername" : false, - "rememberMe" : false, - "verifyEmail" : false, - "loginWithEmailAllowed" : true, - "duplicateEmailsAllowed" : false, - "resetPasswordAllowed" : false, - "editUsernameAllowed" : false, - "bruteForceProtected" : false, - "permanentLockout" : false, - "maxTemporaryLockouts" : 0, - "bruteForceStrategy" : "MULTIPLE", - "maxFailureWaitSeconds" : 900, - "minimumQuickLoginWaitSeconds" : 60, - "waitIncrementSeconds" : 60, - "quickLoginCheckMilliSeconds" : 1000, - "maxDeltaTimeSeconds" : 43200, - "failureFactor" : 30, - "roles" : { - "realm" : [ { - "id" : "01178d3c-65eb-406b-87a1-e7144f488028", - "name" : "default-roles-master", - "description" : "${role_default-roles}", - "composite" : true, - "composites" : { - "realm" : [ "offline_access", "uma_authorization" ], - "client" : { - "account" : [ "view-profile", "manage-account" ] - } - }, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - }, { - "id" : "646cda2d-911d-459e-8522-b28ba3126341", - "name" : "uma_authorization", - "description" : "${role_uma_authorization}", - "composite" : false, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - }, { - "id" : "344b3b83-99f7-43f7-8533-76f64195eab6", - "name" : "offline_access", - "description" : "${role_offline-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - }, { - "id" : "9ca176f3-c0c8-4ba1-8364-c38f3ce4f88b", - "name" : "admin", - "description" : "${role_admin}", - "composite" : true, - "composites" : { - "realm" : [ "create-realm" ], - "client" : { - "master-realm" : [ "manage-realm", "view-events", "view-authorization", "manage-authorization", "query-realms", "query-clients", "manage-clients", "view-clients", "create-client", "impersonation", "query-users", "view-identity-providers", "manage-users", "manage-events", "view-realm", "query-groups", "manage-identity-providers", "view-users" ], - "dbrepo-realm" : [ "manage-users", "query-realms", "query-groups", "manage-identity-providers", "manage-events", "manage-authorization", "query-users", "manage-clients", "view-users", "view-events", "view-authorization", "query-clients", "view-identity-providers", "view-realm", "view-clients", "create-client", "manage-realm", "impersonation" ] - } - }, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - }, { - "id" : "6e765f03-5dee-4061-b027-c3ec41114329", - "name" : "default-system-roles", - "description" : "${default-system-roles}", - "composite" : true, - "composites" : { - "realm" : [ "create-realm", "default-roles-master", "default-system-roles", "offline_access", "admin", "uma_authorization" ] - }, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - }, { - "id" : "3da4e842-c3cc-4bcd-a2f0-dec1ec36f3c5", - "name" : "create-realm", - "description" : "${role_create-realm}", - "composite" : false, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd", - "attributes" : { } - } ], - "client" : { - "security-admin-console" : [ ], - "admin-cli" : [ ], - "account-console" : [ ], - "broker" : [ { - "id" : "07de46e9-cc5c-4b50-8904-14443ed4d1f1", - "name" : "read-token", - "description" : "${role_read-token}", - "composite" : false, - "clientRole" : true, - "containerId" : "217563ea-11c7-4c96-969b-af076d740f7c", - "attributes" : { } - } ], - "master-realm" : [ { - "id" : "5c8f38f8-0a16-4f92-8fa2-81a6301f6215", - "name" : "create-client", - "description" : "${role_create-client}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "d0ab2e61-c7e4-49f3-9af2-965f20ec725a", - "name" : "manage-realm", - "description" : "${role_manage-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "89d438ee-957d-435c-b201-5be06aee01fd", - "name" : "view-events", - "description" : "${role_view-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "664a9190-f73f-4f83-83bc-a2185cea334c", - "name" : "view-authorization", - "description" : "${role_view-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "b3c0e4db-5a09-4d1e-9ced-96a34efb6398", - "name" : "manage-authorization", - "description" : "${role_manage-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "5cd61b20-da2b-4fed-b0c3-2fb5819ab06b", - "name" : "query-realms", - "description" : "${role_query-realms}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "94ceae4b-2cb8-4d10-bf11-8ce5c1ec9c55", - "name" : "impersonation", - "description" : "${role_impersonation}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "77072e30-3941-4b32-a8c8-76993fc507bb", - "name" : "query-users", - "description" : "${role_query-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "ea00baa8-f64d-409d-936d-ecf0adec5a57", - "name" : "view-identity-providers", - "description" : "${role_view-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "fb2c167e-fb6b-4db5-b0bf-d2c8454ceee5", - "name" : "manage-users", - "description" : "${role_manage-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "f0370bc0-15d6-43f1-82bc-7d31f37b19e4", - "name" : "manage-events", - "description" : "${role_manage-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "f0448680-b803-471e-8d0a-ec3e34a24228", - "name" : "view-realm", - "description" : "${role_view-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "dfdf768b-ac34-4491-b5d2-0938242e7e48", - "name" : "query-groups", - "description" : "${role_query-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "d5ff044b-c4e0-4197-8f51-833e8a956396", - "name" : "query-clients", - "description" : "${role_query-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "aaf73aa0-52a3-4833-8521-1eb1312b9f33", - "name" : "manage-identity-providers", - "description" : "${role_manage-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "fa08c54a-1f0c-4392-bf6a-a698bf3d164b", - "name" : "view-users", - "description" : "${role_view-users}", - "composite" : true, - "composites" : { - "client" : { - "master-realm" : [ "query-groups", "query-users" ] - } - }, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "fd317e90-0b34-4263-8906-caa9d6000b28", - "name" : "manage-clients", - "description" : "${role_manage-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - }, { - "id" : "162f12db-6d7f-4c53-905c-3f4bbd80fd58", - "name" : "view-clients", - "description" : "${role_view-clients}", - "composite" : true, - "composites" : { - "client" : { - "master-realm" : [ "query-clients" ] - } - }, - "clientRole" : true, - "containerId" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "attributes" : { } - } ], - "account" : [ { - "id" : "50c2778e-15fa-4c14-9414-5937649eb89f", - "name" : "delete-account", - "description" : "${role_delete-account}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "083c3506-866a-4b85-ae57-bab1c29ac33e", - "name" : "view-groups", - "description" : "${role_view-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "a1942880-1a32-402c-b9bb-e8f5edf2ba1a", - "name" : "view-profile", - "description" : "${role_view-profile}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "a69f73d6-ce42-41e6-b341-30a2d99caba8", - "name" : "manage-account-links", - "description" : "${role_manage-account-links}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "ac22aeec-062a-4fc0-ac79-aa849ee55d84", - "name" : "manage-consent", - "description" : "${role_manage-consent}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "view-consent" ] - } - }, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "ad45329d-0efa-4505-906a-5a69b6c8414a", - "name" : "view-applications", - "description" : "${role_view-applications}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "8c0bfbdf-1914-4522-9024-ef0e6e91be9d", - "name" : "view-consent", - "description" : "${role_view-consent}", - "composite" : false, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - }, { - "id" : "f34de6ff-a5aa-41a7-a8d2-87bdfa850c50", - "name" : "manage-account", - "description" : "${role_manage-account}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "manage-account-links" ] - } - }, - "clientRole" : true, - "containerId" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "attributes" : { } - } ], - "dbrepo-realm" : [ { - "id" : "89292ccf-3b12-4c8b-a615-966ddcf14556", - "name" : "manage-users", - "description" : "${role_manage-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "784f2fdf-a090-4452-8a02-d9cc8227df8f", - "name" : "view-authorization", - "description" : "${role_view-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "57a70a96-bc56-4629-8d2b-86c68ac1c6f6", - "name" : "query-realms", - "description" : "${role_query-realms}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "60349d70-ba29-426d-9c05-df0b11e1a73b", - "name" : "query-clients", - "description" : "${role_query-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "c07819ae-8951-4dc4-af4d-bca93c60eb5a", - "name" : "view-identity-providers", - "description" : "${role_view-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "86842bf0-7f63-4053-8389-2ec5401cb2a9", - "name" : "query-groups", - "description" : "${role_query-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "0a1579a0-76c5-4ee3-90cc-c924827b7492", - "name" : "view-realm", - "description" : "${role_view-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "4eb0d05c-38c7-4d45-b858-ad7011df0ac0", - "name" : "manage-identity-providers", - "description" : "${role_manage-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "d4ff5a03-21e8-440c-9ccb-690ecbb89684", - "name" : "manage-events", - "description" : "${role_manage-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "00d523c3-e9c7-45c3-8221-0b6d6c82cd5d", - "name" : "manage-authorization", - "description" : "${role_manage-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "c441f018-7113-4fcb-8208-10ab4bd4bb27", - "name" : "view-clients", - "description" : "${role_view-clients}", - "composite" : true, - "composites" : { - "client" : { - "dbrepo-realm" : [ "query-clients" ] - } - }, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "a146533f-fbf3-4513-8505-cf44473f5459", - "name" : "create-client", - "description" : "${role_create-client}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "d3d0ed01-05a5-4812-8fa7-9231f71e61fa", - "name" : "query-users", - "description" : "${role_query-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "fcaed53d-022a-416d-b207-a6ae694a9384", - "name" : "manage-clients", - "description" : "${role_manage-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "cefdb023-0eec-4c05-93d7-8b557bb28a81", - "name" : "view-users", - "description" : "${role_view-users}", - "composite" : true, - "composites" : { - "client" : { - "dbrepo-realm" : [ "query-users", "query-groups" ] - } - }, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "44d13b2a-a2b5-4f3b-bea1-4ab550205e12", - "name" : "manage-realm", - "description" : "${role_manage-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "17378e7a-9a78-4e92-ae0b-6bdfadede2d5", - "name" : "impersonation", - "description" : "${role_impersonation}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - }, { - "id" : "7810ab39-c546-456c-81eb-7ee09492da92", - "name" : "view-events", - "description" : "${role_view-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "attributes" : { } - } ] - } - }, - "groups" : [ { - "id" : "1fcdbec1-9c86-4a14-a859-425b43cf73cb", - "name" : "system", - "path" : "/system", - "subGroups" : [ ], - "attributes" : { }, - "realmRoles" : [ "default-roles-master", "default-system-roles", "admin", "create-realm" ], - "clientRoles" : { } - } ], - "defaultRole" : { - "id" : "01178d3c-65eb-406b-87a1-e7144f488028", - "name" : "default-roles-master", - "description" : "${role_default-roles}", - "composite" : true, - "clientRole" : false, - "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd" - }, - "requiredCredentials" : [ "password" ], - "passwordPolicy" : "length(8) and maxLength(64) and specialChars(1) and lowerCase(1) and upperCase(1) and digits(1)", - "otpPolicyType" : "totp", - "otpPolicyAlgorithm" : "HmacSHA1", - "otpPolicyInitialCounter" : 0, - "otpPolicyDigits" : 6, - "otpPolicyLookAheadWindow" : 1, - "otpPolicyPeriod" : 30, - "otpPolicyCodeReusable" : false, - "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], - "localizationTexts" : { }, - "webAuthnPolicyRpEntityName" : "keycloak", - "webAuthnPolicySignatureAlgorithms" : [ "ES256", "RS256" ], - "webAuthnPolicyRpId" : "", - "webAuthnPolicyAttestationConveyancePreference" : "not specified", - "webAuthnPolicyAuthenticatorAttachment" : "not specified", - "webAuthnPolicyRequireResidentKey" : "not specified", - "webAuthnPolicyUserVerificationRequirement" : "not specified", - "webAuthnPolicyCreateTimeout" : 0, - "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyAcceptableAaguids" : [ ], - "webAuthnPolicyExtraOrigins" : [ ], - "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", - "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256", "RS256" ], - "webAuthnPolicyPasswordlessRpId" : "", - "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", - "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", - "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", - "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", - "webAuthnPolicyPasswordlessCreateTimeout" : 0, - "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], - "webAuthnPolicyPasswordlessExtraOrigins" : [ ], - "scopeMappings" : [ { - "clientScope" : "offline_access", - "roles" : [ "offline_access" ] - } ], - "clientScopeMappings" : { - "account" : [ { - "client" : "account-console", - "roles" : [ "manage-account", "view-groups" ] - } ] - }, - "clients" : [ { - "id" : "b63c04db-23a8-432b-a6a7-1a4c9a5d1cad", - "clientId" : "account", - "name" : "${client_account}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/master/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/master/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - }, { - "id" : "1af255f9-7eee-415c-9096-3a717d2c5150", - "clientId" : "account-console", - "name" : "${client_account-console}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/master/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/master/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "63d1e47d-6e61-4f36-8a5b-98384a782d60", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - }, { - "id" : "65ce3e14-5e30-424a-a6bd-0b194da203ef", - "clientId" : "admin-cli", - "name" : "${client_admin-cli}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : false, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "client.use.lightweight.access.token.enabled" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - }, { - "id" : "217563ea-11c7-4c96-969b-af076d740f7c", - "clientId" : "broker", - "name" : "${client_broker}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - }, { - "id" : "c10597a2-3888-43c4-9d60-1a90a6a4d490", - "clientId" : "dbrepo-realm", - "name" : "dbrepo Realm", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ ], - "optionalClientScopes" : [ ] - }, { - "id" : "9a451e5c-a55a-4872-bee1-58af763101a1", - "clientId" : "master-realm", - "name" : "master Realm", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "true", - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - }, { - "id" : "b2a24dc7-01d2-4a5a-8385-8b06d2b8a3fb", - "clientId" : "security-admin-console", - "name" : "${client_security-admin-console}", - "rootUrl" : "${authAdminUrl}", - "baseUrl" : "/admin/master/console/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/admin/master/console/*" ], - "webOrigins" : [ "+" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "realm_client" : "false", - "client.use.lightweight.access.token.enabled" : "true", - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "54d1c74b-4eb6-483b-88b5-261964dd182a", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String" - } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "roles", "profile", "basic", "email" ], - "optionalClientScopes" : [ "address", "phone", "organization", "offline_access", "microprofile-jwt" ] - } ], - "clientScopes" : [ { - "id" : "12ce4fa5-b53e-47dc-b70f-caf2110e31cd", - "name" : "address", - "description" : "OpenID Connect built-in scope: address", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${addressScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "4aed5e41-0d8d-4c24-80a0-cd9822072756", - "name" : "address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-address-mapper", - "consentRequired" : false, - "config" : { - "user.attribute.formatted" : "formatted", - "user.attribute.country" : "country", - "introspection.token.claim" : "true", - "user.attribute.postal_code" : "postal_code", - "userinfo.token.claim" : "true", - "user.attribute.street" : "street", - "id.token.claim" : "true", - "user.attribute.region" : "region", - "access.token.claim" : "true", - "user.attribute.locality" : "locality" - } - } ] - }, { - "id" : "a7683fe7-1c8b-44f8-9be7-a28acdffa61e", - "name" : "organization", - "description" : "Additional claims about the organization a subject belongs to", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${organizationScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "5e80a7d2-c9d0-48e1-aadc-d8848ff90f92", - "name" : "organization", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-organization-membership-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "multivalued" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "organization", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "1be1e284-2749-4bbb-890a-2d519cc1531c", - "name" : "service_account", - "description" : "Specific scope for a client enabled for service accounts", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "c913a673-cf66-4493-a2ed-14556c07617c", - "name" : "Client ID", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "client_id", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "client_id", - "jsonType.label" : "String" - } - }, { - "id" : "5c244d68-5c63-4356-ac71-5a586f40c77e", - "name" : "Client IP Address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "clientAddress", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "clientAddress", - "jsonType.label" : "String" - } - }, { - "id" : "600285d4-ae51-4b39-a7be-bb83cf5870db", - "name" : "Client Host", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "clientHost", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "clientHost", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "0411ea86-a074-4781-850d-ea3ca94590a2", - "name" : "offline_access", - "description" : "OpenID Connect built-in scope: offline_access", - "protocol" : "openid-connect", - "attributes" : { - "consent.screen.text" : "${offlineAccessScopeConsentText}", - "display.on.consent.screen" : "true" - } - }, { - "id" : "4363ea0f-c7e9-43f3-8611-146514c37b47", - "name" : "basic", - "description" : "OpenID Connect scope for add all basic claims to the token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "0b691845-92b7-47b8-82d3-6fea760d885a", - "name" : "sub", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-sub-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "access.token.claim" : "true" - } - }, { - "id" : "15db8f91-12c9-444c-8661-5a795856e884", - "name" : "auth_time", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usersessionmodel-note-mapper", - "consentRequired" : false, - "config" : { - "user.session.note" : "AUTH_TIME", - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "auth_time", - "jsonType.label" : "long" - } - } ] - }, { - "id" : "5f9da2a4-b8d2-48cd-9343-5c8ff42ef637", - "name" : "profile", - "description" : "OpenID Connect built-in scope: profile", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${profileScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "2d1400be-4053-4393-ba87-91b64f699054", - "name" : "full name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-full-name-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "introspection.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - }, { - "id" : "6b12336d-589e-4023-9c51-1da3a4114a62", - "name" : "website", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "website", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "website", - "jsonType.label" : "String" - } - }, { - "id" : "13a7a453-3862-40b4-8a81-550172a06dc0", - "name" : "zoneinfo", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "zoneinfo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "zoneinfo", - "jsonType.label" : "String" - } - }, { - "id" : "43c149fc-aaf4-486a-a279-df624d2eb47e", - "name" : "given name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "firstName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "given_name", - "jsonType.label" : "String" - } - }, { - "id" : "8bba390c-543b-4fe3-98db-e020184e5014", - "name" : "birthdate", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "birthdate", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "birthdate", - "jsonType.label" : "String" - } - }, { - "id" : "dc5a7474-c62a-42d6-ba98-f2b2a7a7328c", - "name" : "nickname", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "nickname", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "nickname", - "jsonType.label" : "String" - } - }, { - "id" : "9e02395e-5c37-46fb-8d30-0ebe6da3b7f0", - "name" : "gender", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "gender", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "gender", - "jsonType.label" : "String" - } - }, { - "id" : "d2f3d16d-21a8-4128-b60b-55e55046fa29", - "name" : "profile", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "profile", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "profile", - "jsonType.label" : "String" - } - }, { - "id" : "825cafb6-3392-491a-bb34-e607330f5170", - "name" : "family name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "lastName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "family_name", - "jsonType.label" : "String" - } - }, { - "id" : "c44ac799-cac2-4200-b71b-badab4b48d92", - "name" : "updated at", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "updatedAt", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "updated_at", - "jsonType.label" : "long" - } - }, { - "id" : "402b2c5f-0a7b-4520-9015-03fa9a1e2e4a", - "name" : "picture", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "picture", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "picture", - "jsonType.label" : "String" - } - }, { - "id" : "f34812b0-28b3-486c-8911-9394890be4f6", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String" - } - }, { - "id" : "3fe6f4f2-c881-4b84-87db-8e9b9243a7f0", - "name" : "middle name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "middleName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "middle_name", - "jsonType.label" : "String" - } - }, { - "id" : "4d1465b2-c408-4a62-9821-afce35a55f12", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "9b03908f-dac3-4bbd-8e93-ef29e64a59ad", - "name" : "role_list", - "description" : "SAML role list", - "protocol" : "saml", - "attributes" : { - "consent.screen.text" : "${samlRoleListScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "d6678801-a0f1-4385-ae11-5dee90a9e3b4", - "name" : "role list", - "protocol" : "saml", - "protocolMapper" : "saml-role-list-mapper", - "consentRequired" : false, - "config" : { - "single" : "false", - "attribute.nameformat" : "Basic", - "attribute.name" : "Role" - } - } ] - }, { - "id" : "fa13fc44-16f6-4f82-965d-b86dfad2a984", - "name" : "microprofile-jwt", - "description" : "Microprofile - JWT built-in scope", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "f70938d7-e91f-4c45-bfed-3b974d0e4697", - "name" : "groups", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "multivalued" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "foo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "groups", - "jsonType.label" : "String" - } - }, { - "id" : "1636d5e3-2af1-4d54-a60f-9db1f562b009", - "name" : "upn", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "upn", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "1124b695-1319-45aa-bc1b-ec0b2cf99b9e", - "name" : "acr", - "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "0e17d8d7-fb11-4b31-8023-d29611f7d492", - "name" : "acr loa level", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-acr-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "introspection.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "cc53d998-1eac-4574-9bec-58110d92d282", - "name" : "web-origins", - "description" : "OpenID Connect scope for add allowed web origins to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "consent.screen.text" : "", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "635cbac1-7cab-43bd-99fc-f7084aca2fa2", - "name" : "allowed web origins", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-allowed-origins-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "access.token.claim" : "true" - } - } ] - }, { - "id" : "2c901d49-bb6d-44a7-8835-1229b655ccfa", - "name" : "saml_organization", - "description" : "Organization Membership", - "protocol" : "saml", - "attributes" : { - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "60ad6a87-646d-4c9e-932e-34ab1ac51fcb", - "name" : "organization", - "protocol" : "saml", - "protocolMapper" : "saml-organization-membership-mapper", - "consentRequired" : false, - "config" : { } - } ] - }, { - "id" : "943d1441-ee61-4ab5-b5bd-de3c5f8ff25f", - "name" : "roles", - "description" : "OpenID Connect scope for add user roles to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "consent.screen.text" : "${rolesScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "2b5a3df4-1adb-402d-bc28-2bd43224e682", - "name" : "realm roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "foo", - "introspection.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "realm_access.roles", - "jsonType.label" : "String", - "multivalued" : "true" - } - }, { - "id" : "f3b60071-ef26-48a7-9554-67f62f84d543", - "name" : "client roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-client-role-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "foo", - "introspection.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "resource_access.${client_id}.roles", - "jsonType.label" : "String", - "multivalued" : "true" - } - }, { - "id" : "b757200e-494a-4585-857e-e4c18aef7a0c", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "access.token.claim" : "true" - } - } ] - }, { - "id" : "4509fb3c-a899-49ad-b690-b031f9568888", - "name" : "email", - "description" : "OpenID Connect built-in scope: email", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${emailScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "e18769b3-778b-47d8-be52-dd2769deebd1", - "name" : "email", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "email", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email", - "jsonType.label" : "String" - } - }, { - "id" : "d98c5037-5178-4cc5-8e22-ca6cf0cb169e", - "name" : "email verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "emailVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email_verified", - "jsonType.label" : "boolean" - } - } ] - }, { - "id" : "6e14db34-285a-47ae-8b43-b3dcf10ae7f8", - "name" : "phone", - "description" : "OpenID Connect built-in scope: phone", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${phoneScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "98cc724c-3f53-47f7-bf9f-baf2f7e08026", - "name" : "phone number verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "phoneNumberVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number_verified", - "jsonType.label" : "boolean" - } - }, { - "id" : "716a7b58-dcf4-4557-9f84-d21ca19630fb", - "name" : "phone number", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "introspection.token.claim" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "phoneNumber", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number", - "jsonType.label" : "String" - } - } ] - } ], - "defaultDefaultClientScopes" : [ "role_list", "saml_organization", "profile", "email", "roles", "web-origins", "acr", "basic" ], - "defaultOptionalClientScopes" : [ "offline_access", "address", "phone", "microprofile-jwt", "organization" ], - "browserSecurityHeaders" : { - "contentSecurityPolicyReportOnly" : "", - "xContentTypeOptions" : "nosniff", - "referrerPolicy" : "no-referrer", - "xRobotsTag" : "none", - "xFrameOptions" : "SAMEORIGIN", - "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "xXSSProtection" : "1; mode=block", - "strictTransportSecurity" : "max-age=31536000; includeSubDomains" - }, - "smtpServer" : { }, - "eventsEnabled" : false, - "eventsListeners" : [ "jboss-logging" ], - "enabledEventTypes" : [ ], - "adminEventsEnabled" : false, - "adminEventsDetailsEnabled" : false, - "identityProviders" : [ ], - "identityProviderMappers" : [ ], - "components" : { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { - "id" : "f2a52e27-5582-4ca4-b20c-1864b8339b16", - "name" : "Trusted Hosts", - "providerId" : "trusted-hosts", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "host-sending-registration-request-must-match" : [ "true" ], - "client-uris-must-match" : [ "true" ] - } - }, { - "id" : "95b33704-ec30-4988-b018-f73d8bcf71b5", - "name" : "Full Scope Disabled", - "providerId" : "scope", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "d1114c75-d0b0-4584-a89f-a4e70eab2cd7", - "name" : "Consent Required", - "providerId" : "consent-required", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "6b0202cc-e70e-46da-869b-36ad59907239", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-usermodel-property-mapper", "saml-role-list-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-full-name-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper", "oidc-address-mapper", "saml-user-property-mapper" ] - } - }, { - "id" : "4b976576-c880-48a0-9b4d-2956cfd19b4a", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-attribute-mapper" ] - } - }, { - "id" : "e1861ec9-2761-46fb-8048-149492269ff0", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - }, { - "id" : "51b3aa61-e453-4e0b-bfe1-aefd8353ea06", - "name" : "Max Clients Limit", - "providerId" : "max-clients", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "max-clients" : [ "200" ] - } - }, { - "id" : "851cf8c2-ffe8-4a37-8a12-df04f724c90b", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - } ], - "org.keycloak.userprofile.UserProfileProvider" : [ { - "id" : "34049725-5a66-456c-b895-87ca7c11bb6b", - "providerId" : "declarative-user-profile", - "subComponents" : { }, - "config" : { - "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}]}" ] - } - } ], - "org.keycloak.storage.UserStorageProvider" : [ { - "id" : "3a6f24e8-128b-4ac1-b3ab-694836db82fd", - "name" : "Identity Service", - "providerId" : "ldap", - "subComponents" : { - "org.keycloak.storage.ldap.mappers.LDAPStorageMapper" : [ { - "id" : "bf97cfab-4d53-4994-b3a8-0c771a70467b", - "name" : "email", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "mail" ], - "is.mandatory.in.ldap" : [ "false" ], - "always.read.value.from.ldap" : [ "false" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "email" ] - } - }, { - "id" : "cddffa16-0aff-4e0c-99a2-021f0495de03", - "name" : "last name", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "sn" ], - "is.mandatory.in.ldap" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "lastName" ] - } - }, { - "id" : "4eaae3fa-d280-4605-b09d-1caeb881322c", - "name" : "modify date", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "modifyTimestamp" ], - "is.mandatory.in.ldap" : [ "false" ], - "read.only" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "user.model.attribute" : [ "modifyTimestamp" ] - } - }, { - "id" : "98c4a2c1-d509-443b-8475-fc971c193324", - "name" : "first name", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "cn" ], - "is.mandatory.in.ldap" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "firstName" ] - } - }, { - "id" : "74dbebb4-9881-4be1-8b30-6b0f2a718c86", - "name" : "username", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "uid" ], - "is.mandatory.in.ldap" : [ "true" ], - "always.read.value.from.ldap" : [ "false" ], - "read.only" : [ "false" ], - "user.model.attribute" : [ "username" ] - } - }, { - "id" : "5692d060-55b8-4cb1-b68f-0ae123cd9d03", - "name" : "system", - "providerId" : "group-ldap-mapper", - "subComponents" : { }, - "config" : { - "mode" : [ "LDAP_ONLY" ], - "membership.attribute.type" : [ "DN" ], - "user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ], - "group.name.ldap.attribute" : [ "cn" ], - "ignore.missing.groups" : [ "false" ], - "membership.user.ldap.attribute" : [ "uid" ], - "preserve.group.inheritance" : [ "false" ], - "membership.ldap.attribute" : [ "member" ], - "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], - "memberof.ldap.attribute" : [ "memberOf" ], - "group.object.classes" : [ "groupOfNames" ], - "drop.non.existing.groups.during.sync" : [ "false" ], - "groups.path" : [ "/" ] - } - }, { - "id" : "0453ae29-3cdc-4e09-800e-0117e7a2fb68", - "name" : "creation date", - "providerId" : "user-attribute-ldap-mapper", - "subComponents" : { }, - "config" : { - "ldap.attribute" : [ "createTimestamp" ], - "is.mandatory.in.ldap" : [ "false" ], - "read.only" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], - "user.model.attribute" : [ "createTimestamp" ] - } - } ] - }, - "config" : { - "pagination" : [ "false" ], - "fullSyncPeriod" : [ "-1" ], - "startTls" : [ "false" ], - "connectionPooling" : [ "false" ], - "usersDn" : [ "ou=users,{{ .Values.identityservice.global.ldapDomain }}" ], - "cachePolicy" : [ "DEFAULT" ], - "useKerberosForPasswordAuthentication" : [ "false" ], - "importEnabled" : [ "true" ], - "enabled" : [ "true" ], - "changedSyncPeriod" : [ "-1" ], - "usernameLDAPAttribute" : [ "uid" ], - "bindCredential" : [ "{{ .Values.identityservice.global.adminPassword }}" ], - "bindDn" : [ "cn={{ .Values.identityservice.global.adminUser }},{{ .Values.identityservice.global.ldapDomain }}" ], - "vendor" : [ "other" ], - "uuidLDAPAttribute" : [ "entryUUID" ], - "allowKerberosAuthentication" : [ "false" ], - "connectionUrl" : [ "ldap://identity-service:389" ], - "syncRegistrations" : [ "true" ], - "authType" : [ "simple" ], - "krbPrincipalAttribute" : [ "krb5PrincipalName" ], - "searchScope" : [ "1" ], - "useTruststoreSpi" : [ "always" ], - "usePasswordModifyExtendedOp" : [ "false" ], - "trustEmail" : [ "false" ], - "userObjectClasses" : [ "inetOrgPerson, organizationalPerson, person" ], - "rdnLDAPAttribute" : [ "uid" ], - "editMode" : [ "READ_ONLY" ], - "validatePasswordPolicy" : [ "false" ] - } - } ], - "org.keycloak.keys.KeyProvider" : [ { - "id" : "5b1052d2-fb71-47d2-86f9-908c869c8d1b", - "name" : "hmac-generated-hs512", - "providerId" : "hmac-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "dff6ccc5-bd9b-467c-8e93-0fe51d353eaf" ], - "secret" : [ "Q8srw06SZoVO9ZJtKsfKPZyg8O7w01pLMv-CVMbxhBNXJ2lldqKmDgYxHBWnyeIYjXsp2M_Q-SQh1MZc7THyJJpFpRvqN8q9ZgUyWv3GZ-TH7Cez7aeg-WEQrWywBTFfacu_VjmDxucinZoJTWLaH9NNdCcZSMeuBHyM1V__BeE" ], - "priority" : [ "100" ], - "algorithm" : [ "HS512" ] - } - }, { - "id" : "fd48cdb1-8be8-4ac9-9347-dc3e91db95d7", - "name" : "rsa-enc-generated", - "providerId" : "rsa-enc-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEpAIBAAKCAQEA3ZslFoBBYiRi9ZF9uMllfkL6ZDheVTSDTPgQar/ueThttbnovNEJ5W2xIJrSPJkN5yuq55zycwr8IzMjBPt9DLbKxqHmaUm2YkO3MMPdQGLoI8j8no6IB74qKBxpyUoEDXmmUaE02u+QkuBohhBuBSyvzktWzv25giXVxzwFqzmRx6aJXvZSKuE6fBqbIA+hxit6Wm35OkLNl6UKDDI1WmhAuaNwV/UUsJvOWW2QFAosLCr7bevrIX+mHWUimiTcBQC/hW6K391dA0LczHHGJ//74r/OeXvF4ODBdFSl1NuamgRGZnRD7pjTtp57mutwWm+bSWo2/DrCFQfjfVKhkQIDAQABAoIBAA+zk+ult7w/7sEOh3Vl06qgDUS3l7t6xojYFLWzlq6BGIjlPL/QId7fKEsynQ3NHGaSOgBCJw2OrDHESElslj4l33U2eHBiWClbOeobHpyWxXLvpTKIz8uYpj0EUlyAQYxA389t2CRhEAHQI6fIFzuHoIdB4Es3QAMgMib1MkOg5VGsuV1LE8HcK44uFBOWXeQmEuasMQqmvAwj9M2yS6xjsxq0nS381PY1JYR7suhmOyvyZas/YvmltOVvQczwzW/MfMGga14YoJyAAz/7VZXCgVTs1ffHg9ET6s1PkNwVNTDAGriMG7GtN40UFEukS5cb2SRIJdg89DnHxHoNQ3cCgYEA+QIaUDuzgN+0D1ydYnCbTDwolHtBce7EUkOpaJRXyfwsrf/m8/bx302JSQLXs9zd9B3VwHWQIDQElAKcE/nbqUJPZLvjAWuSU/viLljGab5++mLKQ537UEV74msFj5rxwulzvQQ0owPsf/gHgTQ27ds/fWufywWpSCr/0+aE+NsCgYEA49QShQ1LakkAtckJYJ5W5TycDHMj1WV5GHUy9SX6fDNK9HpL1RQv5RY2yNa5nlpy5Izv5LzQb+6vAGZcfdd3WXv934k5qwAh+prmorWS2gXEbQJAan1BsApjFgtbJqyxLjhHywlG3W9Eh+HImlLTUKnx/3tr3Yn4vP7YAA1ZVQMCgYB+uZQ8qvWCq9aOTtsGAzr1xFP+pO+8lQAywZ6Qy5YWBJGUh/y4wj98HpC0qI6wScJnf1uOVAZibTa7QMy/2dPxwv52zKwNx/ozZahJYAKyRDGJKge3+8mvo30V0NOGrxtEz9yIIIDNSaztv4PKPJGL4Z3hLYmoIBxzzvZdmB6qKwKBgQDKqOYEduwD0oaQLhFqYc8YQU7qgC168LXEfNRkX3EutA3T5Um5dCialqULCH67Dugux/PJO/AJ8X64U1WpF1ZyQip1gsLKiuau3sWULQJBcGnnMd6NG3ioGMVFYbqmb214mNW8FTd1WDnUyZJBPLX+hf3fbjFoMwgRTnxjp3w0cwKBgQDxnYNXZqVPJsDDqW23+uj66b0n1oamhe/hl6zm2uhhq5hXXIRbRPqCWznZvm6eD/kcvknrNYopsb90RkJYjl9povaIFrSWH28QEaTHIzJmW0tKOxL0bQo05AmRXLnW2vlBafno6ZQGFAotnIIJLwzU9Tu2PwRQ83ypP1mvWowXzA==" ], - "certificate" : [ "MIICmzCCAYMCBgGUfz5NvjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjUwMTE5MTU0NDM3WhcNMzUwMTE5MTU0NjE3WjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdmyUWgEFiJGL1kX24yWV+QvpkOF5VNINM+BBqv+55OG21uei80QnlbbEgmtI8mQ3nK6rnnPJzCvwjMyME+30MtsrGoeZpSbZiQ7cww91AYugjyPyejogHviooHGnJSgQNeaZRoTTa75CS4GiGEG4FLK/OS1bO/bmCJdXHPAWrOZHHpole9lIq4Tp8GpsgD6HGK3pabfk6Qs2XpQoMMjVaaEC5o3BX9RSwm85ZbZAUCiwsKvtt6+shf6YdZSKaJNwFAL+Fborf3V0DQtzMccYn//viv855e8Xg4MF0VKXU25qaBEZmdEPumNO2nnua63Bab5tJajb8OsIVB+N9UqGRAgMBAAEwDQYJKoZIhvcNAQELBQADggEBALGWVRlB9zbRWtv9fgxyWEzPqcZeyILAp0//bC4Y+EEe1fS5EfgP/J5U7j0DNt2Sc87uVkGCOGjTx7du6a/9uPA4ULMLUQO0Xusz41YrntjLWdWveLDmcqEYfF52qJQRhX7iYGGGG1Iq6Ju/1dfiX3nBD/RnVVHHf5s8QY0v0V/AnfWVaj3eFA8tybx1VsD7A8Whm7jgcQTOqu2L5F4gw4BwDDkCIYhkJcfPu1pvM+R3eDmXN8rTEVnNcCtvLFtTlBcmHhYnCYJaNHiSquKs5wDuDE6crBPgWfzzk2XHKLpmamdFyjzL8WFUmhnypQfwBNjnsgAl2U059bQz1fyBIlM=" ], - "priority" : [ "100" ], - "algorithm" : [ "RSA-OAEP" ] - } - }, { - "id" : "0ff03eb6-b43b-4065-b583-9e310f53a573", - "name" : "rsa-generated", - "providerId" : "rsa-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEogIBAAKCAQEAsetSXQJDd0r9Cv6hB/QyQ7DlVXAQeRuwasOTF5Eoez0mTuW1DGraTIttZwPOYMxvDOs4c9/+0QA9DNUtc4PHGXPB0WxuKDSikkVlPtyqOnrcaSYYArhHkYU727M+8r+vIhtToYB/g88mlMH4JfL0tUJQGlnOrDxUUP7RiWAbzQ33JDAAyV6HUOm1SgNH61V6z8a06m9NL//trN2PeILqNt/DT7iwTd+bmNQZzw+wSVTGR4K3O5sjWjRHvihAxvOCKvyzpYnbQ5AM/GpXOmahpuOQ45LebSYHlU7YSUVXH8Q2yLefjRCZ0H0mkRDx+yBr/vkKhF5vqv+lH3qKA6H6jQIDAQABAoIBAFdLSWb/BFEUhuENG79GTh8uPOdVi4+QSVeoy5PFkeIdl50gUVtdVew2gKAJmwmdZGMnSdR4s5KiFlIkih9iKZ7QT+lL1SR+5sDzsYBNTmxQ+bHRkfhLqDm68CqUYK9D407Nr5PO80GdsqVMIk+kS/JfLeQv6hpRo2D2FaLcd+d8Pzp72qgCcRTLGKzjPEv+ffA9eL6smP+E3/m54YS7e3jwMyVdl4IXAKBjPMkdtKMWnuGxHnPrZ71A1LJjL4un4N8HjIMGDCyFFkCvPE7FhzpdN249VF29QTfU+QHjiKC0O6nej/A+4kIbWjDF+YmmSEJRSKfk7SVuzs4XnBfsz7UCgYEA6zW+Sud2qos5/DQUUWTleKfqhaEzVvy2pWMXUqaHzvPu7NsaLl+DbEIRvoxJzqdWfwwnWIrD6kGU8GVa1I8RLKK3JS681R6Pw/Ih5JKw9n5lkD+gIpE5ryENQ5jGdwFRUTpJxKY2aPUve7PsyM5flau2d3eo/4SXIRy1pCMcAgMCgYEAwaU44XDH54rLVFuSpg6ck7uSxb15987AECW1z6n/oIAw0reVvCvp8tInk6owKRqvxVCM3W/B0UQONGDmcCcK1GoaO+hJZV/t+c9NAHrna2t10+bHRHwYLG9FUu/hWKtLsxqathsEXdS02m6y6jX3UWuR6Qwz2XYH7PWS3/EHNC8CgYA//qxapuVTe3P4WZcZmjERBea6GuTkCvgKwY4r76FNvnLIQMi7y0Lvpn47cOH39vGCuaTO41pwlw1V5s2yvYY3tcHMvQ2lkp4c+vkbvomlVzh86cLBBPBD5OM9/AgrgtFEH27IsUxmfCdCKe8Hp5a8Gy8XDBiQBNw1pyEImoDZTwKBgCU+nwMVSw2or1TpS/puYwUzFZa8y8Gy3VP9vMtVOhpnrXxJ3R3VIGkYrI4FNMAjJt1/kahhf1i9izHd1VSK3dVfFu6gzcUWv1HF4lyORwZtI7t+7qKob4nUWPQLuT7xq1ymaE1QQvW9HI/KrNTJTmk1lFnLhAl2Xy3fScGSvTz3AoGABYA6e1Ksiex2Iv37f16l6lo6hfbUKIoAooyrTKjwqpWGaFtDBQxTNaOR93APjg1rX+wtcwMpl1ABpsf2a1DoRJBItH1oE7q6ZDJ/qz2BnJkH8TvDy89Cbe/8R2vwQIsE7rDzW3Ivfx2KN//iKHAA6BEqf3m2p4u2Dqient5XC9M=" ], - "certificate" : [ "MIICmzCCAYMCBgGUfz5OEDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjUwMTE5MTU0NDM3WhcNMzUwMTE5MTU0NjE3WjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx61JdAkN3Sv0K/qEH9DJDsOVVcBB5G7Bqw5MXkSh7PSZO5bUMatpMi21nA85gzG8M6zhz3/7RAD0M1S1zg8cZc8HRbG4oNKKSRWU+3Ko6etxpJhgCuEeRhTvbsz7yv68iG1OhgH+DzyaUwfgl8vS1QlAaWc6sPFRQ/tGJYBvNDfckMADJXodQ6bVKA0frVXrPxrTqb00v/+2s3Y94guo238NPuLBN35uY1BnPD7BJVMZHgrc7myNaNEe+KEDG84Iq/LOlidtDkAz8alc6ZqGm45Djkt5tJgeVTthJRVcfxDbIt5+NEJnQfSaREPH7IGv++QqEXm+q/6UfeooDofqNAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADmCns7tVOSdgo8sdJ/pviO1wjbmsNdg8vwn2uTsPesYLTya9iaIXVfjvhM2jOqoglIGp2/udjphOJvJapmpPmr7v6jPSrzW6phW4NP75scWR61gr9a+HKGA2imA/UwRPbb4gV3sIkIZtzlAiBJ7mItQ3C4gg3UpzwFkCxeUVPira0zq87T0p3c8b2QaUdsqhnpHUlB1KeSKstGgrUShZbOh0/Qzu+Fkw+CPsbshlRpCzpL5gwz8YolLeAl9E+qXH2fbugc+gvJyxciN6bn5tMa8QwV833jYSUdt3f+P+BwVCWG1XbkbzLTxd3JWB5JNXtEzXpylnRgtTydLDTZyC3c=" ], - "priority" : [ "100" ] - } - }, { - "id" : "df28b561-7463-4927-974d-615618056b41", - "name" : "aes-generated", - "providerId" : "aes-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "04a0e3ff-030f-4d22-a125-449f1541b83c" ], - "secret" : [ "uhC2E9sCbuigVhRLbnCmCQ" ], - "priority" : [ "100" ] - } - } ] - }, - "internationalizationEnabled" : false, - "supportedLocales" : [ ], - "authenticationFlows" : [ { - "id" : "2e13d5a8-b0fb-475b-8991-66d1cc8e99f1", - "alias" : "Account verification options", - "description" : "Method with which to verity the existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-email-verification", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Verify Existing Account by Re-authentication", - "userSetupAllowed" : false - } ] - }, { - "id" : "0bf3a099-5ef5-4ea9-b325-5bc9699180a6", - "alias" : "Browser - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "88ca29ab-cbe0-4e3f-938a-e6c5327748ab", - "alias" : "Direct Grant - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "789e7d43-bc05-44d2-8c09-de7fee9d56de", - "alias" : "First broker login - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "ee145b84-2b30-438e-9cee-6fe90909af1a", - "alias" : "Handle Existing Account", - "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-confirm-link", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Account verification options", - "userSetupAllowed" : false - } ] - }, { - "id" : "853d891a-0009-443c-91c3-a7f1ad1dd0dc", - "alias" : "Reset - Conditional OTP", - "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "d7f13a9b-a13c-4236-ae41-df8da7e5fa8d", - "alias" : "User creation or linking", - "description" : "Flow for the existing/non-existing user alternatives", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "create unique user config", - "authenticator" : "idp-create-user-if-unique", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Handle Existing Account", - "userSetupAllowed" : false - } ] - }, { - "id" : "3cb699ee-11d4-44be-878b-a183b9e96b59", - "alias" : "Verify Existing Account by Re-authentication", - "description" : "Reauthentication of existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "First broker login - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "61d5a1e2-7074-41ad-97bf-e5c41c70989e", - "alias" : "browser", - "description" : "Browser based authentication", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-cookie", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-spnego", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "identity-provider-redirector", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 25, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "forms", - "userSetupAllowed" : false - } ] - }, { - "id" : "21dabcf1-8817-4f2d-981a-13239e160b56", - "alias" : "clients", - "description" : "Base authentication for clients", - "providerId" : "client-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "client-secret", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-secret-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-x509", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 40, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "a349aeb2-9373-47ec-9381-0c379df56c71", - "alias" : "direct grant", - "description" : "OpenID Connect Resource Owner Grant", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "direct-grant-validate-username", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "Direct Grant - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "39b3aa37-4ece-4e31-acbc-79889994713e", - "alias" : "docker auth", - "description" : "Used by Docker clients to authenticate against the IDP", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "docker-http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "18561349-cc5e-4e5b-bcb2-979645118f96", - "alias" : "first broker login", - "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "review profile config", - "authenticator" : "idp-review-profile", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "User creation or linking", - "userSetupAllowed" : false - } ] - }, { - "id" : "9933f082-3d53-4575-b011-90e6933fb2a1", - "alias" : "forms", - "description" : "Username, password, otp and other auth forms.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Browser - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "00285357-456a-4fd4-b449-ed25253e6364", - "alias" : "registration", - "description" : "Registration flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-page-form", - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : true, - "flowAlias" : "registration form", - "userSetupAllowed" : false - } ] - }, { - "id" : "b9131fa9-5614-42b4-8353-c6c15e66c2ce", - "alias" : "registration form", - "description" : "Registration form", - "providerId" : "form-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-user-creation", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-password-action", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 50, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-recaptcha-action", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 60, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-terms-and-conditions", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 70, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "424642cc-3a71-4732-ba38-b737179ce37f", - "alias" : "reset credentials", - "description" : "Reset credentials for a user if they forgot their password or something", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "reset-credentials-choose-user", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-credential-email", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 40, - "autheticatorFlow" : true, - "flowAlias" : "Reset - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "c8c9c4dc-a39d-4ba6-ad4b-9447a8125349", - "alias" : "saml ecp", - "description" : "SAML ECP Profile Authentication Flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - } ], - "authenticatorConfig" : [ { - "id" : "49d63952-ca6e-450c-a65f-70388169cb90", - "alias" : "create unique user config", - "config" : { - "require.password.update.after.registration" : "false" - } - }, { - "id" : "5b4f58fc-aff7-4e12-8c48-40aeb3db1432", - "alias" : "review profile config", - "config" : { - "update.profile.on.first.login" : "missing" - } - } ], - "requiredActions" : [ { - "alias" : "CONFIGURE_TOTP", - "name" : "Configure OTP", - "providerId" : "CONFIGURE_TOTP", - "enabled" : true, - "defaultAction" : false, - "priority" : 10, - "config" : { } - }, { - "alias" : "TERMS_AND_CONDITIONS", - "name" : "Terms and Conditions", - "providerId" : "TERMS_AND_CONDITIONS", - "enabled" : false, - "defaultAction" : false, - "priority" : 20, - "config" : { } - }, { - "alias" : "UPDATE_PASSWORD", - "name" : "Update Password", - "providerId" : "UPDATE_PASSWORD", - "enabled" : true, - "defaultAction" : false, - "priority" : 30, - "config" : { } - }, { - "alias" : "UPDATE_PROFILE", - "name" : "Update Profile", - "providerId" : "UPDATE_PROFILE", - "enabled" : true, - "defaultAction" : false, - "priority" : 40, - "config" : { } - }, { - "alias" : "VERIFY_EMAIL", - "name" : "Verify Email", - "providerId" : "VERIFY_EMAIL", - "enabled" : true, - "defaultAction" : false, - "priority" : 50, - "config" : { } - }, { - "alias" : "delete_account", - "name" : "Delete Account", - "providerId" : "delete_account", - "enabled" : false, - "defaultAction" : false, - "priority" : 60, - "config" : { } - }, { - "alias" : "webauthn-register", - "name" : "Webauthn Register", - "providerId" : "webauthn-register", - "enabled" : true, - "defaultAction" : false, - "priority" : 70, - "config" : { } - }, { - "alias" : "webauthn-register-passwordless", - "name" : "Webauthn Register Passwordless", - "providerId" : "webauthn-register-passwordless", - "enabled" : true, - "defaultAction" : false, - "priority" : 80, - "config" : { } - }, { - "alias" : "VERIFY_PROFILE", - "name" : "Verify Profile", - "providerId" : "VERIFY_PROFILE", - "enabled" : true, - "defaultAction" : false, - "priority" : 90, - "config" : { } - }, { - "alias" : "delete_credential", - "name" : "Delete Credential", - "providerId" : "delete_credential", - "enabled" : true, - "defaultAction" : false, - "priority" : 100, - "config" : { } - }, { - "alias" : "update_user_locale", - "name" : "Update User Locale", - "providerId" : "update_user_locale", - "enabled" : true, - "defaultAction" : false, - "priority" : 1000, - "config" : { } - } ], - "browserFlow" : "browser", - "registrationFlow" : "registration", - "directGrantFlow" : "direct grant", - "resetCredentialsFlow" : "reset credentials", - "clientAuthenticationFlow" : "clients", - "dockerAuthenticationFlow" : "docker auth", - "firstBrokerLoginFlow" : "first broker login", - "attributes" : { - "cibaBackchannelTokenDeliveryMode" : "poll", - "cibaAuthRequestedUserHint" : "login_hint", - "clientOfflineSessionMaxLifespan" : "0", - "oauth2DevicePollingInterval" : "5", - "clientSessionIdleTimeout" : "0", - "clientOfflineSessionIdleTimeout" : "0", - "cibaInterval" : "5", - "realmReusableOtpCode" : "false", - "cibaExpiresIn" : "120", - "oauth2DeviceCodeLifespan" : "600", - "parRequestUriLifespan" : "60", - "clientSessionMaxLifespan" : "0", - "frontendUrl" : "", - "organizationsEnabled" : "false", - "acr.loa.map" : "{}" - }, - "keycloakVersion" : "26.0.4", - "userManagedAccessAllowed" : false, - "organizationsEnabled" : false, - "clientProfiles" : { - "profiles" : [ ] - }, - "clientPolicies" : { - "policies" : [ ] - } - } + AUTH_SERVICE_ADMIN: "{{ .Values.authservice.auth.adminUser }}" + AUTH_SERVICE_ADMIN_PASSWORD: "{{ .Values.authservice.auth.adminPassword }}" + AUTH_SERVICE_ENDPOINT: "{{ .Values.authservice.endpoint }}" + LDAP_ROOT: "{{ .Values.identityservice.global.ldapDomain }}" + LDAP_ADMIN_DN: "cn={{ .Values.identityservice.global.adminUser }},{{ .Values.identityservice.global.ldapDomain }}" + LDAP_ADMIN_PASSWORD: "{{ .Values.identityservice.global.adminPassword }}" + METADATA_DB: "{{ .Values.metadatadb.db.name }}" + METADATA_DB_PASSWORD: "{{ .Values.metadatadb.rootUser.password }}" + METADATA_SERVICE_ENDPOINT: "{{ .Values.metadataservice.endpoint }}" + METADATA_USERNAME: "{{ .Values.metadatadb.rootUser.user }}" + SYSTEM_USERNAME: "{{ .Values.identityservice.users }}" + SYSTEM_PASSWORD: "{{ .Values.identityservice.userPasswords }}" + {{ (.Files.Glob "files/dbrepo-realm.json").AsConfig | nindent 2 }} + {{ (.Files.Glob "files/master-realm.json").AsConfig | nindent 2 }} {{- end }} \ No newline at end of file diff --git a/helm/dbrepo/templates/auth-job.yaml b/helm/dbrepo/templates/auth-job.yaml index 5771f817ff4c5422c6f5d84cb04aa07ce2cc1d84..ca58e6a287cb97365b62fa4bec597ae8cb0ebab9 100644 --- a/helm/dbrepo/templates/auth-job.yaml +++ b/helm/dbrepo/templates/auth-job.yaml @@ -30,8 +30,8 @@ spec: fieldRef: fieldPath: metadata.namespace envFrom: - - secretRef: - name: auth-service-secret + - configMapRef: + name: auth-service-config {{- if .Values.authservice.setupJob.resources }} resources: {{- toYaml .Values.authservice.setupJob.resources | nindent 12 }} {{- else if ne .Values.authservice.setupJob.resourcesPreset "none" }} diff --git a/helm/dbrepo/templates/auth-secret.yaml b/helm/dbrepo/templates/auth-secret.yaml index cb2b2a6aebadcbb443bb05e76d27ee2b80a3b64e..0d1b5625c5f289c749ad8d1f565212516d7359b6 100644 --- a/helm/dbrepo/templates/auth-secret.yaml +++ b/helm/dbrepo/templates/auth-secret.yaml @@ -1,4 +1,5 @@ {{- if .Values.authservice.enabled }} +{{/*openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"*/}} --- apiVersion: v1 kind: Secret @@ -6,13 +7,88 @@ metadata: name: auth-service-secret namespace: {{ include "common.names.namespace" . | quote }} stringData: - AUTH_SERVICE_ADMIN: "{{ .Values.authservice.auth.adminUser }}" - AUTH_SERVICE_ADMIN_PASSWORD: "{{ .Values.authservice.auth.adminPassword }}" - AUTH_SERVICE_ENDPOINT: "{{ .Values.authservice.endpoint }}" - METADATA_DB: "{{ .Values.metadatadb.db.name }}" - METADATA_DB_PASSWORD: "{{ .Values.metadatadb.rootUser.password }}" - METADATA_SERVICE_ENDPOINT: "{{ .Values.metadataservice.endpoint }}" - METADATA_USERNAME: "{{ .Values.metadatadb.rootUser.user }}" - SYSTEM_USERNAME: "{{ .Values.identityservice.users }}" - SYSTEM_PASSWORD: "{{ .Values.identityservice.userPasswords }}" + tls.key: |- + -----BEGIN PRIVATE KEY----- + MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDdgSRp+M9I4b/Y + c21SXAnRpjq85U2u4zvB3tcRSvZpyWtsBuwHY2OEGUVClPEYvT8QhRRMdcKiXA78 + Q5FiXPGidc3kJhgt2PE4R5GaoLG5vGGQimnASE31f94y+zDWhvNxCluix08FM7Z2 + VHpYQHWZFveltP1jf68gmQDgu99hZ/Zri9ig8b99q9xITXMw6gbmdesadlNLaAET + wjBJe44+Y/uQ3VHQUCIPQxgPPzEivceR1beUpnfcmVYmO8O4f0u5OvyN1BbIhdjt + VVt29s/V8QPDsE8McnImoTLN10cACq66volnDTrlM9x5Grg89GlzbpQsPkBMltY9 + NTP3+NFSrpfu7VjEVYO/O5k6JFFfMlqHUtygaNi7dOeOY3IiytL7rvxWLGUQYB7b + e662ETK8nw5F+yGiae6spZPf7nmI2iLs8ja5QneU6mQrKfqO/KRJBehwZP2771nj + RO3BIyJPm1oygnihWG+jTy9zDYCguJrPZ1f1hvUzfmpCKtyqaxGmxPA8YDu4dyL9 + rJgf3oT5fYv3nDpMePDYh3Z18YeqYJf4pmDv53Wus5CoXURfc3NRRTqMQKLKOYvV + WTiM4odY4+VkbgOUOrLxOK5llZSB6bO52KccKpQnQLt30okGQXDlsR1hbFIDAI1N + WilFsry4JpVcxjTJGQMV2W0TcG+fkQIDAQABAoICAD84Sb1ZP0hM7mWH5E7aaA8H + Q8KAK+DbiEW4JWgRHi1pSJinjRw6uL+OOt9bBUkLUoGTigycm7WdUsWbP1Z0sp6s + wtv4J3SGc6qdeqhIbxFU+/+2EaLIwD9uhGvGl9TS5Y6A51CZVCtm7A/v4o9nrmjI + TlxkQOHyInjKUp7R4Fq7wnBFlMmy1fW3ZILaYCM42ElUpIqD9RgTkiMijIeclSen + f7iEAoLTLDVw7+ACKDMDOX+dIO1zachzl0wISL9SzbkLZePRAcOvuA9dCmL05LLq + PCnRG26xB3WREp//botLgT1ZfnwEIagjWizSfH0hQSuqBu5twgpaDsGferqusIdB + hbikXR4TdobvUfkg/pNqcpx8HuqTR1QYTUOp3Bw7lpHKihuDLcjhXs0d+7c/sFFd + OZmBCrbV8DKhGXfQ/Uz1BnROVchbzkrIVWVBMx1QZxGDt6xiAF0yCdkDQI2cQxn3 + scRSg8AQjBqo+yb7YYVcegIFLV4xXnYei25D+GITR1XppNZ/8wdMtQt0IiWqzTax + Z4UDMUeE0Z1ce8VCZ3Qkg4gPAEPiAoCfZLZIgMFLIvMAf+6SegnkZTsL+TYRXxC2 + nFE41iBEUvd3wsIwOCOJXrb4ftL/ivEllpy+Uwy39cSV5+YymeG174+KJPTeN6v7 + 1b0NlTuFYqcrKNkzefQlAoIBAQD+WOTR5Cr9A/TtJCLI6fhzFefMHiGiVu24jM0k + lcguOxW633F8odoSzxyXt5Fa8muJV4qBE9j/wsV6xoSuFCqh+YPd/WCa4WIBR9qe + KqNrA+I0G/ORJgZxMm3FvW9dtiT1JHTs6mczh0SGtGB/uDINOqmeuT/Nz4/easL+ + B7Ih6wqnNUnCntWEzJ5WfIiOofQ5YjSlrskggC1Mn8Ygo24XQoVTq/+QV/Ju/PnQ + nRZWKN6O8C9akbKjJ9DeEK3Qj6Lhja+blrKyopL5eAppKq1MlzZ+RU0q/SfAlmbq + IkThiSOcdeCqSGjJU3sYk5x8IQBp9EDrb4snhm6TtaAyxOWnAoIBAQDe8Z1QjCWb + f5tdbmuACDxY1x72R++dhKwyLIX/EpPL80MSpesrfsfIsmATWWgxZEiGBekchP69 + qB/rcpBAefrr85QD8y5zvAv6gNhjE7pqKgDtyNF+osulLD+ZattqZlHH5S74aOyi + oGtOCHcETGJhGHrePSLRwm9e/q2e2zXLyyD32a9WWvhwA0uLMDEFshXw9kE41jrZ + MqeBf6HsEAKWAhuE2Tj0lYWbULhDgBPV6f/rgNU41Rm+cs5j98ONkNEuP1jjyc8J + Cg/JrBzcUUDkTa7RRtcN9g2FilpZRi6CErKpK4u6OLu8VXz+zY4gQFiVZRUvXGCF + E4k0098VYugHAoIBAQDsV+n4Z47SoTScjzGLhG4LctV7xJv4X9Jx5NRTJKNo4hpl + FXA9IaCkTbQB/t+gpRbr/l6DZtADiRc76PAtWivraxHv25xDDx+klQI+atyDeo5d + YYPI4o6l7Pg4ALlVWQWqjX/hDkdriExS55Wr2JsZ0+L9zKHPOwoy4P3kU35hKiky + CsBJipJZ3lFbiEjUUQXBtNG7C1l1S+XMB8NxXKvWDUga4f6OQErUe1ofUXkKAtwb + 8m/uNujJ1xus3c7FuFLgSGpfp37Ro2PzUGpMIw3516EZYIg+ZBLmUFu9QK7E7Ewc + /SQQ10wXl+0Qf0mvxnK+Aeu5WmLyDWb+9oyv4GqNAoIBAQC9v8DYBGAhx+sRC2D9 + eIT8TCOzE6jSVVBF5/UoEsSuKl5k6ciNnXsmywLQlSEEIMlFIJS2TE+QVh7MwxYZ + enhhCFBrSDe6E0vSqoUBVpIrt5JQz8HWWXKgI1gCGJulJG7ohpyCmrME+yo5ISVD + CEwXPcGdk0UmaKlnnbVh5ksUJ8/og2MjSYv3siZC0gJ3SYo5Ky551IQDxoQgyOOk + yj+ZMzP+zu8V5IjxlzMtaD35rA7Af0d69ozRtl8JYKAUxjPze8EJJwNKO0ESsaVi + stlbNu7aecOhw1Dg3s9k+kGtPYLITyK+nXjTo6MeLw+PTZTXmk/8nlAcE3OM/eL6 + DdNTAoIBAEib9d8V1gTNWecBxmWbGnxqb+08tcvlhyVe055ndmu1S2kQb0tcfcc+ + y0YIXnN/d8poHPCoaO7CXgh0AOlznayywzwncuEP9Cngcq285rkjCpq1YxU9c1rq + iKUEjCATBZ1QqQoElmsAffU3N1bQdSv5u2lWxQ2VBZYjubv3DPSRAY9amYbHA+Dy + xW7FY9haFX71aQNquN8nGjF0q46JrMgi1BSh+rLMdLqLUJ8kjpEO3nExEnYrzHgF + o+PzcyNgP6N0bkSlUc19p18LKkCU1yimA54CMGNk5bcB9pylJQsV3ldv+Ra6JJux + Px0kzVCk41nBfNgjXe3s2BLlEhh3Lrk= + -----END PRIVATE KEY----- + tls.crt: |- + -----BEGIN CERTIFICATE----- + MIIFDzCCAvegAwIBAgIUCRgz8OLg6bHay9kWHFgSp9SF3RAwDQYJKoZIhvcNAQEL + BQAwFzEVMBMGA1UEAwwMYXV0aC1zZXJ2aWNlMB4XDTI1MDMwNDE5NDUxOVoXDTM1 + MDMwMjE5NDUxOVowFzEVMBMGA1UEAwwMYXV0aC1zZXJ2aWNlMIICIjANBgkqhkiG + 9w0BAQEFAAOCAg8AMIICCgKCAgEA3YEkafjPSOG/2HNtUlwJ0aY6vOVNruM7wd7X + EUr2aclrbAbsB2NjhBlFQpTxGL0/EIUUTHXColwO/EORYlzxonXN5CYYLdjxOEeR + mqCxubxhkIppwEhN9X/eMvsw1obzcQpbosdPBTO2dlR6WEB1mRb3pbT9Y3+vIJkA + 4LvfYWf2a4vYoPG/favcSE1zMOoG5nXrGnZTS2gBE8IwSXuOPmP7kN1R0FAiD0MY + Dz8xIr3HkdW3lKZ33JlWJjvDuH9LuTr8jdQWyIXY7VVbdvbP1fEDw7BPDHJyJqEy + zddHAAquur6JZw065TPceRq4PPRpc26ULD5ATJbWPTUz9/jRUq6X7u1YxFWDvzuZ + OiRRXzJah1LcoGjYu3TnjmNyIsrS+678VixlEGAe23uuthEyvJ8ORfshomnurKWT + 3+55iNoi7PI2uUJ3lOpkKyn6jvykSQXocGT9u+9Z40TtwSMiT5taMoJ4oVhvo08v + cw2AoLiaz2dX9Yb1M35qQircqmsRpsTwPGA7uHci/ayYH96E+X2L95w6THjw2Id2 + dfGHqmCX+KZg7+d1rrOQqF1EX3NzUUU6jECiyjmL1Vk4jOKHWOPlZG4DlDqy8Tiu + ZZWUgemzudinHCqUJ0C7d9KJBkFw5bEdYWxSAwCNTVopRbK8uCaVXMY0yRkDFdlt + E3Bvn5ECAwEAAaNTMFEwHQYDVR0OBBYEFBWE851rO2U9WR+0md9lfAbkAtevMB8G + A1UdIwQYMBaAFBWE851rO2U9WR+0md9lfAbkAtevMA8GA1UdEwEB/wQFMAMBAf8w + DQYJKoZIhvcNAQELBQADggIBAI2dI9hT/xfnwtYAdBlyIJRW1IMn1vVo6Xm/UVrl + PPmbB2vQ13Z07vWi0Djwou+BwUhFSq6YRIe+bhQjg6On8O2581aNve97K1AwwB3O + YZztiyyJ5Moccrkb9Wy2MyfUiPqNY3O8Q0BRl793Tbv9G0gyNudO6FmmdWpfu/VT + ZAfiKRvNycC0BZp7A7tkvbtYWOQ7cGa9qpcVSBHvALj+3b+RKwDVf7K+YBkOXamT + Y2xE6KhHz0FJmFNTIkdwjA2M3CCh5M3QVHyXRDApNKiav5yU6TWBT7JQqZA6GV/+ + jrVNl5fZwT5AHQmwQB0k1q1azjFREMLQXzgkfuSK5AiW+70KRpILxOMzx616FoZH + 2D+7sZ5EXnBVZmAL5WLSraOjwia+jyOUrTIUY8t+4kabxdKhQMhwOATUe4dAxIZK + VGHVHKNJ9+ktZ+j56AUUUNRWNx85LoMjh46e4T3rYm4CG9cBQAHGEXSn1i4bt14q + j4+9BNow4f/66XcUOsvPmiQGqPNWFYVj0QIq84yakzzVWdMm6MEu4WtlVPGlZmRV + OUHuaqiSmdGcHRVGdmqkTTpRUGASw7HR/7nPn3YFwP3yfZFUa44hbtAdQQll1O5Z + IuuDir8s195hl0UJ+9HilYEuOVjB7bS0Wc3sZxOP2U/98CBa4UzMuVDMhJ/WKs5U + znPt + -----END CERTIFICATE----- {{- end }} diff --git a/helm/dbrepo/templates/data-deployment.yaml b/helm/dbrepo/templates/data-deployment.yaml index 291041948b34995f01fab7840b128567c2c2ffe1..7e77d2020e39a877b6d0165452adcf25f2b34eba 100644 --- a/helm/dbrepo/templates/data-deployment.yaml +++ b/helm/dbrepo/templates/data-deployment.yaml @@ -44,7 +44,7 @@ spec: - /bin/bash - -ec - "curl -sSL localhost:8080/actuator/health/readiness | grep 'UP' || exit 1" - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: exec: diff --git a/helm/dbrepo/templates/gateway-configmap.yaml b/helm/dbrepo/templates/gateway-configmap.yaml index 162d65571d358e0470e8dd9eb7f8586a778ced92..0587cbac175d9c70e2ba43ff0a3095bd0dc5b519 100644 --- a/helm/dbrepo/templates/gateway-configmap.yaml +++ b/helm/dbrepo/templates/gateway-configmap.yaml @@ -20,7 +20,7 @@ data: listen 8080 default_server; server_name _; - location /dashboard/ { + location /dashboard { rewrite ^/dashboard/(.*) /$1 break; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -31,7 +31,7 @@ data: } # Proxy Grafana Live WebSocket connections. - location /dashboard/api/live/ { + location /dashboard/api/live { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -71,14 +71,12 @@ data: } location /api/upload { - # allow 128.130.0.0/16; - # deny all; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; - proxy_pass http://upload-service; + proxy_pass http://data-service; proxy_read_timeout 90; # Disable request and response buffering proxy_request_buffering off; @@ -95,7 +93,7 @@ data: proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/table/([0-9]+)/(data|history|export) { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/table/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|history)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -104,7 +102,7 @@ data: proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/view/([0-9]+)/(data|export) { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/data" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -113,7 +111,7 @@ data: proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/view { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -122,7 +120,7 @@ data: proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/subset { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/subset" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -131,7 +129,7 @@ data: proxy_read_timeout 600; } - location ~ /api/(database|concept|container|identifier|image|message|license|oai|ontology|unit|user) { + location ~ "/api/(database|concept|container|identifier|image|message|license|oai|ontology|unit|user)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -140,8 +138,7 @@ data: proxy_read_timeout 90; } - location ~ /pid/([0-9]+) { - rewrite /pid/(.*) /api/identifier/$1 break; + location ~ "/api/identifier/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -150,8 +147,14 @@ data: proxy_read_timeout 90; } - location /assets { - root /etc/nginx/assets; + location ~ "/pid/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})" { + rewrite /pid/(.*) /api/identifier/$1 break; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://metadata-service; + proxy_read_timeout 90; } location / { diff --git a/helm/dbrepo/templates/identity-service.yaml b/helm/dbrepo/templates/identity-service.yaml index fcff683e87c7b55d21c26f7fd79f5831edd93eef..532bc8dae6323917f98094ce19cf8a508b642c1e 100644 --- a/helm/dbrepo/templates/identity-service.yaml +++ b/helm/dbrepo/templates/identity-service.yaml @@ -11,11 +11,11 @@ spec: type: ClusterIP ports: - name: "ldap" - port: 389 + port: 1389 targetPort: 1389 protocol: TCP - name: "sldap" - port: 636 + port: 1636 targetPort: 1636 protocol: TCP selector: diff --git a/helm/dbrepo/templates/identity-statefulset.yaml b/helm/dbrepo/templates/identity-statefulset.yaml index 4d69c9b41330552bd2bda292f234389c9c8c8d97..f65a547e669b1346f6bb58a2bdce7745cd5f430f 100644 --- a/helm/dbrepo/templates/identity-statefulset.yaml +++ b/helm/dbrepo/templates/identity-statefulset.yaml @@ -49,7 +49,7 @@ spec: - /bin/bash - -ec - "ldapwhoami -H ldap://localhost:1389 -D cn={{ .Values.identityservice.global.adminUser }},{{ .Values.identityservice.global.ldapDomain }} -w {{ .Values.identityservice.global.adminPassword }}" - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: exec: diff --git a/helm/dbrepo/templates/metadata-configmap.yaml b/helm/dbrepo/templates/metadata-configmap.yaml index 059f2bd40d2418672f8f6a4a3f1c64f05156cac2..a6b7ad8212839ab1b14fec02b304335ff90e974a 100644 --- a/helm/dbrepo/templates/metadata-configmap.yaml +++ b/helm/dbrepo/templates/metadata-configmap.yaml @@ -6,5 +6,16 @@ metadata: name: metadata-db-config namespace: {{ include "common.names.namespace" . | quote }} data: + {{- with .Values.metadatadb.extraInitDbScripts }} + {{ toYaml . | nindent 2 }} + {{- end }} + {{ (.Files.Glob "files/01-setup-schema.sql").AsConfig | nindent 2 }} + 02-setup-data.sql: |- + BEGIN; + INSERT INTO `mdb_containers` (id, name, internal_name, image_id, host, port, ui_host, ui_port, privileged_username, + privileged_password) + VALUES ('6cfb3b8e-1792-4e46-871a-f3d103527203', 'mariadb:11.1.3-debian-11-r6', 'mariadb_11_1_3', + 'd79cb089-363c-488b-9717-649e44d8fcc5', 'data-db', {{ .Values.datadb.containerPorts.mysql }}, '{{ .Values.hostname }}', {{ .Values.datadb.containerPorts.mysql }}, '{{ .Values.datadb.rootUser.user }}', '{{ .Values.datadb.rootUser.password }}'); + COMMIT; {{ (.Files.Glob "files/my.cnf").AsConfig | nindent 2 }} {{- end }} diff --git a/helm/dbrepo/templates/metadata-deployment.yaml b/helm/dbrepo/templates/metadata-deployment.yaml index b00adf5e12bd377d69cf7f5cfd45adffe04a68c1..f5f27378e1d88c2ee59743a5d2dbbcbe110e0235 100644 --- a/helm/dbrepo/templates/metadata-deployment.yaml +++ b/helm/dbrepo/templates/metadata-deployment.yaml @@ -44,7 +44,7 @@ spec: - /bin/bash - -ec - "curl -sSL localhost:8080/actuator/health/readiness | grep 'UP' || exit 1" - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: exec: diff --git a/helm/dbrepo/templates/search-deployment.yaml b/helm/dbrepo/templates/search-deployment.yaml index 9b9ed71b5bacd5f1d65ee5fc316a5b744c78363b..98908f0c4202f31fdbf9e0915a1eeaea866193ad 100644 --- a/helm/dbrepo/templates/search-deployment.yaml +++ b/helm/dbrepo/templates/search-deployment.yaml @@ -62,7 +62,7 @@ spec: - /bin/bash - -ec - "curl -sSL localhost:8080/health | grep 'UP' || exit 1" - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: exec: diff --git a/helm/dbrepo/templates/ui-deployment.yaml b/helm/dbrepo/templates/ui-deployment.yaml index 96150e63d11089be34388da49d466f54d2f77122..512b3f403f8f18a4949de2c6b8d835f894da46a9 100644 --- a/helm/dbrepo/templates/ui-deployment.yaml +++ b/helm/dbrepo/templates/ui-deployment.yaml @@ -46,7 +46,7 @@ spec: httpGet: path: / port: 3000 - initialDelaySeconds: 120 + initialDelaySeconds: 150 periodSeconds: 10 readinessProbe: httpGet: diff --git a/helm/dbrepo/templates/upload-configmap.yaml b/helm/dbrepo/templates/upload-configmap.yaml deleted file mode 100644 index 3dbde251a88996f82037c8cde87aa6354ac17b79..0000000000000000000000000000000000000000 --- a/helm/dbrepo/templates/upload-configmap.yaml +++ /dev/null @@ -1,54 +0,0 @@ -{{- if .Values.uploadservice.enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: upload-service-setup - namespace: {{ include "common.names.namespace" . | quote }} -data: - pre-create: | - #!/bin/bash - REQUEST_RAW=$(cat /dev/stdin) - - echo "[DEBUG] [pre-create hook] request started" >&2 - if [ "$(echo "$REQUEST_RAW" | jq '.HTTPRequest.Header | has("Authorization")')" == "false" ]; then - echo "[ERROR] [pre-create hook] Missing header 'Authorization'" >&2 - echo "[DEBUG] [pre-create hook] raw request: ${REQUEST_RAW}" >&2 - cat <<END - { - "RejectUpload": true, - "HTTPResponse": { - "StatusCode": 400, - "Header": { - "Content-Type": "application/json" - }, - "Body": "{\"code\":\"error.upload.malformed\",\"message\":\"Missing header 'Authorization'\",\"status\":\"BAD_REQUEST\"}" - } - } - END - exit 1 - fi - - echo "[DEBUG] [pre-create hook] request has 'Authorization' header present" >&2 - - BEARER="$(echo "$REQUEST_RAW" | jq -r '.HTTPRequest.Header.Authorization[0]')" - echo "[DEBUG] [pre-create hook] attempting to contact {{ .Values.authservice.endpoint }}" >&2 - if [ ! "$(wget -O- --quiet --header "Authorization: ${BEARER}" {{ .Values.authservice.endpoint }}/realms/dbrepo/protocol/openid-connect/userinfo)" ]; then - echo "[ERROR] [pre-create hook] Unauthorized" >&2 - cat <<END - { - "RejectUpload": true, - "HTTPResponse": { - "StatusCode": 401, - "Header": { - "Content-Type": "application/json" - }, - "Body": "{\"code\":\"error.upload.unauthorized\",\"message\":\"Authentication required\",\"status\":\"UNAUTHORIZED\"}" - } - } - END - exit 1 - fi - - echo "[INFO] [pre-create hook] Authorized" >&2 -{{- end }} diff --git a/helm/dbrepo/templates/upload-deployment.yaml b/helm/dbrepo/templates/upload-deployment.yaml deleted file mode 100644 index 1eb9eebd653a9537c3435c2c59e9657425e143a7..0000000000000000000000000000000000000000 --- a/helm/dbrepo/templates/upload-deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -{{- if .Values.uploadservice.enabled }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: upload-service - namespace: {{ include "common.names.namespace" . | quote }} - labels: - app: upload-service - service: upload-service -spec: - replicas: {{ .Values.uploadservice.replicaCount }} - strategy: - type: {{ .Values.strategyType }} - selector: - matchLabels: - app: upload-service - service: upload-service - template: - metadata: - labels: - app: upload-service - service: upload-service - spec: - {{- if .Values.uploadservice.podSecurityContext.enabled }} - securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.uploadservice.podSecurityContext "context" $) | nindent 8 }} - {{- end }} - containers: - - name: upload-service - image: {{ .Values.uploadservice.image.name }} - imagePullPolicy: {{ .Values.uploadservice.image.pullPolicy | default "IfNotPresent" }} - {{- if .Values.uploadservice.containerSecurityContext.enabled }} - securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.uploadservice.containerSecurityContext "context" $) | nindent 12 }} - {{- end }} - args: - - "-behind-proxy" - - "-max-size={{ .Values.uploadservice.s3.maxSize }}" - - "-base-path=/api/upload/files/" - - "-s3-endpoint={{ .Values.uploadservice.s3.endpoint}}" - - "-s3-bucket={{ .Values.uploadservice.s3.bucket }}" - ports: - - containerPort: 1080 - protocol: TCP - envFrom: - - secretRef: - name: upload-service-secret - livenessProbe: - httpGet: - port: 1080 - initialDelaySeconds: 120 - periodSeconds: 10 - readinessProbe: - httpGet: - port: 1080 - initialDelaySeconds: 30 - periodSeconds: 10 - {{- if .Values.uploadservice.resources }} - resources: {{- toYaml .Values.uploadservice.resources | nindent 12 }} - {{- else if ne .Values.uploadservice.resourcesPreset "none" }} - resources: {{- include "common.resources.preset" (dict "type" .Values.uploadservice.resourcesPreset) | nindent 12 }} - {{- end }} -{{- end }} diff --git a/helm/dbrepo/templates/upload-secret.yaml b/helm/dbrepo/templates/upload-secret.yaml deleted file mode 100644 index 9b246d177e85dba3f588f39c6f15a77b9b77c7a3..0000000000000000000000000000000000000000 --- a/helm/dbrepo/templates/upload-secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - name: upload-service-secret - namespace: {{ include "common.names.namespace" . | quote }} -stringData: - AWS_ACCESS_KEY_ID: "{{ .Values.storageservice.s3.auth.adminAccessKeyId }}" - AWS_SECRET_ACCESS_KEY: "{{ .Values.storageservice.s3.auth.adminSecretAccessKey }}" - AWS_REGION: "{{ .Values.storageservice.s3.region | default "default" }}" diff --git a/helm/dbrepo/templates/upload-service.yaml b/helm/dbrepo/templates/upload-service.yaml deleted file mode 100644 index b755ca4461e6eec3066d9d73d87defe90e54b061..0000000000000000000000000000000000000000 --- a/helm/dbrepo/templates/upload-service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.uploadservice.enabled }} ---- -apiVersion: v1 -kind: Service -metadata: - name: upload-service - namespace: {{ include "common.names.namespace" . | quote }} - labels: - service: upload-service -spec: - type: ClusterIP - ports: - - name: "upload-service" - port: 80 - targetPort: 1080 - protocol: TCP - selector: - service: upload-service -{{- end }} diff --git a/helm/dbrepo/values.schema.json b/helm/dbrepo/values.schema.json index bf0c7d216df1894d4231ea092074a05967033aef..f99941e2f829db6b86e837ce71e8c132af9e9bc2 100644 --- a/helm/dbrepo/values.schema.json +++ b/helm/dbrepo/values.schema.json @@ -126,7 +126,7 @@ "endpoint": { "type": "string" }, - "extraEnvVarsSecret": { + "extraEnvVarsCM": { "type": "string" }, "extraVolumeMounts": { diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index ff5562eebc310b204b49694fd0c53134a0cbbbf1..418009deec6a494536f359b8ecae102a5d8df58b 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -55,7 +55,7 @@ metadatadb: ## @skip metadatadb.metrics.enabled The Prometheus settings. enabled: true ## @skip metadatadb.initdbScriptsConfigMap The initial database scripts. - initdbScriptsConfigMap: metadata-db-setup + initdbScriptsConfigMap: metadata-db-config ## @param metadatadb.configurationConfigMap The database configuration files. configurationConfigMap: metadata-db-config ## @param metadatadb.extraInitDbScripts Additional init.db scripts that are executed on the first start. @@ -102,7 +102,7 @@ authservice: ## @param authservice.tls.enabled Enable TLS/SSL communication. Required for HTTPS. enabled: true ## @param authservice.tls.existingSecret The secret containing the `tls.crt`, `tls.key` and `ca.crt`. - existingSecret: ingress-cert + existingSecret: auth-service-secret ## @skip authservice.tls.usePem usePem: true metrics: @@ -122,7 +122,7 @@ authservice: setupJob: image: ## @skip authservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.7.1 ## @param authservice.setupJob.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param authservice.setupJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -133,8 +133,8 @@ authservice: ## limits: ## cpu: 500m ## memory: 1024Mi - ## @skip authservice.extraEnvVarsSecret - extraEnvVarsSecret: auth-service-secret + ## @skip authservice.extraEnvVarsCM + extraEnvVarsCM: auth-service-config ## @skip authservice.extraVolumes extraVolumes: - name: config-map @@ -415,7 +415,7 @@ analyseservice: enabled: true image: ## @skip analyseservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param analyseservice.podSecurityContext.enabled Enable pods' Security Context @@ -476,7 +476,7 @@ metadataservice: enabled: true image: ## @skip metadataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param metadataservice.podSecurityContext.enabled Enable pods' Security Context @@ -573,7 +573,7 @@ dataservice: endpoint: http://data-service image: ## @skip dataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param dataservice.podSecurityContext.enabled Enable pods' Security Context @@ -659,7 +659,7 @@ searchservice: endpoint: http://search-service image: ## @skip searchservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param searchservice.podSecurityContext.enabled Enable pods' Security Context @@ -706,7 +706,7 @@ searchservice: init: image: ## @skip searchservice.init.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.1 ## @param searchservice.init.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param searchservice.init.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -767,7 +767,7 @@ storageservice: init: image: ## @skip storageservice.init.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.1 s3: ## @param storageservice.init.s3.endpoint The S3-capable endpoint the microservice connects to. endpoint: http://storage-service-s3:8333 @@ -876,7 +876,7 @@ ui: enabled: true image: ## @skip ui.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.0 + name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.1 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param ui.podSecurityContext.enabled Enable pods' Security Context diff --git a/helm/seaweedfs/Chart.lock b/helm/seaweedfs/Chart.lock index 863acf55617dc87a2f5de5ba765d7ce5bcac8066..a6802a09cf77b8371a86d178399c67d7717544c5 100644 --- a/helm/seaweedfs/Chart.lock +++ b/helm/seaweedfs/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts - version: 20.2.4 + version: 20.4.1 - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 16.4.9 + version: 16.4.16 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.29.1 -digest: sha256:dbba12b36ab3b4370112da3089066f57bcef2be1651134787fd158491a2a766c -generated: "2025-02-18T09:32:41.716703325+01:00" + version: 2.30.0 +digest: sha256:20dba9f2a4322ee4b5e734cc85f7f10a47a090b0cc34bf9c1658feb774fad06e +generated: "2025-03-04T21:41:17.631905476+01:00" diff --git a/helm/seaweedfs/charts/common-2.29.1.tgz b/helm/seaweedfs/charts/common-2.29.1.tgz deleted file mode 100644 index 8b9abbbc5b6c62a743cc0fb041d26b199c4313c8..0000000000000000000000000000000000000000 Binary files a/helm/seaweedfs/charts/common-2.29.1.tgz and /dev/null differ diff --git a/helm/seaweedfs/charts/common-2.30.0.tgz b/helm/seaweedfs/charts/common-2.30.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ef7b68044a9ee31a9ba735054c13e41814b79a16 Binary files /dev/null and b/helm/seaweedfs/charts/common-2.30.0.tgz differ diff --git a/helm/seaweedfs/charts/mariadb-20.2.4.tgz b/helm/seaweedfs/charts/mariadb-20.2.4.tgz deleted file mode 100644 index eb0f7bcfab6286495ed5338abdb8221b1f89805c..0000000000000000000000000000000000000000 Binary files a/helm/seaweedfs/charts/mariadb-20.2.4.tgz and /dev/null differ diff --git a/helm/seaweedfs/charts/mariadb-20.4.1.tgz b/helm/seaweedfs/charts/mariadb-20.4.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..924d07c3e7f88655b179085c3546f5d3de5c6e75 Binary files /dev/null and b/helm/seaweedfs/charts/mariadb-20.4.1.tgz differ diff --git a/helm/seaweedfs/charts/postgresql-16.4.16.tgz b/helm/seaweedfs/charts/postgresql-16.4.16.tgz new file mode 100644 index 0000000000000000000000000000000000000000..b862ff5d0d42b34d83ea4f479ed90070f1e4ee16 Binary files /dev/null and b/helm/seaweedfs/charts/postgresql-16.4.16.tgz differ diff --git a/helm/seaweedfs/charts/postgresql-16.4.9.tgz b/helm/seaweedfs/charts/postgresql-16.4.9.tgz deleted file mode 100644 index 4bb0578224f0d8817e757a759547b171798bd407..0000000000000000000000000000000000000000 Binary files a/helm/seaweedfs/charts/postgresql-16.4.9.tgz and /dev/null differ diff --git a/install.sh b/install.sh index 6de016007f4e4eab84cd331a0a1a7aafca046b38..84b139ddf95128d994a912a3de3d1ba6db1cef1d 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # preset -VERSION="1.7.0" +VERSION="1.7.1" MIN_CPU=8 MIN_RAM=4 MIN_MAP_COUNT=262144 diff --git a/lib/python/.gitignore b/lib/python/.gitignore index 1f4bb524a1c7dfe8ec62be60b755993e13f7dedc..b11bfe061cb8fd2c97c9195211a8ba08ed1ae0ee 100644 --- a/lib/python/.gitignore +++ b/lib/python/.gitignore @@ -7,6 +7,7 @@ dbrepo.egg-info/ build/ htmlcov/ tmp-* +report.xml # debug debug.py @@ -15,9 +16,8 @@ debug.py .pypirc # coverage -coverage.txt +coverage.* .coverage -report.xml # environment .env diff --git a/lib/python/README.md b/lib/python/README.md index 443787cbb4cdcb13d0e3ec522d0d9762262000e8..1a15df15c79acd1dba9ea26ab14c09cbb2419927 100644 --- a/lib/python/README.md +++ b/lib/python/README.md @@ -2,7 +2,7 @@ Official client library for [DBRepo](https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4.3/), a database repository to support research based -on [requests](https://pypi.org/project/requests/), [pydantic](https://pypi.org/project/pydantic/), [tuspy](https://pypi.org/project/tuspy/) +on [requests](https://pypi.org/project/requests/), [pydantic](https://pypi.org/project/pydantic/) and [pika](https://pypi.org/project/pika/). ## Installing @@ -20,9 +20,11 @@ Get public data from a table as pandas `DataFrame`: ```python from dbrepo.RestClient import RestClient -client = RestClient(endpoint="https://dbrepo1.ec.tuwien.ac.at") +client = RestClient(endpoint="https://test.dbrepo.tuwien.ac.at") # Get a small data slice of just three rows -df = client.get_table_data(database_id=7, table_id=13, page=0, size=3, df=True) +df = client.get_table_data(database_id="e0d82287-9099-4077-8f69-3c19fc3bc145", + table_id="71f8c746-ea26-4651-b3f2-ce46830f1af4", + page=0, size=3) print(df) # x_coord component unit ... value stationid meantype # 0 16.52617 Feinstaub (PM10) µg/m³ ... 21.0 01:0001 HMW @@ -32,17 +34,30 @@ print(df) # [3 rows x 12 columns] ``` -Import data into a table: +Create table and import `DataFrame` into a table: ```python import pandas as pd from dbrepo.RestClient import RestClient -client = RestClient(endpoint="https://dbrepo1.ec.tuwien.ac.at", username="foo", +client = RestClient(endpoint="https://test.dbrepo.tuwien.ac.at", username="foo", password="bar") df = pd.DataFrame(data={'x_coord': 16.52617, 'component': 'Feinstaub (PM10)', 'unit': 'µg/m³', ...}) -client.import_table_data(database_id=7, table_id=13, file_name_or_data_frame=df) +df = df.set_index(['x_coord']) +client.create_table(database_id="e0d82287-9099-4077-8f69-3c19fc3bc145", + name="Sensor", is_public=True, is_schema_public=True, + dataframe=df) +``` + +... or just create the table schema by setting `create_table(..., withData=False)`. + +In both cases it is important to set the index to existing columns that uniquely +identify a row. You can specify multiple columns: + +```python +... +df = df.set_index(['some_column', 'some_other_column']) ``` ## Supported Features & Best-Practices @@ -76,7 +91,6 @@ AMQP_API_PORT="5672" AMQP_API_USERNAME="foo" AMQP_API_PASSWORD="bar" AMQP_API_VIRTUAL_HOST="dbrepo" -REST_UPLOAD_ENDPOINT="https://dbrepo1.ec.tuwien.ac.at/api/upload/files" ``` You can disable logging by setting the log level to e.g. `INFO`: diff --git a/lib/python/coverage.xml b/lib/python/coverage.xml index ac21b0bc1ed6b9f659ba578333c89e481c34ca8f..b23a031c5fe13102ab04331b3ef60329ee9353c0 100644 --- a/lib/python/coverage.xml +++ b/lib/python/coverage.xml @@ -1,41 +1,41 @@ <?xml version="1.0" ?> -<coverage version="7.6.10" timestamp="1740478405603" lines-valid="1820" lines-covered="1743" line-rate="0.9577" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> +<coverage version="7.6.10" timestamp="1741253336897" lines-valid="1941" lines-covered="1818" line-rate="0.9366" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> <!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.6.10 --> <!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --> <sources> <source>/home/mweise/Projects/fda-services/lib/python</source> </sources> <packages> - <package name="dbrepo" line-rate="0.9134" branch-rate="0" complexity="0"> + <package name="dbrepo" line-rate="0.9102" branch-rate="0" complexity="0"> <classes> - <class name="RestClient.py" filename="dbrepo/RestClient.py" complexity="0" line-rate="0.9248" branch-rate="0"> + <class name="RestClient.py" filename="dbrepo/RestClient.py" complexity="0" line-rate="0.9102" branch-rate="0"> <methods/> <lines> <line number="1" hits="1"/> <line number="2" hits="1"/> <line number="3" hits="1"/> - <line number="5" hits="1"/> + <line number="4" hits="1"/> <line number="6" hits="1"/> <line number="7" hits="1"/> - <line number="9" hits="1"/> + <line number="8" hits="1"/> <line number="10" hits="1"/> <line number="11" hits="1"/> - <line number="15" hits="1"/> - <line number="19" hits="1"/> - <line number="31" hits="1"/> + <line number="14" hits="1"/> + <line number="16" hits="1"/> + <line number="20" hits="1"/> <line number="32" hits="1"/> <line number="33" hits="1"/> <line number="34" hits="1"/> - <line number="36" hits="1"/> - <line number="41" hits="1"/> + <line number="35" hits="1"/> + <line number="37" hits="1"/> <line number="42" hits="1"/> <line number="43" hits="1"/> <line number="44" hits="1"/> <line number="45" hits="1"/> - <line number="47" hits="1"/> + <line number="46" hits="1"/> <line number="48" hits="1"/> - <line number="51" hits="1"/> - <line number="53" hits="1"/> + <line number="49" hits="1"/> + <line number="52" hits="1"/> <line number="54" hits="1"/> <line number="55" hits="1"/> <line number="56" hits="1"/> @@ -46,7 +46,7 @@ <line number="61" hits="1"/> <line number="62" hits="1"/> <line number="63" hits="1"/> - <line number="64" hits="1"/> + <line number="65" hits="1"/> <line number="66" hits="1"/> <line number="67" hits="1"/> <line number="68" hits="1"/> @@ -58,28 +58,28 @@ <line number="74" hits="1"/> <line number="75" hits="1"/> <line number="76" hits="1"/> - <line number="77" hits="1"/> - <line number="80" hits="1"/> + <line number="79" hits="1"/> + <line number="85" hits="1"/> <line number="86" hits="1"/> <line number="87" hits="1"/> <line number="88" hits="1"/> <line number="89" hits="1"/> - <line number="90" hits="1"/> - <line number="92" hits="1"/> + <line number="91" hits="1"/> + <line number="99" hits="1"/> <line number="100" hits="1"/> <line number="101" hits="1"/> <line number="102" hits="1"/> <line number="103" hits="1"/> <line number="104" hits="1"/> - <line number="105" hits="1"/> - <line number="108" hits="1"/> + <line number="107" hits="1"/> + <line number="115" hits="1"/> <line number="116" hits="1"/> <line number="117" hits="1"/> <line number="118" hits="1"/> <line number="119" hits="1"/> <line number="120" hits="1"/> - <line number="121" hits="1"/> - <line number="124" hits="1"/> + <line number="123" hits="1"/> + <line number="133" hits="1"/> <line number="134" hits="1"/> <line number="135" hits="1"/> <line number="136" hits="1"/> @@ -89,10 +89,10 @@ <line number="140" hits="1"/> <line number="141" hits="1"/> <line number="142" hits="1"/> - <line number="143" hits="1"/> - <line number="146" hits="1"/> + <line number="145" hits="1"/> + <line number="165" hits="1"/> <line number="166" hits="1"/> - <line number="167" hits="1"/> + <line number="169" hits="1"/> <line number="170" hits="1"/> <line number="171" hits="1"/> <line number="172" hits="1"/> @@ -102,15 +102,15 @@ <line number="176" hits="1"/> <line number="177" hits="1"/> <line number="178" hits="1"/> - <line number="179" hits="1"/> - <line number="182" hits="1"/> + <line number="181" hits="1"/> + <line number="189" hits="1"/> <line number="190" hits="1"/> <line number="191" hits="1"/> <line number="192" hits="1"/> <line number="193" hits="1"/> <line number="194" hits="1"/> - <line number="195" hits="1"/> - <line number="198" hits="1"/> + <line number="197" hits="1"/> + <line number="206" hits="1"/> <line number="207" hits="1"/> <line number="208" hits="1"/> <line number="209" hits="1"/> @@ -118,21 +118,21 @@ <line number="211" hits="1"/> <line number="212" hits="1"/> <line number="213" hits="1"/> - <line number="214" hits="1"/> - <line number="217" hits="1"/> + <line number="216" hits="1"/> + <line number="224" hits="1"/> <line number="225" hits="1"/> <line number="226" hits="1"/> <line number="227" hits="1"/> <line number="228" hits="1"/> <line number="229" hits="1"/> - <line number="230" hits="1"/> - <line number="233" hits="1"/> + <line number="232" hits="1"/> + <line number="239" hits="1"/> <line number="240" hits="1"/> <line number="241" hits="1"/> <line number="242" hits="1"/> <line number="243" hits="1"/> - <line number="244" hits="1"/> - <line number="247" hits="1"/> + <line number="246" hits="1"/> + <line number="257" hits="1"/> <line number="258" hits="1"/> <line number="259" hits="1"/> <line number="260" hits="1"/> @@ -142,10 +142,10 @@ <line number="264" hits="1"/> <line number="265" hits="1"/> <line number="266" hits="1"/> - <line number="267" hits="1"/> - <line number="270" hits="1"/> + <line number="269" hits="1"/> + <line number="289" hits="1"/> <line number="290" hits="1"/> - <line number="291" hits="1"/> + <line number="293" hits="1"/> <line number="294" hits="1"/> <line number="295" hits="1"/> <line number="296" hits="1"/> @@ -161,10 +161,10 @@ <line number="306" hits="1"/> <line number="307" hits="1"/> <line number="308" hits="1"/> - <line number="309" hits="1"/> - <line number="312" hits="1"/> + <line number="311" hits="1"/> + <line number="335" hits="1"/> <line number="336" hits="1"/> - <line number="337" hits="1"/> + <line number="341" hits="1"/> <line number="342" hits="1"/> <line number="343" hits="1"/> <line number="344" hits="1"/> @@ -176,10 +176,10 @@ <line number="350" hits="1"/> <line number="351" hits="1"/> <line number="352" hits="1"/> - <line number="353" hits="1"/> - <line number="356" hits="1"/> + <line number="355" hits="1"/> + <line number="372" hits="1"/> <line number="373" hits="1"/> - <line number="374" hits="1"/> + <line number="375" hits="1"/> <line number="376" hits="1"/> <line number="377" hits="1"/> <line number="378" hits="1"/> @@ -190,11 +190,11 @@ <line number="383" hits="1"/> <line number="384" hits="1"/> <line number="385" hits="1"/> - <line number="386" hits="1"/> + <line number="387" hits="1"/> <line number="388" hits="1"/> <line number="389" hits="1"/> - <line number="390" hits="1"/> - <line number="393" hits="1"/> + <line number="392" hits="1"/> + <line number="408" hits="1"/> <line number="409" hits="1"/> <line number="410" hits="1"/> <line number="411" hits="1"/> @@ -207,11 +207,11 @@ <line number="418" hits="1"/> <line number="419" hits="1"/> <line number="420" hits="1"/> - <line number="421" hits="1"/> + <line number="422" hits="1"/> <line number="423" hits="1"/> - <line number="424" hits="1"/> - <line number="426" hits="1"/> - <line number="429" hits="1"/> + <line number="425" hits="1"/> + <line number="428" hits="1"/> + <line number="443" hits="1"/> <line number="444" hits="1"/> <line number="445" hits="1"/> <line number="446" hits="1"/> @@ -228,19 +228,18 @@ <line number="457" hits="1"/> <line number="458" hits="1"/> <line number="459" hits="1"/> - <line number="460" hits="1"/> + <line number="461" hits="1"/> <line number="462" hits="1"/> <line number="463" hits="1"/> - <line number="464" hits="1"/> - <line number="467" hits="1"/> + <line number="466" hits="1"/> + <line number="489" hits="1"/> + <line number="490" hits="1"/> <line number="491" hits="1"/> - <line number="492" hits="1"/> + <line number="494" hits="1"/> <line number="495" hits="1"/> <line number="496" hits="1"/> <line number="497" hits="1"/> - <line number="498" hits="1"/> - <line number="499" hits="1"/> - <line number="500" hits="1"/> + <line number="498" hits="0"/> <line number="501" hits="1"/> <line number="502" hits="1"/> <line number="503" hits="1"/> @@ -251,33 +250,33 @@ <line number="508" hits="1"/> <line number="509" hits="1"/> <line number="510" hits="1"/> + <line number="511" hits="1"/> + <line number="512" hits="1"/> <line number="513" hits="1"/> - <line number="525" hits="1"/> - <line number="526" hits="1"/> - <line number="527" hits="1"/> - <line number="528" hits="1"/> + <line number="514" hits="1"/> + <line number="517" hits="1"/> <line number="529" hits="1"/> <line number="530" hits="1"/> <line number="531" hits="1"/> <line number="532" hits="1"/> <line number="533" hits="1"/> <line number="534" hits="1"/> + <line number="535" hits="1"/> + <line number="536" hits="1"/> <line number="537" hits="1"/> - <line number="550" hits="1"/> - <line number="551" hits="1"/> - <line number="552" hits="1"/> - <line number="553" hits="1"/> + <line number="538" hits="1"/> + <line number="541" hits="1"/> <line number="554" hits="1"/> <line number="555" hits="1"/> <line number="556" hits="1"/> <line number="557" hits="1"/> <line number="558" hits="1"/> <line number="559" hits="1"/> + <line number="560" hits="1"/> + <line number="561" hits="1"/> <line number="562" hits="1"/> - <line number="576" hits="1"/> - <line number="577" hits="1"/> - <line number="578" hits="1"/> - <line number="579" hits="1"/> + <line number="563" hits="1"/> + <line number="566" hits="1"/> <line number="580" hits="1"/> <line number="581" hits="1"/> <line number="582" hits="1"/> @@ -289,11 +288,11 @@ <line number="588" hits="1"/> <line number="589" hits="1"/> <line number="590" hits="1"/> + <line number="591" hits="1"/> + <line number="592" hits="1"/> <line number="593" hits="1"/> - <line number="606" hits="1"/> - <line number="607" hits="1"/> - <line number="608" hits="1"/> - <line number="609" hits="1"/> + <line number="594" hits="1"/> + <line number="597" hits="1"/> <line number="610" hits="1"/> <line number="611" hits="1"/> <line number="612" hits="1"/> @@ -301,11 +300,11 @@ <line number="614" hits="1"/> <line number="615" hits="1"/> <line number="616" hits="1"/> + <line number="617" hits="1"/> + <line number="618" hits="1"/> <line number="619" hits="1"/> - <line number="633" hits="1"/> - <line number="634" hits="1"/> - <line number="635" hits="1"/> - <line number="636" hits="1"/> + <line number="620" hits="1"/> + <line number="623" hits="1"/> <line number="637" hits="1"/> <line number="638" hits="1"/> <line number="639" hits="1"/> @@ -316,47 +315,46 @@ <line number="644" hits="1"/> <line number="645" hits="1"/> <line number="646" hits="1"/> + <line number="647" hits="1"/> + <line number="648" hits="1"/> <line number="649" hits="1"/> - <line number="660" hits="1"/> - <line number="661" hits="1"/> - <line number="662" hits="1"/> - <line number="663" hits="1"/> + <line number="650" hits="1"/> + <line number="653" hits="1"/> <line number="664" hits="1"/> <line number="665" hits="1"/> <line number="666" hits="1"/> <line number="667" hits="1"/> + <line number="668" hits="1"/> + <line number="669" hits="1"/> <line number="670" hits="1"/> - <line number="683" hits="1"/> - <line number="684" hits="1"/> - <line number="685" hits="1"/> - <line number="686" hits="1"/> + <line number="671" hits="1"/> + <line number="674" hits="1"/> <line number="687" hits="1"/> <line number="688" hits="1"/> <line number="689" hits="1"/> <line number="690" hits="1"/> <line number="691" hits="1"/> <line number="692" hits="1"/> + <line number="693" hits="1"/> + <line number="694" hits="1"/> <line number="695" hits="1"/> - <line number="710" hits="1"/> - <line number="711" hits="1"/> - <line number="713" hits="1"/> + <line number="696" hits="1"/> + <line number="699" hits="1"/> <line number="714" hits="1"/> <line number="715" hits="1"/> - <line number="716" hits="1"/> <line number="717" hits="1"/> <line number="718" hits="1"/> <line number="719" hits="1"/> <line number="720" hits="1"/> + <line number="721" hits="1"/> + <line number="722" hits="1"/> <line number="723" hits="1"/> - <line number="743" hits="1"/> - <line number="744" hits="1"/> - <line number="747" hits="1"/> + <line number="724" hits="1"/> + <line number="727" hits="1"/> <line number="748" hits="1"/> <line number="749" hits="1"/> <line number="750" hits="1"/> <line number="751" hits="1"/> - <line number="752" hits="1"/> - <line number="753" hits="1"/> <line number="754" hits="1"/> <line number="755" hits="1"/> <line number="756" hits="1"/> @@ -366,14 +364,14 @@ <line number="760" hits="1"/> <line number="761" hits="1"/> <line number="762" hits="1"/> + <line number="763" hits="1"/> + <line number="764" hits="1"/> <line number="765" hits="1"/> - <line number="780" hits="1"/> - <line number="781" hits="1"/> - <line number="782" hits="1"/> - <line number="783" hits="1"/> - <line number="784" hits="1"/> - <line number="785" hits="1"/> - <line number="786" hits="1"/> + <line number="766" hits="1"/> + <line number="767" hits="1"/> + <line number="768" hits="1"/> + <line number="769" hits="1"/> + <line number="772" hits="1"/> <line number="787" hits="1"/> <line number="788" hits="1"/> <line number="789" hits="1"/> @@ -384,14 +382,14 @@ <line number="794" hits="1"/> <line number="795" hits="1"/> <line number="796" hits="1"/> + <line number="797" hits="1"/> + <line number="798" hits="1"/> <line number="799" hits="1"/> - <line number="817" hits="1"/> - <line number="818" hits="1"/> - <line number="819" hits="1"/> - <line number="820" hits="1"/> - <line number="821" hits="1"/> - <line number="822" hits="1"/> - <line number="823" hits="1"/> + <line number="800" hits="1"/> + <line number="801" hits="1"/> + <line number="802" hits="1"/> + <line number="803" hits="1"/> + <line number="806" hits="1"/> <line number="824" hits="1"/> <line number="825" hits="1"/> <line number="826" hits="1"/> @@ -403,15 +401,15 @@ <line number="832" hits="1"/> <line number="833" hits="1"/> <line number="834" hits="1"/> + <line number="835" hits="1"/> <line number="836" hits="1"/> + <line number="837" hits="1"/> + <line number="838" hits="1"/> <line number="839" hits="1"/> - <line number="858" hits="1"/> - <line number="859" hits="1"/> - <line number="860" hits="1"/> - <line number="861" hits="1"/> - <line number="862" hits="1"/> - <line number="863" hits="1"/> - <line number="864" hits="1"/> + <line number="840" hits="1"/> + <line number="841" hits="1"/> + <line number="843" hits="1"/> + <line number="846" hits="1"/> <line number="865" hits="1"/> <line number="866" hits="1"/> <line number="867" hits="1"/> @@ -423,144 +421,145 @@ <line number="873" hits="1"/> <line number="874" hits="1"/> <line number="875" hits="1"/> + <line number="876" hits="1"/> <line number="877" hits="1"/> + <line number="878" hits="1"/> + <line number="879" hits="1"/> <line number="880" hits="1"/> - <line number="894" hits="1"/> - <line number="895" hits="1"/> - <line number="896" hits="1"/> - <line number="897" hits="1"/> - <line number="898" hits="1"/> - <line number="899" hits="1"/> - <line number="900" hits="1"/> + <line number="881" hits="1"/> + <line number="882" hits="1"/> + <line number="884" hits="1"/> + <line number="887" hits="1"/> <line number="901" hits="1"/> <line number="902" hits="1"/> <line number="903" hits="1"/> <line number="904" hits="1"/> <line number="905" hits="1"/> + <line number="906" hits="1"/> <line number="907" hits="1"/> + <line number="908" hits="1"/> + <line number="909" hits="1"/> <line number="910" hits="1"/> - <line number="926" hits="0"/> + <line number="911" hits="1"/> + <line number="912" hits="1"/> + <line number="914" hits="1"/> + <line number="917" hits="1"/> <line number="927" hits="0"/> <line number="928" hits="0"/> <line number="929" hits="0"/> + <line number="930" hits="0"/> <line number="932" hits="0"/> <line number="933" hits="0"/> <line number="934" hits="0"/> <line number="935" hits="0"/> - <line number="936" hits="0"/> - <line number="937" hits="0"/> - <line number="938" hits="0"/> - <line number="939" hits="0"/> - <line number="940" hits="0"/> - <line number="941" hits="0"/> - <line number="943" hits="0"/> - <line number="946" hits="1"/> + <line number="938" hits="1"/> + <line number="955" hits="0"/> + <line number="956" hits="0"/> + <line number="959" hits="0"/> <line number="960" hits="0"/> <line number="961" hits="0"/> <line number="962" hits="0"/> + <line number="963" hits="0"/> + <line number="964" hits="0"/> + <line number="965" hits="0"/> + <line number="966" hits="0"/> + <line number="967" hits="0"/> <line number="968" hits="0"/> - <line number="969" hits="0"/> <line number="970" hits="0"/> - <line number="971" hits="0"/> - <line number="972" hits="0"/> - <line number="973" hits="0"/> - <line number="974" hits="0"/> - <line number="975" hits="0"/> - <line number="976" hits="0"/> - <line number="977" hits="0"/> - <line number="980" hits="1"/> - <line number="992" hits="0"/> + <line number="973" hits="1"/> + <line number="987" hits="0"/> <line number="993" hits="0"/> <line number="994" hits="0"/> + <line number="995" hits="0"/> + <line number="996" hits="0"/> + <line number="997" hits="0"/> <line number="998" hits="0"/> <line number="999" hits="0"/> <line number="1000" hits="0"/> <line number="1001" hits="0"/> <line number="1002" hits="0"/> - <line number="1003" hits="0"/> - <line number="1004" hits="0"/> - <line number="1005" hits="0"/> - <line number="1006" hits="0"/> - <line number="1007" hits="0"/> - <line number="1010" hits="1"/> - <line number="1025" hits="1"/> - <line number="1026" hits="1"/> - <line number="1027" hits="1"/> - <line number="1028" hits="1"/> - <line number="1029" hits="1"/> - <line number="1030" hits="1"/> - <line number="1031" hits="1"/> - <line number="1032" hits="1"/> + <line number="1005" hits="1"/> + <line number="1017" hits="0"/> + <line number="1021" hits="0"/> + <line number="1022" hits="0"/> + <line number="1023" hits="0"/> + <line number="1024" hits="0"/> + <line number="1025" hits="0"/> + <line number="1026" hits="0"/> + <line number="1027" hits="0"/> + <line number="1028" hits="0"/> + <line number="1029" hits="0"/> + <line number="1030" hits="0"/> <line number="1033" hits="1"/> - <line number="1034" hits="1"/> - <line number="1035" hits="1"/> - <line number="1037" hits="1"/> - <line number="1038" hits="1"/> - <line number="1039" hits="1"/> - <line number="1042" hits="1"/> + <line number="1048" hits="1"/> + <line number="1049" hits="1"/> + <line number="1050" hits="1"/> + <line number="1051" hits="1"/> + <line number="1052" hits="1"/> + <line number="1053" hits="1"/> + <line number="1054" hits="1"/> + <line number="1055" hits="1"/> + <line number="1056" hits="1"/> <line number="1057" hits="1"/> <line number="1058" hits="1"/> - <line number="1059" hits="1"/> <line number="1060" hits="1"/> <line number="1061" hits="1"/> <line number="1062" hits="1"/> - <line number="1063" hits="1"/> - <line number="1064" hits="1"/> <line number="1065" hits="1"/> - <line number="1066" hits="1"/> - <line number="1067" hits="1"/> - <line number="1068" hits="1"/> - <line number="1070" hits="1"/> - <line number="1073" hits="1"/> + <line number="1080" hits="1"/> + <line number="1081" hits="1"/> + <line number="1082" hits="1"/> + <line number="1083" hits="1"/> + <line number="1084" hits="1"/> + <line number="1085" hits="1"/> + <line number="1086" hits="1"/> <line number="1087" hits="1"/> <line number="1088" hits="1"/> <line number="1089" hits="1"/> <line number="1090" hits="1"/> <line number="1091" hits="1"/> - <line number="1092" hits="1"/> <line number="1093" hits="1"/> - <line number="1094" hits="1"/> - <line number="1095" hits="1"/> <line number="1096" hits="1"/> - <line number="1097" hits="1"/> - <line number="1098" hits="1"/> - <line number="1100" hits="1"/> - <line number="1103" hits="1"/> + <line number="1110" hits="1"/> + <line number="1111" hits="1"/> + <line number="1112" hits="1"/> + <line number="1113" hits="1"/> + <line number="1114" hits="1"/> + <line number="1115" hits="1"/> + <line number="1116" hits="1"/> + <line number="1117" hits="1"/> + <line number="1118" hits="1"/> + <line number="1119" hits="1"/> <line number="1120" hits="1"/> <line number="1121" hits="1"/> - <line number="1122" hits="1"/> <line number="1123" hits="1"/> - <line number="1124" hits="1"/> - <line number="1125" hits="1"/> <line number="1126" hits="1"/> - <line number="1127" hits="1"/> - <line number="1128" hits="1"/> - <line number="1129" hits="1"/> - <line number="1130" hits="1"/> - <line number="1131" hits="1"/> - <line number="1132" hits="1"/> - <line number="1133" hits="1"/> - <line number="1134" hits="1"/> - <line number="1135" hits="1"/> - <line number="1136" hits="1"/> - <line number="1138" hits="1"/> - <line number="1141" hits="1"/> + <line number="1143" hits="1"/> + <line number="1144" hits="1"/> + <line number="1145" hits="1"/> + <line number="1146" hits="1"/> + <line number="1147" hits="1"/> + <line number="1148" hits="1"/> + <line number="1149" hits="1"/> + <line number="1150" hits="1"/> + <line number="1151" hits="1"/> + <line number="1152" hits="1"/> + <line number="1153" hits="1"/> + <line number="1154" hits="1"/> + <line number="1155" hits="1"/> + <line number="1156" hits="1"/> <line number="1157" hits="1"/> <line number="1158" hits="1"/> <line number="1159" hits="1"/> - <line number="1160" hits="1"/> <line number="1161" hits="1"/> - <line number="1162" hits="1"/> - <line number="1163" hits="1"/> <line number="1164" hits="1"/> - <line number="1165" hits="1"/> - <line number="1166" hits="1"/> - <line number="1167" hits="1"/> - <line number="1168" hits="1"/> - <line number="1169" hits="1"/> - <line number="1170" hits="1"/> - <line number="1172" hits="1"/> - <line number="1175" hits="1"/> + <line number="1180" hits="1"/> + <line number="1181" hits="1"/> + <line number="1182" hits="1"/> + <line number="1183" hits="1"/> + <line number="1184" hits="1"/> + <line number="1185" hits="1"/> + <line number="1186" hits="1"/> <line number="1187" hits="1"/> <line number="1188" hits="1"/> <line number="1189" hits="1"/> @@ -568,102 +567,104 @@ <line number="1191" hits="1"/> <line number="1192" hits="1"/> <line number="1193" hits="1"/> - <line number="1194" hits="1"/> <line number="1195" hits="1"/> - <line number="1196" hits="1"/> - <line number="1199" hits="1"/> + <line number="1198" hits="1"/> + <line number="1210" hits="1"/> + <line number="1211" hits="1"/> + <line number="1212" hits="1"/> + <line number="1213" hits="1"/> + <line number="1214" hits="1"/> + <line number="1215" hits="1"/> <line number="1216" hits="1"/> <line number="1217" hits="1"/> <line number="1218" hits="1"/> <line number="1219" hits="1"/> - <line number="1220" hits="1"/> - <line number="1221" hits="1"/> <line number="1222" hits="1"/> - <line number="1223" hits="1"/> - <line number="1224" hits="1"/> - <line number="1225" hits="1"/> - <line number="1226" hits="1"/> - <line number="1227" hits="1"/> - <line number="1228" hits="1"/> - <line number="1230" hits="1"/> - <line number="1231" hits="1"/> - <line number="1232" hits="1"/> - <line number="1235" hits="1"/> - <line number="1252" hits="1"/> + <line number="1239" hits="1"/> + <line number="1240" hits="1"/> + <line number="1241" hits="1"/> + <line number="1242" hits="1"/> + <line number="1243" hits="1"/> + <line number="1244" hits="1"/> + <line number="1245" hits="1"/> + <line number="1246" hits="1"/> + <line number="1247" hits="1"/> + <line number="1248" hits="1"/> + <line number="1249" hits="1"/> + <line number="1250" hits="1"/> + <line number="1251" hits="1"/> <line number="1253" hits="1"/> <line number="1254" hits="1"/> <line number="1255" hits="1"/> - <line number="1256" hits="1"/> - <line number="1257" hits="1"/> <line number="1258" hits="1"/> - <line number="1259" hits="1"/> - <line number="1260" hits="1"/> - <line number="1261" hits="1"/> - <line number="1262" hits="1"/> - <line number="1263" hits="1"/> - <line number="1264" hits="1"/> - <line number="1266" hits="1"/> - <line number="1267" hits="1"/> - <line number="1268" hits="1"/> - <line number="1271" hits="1"/> + <line number="1275" hits="1"/> + <line number="1276" hits="1"/> + <line number="1277" hits="1"/> + <line number="1278" hits="1"/> + <line number="1279" hits="1"/> + <line number="1280" hits="1"/> + <line number="1281" hits="1"/> + <line number="1282" hits="1"/> + <line number="1283" hits="1"/> + <line number="1284" hits="1"/> <line number="1285" hits="1"/> <line number="1286" hits="1"/> <line number="1287" hits="1"/> - <line number="1288" hits="1"/> <line number="1289" hits="1"/> <line number="1290" hits="1"/> <line number="1291" hits="1"/> - <line number="1292" hits="1"/> - <line number="1293" hits="1"/> <line number="1294" hits="1"/> - <line number="1295" hits="1"/> - <line number="1296" hits="1"/> - <line number="1298" hits="1"/> - <line number="1299" hits="1"/> - <line number="1300" hits="1"/> - <line number="1303" hits="1"/> + <line number="1308" hits="1"/> + <line number="1309" hits="1"/> + <line number="1310" hits="1"/> + <line number="1311" hits="1"/> + <line number="1312" hits="1"/> + <line number="1313" hits="1"/> + <line number="1314" hits="1"/> + <line number="1315" hits="1"/> + <line number="1316" hits="1"/> + <line number="1317" hits="1"/> + <line number="1318" hits="1"/> + <line number="1319" hits="1"/> + <line number="1321" hits="1"/> + <line number="1322" hits="1"/> + <line number="1323" hits="1"/> <line number="1326" hits="1"/> - <line number="1327" hits="1"/> - <line number="1328" hits="1"/> - <line number="1329" hits="1"/> - <line number="1330" hits="1"/> - <line number="1331" hits="1"/> - <line number="1332" hits="1"/> - <line number="1333" hits="1"/> - <line number="1335" hits="1"/> - <line number="1336" hits="1"/> - <line number="1337" hits="1"/> - <line number="1338" hits="1"/> - <line number="1339" hits="1"/> - <line number="1340" hits="1"/> - <line number="1341" hits="1"/> - <line number="1342" hits="1"/> - <line number="1343" hits="1"/> - <line number="1344" hits="1"/> - <line number="1345" hits="1"/> - <line number="1346" hits="1"/> - <line number="1347" hits="1"/> - <line number="1348" hits="1"/> <line number="1349" hits="1"/> <line number="1350" hits="1"/> + <line number="1351" hits="1"/> + <line number="1352" hits="1"/> <line number="1353" hits="1"/> + <line number="1354" hits="1"/> + <line number="1355" hits="1"/> + <line number="1356" hits="1"/> + <line number="1357" hits="1"/> + <line number="1358" hits="1"/> + <line number="1360" hits="1"/> + <line number="1361" hits="1"/> + <line number="1362" hits="1"/> + <line number="1363" hits="1"/> + <line number="1364" hits="1"/> + <line number="1365" hits="1"/> + <line number="1366" hits="1"/> + <line number="1367" hits="1"/> + <line number="1368" hits="1"/> + <line number="1369" hits="1"/> + <line number="1370" hits="1"/> <line number="1371" hits="1"/> <line number="1372" hits="1"/> <line number="1373" hits="1"/> <line number="1374" hits="1"/> <line number="1375" hits="1"/> - <line number="1376" hits="1"/> - <line number="1377" hits="1"/> <line number="1378" hits="1"/> - <line number="1379" hits="1"/> - <line number="1380" hits="1"/> - <line number="1381" hits="1"/> - <line number="1382" hits="1"/> - <line number="1383" hits="1"/> - <line number="1384" hits="1"/> - <line number="1385" hits="1"/> - <line number="1386" hits="1"/> - <line number="1389" hits="1"/> + <line number="1396" hits="1"/> + <line number="1397" hits="1"/> + <line number="1398" hits="1"/> + <line number="1399" hits="1"/> + <line number="1400" hits="1"/> + <line number="1401" hits="1"/> + <line number="1402" hits="1"/> + <line number="1403" hits="1"/> <line number="1404" hits="1"/> <line number="1405" hits="1"/> <line number="1406" hits="1"/> @@ -671,13 +672,13 @@ <line number="1408" hits="1"/> <line number="1409" hits="1"/> <line number="1410" hits="1"/> - <line number="1411" hits="1"/> - <line number="1412" hits="1"/> <line number="1413" hits="1"/> - <line number="1414" hits="1"/> - <line number="1415" hits="1"/> - <line number="1416" hits="1"/> - <line number="1419" hits="1"/> + <line number="1428" hits="1"/> + <line number="1429" hits="1"/> + <line number="1430" hits="1"/> + <line number="1431" hits="1"/> + <line number="1432" hits="1"/> + <line number="1433" hits="1"/> <line number="1434" hits="1"/> <line number="1435" hits="1"/> <line number="1436" hits="1"/> @@ -685,14 +686,12 @@ <line number="1438" hits="1"/> <line number="1439" hits="1"/> <line number="1440" hits="1"/> - <line number="1441" hits="1"/> - <line number="1442" hits="1"/> <line number="1443" hits="1"/> - <line number="1444" hits="1"/> - <line number="1445" hits="1"/> - <line number="1446" hits="1"/> - <line number="1447" hits="1"/> - <line number="1450" hits="1"/> + <line number="1458" hits="1"/> + <line number="1459" hits="1"/> + <line number="1460" hits="1"/> + <line number="1461" hits="1"/> + <line number="1462" hits="1"/> <line number="1463" hits="1"/> <line number="1464" hits="1"/> <line number="1465" hits="1"/> @@ -702,209 +701,207 @@ <line number="1469" hits="1"/> <line number="1470" hits="1"/> <line number="1471" hits="1"/> - <line number="1472" hits="1"/> - <line number="1473" hits="1"/> <line number="1474" hits="1"/> - <line number="1477" hits="1"/> + <line number="1487" hits="1"/> + <line number="1488" hits="1"/> + <line number="1489" hits="1"/> + <line number="1490" hits="1"/> + <line number="1491" hits="1"/> + <line number="1492" hits="1"/> + <line number="1493" hits="1"/> + <line number="1494" hits="1"/> <line number="1495" hits="1"/> <line number="1496" hits="1"/> <line number="1497" hits="1"/> <line number="1498" hits="1"/> - <line number="1499" hits="1"/> - <line number="1500" hits="1"/> <line number="1501" hits="1"/> - <line number="1502" hits="1"/> - <line number="1503" hits="1"/> - <line number="1504" hits="1"/> - <line number="1505" hits="1"/> - <line number="1506" hits="1"/> - <line number="1507" hits="1"/> - <line number="1508" hits="1"/> - <line number="1509" hits="1"/> - <line number="1510" hits="1"/> - <line number="1513" hits="1"/> - <line number="1549" hits="1"/> - <line number="1550" hits="1"/> - <line number="1555" hits="1"/> - <line number="1556" hits="1"/> - <line number="1557" hits="1"/> - <line number="1558" hits="1"/> - <line number="1559" hits="1"/> - <line number="1560" hits="1"/> - <line number="1561" hits="1"/> - <line number="1562" hits="1"/> - <line number="1563" hits="1"/> - <line number="1564" hits="1"/> - <line number="1565" hits="1"/> - <line number="1566" hits="1"/> - <line number="1568" hits="1"/> - <line number="1569" hits="1"/> - <line number="1570" hits="1"/> + <line number="1519" hits="1"/> + <line number="1520" hits="1"/> + <line number="1521" hits="1"/> + <line number="1522" hits="1"/> + <line number="1523" hits="1"/> + <line number="1524" hits="1"/> + <line number="1525" hits="1"/> + <line number="1526" hits="1"/> + <line number="1527" hits="1"/> + <line number="1528" hits="1"/> + <line number="1529" hits="1"/> + <line number="1530" hits="1"/> + <line number="1531" hits="1"/> + <line number="1532" hits="1"/> + <line number="1533" hits="1"/> + <line number="1534" hits="1"/> + <line number="1537" hits="1"/> <line number="1573" hits="1"/> - <line number="1610" hits="1"/> - <line number="1611" hits="1"/> - <line number="1617" hits="1"/> - <line number="1618" hits="1"/> - <line number="1619" hits="1"/> - <line number="1620" hits="1"/> - <line number="1621" hits="1"/> - <line number="1622" hits="1"/> - <line number="1623" hits="1"/> - <line number="1624" hits="1"/> - <line number="1625" hits="1"/> - <line number="1626" hits="1"/> - <line number="1627" hits="1"/> - <line number="1628" hits="1"/> - <line number="1630" hits="1"/> - <line number="1631" hits="1"/> - <line number="1632" hits="1"/> + <line number="1574" hits="1"/> + <line number="1579" hits="1"/> + <line number="1580" hits="1"/> + <line number="1581" hits="1"/> + <line number="1582" hits="1"/> + <line number="1583" hits="1"/> + <line number="1584" hits="1"/> + <line number="1585" hits="1"/> + <line number="1586" hits="1"/> + <line number="1587" hits="1"/> + <line number="1588" hits="1"/> + <line number="1589" hits="1"/> + <line number="1590" hits="1"/> + <line number="1592" hits="1"/> + <line number="1593" hits="1"/> + <line number="1594" hits="1"/> + <line number="1597" hits="1"/> + <line number="1634" hits="1"/> <line number="1635" hits="1"/> + <line number="1641" hits="1"/> + <line number="1642" hits="1"/> + <line number="1643" hits="1"/> + <line number="1644" hits="1"/> + <line number="1645" hits="1"/> + <line number="1646" hits="1"/> + <line number="1647" hits="1"/> + <line number="1648" hits="1"/> + <line number="1649" hits="1"/> <line number="1650" hits="1"/> <line number="1651" hits="1"/> <line number="1652" hits="1"/> - <line number="1653" hits="1"/> <line number="1654" hits="1"/> <line number="1655" hits="1"/> <line number="1656" hits="1"/> - <line number="1657" hits="1"/> - <line number="1658" hits="1"/> <line number="1659" hits="1"/> - <line number="1660" hits="1"/> - <line number="1661" hits="1"/> - <line number="1662" hits="1"/> - <line number="1664" hits="1"/> - <line number="1665" hits="1"/> - <line number="1666" hits="1"/> - <line number="1669" hits="1"/> + <line number="1674" hits="1"/> <line number="1675" hits="1"/> <line number="1676" hits="1"/> <line number="1677" hits="1"/> <line number="1678" hits="1"/> <line number="1679" hits="1"/> <line number="1680" hits="1"/> + <line number="1681" hits="1"/> + <line number="1682" hits="1"/> <line number="1683" hits="1"/> - <line number="1689" hits="0"/> - <line number="1690" hits="0"/> - <line number="1691" hits="0"/> - <line number="1692" hits="0"/> - <line number="1693" hits="0"/> - <line number="1694" hits="0"/> - <line number="1697" hits="1"/> + <line number="1684" hits="1"/> + <line number="1685" hits="1"/> + <line number="1686" hits="1"/> + <line number="1688" hits="1"/> + <line number="1689" hits="1"/> + <line number="1690" hits="1"/> + <line number="1693" hits="1"/> + <line number="1699" hits="1"/> + <line number="1700" hits="1"/> + <line number="1701" hits="1"/> + <line number="1702" hits="1"/> <line number="1703" hits="1"/> <line number="1704" hits="1"/> - <line number="1705" hits="1"/> - <line number="1706" hits="1"/> <line number="1707" hits="1"/> - <line number="1708" hits="1"/> - <line number="1711" hits="1"/> + <line number="1713" hits="0"/> + <line number="1714" hits="0"/> + <line number="1715" hits="0"/> + <line number="1716" hits="0"/> + <line number="1717" hits="0"/> + <line number="1718" hits="0"/> + <line number="1721" hits="1"/> + <line number="1727" hits="1"/> + <line number="1728" hits="1"/> + <line number="1729" hits="1"/> <line number="1730" hits="1"/> <line number="1731" hits="1"/> <line number="1732" hits="1"/> - <line number="1733" hits="1"/> - <line number="1734" hits="1"/> <line number="1735" hits="1"/> - <line number="1736" hits="1"/> - <line number="1737" hits="1"/> - <line number="1738" hits="1"/> - <line number="1739" hits="1"/> - <line number="1740" hits="1"/> - <line number="1741" hits="1"/> - <line number="1742" hits="1"/> - <line number="1743" hits="1"/> - <line number="1744" hits="1"/> - <line number="1745" hits="1"/> - <line number="1746" hits="1"/> - <line number="1747" hits="1"/> - <line number="1748" hits="1"/> - <line number="1749" hits="1"/> - <line number="1750" hits="1"/> - <line number="1751" hits="1"/> - <line number="1752" hits="1"/> - <line number="1753" hits="1"/> <line number="1754" hits="1"/> <line number="1755" hits="1"/> <line number="1756" hits="1"/> <line number="1757" hits="1"/> + <line number="1758" hits="1"/> <line number="1759" hits="1"/> + <line number="1760" hits="1"/> + <line number="1761" hits="1"/> <line number="1762" hits="1"/> - <line number="1773" hits="0"/> - <line number="1774" hits="0"/> - <line number="1775" hits="0"/> - <line number="1776" hits="0"/> - <line number="1777" hits="0"/> - <line number="1778" hits="0"/> - <line number="1779" hits="0"/> - <line number="1780" hits="0"/> + <line number="1763" hits="1"/> + <line number="1764" hits="1"/> + <line number="1765" hits="1"/> + <line number="1766" hits="1"/> + <line number="1767" hits="1"/> + <line number="1768" hits="1"/> + <line number="1769" hits="1"/> + <line number="1770" hits="1"/> + <line number="1771" hits="1"/> + <line number="1772" hits="1"/> + <line number="1773" hits="1"/> + <line number="1774" hits="1"/> + <line number="1775" hits="1"/> + <line number="1776" hits="1"/> + <line number="1777" hits="1"/> + <line number="1778" hits="1"/> + <line number="1779" hits="1"/> + <line number="1780" hits="1"/> + <line number="1781" hits="1"/> <line number="1783" hits="1"/> - <line number="1794" hits="0"/> - <line number="1795" hits="0"/> - <line number="1796" hits="0"/> + <line number="1786" hits="1"/> <line number="1797" hits="0"/> <line number="1798" hits="0"/> <line number="1799" hits="0"/> <line number="1800" hits="0"/> <line number="1801" hits="0"/> - <line number="1804" hits="1"/> - <line number="1810" hits="1"/> - <line number="1811" hits="1"/> - <line number="1812" hits="1"/> - <line number="1813" hits="1"/> - <line number="1814" hits="1"/> - <line number="1815" hits="0"/> - <line number="1818" hits="1"/> - <line number="1824" hits="1"/> - <line number="1825" hits="1"/> - <line number="1826" hits="1"/> - <line number="1827" hits="1"/> - <line number="1828" hits="1"/> + <line number="1802" hits="0"/> + <line number="1803" hits="0"/> + <line number="1804" hits="0"/> + <line number="1807" hits="1"/> + <line number="1818" hits="0"/> + <line number="1819" hits="0"/> + <line number="1820" hits="0"/> + <line number="1821" hits="0"/> + <line number="1822" hits="0"/> + <line number="1823" hits="0"/> + <line number="1824" hits="0"/> + <line number="1826" hits="0"/> + <line number="1827" hits="0"/> <line number="1829" hits="0"/> - <line number="1833" hits="1"/> + <line number="1830" hits="0"/> + <line number="1832" hits="0"/> + <line number="1833" hits="0"/> + <line number="1834" hits="0"/> + <line number="1835" hits="0"/> + <line number="1836" hits="0"/> + <line number="1837" hits="0"/> + <line number="1840" hits="1"/> + <line number="1851" hits="1"/> + <line number="1852" hits="1"/> <line number="1853" hits="1"/> <line number="1854" hits="1"/> - <line number="1856" hits="1"/> - <line number="1857" hits="1"/> - <line number="1858" hits="1"/> - <line number="1859" hits="1"/> - <line number="1860" hits="1"/> + <line number="1855" hits="1"/> + <line number="1856" hits="0"/> + <line number="1857" hits="0"/> + <line number="1858" hits="0"/> <line number="1861" hits="1"/> - <line number="1862" hits="1"/> - <line number="1863" hits="1"/> - <line number="1864" hits="1"/> - <line number="1865" hits="1"/> - <line number="1866" hits="1"/> <line number="1867" hits="1"/> <line number="1868" hits="1"/> <line number="1869" hits="1"/> - </lines> - </class> - <class name="UploadClient.py" filename="dbrepo/UploadClient.py" complexity="0" line-rate="0.52" branch-rate="0"> - <methods/> - <lines> - <line number="1" hits="1"/> - <line number="2" hits="1"/> - <line number="3" hits="1"/> - <line number="4" hits="1"/> - <line number="5" hits="1"/> - <line number="7" hits="1"/> - <line number="8" hits="1"/> - <line number="10" hits="1"/> - <line number="12" hits="1"/> - <line number="16" hits="1"/> - <line number="24" hits="1"/> - <line number="26" hits="1"/> - <line number="27" hits="0"/> - <line number="29" hits="1"/> - <line number="30" hits="0"/> - <line number="31" hits="0"/> - <line number="32" hits="0"/> - <line number="33" hits="0"/> - <line number="34" hits="0"/> - <line number="35" hits="0"/> - <line number="36" hits="0"/> - <line number="37" hits="0"/> - <line number="38" hits="0"/> - <line number="39" hits="0"/> - <line number="40" hits="0"/> + <line number="1870" hits="1"/> + <line number="1871" hits="1"/> + <line number="1872" hits="0"/> + <line number="1875" hits="1"/> + <line number="1881" hits="1"/> + <line number="1882" hits="1"/> + <line number="1883" hits="1"/> + <line number="1884" hits="1"/> + <line number="1885" hits="1"/> + <line number="1886" hits="0"/> + <line number="1889" hits="1"/> + <line number="1909" hits="1"/> + <line number="1910" hits="1"/> + <line number="1912" hits="1"/> + <line number="1913" hits="1"/> + <line number="1914" hits="1"/> + <line number="1915" hits="1"/> + <line number="1916" hits="1"/> + <line number="1917" hits="1"/> + <line number="1918" hits="1"/> + <line number="1919" hits="1"/> + <line number="1920" hits="1"/> + <line number="1921" hits="1"/> + <line number="1922" hits="1"/> + <line number="1923" hits="1"/> + <line number="1924" hits="1"/> + <line number="1925" hits="1"/> </lines> </class> <class name="__init__.py" filename="dbrepo/__init__.py" complexity="0" line-rate="1" branch-rate="0"> @@ -913,7 +910,7 @@ </class> </classes> </package> - <package name="dbrepo.api" line-rate="1" branch-rate="0" complexity="0"> + <package name="dbrepo.api" line-rate="0.959" branch-rate="0" complexity="0"> <classes> <class name="__init__.py" filename="dbrepo/api/__init__.py" complexity="0" line-rate="1" branch-rate="0"> <methods/> @@ -941,81 +938,79 @@ <line number="26" hits="1"/> <line number="27" hits="1"/> <line number="28" hits="1"/> - <line number="29" hits="1"/> - <line number="30" hits="1"/> <line number="31" hits="1"/> <line number="32" hits="1"/> <line number="33" hits="1"/> - <line number="36" hits="1"/> - <line number="37" hits="1"/> + <line number="34" hits="1"/> + <line number="35" hits="1"/> <line number="38" hits="1"/> <line number="39" hits="1"/> <line number="40" hits="1"/> - <line number="43" hits="1"/> - <line number="44" hits="1"/> + <line number="41" hits="1"/> + <line number="42" hits="1"/> <line number="45" hits="1"/> <line number="46" hits="1"/> <line number="47" hits="1"/> <line number="50" hits="1"/> <line number="51" hits="1"/> <line number="52" hits="1"/> + <line number="53" hits="1"/> + <line number="54" hits="1"/> <line number="55" hits="1"/> <line number="56" hits="1"/> <line number="57" hits="1"/> <line number="58" hits="1"/> - <line number="59" hits="1"/> - <line number="60" hits="1"/> <line number="61" hits="1"/> <line number="62" hits="1"/> <line number="63" hits="1"/> - <line number="66" hits="1"/> + <line number="64" hits="1"/> <line number="67" hits="1"/> <line number="68" hits="1"/> <line number="69" hits="1"/> + <line number="70" hits="1"/> + <line number="71" hits="1"/> <line number="72" hits="1"/> <line number="73" hits="1"/> - <line number="74" hits="1"/> - <line number="75" hits="1"/> <line number="76" hits="1"/> <line number="77" hits="1"/> <line number="78" hits="1"/> + <line number="79" hits="1"/> + <line number="80" hits="1"/> <line number="81" hits="1"/> <line number="82" hits="1"/> <line number="83" hits="1"/> - <line number="84" hits="1"/> - <line number="85" hits="1"/> <line number="86" hits="1"/> <line number="87" hits="1"/> <line number="88" hits="1"/> + <line number="89" hits="1"/> + <line number="90" hits="1"/> <line number="91" hits="1"/> <line number="92" hits="1"/> - <line number="93" hits="1"/> - <line number="94" hits="1"/> <line number="95" hits="1"/> <line number="96" hits="1"/> <line number="97" hits="1"/> <line number="98" hits="1"/> <line number="99" hits="1"/> - <line number="102" hits="1"/> - <line number="103" hits="1"/> + <line number="100" hits="1"/> + <line number="101" hits="1"/> <line number="104" hits="1"/> <line number="105" hits="1"/> <line number="106" hits="1"/> <line number="107" hits="1"/> <line number="108" hits="1"/> + <line number="109" hits="1"/> + <line number="110" hits="1"/> <line number="111" hits="1"/> - <line number="112" hits="1"/> - <line number="113" hits="1"/> <line number="114" hits="1"/> <line number="115" hits="1"/> <line number="116" hits="1"/> <line number="117" hits="1"/> <line number="118" hits="1"/> + <line number="119" hits="1"/> + <line number="120" hits="1"/> <line number="121" hits="1"/> <line number="122" hits="1"/> <line number="123" hits="1"/> - <line number="124" hits="1"/> - <line number="125" hits="1"/> <line number="126" hits="1"/> <line number="127" hits="1"/> <line number="128" hits="1"/> @@ -1026,26 +1021,28 @@ <line number="135" hits="1"/> <line number="136" hits="1"/> <line number="137" hits="1"/> + <line number="138" hits="1"/> + <line number="139" hits="1"/> <line number="140" hits="1"/> - <line number="141" hits="1"/> - <line number="142" hits="1"/> <line number="143" hits="1"/> <line number="144" hits="1"/> - <line number="145" hits="1"/> - <line number="146" hits="1"/> <line number="147" hits="1"/> - <line number="150" hits="1"/> + <line number="148" hits="1"/> <line number="151" hits="1"/> - <line number="154" hits="1"/> <line number="155" hits="1"/> + <line number="156" hits="1"/> <line number="158" hits="1"/> + <line number="159" hits="1"/> + <line number="161" hits="1"/> <line number="162" hits="1"/> - <line number="163" hits="1"/> <line number="165" hits="1"/> - <line number="166" hits="1"/> - <line number="168" hits="1"/> <line number="169" hits="1"/> + <line number="170" hits="1"/> + <line number="171" hits="1"/> <line number="172" hits="1"/> + <line number="173" hits="1"/> + <line number="174" hits="1"/> + <line number="175" hits="1"/> <line number="176" hits="1"/> <line number="177" hits="1"/> <line number="178" hits="1"/> @@ -1069,14 +1066,14 @@ <line number="196" hits="1"/> <line number="197" hits="1"/> <line number="198" hits="1"/> - <line number="199" hits="1"/> - <line number="200" hits="1"/> <line number="201" hits="1"/> - <line number="202" hits="1"/> - <line number="203" hits="1"/> - <line number="204" hits="1"/> <line number="205" hits="1"/> + <line number="206" hits="1"/> + <line number="207" hits="1"/> <line number="208" hits="1"/> + <line number="209" hits="1"/> + <line number="210" hits="1"/> + <line number="211" hits="1"/> <line number="212" hits="1"/> <line number="213" hits="1"/> <line number="214" hits="1"/> @@ -1254,171 +1251,171 @@ <line number="386" hits="1"/> <line number="387" hits="1"/> <line number="388" hits="1"/> - <line number="389" hits="1"/> - <line number="390" hits="1"/> <line number="391" hits="1"/> <line number="392" hits="1"/> <line number="393" hits="1"/> - <line number="394" hits="1"/> - <line number="395" hits="1"/> - <line number="398" hits="1"/> - <line number="399" hits="1"/> + <line number="396" hits="1"/> + <line number="397" hits="1"/> <line number="400" hits="1"/> - <line number="403" hits="1"/> + <line number="401" hits="1"/> <line number="404" hits="1"/> - <line number="407" hits="1"/> <line number="408" hits="1"/> + <line number="409" hits="1"/> + <line number="410" hits="1"/> <line number="411" hits="1"/> + <line number="414" hits="1"/> <line number="415" hits="1"/> <line number="416" hits="1"/> <line number="417" hits="1"/> - <line number="418" hits="1"/> + <line number="420" hits="1"/> <line number="421" hits="1"/> - <line number="422" hits="1"/> - <line number="423" hits="1"/> <line number="424" hits="1"/> + <line number="425" hits="1"/> + <line number="426" hits="1"/> <line number="427" hits="1"/> <line number="428" hits="1"/> <line number="431" hits="1"/> <line number="432" hits="1"/> <line number="433" hits="1"/> <line number="434" hits="1"/> - <line number="435" hits="1"/> + <line number="437" hits="1"/> <line number="438" hits="1"/> - <line number="439" hits="1"/> - <line number="440" hits="1"/> <line number="441" hits="1"/> + <line number="442" hits="1"/> + <line number="443" hits="1"/> <line number="444" hits="1"/> <line number="445" hits="1"/> + <line number="446" hits="1"/> + <line number="447" hits="1"/> <line number="448" hits="1"/> - <line number="449" hits="1"/> - <line number="450" hits="1"/> <line number="451" hits="1"/> <line number="452" hits="1"/> <line number="453" hits="1"/> <line number="454" hits="1"/> <line number="455" hits="1"/> - <line number="458" hits="1"/> - <line number="459" hits="1"/> + <line number="456" hits="1"/> + <line number="457" hits="1"/> <line number="460" hits="1"/> <line number="461" hits="1"/> - <line number="462" hits="1"/> - <line number="463" hits="1"/> <line number="464" hits="1"/> + <line number="465" hits="1"/> + <line number="466" hits="1"/> <line number="467" hits="1"/> - <line number="468" hits="1"/> + <line number="470" hits="1"/> <line number="471" hits="1"/> <line number="472" hits="1"/> <line number="473" hits="1"/> <line number="474" hits="1"/> - <line number="477" hits="1"/> - <line number="478" hits="1"/> + <line number="475" hits="1"/> + <line number="476" hits="1"/> <line number="479" hits="1"/> <line number="480" hits="1"/> - <line number="481" hits="1"/> - <line number="482" hits="1"/> <line number="483" hits="1"/> - <line number="486" hits="1"/> - <line number="487" hits="1"/> - <line number="490" hits="1"/> - <line number="491" hits="1"/> + <line number="484" hits="1"/> + <line number="485" hits="1"/> + <line number="488" hits="1"/> + <line number="489" hits="1"/> <line number="492" hits="1"/> + <line number="493" hits="1"/> + <line number="494" hits="1"/> <line number="495" hits="1"/> <line number="496" hits="1"/> - <line number="499" hits="1"/> + <line number="497" hits="1"/> <line number="500" hits="1"/> <line number="501" hits="1"/> <line number="502" hits="1"/> - <line number="503" hits="1"/> - <line number="504" hits="1"/> + <line number="505" hits="1"/> + <line number="506" hits="1"/> <line number="507" hits="1"/> - <line number="508" hits="1"/> - <line number="509" hits="1"/> - <line number="512" hits="1"/> - <line number="513" hits="1"/> + <line number="510" hits="1"/> + <line number="511" hits="1"/> <line number="514" hits="1"/> + <line number="515" hits="1"/> + <line number="516" hits="1"/> <line number="517" hits="1"/> <line number="518" hits="1"/> - <line number="521" hits="1"/> - <line number="522" hits="1"/> + <line number="519" hits="1"/> + <line number="520" hits="1"/> <line number="523" hits="1"/> <line number="524" hits="1"/> <line number="525" hits="1"/> <line number="526" hits="1"/> <line number="527" hits="1"/> + <line number="528" hits="1"/> + <line number="529" hits="1"/> <line number="530" hits="1"/> <line number="531" hits="1"/> <line number="532" hits="1"/> <line number="533" hits="1"/> <line number="534" hits="1"/> - <line number="535" hits="1"/> - <line number="536" hits="1"/> <line number="537" hits="1"/> <line number="538" hits="1"/> <line number="539" hits="1"/> <line number="540" hits="1"/> <line number="541" hits="1"/> <line number="544" hits="1"/> - <line number="545" hits="1"/> - <line number="546" hits="1"/> - <line number="547" hits="1"/> <line number="548" hits="1"/> + <line number="549" hits="1"/> + <line number="550" hits="1"/> <line number="551" hits="1"/> - <line number="555" hits="1"/> - <line number="556" hits="1"/> - <line number="557" hits="1"/> + <line number="554" hits="1"/> <line number="558" hits="1"/> - <line number="561" hits="1"/> + <line number="559" hits="1"/> + <line number="560" hits="1"/> + <line number="563" hits="1"/> + <line number="564" hits="1"/> <line number="565" hits="1"/> <line number="566" hits="1"/> <line number="567" hits="1"/> + <line number="568" hits="1"/> + <line number="569" hits="1"/> <line number="570" hits="1"/> <line number="571" hits="1"/> <line number="572" hits="1"/> <line number="573" hits="1"/> <line number="574" hits="1"/> <line number="575" hits="1"/> - <line number="576" hits="1"/> - <line number="577" hits="1"/> <line number="578" hits="1"/> <line number="579" hits="1"/> <line number="580" hits="1"/> <line number="581" hits="1"/> <line number="582" hits="1"/> + <line number="583" hits="1"/> + <line number="584" hits="1"/> <line number="585" hits="1"/> <line number="586" hits="1"/> - <line number="587" hits="1"/> - <line number="588" hits="1"/> <line number="589" hits="1"/> <line number="590" hits="1"/> <line number="591" hits="1"/> <line number="592" hits="1"/> <line number="593" hits="1"/> + <line number="594" hits="1"/> + <line number="595" hits="1"/> <line number="596" hits="1"/> <line number="597" hits="1"/> <line number="598" hits="1"/> <line number="599" hits="1"/> <line number="600" hits="1"/> - <line number="601" hits="1"/> - <line number="602" hits="1"/> <line number="603" hits="1"/> <line number="604" hits="1"/> - <line number="605" hits="1"/> - <line number="606" hits="1"/> <line number="607" hits="1"/> + <line number="608" hits="1"/> + <line number="609" hits="1"/> <line number="610" hits="1"/> <line number="611" hits="1"/> <line number="614" hits="1"/> <line number="615" hits="1"/> <line number="616" hits="1"/> <line number="617" hits="1"/> - <line number="618" hits="1"/> + <line number="620" hits="1"/> <line number="621" hits="1"/> - <line number="622" hits="1"/> - <line number="623" hits="1"/> <line number="624" hits="1"/> + <line number="625" hits="1"/> + <line number="626" hits="1"/> <line number="627" hits="1"/> <line number="628" hits="1"/> + <line number="629" hits="1"/> + <line number="630" hits="1"/> <line number="631" hits="1"/> <line number="632" hits="1"/> <line number="633" hits="1"/> @@ -1435,15 +1432,15 @@ <line number="644" hits="1"/> <line number="645" hits="1"/> <line number="646" hits="1"/> - <line number="647" hits="1"/> - <line number="648" hits="1"/> <line number="649" hits="1"/> <line number="650" hits="1"/> - <line number="651" hits="1"/> - <line number="652" hits="1"/> <line number="653" hits="1"/> + <line number="654" hits="1"/> + <line number="655" hits="1"/> <line number="656" hits="1"/> <line number="657" hits="1"/> + <line number="658" hits="1"/> + <line number="659" hits="1"/> <line number="660" hits="1"/> <line number="661" hits="1"/> <line number="662" hits="1"/> @@ -1464,19 +1461,19 @@ <line number="677" hits="1"/> <line number="678" hits="1"/> <line number="679" hits="1"/> - <line number="680" hits="1"/> - <line number="681" hits="1"/> <line number="682" hits="1"/> <line number="683" hits="1"/> <line number="684" hits="1"/> <line number="685" hits="1"/> + <line number="686" hits="1"/> + <line number="687" hits="1"/> <line number="688" hits="1"/> - <line number="689" hits="1"/> - <line number="690" hits="1"/> <line number="691" hits="1"/> <line number="692" hits="1"/> <line number="693" hits="1"/> <line number="694" hits="1"/> + <line number="695" hits="1"/> + <line number="696" hits="1"/> <line number="697" hits="1"/> <line number="698" hits="1"/> <line number="699" hits="1"/> @@ -1484,12 +1481,12 @@ <line number="701" hits="1"/> <line number="702" hits="1"/> <line number="703" hits="1"/> - <line number="704" hits="1"/> - <line number="705" hits="1"/> <line number="706" hits="1"/> <line number="707" hits="1"/> <line number="708" hits="1"/> <line number="709" hits="1"/> + <line number="710" hits="1"/> + <line number="711" hits="1"/> <line number="712" hits="1"/> <line number="713" hits="1"/> <line number="714" hits="1"/> @@ -1497,13 +1494,11 @@ <line number="716" hits="1"/> <line number="717" hits="1"/> <line number="718" hits="1"/> - <line number="719" hits="1"/> - <line number="720" hits="1"/> <line number="721" hits="1"/> <line number="722" hits="1"/> <line number="723" hits="1"/> <line number="724" hits="1"/> - <line number="727" hits="1"/> + <line number="725" hits="1"/> <line number="728" hits="1"/> <line number="729" hits="1"/> <line number="730" hits="1"/> @@ -1512,96 +1507,83 @@ <line number="735" hits="1"/> <line number="736" hits="1"/> <line number="737" hits="1"/> + <line number="738" hits="1"/> + <line number="739" hits="1"/> <line number="740" hits="1"/> <line number="741" hits="1"/> <line number="742" hits="1"/> <line number="743" hits="1"/> <line number="744" hits="1"/> - <line number="745" hits="1"/> - <line number="746" hits="1"/> <line number="747" hits="1"/> <line number="748" hits="1"/> <line number="749" hits="1"/> <line number="750" hits="1"/> - <line number="753" hits="1"/> + <line number="751" hits="1"/> <line number="754" hits="1"/> <line number="755" hits="1"/> <line number="756" hits="1"/> <line number="757" hits="1"/> <line number="760" hits="1"/> <line number="761" hits="1"/> - <line number="762" hits="1"/> - <line number="763" hits="1"/> + <line number="764" hits="1"/> + <line number="765" hits="1"/> <line number="766" hits="1"/> <line number="767" hits="1"/> - <line number="770" hits="1"/> - <line number="771" hits="1"/> + <line number="768" hits="1"/> + <line number="769" hits="1"/> <line number="772" hits="1"/> <line number="773" hits="1"/> <line number="774" hits="1"/> <line number="775" hits="1"/> <line number="778" hits="1"/> <line number="779" hits="1"/> - <line number="780" hits="1"/> - <line number="781" hits="1"/> + <line number="782" hits="1"/> + <line number="783" hits="1"/> <line number="784" hits="1"/> <line number="785" hits="1"/> - <line number="788" hits="1"/> + <line number="786" hits="1"/> <line number="789" hits="1"/> - <line number="790" hits="1"/> - <line number="791" hits="1"/> - <line number="792" hits="1"/> + <line number="793" hits="1"/> + <line number="794" hits="1"/> <line number="795" hits="1"/> - <line number="796" hits="1"/> - <line number="799" hits="1"/> + <line number="798" hits="1"/> + <line number="802" hits="1"/> <line number="803" hits="1"/> - <line number="804" hits="1"/> - <line number="805" hits="1"/> <line number="806" hits="1"/> + <line number="807" hits="1"/> + <line number="808" hits="1"/> <line number="809" hits="1"/> + <line number="810" hits="1"/> <line number="813" hits="1"/> <line number="814" hits="1"/> + <line number="815" hits="1"/> + <line number="816" hits="1"/> <line number="817" hits="1"/> + <line number="820" hits="1"/> <line number="821" hits="1"/> <line number="822" hits="1"/> - <line number="823" hits="1"/> - <line number="824" hits="1"/> <line number="825" hits="1"/> <line number="826" hits="1"/> <line number="827" hits="1"/> - <line number="828" hits="1"/> - <line number="829" hits="1"/> <line number="830" hits="1"/> <line number="831" hits="1"/> <line number="832" hits="1"/> <line number="833" hits="1"/> <line number="834" hits="1"/> - <line number="835" hits="1"/> - <line number="836" hits="1"/> <line number="837" hits="1"/> <line number="838" hits="1"/> + <line number="839" hits="1"/> + <line number="840" hits="1"/> <line number="841" hits="1"/> - <line number="845" hits="1"/> - <line number="846" hits="1"/> - <line number="847" hits="1"/> + <line number="844" hits="1"/> <line number="848" hits="1"/> <line number="849" hits="1"/> <line number="850" hits="1"/> <line number="851" hits="1"/> - <line number="852" hits="1"/> - <line number="853" hits="1"/> <line number="854" hits="1"/> - <line number="855" hits="1"/> - <line number="856" hits="1"/> - <line number="857" hits="1"/> <line number="858" hits="1"/> <line number="859" hits="1"/> - <line number="860" hits="1"/> - <line number="861" hits="1"/> <line number="862" hits="1"/> - <line number="863" hits="1"/> - <line number="864" hits="1"/> - <line number="865" hits="1"/> <line number="866" hits="1"/> <line number="867" hits="1"/> <line number="868" hits="1"/> @@ -1615,62 +1597,73 @@ <line number="876" hits="1"/> <line number="877" hits="1"/> <line number="878" hits="1"/> + <line number="879" hits="1"/> + <line number="880" hits="1"/> <line number="881" hits="1"/> - <line number="885" hits="1"/> + <line number="882" hits="1"/> + <line number="883" hits="1"/> <line number="886" hits="1"/> - <line number="887" hits="1"/> - <line number="888" hits="1"/> - <line number="889" hits="1"/> <line number="890" hits="1"/> + <line number="891" hits="1"/> + <line number="892" hits="1"/> <line number="893" hits="1"/> + <line number="894" hits="1"/> + <line number="895" hits="1"/> + <line number="896" hits="1"/> <line number="897" hits="1"/> <line number="898" hits="1"/> + <line number="899" hits="1"/> <line number="900" hits="1"/> <line number="901" hits="1"/> + <line number="902" hits="1"/> + <line number="903" hits="1"/> <line number="904" hits="1"/> + <line number="905" hits="1"/> + <line number="906" hits="1"/> + <line number="907" hits="1"/> <line number="908" hits="1"/> <line number="909" hits="1"/> + <line number="910" hits="1"/> <line number="911" hits="1"/> <line number="912" hits="1"/> + <line number="913" hits="1"/> <line number="914" hits="1"/> <line number="915" hits="1"/> + <line number="916" hits="1"/> <line number="917" hits="1"/> <line number="918" hits="1"/> + <line number="919" hits="1"/> + <line number="920" hits="1"/> <line number="921" hits="1"/> - <line number="925" hits="1"/> + <line number="922" hits="1"/> + <line number="923" hits="1"/> <line number="926" hits="1"/> - <line number="928" hits="1"/> - <line number="929" hits="1"/> + <line number="930" hits="1"/> + <line number="931" hits="1"/> <line number="932" hits="1"/> - <line number="936" hits="1"/> - <line number="937" hits="1"/> - <line number="939" hits="1"/> - <line number="940" hits="1"/> + <line number="933" hits="1"/> + <line number="934" hits="1"/> + <line number="935" hits="1"/> + <line number="938" hits="1"/> <line number="942" hits="1"/> <line number="943" hits="1"/> <line number="945" hits="1"/> <line number="946" hits="1"/> <line number="949" hits="1"/> - <line number="950" hits="1"/> - <line number="951" hits="1"/> - <line number="952" hits="1"/> <line number="953" hits="1"/> <line number="954" hits="1"/> - <line number="955" hits="1"/> <line number="956" hits="1"/> <line number="957" hits="1"/> - <line number="958" hits="1"/> <line number="959" hits="1"/> <line number="960" hits="1"/> - <line number="961" hits="1"/> - <line number="964" hits="1"/> - <line number="965" hits="1"/> - <line number="968" hits="1"/> - <line number="969" hits="1"/> + <line number="962" hits="1"/> + <line number="963" hits="1"/> + <line number="966" hits="1"/> <line number="970" hits="1"/> + <line number="971" hits="1"/> <line number="973" hits="1"/> <line number="974" hits="1"/> - <line number="975" hits="1"/> + <line number="977" hits="1"/> <line number="978" hits="1"/> <line number="979" hits="1"/> <line number="980" hits="1"/> @@ -1683,30 +1676,20 @@ <line number="987" hits="1"/> <line number="988" hits="1"/> <line number="989" hits="1"/> - <line number="990" hits="1"/> - <line number="991" hits="1"/> <line number="992" hits="1"/> <line number="993" hits="1"/> <line number="994" hits="1"/> - <line number="997" hits="1"/> + <line number="995" hits="1"/> <line number="998" hits="1"/> <line number="999" hits="1"/> - <line number="1000" hits="1"/> - <line number="1001" hits="1"/> <line number="1002" hits="1"/> <line number="1003" hits="1"/> <line number="1004" hits="1"/> - <line number="1005" hits="1"/> - <line number="1006" hits="1"/> <line number="1007" hits="1"/> <line number="1008" hits="1"/> <line number="1009" hits="1"/> - <line number="1010" hits="1"/> - <line number="1011" hits="1"/> <line number="1012" hits="1"/> <line number="1013" hits="1"/> - <line number="1014" hits="1"/> - <line number="1015" hits="1"/> <line number="1016" hits="1"/> <line number="1017" hits="1"/> <line number="1018" hits="1"/> @@ -1715,6 +1698,8 @@ <line number="1021" hits="1"/> <line number="1022" hits="1"/> <line number="1023" hits="1"/> + <line number="1024" hits="1"/> + <line number="1025" hits="1"/> <line number="1026" hits="1"/> <line number="1027" hits="1"/> <line number="1028" hits="1"/> @@ -1722,8 +1707,6 @@ <line number="1030" hits="1"/> <line number="1031" hits="1"/> <line number="1032" hits="1"/> - <line number="1033" hits="1"/> - <line number="1034" hits="1"/> <line number="1035" hits="1"/> <line number="1036" hits="1"/> <line number="1037" hits="1"/> @@ -1732,6 +1715,8 @@ <line number="1040" hits="1"/> <line number="1041" hits="1"/> <line number="1042" hits="1"/> + <line number="1043" hits="1"/> + <line number="1044" hits="1"/> <line number="1045" hits="1"/> <line number="1046" hits="1"/> <line number="1047" hits="1"/> @@ -1749,9 +1734,9 @@ <line number="1059" hits="1"/> <line number="1060" hits="1"/> <line number="1061" hits="1"/> - <line number="1062" hits="1"/> - <line number="1063" hits="1"/> <line number="1064" hits="1"/> + <line number="1065" hits="1"/> + <line number="1066" hits="1"/> <line number="1067" hits="1"/> <line number="1068" hits="1"/> <line number="1069" hits="1"/> @@ -1763,9 +1748,9 @@ <line number="1075" hits="1"/> <line number="1076" hits="1"/> <line number="1077" hits="1"/> + <line number="1078" hits="1"/> + <line number="1079" hits="1"/> <line number="1080" hits="1"/> - <line number="1081" hits="1"/> - <line number="1082" hits="1"/> <line number="1083" hits="1"/> <line number="1084" hits="1"/> <line number="1085" hits="1"/> @@ -1781,23 +1766,32 @@ <line number="1095" hits="1"/> <line number="1096" hits="1"/> <line number="1097" hits="1"/> + <line number="1098" hits="1"/> + <line number="1099" hits="1"/> <line number="1100" hits="1"/> <line number="1101" hits="1"/> <line number="1102" hits="1"/> - <line number="1103" hits="1"/> + <line number="1105" hits="1"/> <line number="1106" hits="1"/> <line number="1107" hits="1"/> <line number="1108" hits="1"/> <line number="1109" hits="1"/> <line number="1110" hits="1"/> + <line number="1111" hits="1"/> + <line number="1112" hits="1"/> <line number="1113" hits="1"/> - <line number="1117" hits="1"/> + <line number="1114" hits="1"/> + <line number="1115" hits="1"/> <line number="1118" hits="1"/> <line number="1119" hits="1"/> <line number="1120" hits="1"/> <line number="1121" hits="1"/> + <line number="1122" hits="1"/> + <line number="1123" hits="1"/> <line number="1124" hits="1"/> <line number="1125" hits="1"/> + <line number="1126" hits="1"/> + <line number="1127" hits="1"/> <line number="1128" hits="1"/> <line number="1129" hits="1"/> <line number="1130" hits="1"/> @@ -1810,17 +1804,42 @@ <line number="1139" hits="1"/> <line number="1140" hits="1"/> <line number="1141" hits="1"/> - <line number="1142" hits="1"/> - <line number="1143" hits="1"/> + <line number="1144" hits="1"/> + <line number="1145" hits="1"/> <line number="1146" hits="1"/> <line number="1147" hits="1"/> <line number="1148" hits="1"/> - <line number="1149" hits="1"/> - <line number="1152" hits="1"/> - <line number="1153" hits="1"/> - <line number="1154" hits="1"/> + <line number="1151" hits="1"/> <line number="1155" hits="1"/> <line number="1156" hits="1"/> + <line number="1157" hits="1"/> + <line number="1158" hits="1"/> + <line number="1159" hits="1"/> + <line number="1162" hits="1"/> + <line number="1163" hits="1"/> + <line number="1166" hits="1"/> + <line number="1167" hits="1"/> + <line number="1168" hits="1"/> + <line number="1169" hits="1"/> + <line number="1170" hits="1"/> + <line number="1171" hits="1"/> + <line number="1172" hits="1"/> + <line number="1173" hits="1"/> + <line number="1176" hits="1"/> + <line number="1177" hits="1"/> + <line number="1178" hits="1"/> + <line number="1179" hits="1"/> + <line number="1180" hits="1"/> + <line number="1181" hits="1"/> + <line number="1184" hits="1"/> + <line number="1185" hits="1"/> + <line number="1186" hits="1"/> + <line number="1187" hits="1"/> + <line number="1190" hits="1"/> + <line number="1191" hits="1"/> + <line number="1192" hits="1"/> + <line number="1193" hits="1"/> + <line number="1194" hits="1"/> </lines> </class> <class name="exceptions.py" filename="dbrepo/api/exceptions.py" complexity="0" line-rate="1" branch-rate="0"> @@ -1860,6 +1879,108 @@ <line number="110" hits="1"/> </lines> </class> + <class name="mapper.py" filename="dbrepo/api/mapper.py" complexity="0" line-rate="0.5567" branch-rate="0"> + <methods/> + <lines> + <line number="1" hits="1"/> + <line number="3" hits="1"/> + <line number="4" hits="1"/> + <line number="5" hits="1"/> + <line number="7" hits="1"/> + <line number="9" hits="1"/> + <line number="12" hits="1"/> + <line number="13" hits="1"/> + <line number="14" hits="0"/> + <line number="15" hits="1"/> + <line number="16" hits="1"/> + <line number="17" hits="0"/> + <line number="18" hits="1"/> + <line number="20" hits="1"/> + <line number="21" hits="0"/> + <line number="22" hits="1"/> + <line number="23" hits="1"/> + <line number="24" hits="1"/> + <line number="26" hits="1"/> + <line number="28" hits="1"/> + <line number="29" hits="0"/> + <line number="31" hits="1"/> + <line number="32" hits="1"/> + <line number="33" hits="0"/> + <line number="34" hits="1"/> + <line number="38" hits="1"/> + <line number="39" hits="1"/> + <line number="40" hits="0"/> + <line number="42" hits="0"/> + <line number="44" hits="0"/> + <line number="45" hits="0"/> + <line number="46" hits="0"/> + <line number="47" hits="1"/> + <line number="50" hits="1"/> + <line number="51" hits="1"/> + <line number="52" hits="1"/> + <line number="53" hits="1"/> + <line number="57" hits="1"/> + <line number="58" hits="1"/> + <line number="59" hits="1"/> + <line number="60" hits="1"/> + <line number="63" hits="1"/> + <line number="64" hits="0"/> + <line number="65" hits="0"/> + <line number="66" hits="0"/> + <line number="67" hits="0"/> + <line number="68" hits="0"/> + <line number="70" hits="0"/> + <line number="71" hits="0"/> + <line number="72" hits="1"/> + <line number="73" hits="1"/> + <line number="74" hits="1"/> + <line number="75" hits="1"/> + <line number="76" hits="0"/> + <line number="77" hits="0"/> + <line number="78" hits="0"/> + <line number="79" hits="0"/> + <line number="80" hits="1"/> + <line number="81" hits="1"/> + <line number="82" hits="1"/> + <line number="83" hits="1"/> + <line number="84" hits="1"/> + <line number="85" hits="0"/> + <line number="86" hits="0"/> + <line number="87" hits="0"/> + <line number="88" hits="0"/> + <line number="89" hits="0"/> + <line number="90" hits="0"/> + <line number="91" hits="0"/> + <line number="92" hits="0"/> + <line number="93" hits="0"/> + <line number="94" hits="1"/> + <line number="95" hits="1"/> + <line number="96" hits="1"/> + <line number="97" hits="1"/> + <line number="98" hits="0"/> + <line number="99" hits="0"/> + <line number="100" hits="0"/> + <line number="101" hits="1"/> + <line number="102" hits="1"/> + <line number="103" hits="1"/> + <line number="104" hits="1"/> + <line number="106" hits="0"/> + <line number="107" hits="0"/> + <line number="108" hits="0"/> + <line number="109" hits="0"/> + <line number="110" hits="0"/> + <line number="111" hits="0"/> + <line number="112" hits="0"/> + <line number="113" hits="0"/> + <line number="115" hits="0"/> + <line number="116" hits="1"/> + <line number="117" hits="1"/> + <line number="119" hits="1"/> + <line number="120" hits="1"/> + <line number="121" hits="0"/> + <line number="122" hits="1"/> + </lines> + </class> </classes> </package> </packages> diff --git a/lib/python/dbrepo/RestClient.py b/lib/python/dbrepo/RestClient.py index 9b043bd32faa64783d02406a78d4a81b57716711..3459543d838cc76ee125f2ad84165caf9bced574 100644 --- a/lib/python/dbrepo/RestClient.py +++ b/lib/python/dbrepo/RestClient.py @@ -11,7 +11,7 @@ from dbrepo.api.dto import * from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, \ ForbiddenError, MalformedError, NameExistsError, QueryStoreError, ExternalSystemError, \ AuthenticationError, FormatNotAvailable, RequestError, ServiceError, ServiceConnectionError -from dbrepo.api.mapper import query_to_subset +from dbrepo.api.mapper import query_to_subset, dataframe_to_table_definition logging.basicConfig(format='%(asctime)s %(name)-12s %(levelname)-6s %(message)s', level=logging.INFO, stream=sys.stdout) @@ -463,9 +463,8 @@ class RestClient: raise ResponseCodeError( f'Failed to update database schema: response code: {response.status_code} is not 200 (OK)') - def create_table(self, database_id: str, name: str, is_public: bool, is_schema_public: bool, - columns: List[CreateTableColumn], constraints: CreateTableConstraints, - description: str = None) -> TableBrief: + def create_table(self, database_id: str, name: str, is_public: bool, is_schema_public: bool, dataframe: DataFrame, + description: str = None, with_data: bool = True) -> TableBrief: """ Updates the database owner of a database with given database id. @@ -473,9 +472,9 @@ class RestClient: :param name: The name of the created table. :param is_public: The visibility of the data. If set to true the data will be publicly visible. :param is_schema_public: The visibility of the schema metadata. If set to true the schema metadata will be publicly visible. - :param constraints: The constraints of the created table. - :param columns: The columns of the created table. + :param dataframe: The `pandas` dataframe. :param description: The description of the created table. Optional. + :param with_data: If set to `True`, the data will be included in the new table. Optional. Default: `True`. :returns: The table, if successful. @@ -488,12 +487,18 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the creation. """ url = f'/api/database/{database_id}/table' + columns, constraints = dataframe_to_table_definition(dataframe) response = self._wrapper(method="post", url=url, force_auth=True, payload=CreateTable(name=name, is_public=is_public, is_schema_public=is_schema_public, description=description, columns=columns, constraints=constraints)) if response.status_code == 201: body = response.json() - return TableBrief.model_validate(body) + table = TableBrief.model_validate(body) + if with_data: + self.import_table_data(database_id=database_id, + table_id=table.id, + dataframe=dataframe.reset_index()) + return table if response.status_code == 400: raise MalformedError(f'Failed to create table: {response.text}') if response.status_code == 403: @@ -821,7 +826,7 @@ class RestClient: if page is not None and size is not None: params.append(('page', page)) params.append(('size', size)) - response = self._wrapper(method="get", url=url, params=params) + response = self._wrapper(method="get", url=url, params=params, headers={'Accept': 'application/json'}) if response.status_code == 200: return DataFrame.from_records(response.json()) if response.status_code == 400: @@ -864,7 +869,7 @@ class RestClient: params.append(('size', size)) if timestamp is not None: params.append(('timestamp', timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"))) - response = self._wrapper(method="get", url=url, params=params) + response = self._wrapper(method="get", url=url, params=params, headers={'Accept': 'application/json'}) if response.status_code == 200: return DataFrame.from_records(response.json()) if response.status_code == 400: @@ -919,9 +924,9 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the insert. """ - url = f'/api/upload' buffer = BytesIO() - dataframe.to_csv(path_or_buf=buffer, header=False, index=False) + dataframe.to_csv(path_or_buf=buffer, header=True, index=False) + url = f'/api/upload' response = self._wrapper(method="post", url=url, force_auth=True, files={'file': ('dataframe.csv', buffer.getvalue())}) if response.status_code == 201: @@ -949,8 +954,8 @@ class RestClient: url = f'/api/database/{database_id}/table/{table_id}/data/import' response = self._wrapper(method="post", url=url, force_auth=True, - payload=Import(location=self._upload(dataframe), separator=',', quote='"', - header=True, line_termination='\n')) + payload=Import(location=self._upload(dataframe), separator=',', quote='"', header=True, + line_termination='\n')) if response.status_code == 202: return if response.status_code == 400: @@ -1354,7 +1359,7 @@ class RestClient: payload=subset) if response.status_code == 201: logging.info(f'Created subset with id: {response.headers["X-Id"]}') - return DataFrame.from_records(response.json()) + return DataFrame.from_records(response.json(), columns=query.columns) if response.status_code == 400: raise MalformedError(f'Failed to create subset: {response.text}') if response.status_code == 403: @@ -1388,11 +1393,10 @@ class RestClient: :raises ServiceError: If something went wrong with obtaining the information in the data service. :raises ResponseCodeError: If something went wrong with the retrieval. """ - headers = {} url = f'/api/database/{database_id}/subset/{subset_id}/data' if page is not None and size is not None: url += f'?page={page}&size={size}' - response = self._wrapper(method="get", url=url, headers=headers) + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) if response.status_code == 200: return DataFrame.from_records(response.json()) if response.status_code == 400: @@ -1781,7 +1785,7 @@ class RestClient: def get_identifier(self, identifier_id: str) -> Identifier: """ - Get list of identifiers, filter by the remaining optional arguments. + Get the identifier by given id. :param identifier_id: The identifier id. @@ -1800,6 +1804,39 @@ class RestClient: raise ResponseCodeError(f'Failed to get identifier: response code: {response.status_code} is not ' f'200 (OK): {response.text}') + def get_identifier_data(self, identifier_id: str) -> DataFrame: + """ + Get the identifier data by given id. + + :param identifier_id: The identifier id. + + :returns: The identifier, if successful. + + :raises NotExistsError: If the identifier does not exist. + :raises ResponseCodeError: If something went wrong with the retrieval of the identifier. + """ + url = f'/api/identifier/{identifier_id}' + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + if response.status_code == 200: + body = response.json() + identifier = Identifier.model_validate(body) + if identifier.type == IdentifierType.VIEW: + return self.get_view_data(database_id=identifier.database_id, view_id=identifier.view_id, page=0, + size=10000) + elif identifier.type == IdentifierType.TABLE: + return self.get_table_data(database_id=identifier.database_id, table_id=identifier.table_id, page=0, + size=10000) + elif identifier.type == IdentifierType.SUBSET: + return self.get_subset_data(database_id=identifier.database_id, subset_id=identifier.query_id, page=0, + size=10000) + raise FormatNotAvailable(f'Failed to get identifier data: type is database') + if response.status_code == 404: + raise NotExistsError(f'Failed to get identifier data: not found') + if response.status_code == 406: + raise NotExistsError(f'Failed to get identifier data: type database') + raise ResponseCodeError(f'Failed to get identifier data: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + def get_image(self, image_id: str) -> Image: """ Get container image. diff --git a/lib/python/dbrepo/api/dto.py b/lib/python/dbrepo/api/dto.py index 526ba29bf7d4dfea5983bce99c84c2e67e8befe4..356f9b220095970886e524e8cccefdd49ea823c7 100644 --- a/lib/python/dbrepo/api/dto.py +++ b/lib/python/dbrepo/api/dto.py @@ -653,6 +653,7 @@ class IdentifierSave(CreateIdentifier): class Identifier(BaseModel): id: str database_id: str + links: Links type: IdentifierType owner: UserBrief status: IdentifierStatusType @@ -988,6 +989,12 @@ class Query(BaseModel): identifiers: List[IdentifierBrief] = field(default_factory=list) +class Links(BaseModel): + self: str + self_html: str + data: Optional[str] = None + + class UpdateQuery(BaseModel): persist: bool diff --git a/lib/python/dbrepo/api/mapper.py b/lib/python/dbrepo/api/mapper.py index c062b29923f17f18f8a9d21f5c1913df2b3bb3d4..bede7b38384dae549fed119c9794b96c6aa0c921 100644 --- a/lib/python/dbrepo/api/mapper.py +++ b/lib/python/dbrepo/api/mapper.py @@ -1,4 +1,11 @@ -from dbrepo.api.dto import Subset, QueryDefinition, Database, Table, Image, Filter, Order +import logging + +import pandas +from numpy import dtype +from pandas import DataFrame, Series + +from dbrepo.api.dto import Subset, QueryDefinition, Database, Table, Image, Filter, Order, CreateTableColumn, \ + CreateTableConstraints, ColumnType from dbrepo.api.exceptions import MalformedError @@ -28,7 +35,7 @@ def query_to_subset(database: Database, image: Image, query: QueryDefinition) -> column_id=filter_column_ids[0], operator_id=filter_ops_ids[0], value=filter.value)) - order = None + orders = [] if query.order is not None: for order in query.order: # column_id @@ -36,5 +43,80 @@ def query_to_subset(database: Database, image: Image, query: QueryDefinition) -> column.internal_name == order.column] if len(order_column_ids) != 1: raise MalformedError(f'Failed to create view: order column name not found in database') - order.append(Order(column_id=order_column_ids[0].id, direction=order.direction)) - return Subset(table_id=tables[0].id, columns=filtered_column_ids, filter=filters, order=order) + orders.append(Order(column_id=order_column_ids[0], direction=order.direction)) + return Subset(table_id=tables[0].id, columns=filtered_column_ids, filter=filters, order=orders) + + +def dataframe_to_table_definition(dataframe: DataFrame) -> ([CreateTableColumn], CreateTableConstraints): + if dataframe.index.name is None: + raise MalformedError(f'Failed to map dataframe: index not set') + constraints = CreateTableConstraints(uniques=[], + checks=[], + foreign_keys=[], + primary_key=dataframe.index.names) + dataframe = dataframe.reset_index() + columns = [] + for name, series in dataframe.items(): + column = CreateTableColumn(name=str(name), + type=ColumnType.TEXT, + null_allowed=contains_null(dataframe[name])) + if series.dtype == dtype('float64'): + if pandas.to_numeric(dataframe[name], errors='coerce').notnull().all(): + logging.debug(f"mapped column {name} from float64 to decimal") + column.type = ColumnType.DECIMAL + column.size = 40 + column.d = 20 + else: + logging.debug(f"mapped column {name} from float64 to text") + column.type = ColumnType.TEXT + elif series.dtype == dtype('int64'): + min_val = min(dataframe[name]) + max_val = max(dataframe[name]) + if 0 <= min_val <= 1 and 0 <= max_val <= 1 and 'id' not in name: + logging.debug(f"mapped column {name} from int64 to bool") + column.type = ColumnType.BOOL + columns.append(column) + continue + logging.debug(f"mapped column {name} from int64 to bigint") + column.type = ColumnType.BIGINT + elif series.dtype == dtype('O'): + try: + pandas.to_datetime(dataframe[name], format='mixed') + if dataframe[name].str.contains(':').any(): + logging.debug(f"mapped column {name} from O to timestamp") + column.type = ColumnType.TIMESTAMP + columns.append(column) + continue + logging.debug(f"mapped column {name} from O to date") + column.type = ColumnType.DATE + columns.append(column) + continue + except ValueError: + pass + max_size = max(dataframe[name].astype(str).map(len)) + if max_size <= 1: + logging.debug(f"mapped column {name} from O to char") + column.type = ColumnType.CHAR + column.size = 1 + if 0 <= max_size <= 255: + logging.debug(f"mapped column {name} from O to varchar") + column.type = ColumnType.VARCHAR + column.size = 255 + else: + logging.debug(f"mapped column {name} from O to text") + column.type = ColumnType.TEXT + elif series.dtype == dtype('bool'): + logging.debug(f"mapped column {name} from bool to bool") + column.type = ColumnType.BOOL + elif series.dtype == dtype('datetime64'): + logging.debug(f"mapped column {name} from datetime64 to datetime") + column.type = ColumnType.DATETIME + else: + logging.warning(f'default to \'text\' for column {name} and type {dtype}') + columns.append(column) + return columns, constraints + +def contains_null(dataframe: DataFrame) -> bool: + if '\\N' in dataframe.values: + return True + return dataframe.isnull().values.any() diff --git a/lib/python/docs/index.rst b/lib/python/docs/index.rst index 511a08b52d559b8dc252e593dd69c692aacabf6c..2ebdc80b2d703c3d3e799950079f3a4c7a9d83df 100644 --- a/lib/python/docs/index.rst +++ b/lib/python/docs/index.rst @@ -6,7 +6,7 @@ Pandas `DataFrame <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame provides an object-oriented API as well as low-level access to DBRepo services. .. note:: - The SDK has been implemented and documented for DBRepo version 1.7.0, earlier versions may be supported but are not tested for compatibility. + The SDK has been implemented and documented for DBRepo version 1.7.1, earlier versions may be supported but are not tested for compatibility. Quickstart ---------- diff --git a/lib/python/pyproject.toml b/lib/python/pyproject.toml index 49b9bbb1b7e166bff6f58533fbd879559485e239..61b31fcce1795064df1451c82193f2ed73e836db 100644 --- a/lib/python/pyproject.toml +++ b/lib/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dbrepo" -version = "1.7.0" +version = "1.7.1" description = "DBRepo Python Library" keywords = [ "DBRepo", diff --git a/lib/python/setup.py b/lib/python/setup.py index 4fff48185b04734932caad08d4aa06583730a52f..73d4ced6de7822ff0d430c4488f226a553894e7c 100644 --- a/lib/python/setup.py +++ b/lib/python/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup(name="dbrepo", - version="1.7.0", + version="1.7.1", description="A library for communicating with DBRepo", url="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/", author="Martin Weise", diff --git a/lib/python/tests/test_unit_identifier.py b/lib/python/tests/test_unit_identifier.py index 9ac386437c29f4c65f6879d1a1f0c98641652652..137a513d4666ad097094f67d6fd4dcff80fc1d3b 100644 --- a/lib/python/tests/test_unit_identifier.py +++ b/lib/python/tests/test_unit_identifier.py @@ -7,7 +7,7 @@ from dbrepo.api.dto import Identifier, IdentifierType, SaveIdentifierTitle, Crea IdentifierDescription, SaveIdentifierDescription, Language, SaveIdentifierFunder, SaveRelatedIdentifier, \ RelatedIdentifierRelation, RelatedIdentifierType, IdentifierFunder, RelatedIdentifier, UserBrief, \ IdentifierStatusType, CreateIdentifierCreator, CreateIdentifierTitle, CreateIdentifierFunder, \ - CreateRelatedIdentifier, CreateIdentifierDescription, SaveIdentifierCreator + CreateRelatedIdentifier, CreateIdentifierDescription, SaveIdentifierCreator, Links from dbrepo.api.exceptions import MalformedError, ForbiddenError, NotExistsError, AuthenticationError, \ ServiceConnectionError, ServiceError, ResponseCodeError, FormatNotAvailable, RequestError @@ -19,6 +19,9 @@ class IdentifierUnitTest(unittest.TestCase): exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), publication_year=2024, publisher='TU Wien', type=IdentifierType.VIEW, @@ -172,6 +175,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", @@ -275,6 +281,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", @@ -517,6 +526,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -530,7 +542,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=202) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=202) # test client = RestClient(username="a", password="b") response = client.publish_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") @@ -545,6 +558,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -558,7 +574,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=400) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=400) # test try: RestClient(username="a", password="b").publish_identifier( @@ -575,6 +592,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -588,7 +608,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=403) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=403) # test try: RestClient(username="a", password="b").publish_identifier( @@ -605,6 +626,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -618,7 +642,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=404) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=404) # test try: RestClient(username="a", password="b").publish_identifier( @@ -635,6 +660,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -648,7 +676,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=502) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=502) # test try: RestClient(username="a", password="b").publish_identifier( @@ -665,6 +694,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -678,7 +710,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=503) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=503) # test try: RestClient(username="a", password="b").publish_identifier( @@ -695,6 +728,9 @@ class IdentifierUnitTest(unittest.TestCase): publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, + links=Links(self="/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3", + self_html="/pid/f6171539-a479-4829-9b9b-a6b474e1c7d3", + data="/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/e5229d24-584a-43e8-b9f6-d349c3053f9c/data"), descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", description='Test Description')], titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], @@ -708,7 +744,8 @@ class IdentifierUnitTest(unittest.TestCase): status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock - mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=200) + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), + status_code=200) # test try: RestClient(username="a", password="b").publish_identifier( diff --git a/lib/python/tests/test_unit_query.py b/lib/python/tests/test_unit_query.py index 44f165b9b0ba36ab2375ddcd78c6c50cd363c7d9..528d6775a7e3b84a3afdceb68344518d234ba21d 100644 --- a/lib/python/tests/test_unit_query.py +++ b/lib/python/tests/test_unit_query.py @@ -93,14 +93,14 @@ class QueryUnitTest(unittest.TestCase): def test_create_subset_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] - df = DataFrame.from_records(json.dumps(exp)) + df = DataFrame.from_records(exp) # mock mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), status_code=200) mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), status_code=200) - mock.post(f'/api/database/{self.database.id}/subset', json=json.dumps(exp), - headers={'X-Id': '1'}, status_code=201) + mock.post(f'/api/database/{self.database.id}/subset', json=exp, + headers={'X-Id': '85bc1217-29ab-4c09-9f98-8c019238a9c8'}, status_code=201) # test client = RestClient(username="a", password="b") response = client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", page=0, size=10, @@ -263,14 +263,14 @@ class QueryUnitTest(unittest.TestCase): def test_create_subset_anonymous_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] - df = DataFrame.from_records(json.dumps(exp)) + df = DataFrame.from_records(exp) # mock mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), status_code=200) mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), status_code=200) - mock.post(f'/api/database/{self.database.id}/subset', json=json.dumps(exp), - headers={'X-Id': '1'}, status_code=201) + mock.post(f'/api/database/{self.database.id}/subset', json=exp, + headers={'X-Id': '85bc1217-29ab-4c09-9f98-8c019238a9c8'}, status_code=201) # test client = RestClient() diff --git a/lib/python/tests/test_unit_table.py b/lib/python/tests/test_unit_table.py index a5632f4237f2ab9a34b111e5168cebe7fc084ef6..c67b54c6144016df23a85fc6bb8fe8c46b9a0565 100644 --- a/lib/python/tests/test_unit_table.py +++ b/lib/python/tests/test_unit_table.py @@ -6,7 +6,7 @@ import requests_mock from pandas import DataFrame from dbrepo.RestClient import RestClient -from dbrepo.api.dto import Table, CreateTableConstraints, Column, Constraints, ColumnType, ConceptBrief, UnitBrief, \ +from dbrepo.api.dto import Table, Column, Constraints, ColumnType, ConceptBrief, UnitBrief, \ TableStatistics, ColumnStatistic, PrimaryKey, ColumnBrief, TableBrief, UserBrief, History, HistoryEventType from dbrepo.api.exceptions import MalformedError, ForbiddenError, NotExistsError, NameExistsError, \ AuthenticationError, ExternalSystemError, ServiceError, ServiceConnectionError, ResponseCodeError @@ -25,125 +25,137 @@ class TableUnitTest(unittest.TestCase): is_public=True, is_schema_public=True) with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', json=exp.model_dump(), status_code=201) # test client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, with_data=False, + is_public=True, is_schema_public=True) self.assertEqual(exp, response) + def test_create_table_index_missing_fails(self): + with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}]) + # test + client = RestClient(username="a", password="b") + try: + client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", dataframe=dataframe, with_data=False, + is_public=True, is_schema_public=True) + except MalformedError: + pass + def test_create_table_400_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=400) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except MalformedError: pass def test_create_table_403_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=403) # test try: RestClient(username="a", password="b").create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except ForbiddenError: pass def test_create_table_404_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=404) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except NotExistsError: pass def test_create_table_409_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=409) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except NameExistsError: pass def test_create_table_502_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=502) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except ServiceConnectionError: pass def test_create_table_503_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=503) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except ServiceError: pass def test_create_table_unknown_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=200) # test try: client = RestClient(username="a", password="b") response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except ResponseCodeError: pass def test_create_table_anonymous_fails(self): with requests_mock.Mocker() as mock: + dataframe = DataFrame.from_records([{'id': 1, 'name': 'foobar'}], index=['id']) # mock mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=409) # test try: response = RestClient().create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", - description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + description="Test Table", dataframe=dataframe, + is_public=True, is_schema_public=True) except AuthenticationError: pass diff --git a/sonar-project.properties b/sonar-project.properties index 0d25b112d7133494be618d3f61e3e17a2c415e94..24cf0e14a408513b25631817b2b3c8fcaf6f05ee 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77 sonar.host.url=https://s39.datalab.tuwien.ac.at # project -sonar.projectVersion=1.7.0 +sonar.projectVersion=1.7.1 # general sonar.qualitygate.wait=true sonar.projectCreation.mainBranchName=master