diff options
Diffstat (limited to 'app/src/main/resources')
-rw-r--r-- | app/src/main/resources/application-access-control.yml | 23 | ||||
-rw-r--r-- | app/src/main/resources/application-development.yml | 30 | ||||
-rw-r--r-- | app/src/main/resources/application-local.yml | 34 | ||||
-rw-r--r-- | app/src/main/resources/application.yml | 49 | ||||
-rw-r--r-- | app/src/main/resources/logback-spring.xml | 13 |
5 files changed, 149 insertions, 0 deletions
diff --git a/app/src/main/resources/application-access-control.yml b/app/src/main/resources/application-access-control.yml new file mode 100644 index 0000000..d967c53 --- /dev/null +++ b/app/src/main/resources/application-access-control.yml @@ -0,0 +1,23 @@ +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/main/resources/application-development.yml b/app/src/main/resources/application-development.yml new file mode 100644 index 0000000..50dfb51 --- /dev/null +++ b/app/src/main/resources/application-development.yml @@ -0,0 +1,30 @@ +spring: + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: portal-bff + client-secret: 5933482a-9f4c-44e0-9814-dca17e0a9137 + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/certs + +management: + endpoints: + web: + exposure: + include: "*" + +portal-bff: + realm: ONAP + portal-prefs-url: ${PORTAL_PREFS_URL} + portal-history-url: ${PORTAL_HISTORY_URL} + keycloak-url: ${KEYCLOAK_URL} + instance-id: PORTAL diff --git a/app/src/main/resources/application-local.yml b/app/src/main/resources/application-local.yml new file mode 100644 index 0000000..e90a13b --- /dev/null +++ b/app/src/main/resources/application-local.yml @@ -0,0 +1,34 @@ +spring: + security: + oauth2: + client: + provider: + keycloak: + token-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/token + jwk-set-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: portal-bff + client-secret: pKOuVH1bwRZoNzp5P5t4GV8CqcCJYVtr + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/certs + +management: + endpoints: + web: + exposure: + include: "*" + +portal-bff: + realm: ONAP + portal-prefs-url: http://localhost:9001 + portal-history-url: http://localhost:9002 + keycloak-url: http://localhost:8080/ + instance-id: PORTAL + +logging: + level: + root: debug diff --git a/app/src/main/resources/application.yml b/app/src/main/resources/application.yml new file mode 100644 index 0000000..83686b5 --- /dev/null +++ b/app/src/main/resources/application.yml @@ -0,0 +1,49 @@ +# List of common application properties: +# https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties +server: + port: 9080 + address: 0.0.0.0 + +logging: + level: + org.springframework.web: TRACE + +management: + endpoints: + web: + exposure: + include: "*" + +spring: + application: + name: portal-bff + profiles: + include: + - access-control + security: + oauth2: + client: + provider: + keycloak: + token-uri: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_REALM}/protocol/openid-connect/token + jwk-set-uri: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_REALM}/protocol/openid-connect/certs + registration: + keycloak: + provider: keycloak + client-id: ${KEYCLOAK_CLIENT_ID} + client-secret: ${KEYCLOAK_CLIENT_SECRET} + authorization-grant-type: client_credentials + resourceserver: + jwt: + jwk-set-uri: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_REALM}/protocol/openid-connect/certs + jackson: + serialization: + FAIL_ON_EMPTY_BEANS: false + +portal-bff: + realm: ${KEYCLOAK_REALM} + portal-prefs-url: ${PORTAL_PREFS_URL} + portal-history-url: ${PORTAL_HISTORY_URL} + keycloak-url: ${KEYCLOAK_URL} + instance-id: PORTAL + diff --git a/app/src/main/resources/logback-spring.xml b/app/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..05503bc --- /dev/null +++ b/app/src/main/resources/logback-spring.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration scan="true"> + <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>${LOGBACK_LEVEL:-info}</level> + </filter> + <encoder class="net.logstash.logback.encoder.LogstashEncoder"/> + </appender> + + <root level="all"> + <appender-ref ref="stdout"/> + </root> +</configuration> |