Atlantis is a POC aiming at demonstrating the possible use of Spring Authorization as a replacement of Connect Auth.
Spring Authorization Server. It requires a local mysql database atlantis.
Port: 8080
Two clients are available. (uncomment code in schema.sql to add these clients in the database)
- gateway
- code authorization with PKCS flow used by the gateway
- secret is gatewaysecret
- bar
- client credential flow. user by Bar Server.
- secret is barsecret
Two users are available. (uncomment code in schema.sql to add these users in the database)
- user
- secret is password
- admin
- secret is password
Two Resource Servers are available. These two servers require authentication and use the Atlantis Authorization Server as provider.
Foo Server handles Foo resource
Port: 8081
Bar Server handles Bar resource. Bar server is a client of Foo Server
Port: 8082
Spring Cloud Gateway. Used for BFF pattern.
BFF aims at hiding the OAuth2 tokens from the browser. In this pattern, rich applications (Angular, React, Vue, etc.) are secured with sessions on a middle-ware, the BFF, which is the only OAuth2 client and replaces session cookie with an access-token before forwarding a request to the resource-server.
When a browser application first tries to access REST resources:
- the BFF redirects the user to the authorization-server
- the user authenticates
- the authorization-server redirects back to the BFF with an authorization code
- the BFF fetches OAuth2 tokens from the authorization-server and stores it in session
- the BFF forwards the initial request to the resource-server with the access-token as Authorization header
spring-projects/spring-authorization-server#297 (comment)
Port: 8083
Front End application consumes Foo and Bar APIs through the gateway.
Port: 4200
Front-end application itself must be accessed through the gateway.
mvn clean install
npm install
ng serve front-end
Run all services starting with the authorization service
mvn spring-boot:run -f authorization-server
mvn spring-boot:run -f bar-resource-server
mvn spring-boot:run -f foo-resource-server
mvn spring-boot:run -f gateway
Access UI through the gateway. http://127.0.0.1:8083
Connect as user or admin
- FQDN filter
- Locked Account after X attempts