From 4b962b45e823386c02f835e01bb165587c4188cc Mon Sep 17 00:00:00 2001 From: eelhazati <35301254+eelhazati@users.noreply.github.com> Date: Fri, 22 Mar 2019 11:44:17 +0000 Subject: [PATCH 1/4] Update application.properties --- .../src/main/resources/application.properties | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties b/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties index de8e1a7b9f..4b9d8106eb 100644 --- a/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties +++ b/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties @@ -1,23 +1,10 @@ -# SECURITY OAUTH2 CLIENT (OAuth2ClientProperties) -#spring.security.oauth2.client.provider.*= # OAuth provider details. -#spring.security.oauth2.client.registration.*= # OAuth client registrations. - server.port=8081 -#server.servlet.context-path=/uaa-client-webapp -uaa.url=http://localhost:8080/uaa resource.server.url=http://localhost:8082 -spring.security.oauth2.client.registration.uaa.client-name=UAA OAuth2 Client -spring.security.oauth2.client.registration.uaa.client-id=client1 -spring.security.oauth2.client.registration.uaa.client-secret=client1 -spring.security.oauth2.client.registration.uaa.authorization-grant-type=authorization_code +spring.security.oauth2.client.registration.uaa.client-id=webappclient +spring.security.oauth2.client.registration.uaa.client-secret=webappclientsecret spring.security.oauth2.client.registration.uaa.scope=resource.read,resource.write,openid,profile -spring.security.oauth2.client.registration.uaa.redirect-uri=http://localhost:8081/login/oauth2/code/uaa -#spring.security.oauth2.client.registration.uaa.redirect-uri=http://localhost:8081/** -spring.security.oauth2.client.provider.uaa.token-uri=${uaa.url}/oauth/token -spring.security.oauth2.client.provider.uaa.authorization-uri=${uaa.url}/oauth/authorize -spring.security.oauth2.client.provider.uaa.jwk-set-uri=${uaa.url}/token_keys -spring.security.oauth2.client.provider.uaa.user-info-uri=${uaa.url}/userinfo -spring.security.oauth2.client.provider.uaa.user-name-attribute=user_name +spring.security.oauth2.client.provider.uaa.issuer-uri=http://localhost:8080/uaa/oauth/token + From c6a54656f22df47565b5cc8130435738383ca534 Mon Sep 17 00:00:00 2001 From: eelhazati <35301254+eelhazati@users.noreply.github.com> Date: Fri, 22 Mar 2019 11:45:49 +0000 Subject: [PATCH 2/4] Update application.properties --- .../src/main/resources/application.properties | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cloud-foundry-uaa/cf-uaa-oauth2-resource-server/src/main/resources/application.properties b/cloud-foundry-uaa/cf-uaa-oauth2-resource-server/src/main/resources/application.properties index ba9b95e0d4..a6e846a00f 100644 --- a/cloud-foundry-uaa/cf-uaa-oauth2-resource-server/src/main/resources/application.properties +++ b/cloud-foundry-uaa/cf-uaa-oauth2-resource-server/src/main/resources/application.properties @@ -1,16 +1,3 @@ server.port=8082 -uaa.url=http://localhost:8080/uaa - -#approch1 -spring.security.oauth2.resourceserver.jwt.issuer-uri=${uaa.url}/oauth/token - -#approch2 -#spring.security.oauth2.resourceserver.jwt.jwk-set-uri=${uaa.url}/token_key - -# SECURITY OAUTH2 CLIENT (OAuth2ClientProperties) -#security.oauth2.client.client-id=client1 -#security.oauth2.client.client-secret=client1 - -#security.oauth2.resource.jwt.key-uri=${uaa.url}/token_key -#security.oauth2.resource.token-info-uri=${uaa.url}/oauth/check_token +spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8080/uaa/oauth/token From 700a9530d78cb33eb8e475a7968a5ee7e7882ad2 Mon Sep 17 00:00:00 2001 From: eelhazati <35301254+eelhazati@users.noreply.github.com> Date: Fri, 22 Mar 2019 11:57:45 +0000 Subject: [PATCH 3/4] Update uaa.yml --- cloud-foundry-uaa/cf-uaa-config/uaa.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cloud-foundry-uaa/cf-uaa-config/uaa.yml b/cloud-foundry-uaa/cf-uaa-config/uaa.yml index b782c2b681..ebaa99fb6c 100644 --- a/cloud-foundry-uaa/cf-uaa-config/uaa.yml +++ b/cloud-foundry-uaa/cf-uaa-config/uaa.yml @@ -1,12 +1,7 @@ issuer: uri: http://localhost:8080/uaa -spring_profiles: postgresql,default - -database.driverClassName: org.postgresql.Driver -database.url: jdbc:postgresql:uaadb2 -database.username: postgres -database.password: postgres +spring_profiles: default,hsqldb encryption: active_key_label: CHANGE-THIS-KEY From 640af4ccbea16195e1cc8b0620392c328d2e2c83 Mon Sep 17 00:00:00 2001 From: eelhazati <35301254+eelhazati@users.noreply.github.com> Date: Fri, 22 Mar 2019 12:49:37 +0000 Subject: [PATCH 4/4] Update application.properties --- .../src/main/resources/application.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties b/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties index 4b9d8106eb..8e8797ce54 100644 --- a/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties +++ b/cloud-foundry-uaa/cf-uaa-oauth2-client/src/main/resources/application.properties @@ -2,6 +2,7 @@ server.port=8081 resource.server.url=http://localhost:8082 +spring.security.oauth2.client.registration.uaa.client-name=Web App Client spring.security.oauth2.client.registration.uaa.client-id=webappclient spring.security.oauth2.client.registration.uaa.client-secret=webappclientsecret spring.security.oauth2.client.registration.uaa.scope=resource.read,resource.write,openid,profile