diff options
author | yoonsoonjahng <yoonsoon.jahng@yoppworks.com> | 2020-09-08 19:06:00 -0400 |
---|---|---|
committer | Yoonsoon Jahng <yoonsoon.jahng@yoppworks.com> | 2020-09-23 14:36:09 +0000 |
commit | 628ecd0d519acc6b4717d05aa12fd4f7b7dfc55f (patch) | |
tree | 4d3fef8cf2538432ecdc37e038d93b18d462c9b4 | |
parent | 944970742185cccb73110875d1b4ad9f7305337f (diff) |
Add keycloak configuration to aai-resource in order to support multi-tenency
- Change Values.yaml to add host, port of keycloak server
- add application-keycloak.properties
- Update template/deployment.yaml to include application-keycloak.properties
Issue-ID: AAI-3130
Change-Id: I2b741457a4d8c87e4b70b1f3903974170f35d571
Signed-off-by: yoonsoonjahng <yoonsoon.jahng@yoppworks.com>
4 files changed, 21 insertions, 0 deletions
diff --git a/components/aai-resources/resources/config/application-keycloak.properties b/components/aai-resources/resources/config/application-keycloak.properties new file mode 100644 index 0000000..0aee217 --- /dev/null +++ b/components/aai-resources/resources/config/application-keycloak.properties @@ -0,0 +1,14 @@ + +spring.autoconfigure.exclude=\ + org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ + org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + + +keycloak.auth-server-url=http://{{ .Values.config.keycloak.host }}:{{ .Values.config.keycloak.port }}/auth +keycloak.realm=aai-resources +keycloak.resource=aai-resources-app +keycloak.public-client=true +keycloak.principal-attribute=preferred_username + +keycloak.ssl-required=external +keycloak.bearer-only=true
\ No newline at end of file diff --git a/components/aai-resources/templates/configmap.yaml b/components/aai-resources/templates/configmap.yaml index ccbeae3..1a1192a 100644 --- a/components/aai-resources/templates/configmap.yaml +++ b/components/aai-resources/templates/configmap.yaml @@ -29,6 +29,7 @@ data: {{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }} {{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }} {{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/application-keycloak.properties").AsConfig . | indent 2 }} {{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }} --- apiVersion: v1 diff --git a/components/aai-resources/templates/deployment.yaml b/components/aai-resources/templates/deployment.yaml index 2440da6..ae328f5 100644 --- a/components/aai-resources/templates/deployment.yaml +++ b/components/aai-resources/templates/deployment.yaml @@ -1288,6 +1288,9 @@ spec: - mountPath: /opt/app/aai-resources/resources/application.properties name: {{ include "common.fullname" . }}-config subPath: application.properties + - mountPath: /opt/app/aai-resources/resources/application-keycloak.properties + name: {{ include "common.fullname" . }}-config + subPath: application-keycloak.properties {{ $global := . }} {{ range $job := .Values.global.config.auth.files }} - mountPath: /opt/app/aai-resources/resources/etc/auth/{{ . }} diff --git a/components/aai-resources/values.yaml b/components/aai-resources/values.yaml index 4e19ea4..4b77e31 100644 --- a/components/aai-resources/values.yaml +++ b/components/aai-resources/values.yaml @@ -32,6 +32,9 @@ replicaCount: 1 # Configuration for the resources deployment config: + keycloak: + host: localhost + port: 8180 # Specifies crud related operation timeouts and overrides crud: |