Spring Cloud Security security role
Spring Cloud Security offers a range of original functions for applications and services easily build security. Declarative model can be configured in a large number of external (or centralized) contribute to large-scale collaborative remote components of the system, such systems usually have a central identity management services. It's also very easy to use Cloud Foundry platform in the German wind house. Based on Springboot and Spring Security OAuth2 we can quickly create a single sign-on as possible, relay token, token exchange system so common modules.
Spring Cloud Security of use
Spring Cloud Security by using OAuth2 to a single endpoint protection
<!-- oauth2相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
</dependency>
OAuth2 running processes
(A) after opening the user client, the client asks the user to give authorization.
(B) the user agrees to give the client authorization.
(C) The client uses the authorization obtained in the previous step, to the authentication server application token.
After (D) authentication server to authenticate the client, confirmation, agreed to release the token.
(E) The client token, apply to the resource server access to resources.
(F) confirmed that the token is correct server resources, agreed to open the resource to the client.
Reference material
"Spring Security record realization of the principle of understanding"
"OAuth2.0 principle of the process and its single sign-on and access control."