-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new test module: azure-spring-boot-test-aad-resource-server #18412
Merged
chenrujun
merged 24 commits into
Azure:master
from
chenrujun:create-new-test-module-azure-spring-boot-test-aad-resource-server
Jan 6, 2021
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6b5ba65
1. Add new test module: azure-spring-boot-test-aad-resource-server.
rujche ce9e0be
Update the required dependency about oauth2-client and oauth2-resourc…
rujche ef72cd1
Delete duplicated codes in aad integration test modules.
rujche 103ae2e
Merge branch 'master' into create-new-test-module-azure-spring-boot-t…
rujche fc01b83
Update azure-spring-boot-starter-active-directory's version to 3.0.0.
rujche 9fdfa9d
Move aad test utils to azure-spring-boot-test-core.
rujche 8b21823
Move AADOauth2ROPCGrantClientIT to azure-spring-boot-test-core.
rujche f8052e2
Delete unused java class: OAuthResponse.
rujche 03bc2a1
Change package name in azure-spring-boot-test-core.
rujche f8911dc
Change dependency order to make it easier to read.
rujche 728a4a4
Add "test" scope for test dependencies.
rujche 5552e87
Move filter related test into a new module: azure-spring-boot-test-aa…
rujche 05cf1a1
Rename azure-spring-boot-sample-active-directory-resource-server-with…
rujche f62f82f
Rename azure-spring-boot-sample-active-directory-resource-server-stat…
rujche ab7507f
No logic change, just sort lines.
rujche 86e0b44
Add 2 new artifacts: azure-spring-boot-test-aad-resource-server and a…
rujche 9256036
1. Move "HOW_TO_RUN_AAD_INTEGRATION_TEST_IN_LOCALHOST.md" to "sdk/spr…
rujche bc341c2
Test AADAuthenticationFilter by cookie.
rujche 8b50570
Add azure-spring-boot-test-aad-resource-server-by-filter in version_c…
rujche 3e66ff7
No logic change, just rename method.
rujche ac55d12
Merge branch 'master' into create-new-test-module-azure-spring-boot-t…
rujche 6d13cba
Fix version error.
rujche b569480
Fix version error.
rujche 8668378
Fix error in AADAuthenticationFilterIT.
rujche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ With Spring Starter for Azure Active Directory, now you can get started quickly | |
* **Create a client secret key for the application**: Go to API ACCESS - Keys to create a secret key (`client-secret`). | ||
|
||
### Include the package | ||
To use this starter in an web application, please add following packages: | ||
To use this starter in a web application, please add following packages: | ||
|
||
[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}" | ||
```xml | ||
|
@@ -26,13 +26,13 @@ To use this starter in an web application, please add following packages: | |
<version>3.2.0-beta.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-oauth2-client</artifactId> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-oauth2-client</artifactId> | ||
</dependency> | ||
``` | ||
[//]: # "{x-version-update-end}" | ||
|
||
To use this starter in a resource server, please add following packages: | ||
To use this starter in a resource server without OBO function, please add following packages: | ||
|
||
[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}" | ||
```xml | ||
|
@@ -42,12 +42,28 @@ To use this starter in a resource server, please add following packages: | |
<version>3.2.0-beta.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-oauth2-client</artifactId> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId> | ||
</dependency> | ||
``` | ||
[//]: # "{x-version-update-end}" | ||
|
||
To use this starter in a resource server with OBO function, please add following packages: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dependency is different between |
||
|
||
[//]: # "{x-version-update-start;com.azure.spring:azure-spring-boot-starter-active-directory;current}" | ||
```xml | ||
<dependency> | ||
<groupId>com.azure.spring</groupId> | ||
<artifactId>azure-spring-boot-starter-active-directory</artifactId> | ||
<version>3.0.0-beta.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-oauth2-resource-server</artifactId> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-oauth2-client</artifactId> | ||
chenrujun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</dependency> | ||
``` | ||
[//]: # "{x-version-update-end}" | ||
|
@@ -299,7 +315,7 @@ azure: | |
``` | ||
|
||
### Authenticate in web APIs [Web APIs] | ||
Please refer to [azure-spring-boot-sample-active-directory-resource-server-with-filter] for how to integrate Spring Security and Azure AD for authentication and authorization in a Single Page Application (SPA) scenario. | ||
Please refer to [azure-spring-boot-sample-active-directory-resource-server-by-filter] for how to integrate Spring Security and Azure AD for authentication and authorization in a Single Page Application (SPA) scenario. | ||
|
||
#### Configure application.yml: | ||
```yaml | ||
|
@@ -402,7 +418,7 @@ The following section provides sample projects illustrating how to use the start | |
- [Azure Active Directory for Web apps][azure-spring-boot-sample-active-directory-webapp] | ||
- [Azure Active Directory for Web APIs][azure-spring-boot-sample-active-directory-resource-server] | ||
- [Azure Active Directory for On-Behalf-Of flow][azure-spring-boot-sample-active-directory-resource-server-obo] | ||
- [Azure Active Directory for Resource Server with Filter(Deprecated)][azure-spring-boot-sample-active-directory-resource-server-with-filter] | ||
- [Azure Active Directory for Resource Server by Filter(Deprecated)][azure-spring-boot-sample-active-directory-resource-server-by-filter] | ||
|
||
## Contributing | ||
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. | ||
|
@@ -414,7 +430,7 @@ Please follow [instructions here] to build from source or contribute. | |
[azure-spring-boot-sample-active-directory-webapp]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp | ||
[azure-spring-boot-sample-active-directory-resource-server]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/README.md | ||
[azure-spring-boot-sample-active-directory-resource-server-obo]: https://github.com/ZhuXiaoBing-cn/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo | ||
[azure-spring-boot-sample-active-directory-resource-server-with-filter]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-with-filter | ||
[azure-spring-boot-sample-active-directory-resource-server-by-filter]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter | ||
[AAD App Roles feature]: https://docs.microsoft.com/azure/architecture/multitenant-identity/app-roles#roles-using-azure-ad-app-roles | ||
[client credentials grant flow]: https://docs.microsoft.com/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow | ||
[configured in your manifest]: https://docs.microsoft.com/azure/active-directory/develop/howto-add-app-roles-in-azure-ad-apps#examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yiliuTo ,
(cc: @saragluna , @backwind1233 , FYI)
we should use
xxx-starter
instead ofxxx
, becausexxx-starter
can include other necessary dependencies. Likespring-security-oauth2-jose
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @wujack778.