From cdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Fri, 14 Apr 2023 11:44:19 +0000 Subject: Upload bff Issue-ID: PORTAL-1083 Signed-off-by: Fiete Ostkamp Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade --- .../test/resources/application-access-control.yml | 22 ++++++ app/src/test/resources/application-development.yml | 33 +++++++++ app/src/test/resources/application.yml | 34 +++++++++ app/src/test/resources/logback-spring.xml | 18 +++++ .../preferences/preferencesProperties.json | 80 ++++++++++++++++++++++ 5 files changed, 187 insertions(+) create mode 100644 app/src/test/resources/application-access-control.yml create mode 100644 app/src/test/resources/application-development.yml create mode 100644 app/src/test/resources/application.yml create mode 100644 app/src/test/resources/logback-spring.xml create mode 100644 app/src/test/resources/preferences/preferencesProperties.json (limited to 'app/src/test/resources') diff --git a/app/src/test/resources/application-access-control.yml b/app/src/test/resources/application-access-control.yml new file mode 100644 index 0000000..5454a15 --- /dev/null +++ b/app/src/test/resources/application-access-control.yml @@ -0,0 +1,22 @@ +portal-bff.access-control: + ACTIONS_CREATE: [ onap_admin, onap_designer, onap_operator ] + ACTIONS_GET: [ onap_admin, onap_designer, onap_operator ] + ACTIONS_LIST: [ onap_admin, onap_designer, onap_operator ] + ACTIVE_ALARM_LIST: [onap_admin, onap_designer, onap_operator] + KEY_ENCRYPT_BY_USER: [onap_admin, onap_designer, onap_operator] + KEY_ENCRYPT_BY_VALUE: [onap_admin, onap_designer, onap_operator] + PREFERENCES_CREATE: [onap_admin, onap_designer, onap_operator] + PREFERENCES_GET: [onap_admin, onap_designer, onap_operator] + PREFERENCES_UPDATE: [onap_admin, onap_designer, onap_operator] + ROLE_LIST: ["*"] + TILE_GET: [onap_admin, onap_designer, onap_operator] + TILE_LIST: [onap_admin, onap_designer, onap_operator] + USER_CREATE: [onap_admin, onap_designer, onap_operator] + USER_DELETE: [onap_admin, onap_designer, onap_operator] + USER_GET: [onap_admin, onap_designer, onap_operator] + USER_LIST_AVAILABLE_ROLES: [onap_admin, onap_designer, onap_operator] + USER_LIST_ROLES: [onap_admin, onap_designer, onap_operator] + USER_LIST: [onap_admin, onap_designer, onap_operator] + USER_UPDATE_PASSWORD: [onap_admin, onap_designer, onap_operator] + USER_UPDATE_ROLES: [onap_admin, onap_designer, onap_operator] + USER_UPDATE: [onap_admin, onap_designer, onap_operator] diff --git a/app/src/test/resources/application-development.yml b/app/src/test/resources/application-development.yml new file mode 100644 index 0000000..8e97b45 --- /dev/null +++ b/app/src/test/resources/application-development.yml @@ -0,0 +1,33 @@ +logging: + level: + org.springframework.web: TRACE + +spring: + profiles: + include: access-control + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: test + client-secret: test + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + +portal-bff: + realm: ONAP + portal-prefs-url: http://localhost:${wiremock.server.port} + portal-history-url: http://localhost:${wiremock.server.port} + keycloak-url: http://localhost:${wiremock.server.port} + instance-id: PORTAL diff --git a/app/src/test/resources/application.yml b/app/src/test/resources/application.yml new file mode 100644 index 0000000..f9a82d8 --- /dev/null +++ b/app/src/test/resources/application.yml @@ -0,0 +1,34 @@ +logging: + level: + org.springframework.web: TRACE + +spring: + profiles: + include: + - access-control + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: test + client-secret: test + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + +portal-bff: + realm: ONAP + portal-prefs-url: http://localhost:${wiremock.server.port} + portal-history-url: http://localhost:${wiremock.server.port} + keycloak-url: http://localhost:${wiremock.server.port} + instance-id: PORTAL diff --git a/app/src/test/resources/logback-spring.xml b/app/src/test/resources/logback-spring.xml new file mode 100644 index 0000000..45bd7e2 --- /dev/null +++ b/app/src/test/resources/logback-spring.xml @@ -0,0 +1,18 @@ + + + + + + + ${LOGBACK_LEVEL:-info} + + + ${CONSOLE_LOG_PATTERN} + utf8 + + + + + + + \ No newline at end of file diff --git a/app/src/test/resources/preferences/preferencesProperties.json b/app/src/test/resources/preferences/preferencesProperties.json new file mode 100644 index 0000000..dc094ec --- /dev/null +++ b/app/src/test/resources/preferences/preferencesProperties.json @@ -0,0 +1,80 @@ +{ + "dashboard": { + "apps": { + "availableTiles": [ + { + "type": "ALARM_COUNT_TILE", + "displayed": true + }, + { + "type": "KPI_GRAPH_TILE", + "displayed": true + }, + { + "type": "K8S_RESOURCE_STATUS_TILE", + "displayed": true + }, + { + "type": "USER_LAST_ACTION_TILE", + "displayed": true + } + ], + "k8sResourceStatus": "pod", + "kpiSettings": { + "primaryGraph": "erabDropRatio", + "secondaryGraph": "erabDropData", + "expanded": false + }, + "alarmTileGraphEnabled": false, + "lastUserAction": { + "interval": "1H", + "filterType": "ALL" + } + } + }, + "alarms": { + "showEmptyProperties": false + }, + "columns": [ + "id", + "baseType", + "ackState", + "alarmedObjectType", + "sourceSystemId", + "alarmedObject", + "perceivedSeverity", + "specificProblem", + "eventCategory", + "probableCause", + "proposedRepairedActions", + "comment", + "alarmRaisedTime", + "alarmReportingTime" + ], + "columnsOrder": [ + "id", + "baseType", + "ackState", + "alarmedObjectType", + "sourceSystemId", + "alarmedObject", + "perceivedSeverity", + "specificProblem", + "eventCategory", + "probableCause", + "proposedRepairedActions", + "comment", + "alarmRaisedTime", + "alarmReportingTime" + ], + "refreshInterval": "1", + "serviceInstanceSettings": { + "showAll": false + }, + "topologySettings": { + "showAll": false + }, + "treeViewSettings": { + "showAll": false + } +} \ No newline at end of file -- cgit 1.2.3-korg