From f55a5de920984eb84ef68524af1a1d15a1bec6b0 Mon Sep 17 00:00:00 2001 From: Rujun Chen Date: Thu, 18 Nov 2021 19:39:07 +0800 Subject: [PATCH] Add "enabled" property. --- .../aad-b2c-resource-server/README.md | 1 + .../src/main/resources/application.yml | 1 + .../aad-b2c-web-application/README.md | 3 ++- .../src/main/resources/application.yml | 1 + .../aad-resource-server-by-filter-stateless/README.md | 7 ++++--- .../src/main/resources/application.properties | 11 ++++++----- .../aad-resource-server-by-filter/README.md | 1 + .../src/main/resources/application.yml | 5 +++-- .../aad-resource-server-obo/README.md | 1 + .../src/main/resources/application.yml | 1 + .../aad-resource-server/README.md | 3 ++- .../src/main/resources/application.yml | 3 ++- .../src/main/resources/application.yml | 1 + .../aad-web-application/README.md | 2 ++ .../src/main/resources/application.yml | 1 + 15 files changed, 29 insertions(+), 13 deletions(-) diff --git a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/README.md b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/README.md index 144e38fab..316106e9e 100644 --- a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/README.md +++ b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/README.md @@ -95,6 +95,7 @@ spring: azure: active-directory: b2c: + enabled: true tenant-id: ${your-tenant-id} app-id-uri: ${your-app-id-uri} # If you are using v1.0 token, please configure app-id-uri for `aud` verification client-id: ${your-client-id} # If you are using v2.0 token, please configure client-id for `aud` verification diff --git a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/src/main/resources/application.yml index 289a60e9e..bdd929a2b 100644 --- a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-resource-server/src/main/resources/application.yml @@ -5,6 +5,7 @@ spring: azure: active-directory: b2c: + enabled: true tenant-id: ${your-tenant-id} app-id-uri: ${your-app-id-uri} # If you are using v1.0 token, please configure app-id-uri for `aud` verification client-id: ${your-client-id} # If you are using v2.0 token, please configure client-id for `aud` verification diff --git a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/README.md b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/README.md index bde5d4afa..6d5992efa 100644 --- a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/README.md +++ b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/README.md @@ -38,7 +38,7 @@ Follow the guide of [AAD B2C user flows creation](https://docs.microsoft.com/azu 1. Fill in `${your-tenant-authorization-server-base-uri}` from **Azure AD B2C** portal `App registrations` blade, select **Endpoints**, copy the base endpoint uri(Global cloud format may looks like `https://{your-tenant-name}.b2clogin.com/{your-tenant-name}.onmicrosoft.com`, China Cloud looks like `https://{your-tenant-name}.b2clogin.cn/{your-tenant-name}.partner.onmschina.cn`). - **NOTE**: The `spring.cloud.azure.active-directoryb2c.tenant` has been deprecated. Please use `spring.cloud.azure.active-directoryb2c.base-uri` instead. + **NOTE**: The `spring.cloud.azure.active-directory.b2c.tenant` has been deprecated. Please use `spring.cloud.azure.active-directory.b2c.base-uri` instead. 2. Select one registered instance under `Applications` from portal, and then: 1. Fill in `${your-client-id}` from `Application ID`. @@ -54,6 +54,7 @@ spring: azure: active-directory: b2c: + enabled: true base-uri: ${your-tenant-authorization-server-base-uri} client-id: ${your-client-id} client-secret: ${your-client-secret} diff --git a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/src/main/resources/application.yml index a6066f6cb..e1bc6566d 100644 --- a/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory-b2c/aad-b2c-web-application/src/main/resources/application.yml @@ -3,6 +3,7 @@ spring: azure: active-directory: b2c: + enabled: true base-uri: ${your-tenant-authorization-server-base-uri} client-id: ${your-client-id} client-secret: ${your-client-secret} diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/README.md b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/README.md index f5fa729bd..d50e0295d 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/README.md +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/README.md @@ -79,9 +79,10 @@ Furthermore enable the implicit flow in the manifest for the demo application You have to activate the stateless app-role auth filter and configure the `client-id`of your application registration: ```properties -spring.cloud.azure.active-directorysession-stateless=true -spring.cloud.azure.active-directoryclient-id=xxxxxx-your-client-id-xxxxxx -spring.cloud.azure.active-directoryappIdUri=xxxxxx-your-appIDUri-xxxxxx +spring.cloud.azure.active-directory.enabled=true +spring.cloud.azure.active-directory.session-stateless=true +spring.cloud.azure.active-directory.client-id=xxxxxx-your-client-id-xxxxxx +spring.cloud.azure.active-directory.appIdUri=xxxxxx-your-appIDUri-xxxxxx ``` #### Configure Webapp diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/src/main/resources/application.properties b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/src/main/resources/application.properties index bd964773c..800a2b25e 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/src/main/resources/application.properties +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter-stateless/src/main/resources/application.properties @@ -1,7 +1,8 @@ -# By default, spring.cloud.azure.active-directoryenvironment property has value `global`, +# By default, spring.cloud.azure.active-directory.environment property has value `global`, # supported value is global, cn. Please refer to the README for details. -# spring.cloud.azure.active-directoryenvironment=global -spring.cloud.azure.active-directorysession-stateless=true -spring.cloud.azure.active-directoryclient-id=xxxxxx-your-client-id-xxxxxx -spring.cloud.azure.active-directoryappIdUri=xxxxxx-your-appIDUri-xxxxxx +# spring.cloud.azure.active-directory.environment=global +spring.cloud.azure.active-directory.enabled=true +spring.cloud.azure.active-directory.session-stateless=true +spring.cloud.azure.active-directory.client-id=xxxxxx-your-client-id-xxxxxx +spring.cloud.azure.active-directory.appIdUri=xxxxxx-your-appIDUri-xxxxxx diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/README.md b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/README.md index ab599331b..4485c9884 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/README.md +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/README.md @@ -94,6 +94,7 @@ spring: cloud: azure: active-directory: + enabled: true tenant-id: client-id: client-secret: diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/src/main/resources/application.yml index 41ede3e52..7f75c9bcd 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-by-filter/src/main/resources/application.yml @@ -1,10 +1,11 @@ -# By default, spring.cloud.azure.active-directoryenvironment property has value `global`, +# By default, spring.cloud.azure.active-directory.environment property has value `global`, # supported value is global, cn. Please refer to the README for details. -# spring.cloud.azure.active-directoryenvironment=global +# spring.cloud.azure.active-directory.environment=global spring: cloud: azure: active-directory: + enabled: true tenant-id: client-id: client-secret: diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/README.md b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/README.md index ecad0bcff..051441791 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/README.md +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/README.md @@ -53,6 +53,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: client-secret: tenant-id: diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/src/main/resources/application.yml index bb16549ad..ef1e5baa7 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server-obo/src/main/resources/application.yml @@ -5,6 +5,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: client-secret: tenant-id: diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/README.md b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/README.md index f6be09c95..bfadbf42b 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/README.md +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/README.md @@ -53,7 +53,7 @@ See [Expose scoped permission to web api] for more information about web api. ## Examples ### Configure application.yml ```yaml -#If we configure the spring.cloud.azure.active-directoryclient-id or spring.cloud.azure.active-directoryapp-id-uri will be to check the audience. +#If we configure the spring.cloud.azure.active-directory.client-id or spring.cloud.azure.active-directory.app-id-uri will be to check the audience. #In v2.0 tokens, this is always client id of the app, while in v1.0 tokens it can be the client id or the application id url used in the request. #If you are using v1.0 tokens, configure both to properly complete the audience validation. @@ -61,6 +61,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: app-id-uri: ``` diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/src/main/resources/application.yml index 572fa3734..c05833f88 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory/aad-resource-server/src/main/resources/application.yml @@ -1,4 +1,4 @@ -# If we configure the spring.cloud.azure.active-directoryclient-id or spring.cloud.azure.active-directoryapp-id-uri will be to check the audience. +# If we configure the spring.cloud.azure.active-directory.client-id or spring.cloud.azure.active-directory.app-id-uri will be to check the audience. # In v2.0 tokens, this is always the client ID of the API, while in v1.0 tokens it can be the client ID or the resource URI used in the request. # If you are using v1.0 tokens, configure both to properly complete the audience validation. @@ -9,6 +9,7 @@ spring: cloud: azure: active-directory: + enabled: true tenant-id: ${your-tenant-id} # client-id: ${your-client-id} # app-id-uri: ${your-app-id-uri} diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-web-application-and-resource-server/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory/aad-web-application-and-resource-server/src/main/resources/application.yml index 92ff3ac97..80e24f89f 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-web-application-and-resource-server/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory/aad-web-application-and-resource-server/src/main/resources/application.yml @@ -5,6 +5,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: client-secret: tenant-id: diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-web-application/README.md b/aad/spring-cloud-azure-starter-active-directory/aad-web-application/README.md index e99c7ae14..938be42f3 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-web-application/README.md +++ b/aad/spring-cloud-azure-starter-active-directory/aad-web-application/README.md @@ -86,6 +86,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: client-secret: tenant-id: @@ -135,6 +136,7 @@ spring: cloud: azure: active-directory: + enabled: true tenant-id: common ``` --- diff --git a/aad/spring-cloud-azure-starter-active-directory/aad-web-application/src/main/resources/application.yml b/aad/spring-cloud-azure-starter-active-directory/aad-web-application/src/main/resources/application.yml index 660fcd2f8..45b823cb5 100644 --- a/aad/spring-cloud-azure-starter-active-directory/aad-web-application/src/main/resources/application.yml +++ b/aad/spring-cloud-azure-starter-active-directory/aad-web-application/src/main/resources/application.yml @@ -5,6 +5,7 @@ spring: cloud: azure: active-directory: + enabled: true client-id: client-secret: tenant-id: