Dependencies
provided in the WebAdmin starter, so include it explicitly.
Configuration
Enable the mode, then configure the OAuth2 client with standard Spring Security OAuth2 properties. The example below mirrors the demo’s Keycloak setup (realmaseeflow, externalized under a keycloak: block so the URLs and client secret can be overridden with environment variables):
keycloak registration/provider IDs are arbitrary labels — use whatever matches your provider. The realm here is aseeflow; change it to your own realm.
These values are for local testing — a Keycloak at
localhost:9000 and the demo aseeflow realm and client. For production, point at your own provider and realm, and supply the client secret via an environment variable. See Security./engine-rest activates only when spring.security.oauth2.resourceserver.jwt.issuer-uri is set (the resourceserver block above) — omit that block to make REST session-only (the SPA still works over the SSO session). The group-name-attribute claim usually has to be added on the provider so it appears in the token.
How it works
Unauthenticated UI requests are redirected to the provider; after login, the access token authorizes subsequent UI and REST requests. REST endpoints (/engine-rest/**) are protected by default (set disable-rest-security: true to disable — only when REST is secured elsewhere; see consequences). Logout is handled by the provider’s logout flow.
When to use it
OAuth2 suits enterprise applications with centralized identity management and integration with providers such as Keycloak, Auth0, or Okta. For deep Keycloak integration with user/group synchronization, use Keycloak authentication instead.Properties
Login behavior and REST token validation derive from the standard
spring.security.oauth2.client.registration.<id>.* and spring.security.oauth2.client.provider.<id>.* properties — see the Spring Boot OAuth2 reference for the full set.