Structural updates
parent
e37683e1ed
commit
34e4cb14c4
|
@ -1,43 +1,43 @@
|
|||
This project is built on Spring 3.1 and Spring Security 3.1, making heavy use of the OAuth2 module of Spring Security OAuth (SECOAUTH). Wherever sensible, we have tried to make use of existing functionality in SECOAUTH, Spring, and Spring Security.
|
||||
This project (OIDC-JSS) is intended to be a standalone OpenID Connect Server. Extension and customization of this server can be accomplished by configuration through Spring configuration files, injected functionality through new Beans, and overlay of views and static resources (using Maven War Overlay or similar functionality).
|
||||
|
||||
This project tracks against the development version of SECOAUTH, which is included in the build directories as a Git submodule. This submodule must be initialized before the main project can be built. Once SECOAUTH stabilizes to sufficient point, this project will remove its submodule reference and instead use a Maven dependency.
|
||||
OIDC-JSS is built on Spring 3.1 and Spring Security 3.1, making heavy use of the OAuth2 module of Spring Security OAuth (SECOAUTH)*. Wherever sensible, we have tried to make use of existing functionality in SECOAUTH, Spring, and Spring Security. Because of this, much of the functionality of OIDC-JSS is hidden in Spring context configuration files and may not be readily apparent when examining the codebase. This architecture document will attempt to lay out which portions of the server implementation reside in our own code, and which portions are delegated to the SECOAUTH library.
|
||||
|
||||
This project is intended to be a standalone OpenID Connect Server. Extension and customization of this server can be accomplished by configuration through Spring configuration files, injected functionality through new Beans, and overlay of views and static resources (using Maven War Overlay or similar functionality).
|
||||
In addition, we have written a JWT library (which eventually should be moved outside of this project as a standalone library of its own). We are using this library extensively throughout our code such that all of our Access Tokens and ID Tokens are (optionally signed) JWTs.
|
||||
|
||||
We are using JPA with Eclipselink and external MySQL databases for token, client, and user data persistence.
|
||||
|
||||
There is a JWT library that handles serialization/deserialization and manipulation of JWTs. We have our own implementation of OAuth2AccessToken called OAuth2AccessTokenEntity which is backed by a JWT object and returns the serialized version of the JWT as the token's Value field.
|
||||
## Modules
|
||||
|
||||
The project uses a multi-level Maven and git repository sutrcture. The main project is split into the following modules:
|
||||
|
||||
Managing users:
|
||||
* openid-connect-common: common classes, service and repository interfaces, and JPA-annotated model code. The JWT library is currently included here, but will eventually be moved out as a separate, external library.
|
||||
* openid-connect-server: IdP/server implementation, includes implementations of services and repositories for use by server.
|
||||
* openid-connect-client: RP/client implementation, built around spring security filters.
|
||||
* spring-security-oauth: Git submodule that points to the Spring Security OAuth Git repository. Will be removed once a reliable milestone is reached upstream (see note above).
|
||||
|
||||
## User Management
|
||||
UserDetailsService - used by Spring Security's AuthenticationProvider to represent the current user (loads a user from a given user id)
|
||||
AuthenticationUserDetailsService - Used by Spring Security to load a user from an authentication token
|
||||
UserInfoRepository - repository of user information that is fed into the UserInfoEndpoint's service
|
||||
|
||||
Managing OAuth tokens:
|
||||
## Token Management
|
||||
AuthorizationServerTokenServices - provide tokens for the authorization server
|
||||
|
||||
Managing OAuth clients:
|
||||
## Client Management
|
||||
ClientDetailsService - provide OAuth client information (used for OpenID Connect Clients)
|
||||
|
||||
|
||||
|
||||
Modules
|
||||
-------
|
||||
|
||||
The project uses a multi-level Maven and git repository sutrcture. The main project is split into the following modules:
|
||||
|
||||
- openid-connect-common: common classes, service and repository interfaces, and model code. Also includes full JWT library.
|
||||
- openid-connect-server: IdP/server implementation, includes implementations of services and repositories for use by server.
|
||||
- openid-connect-client: RP/client implementation, built around spring security filters.
|
||||
- spring-security-oauth: Git submodule that points to the Spring Security OAuth Git repository. Will be removed once a reliable milestone is reached upstream (see note above).
|
||||
|
||||
|
||||
|
||||
Maven War Overlay
|
||||
-----------------
|
||||
## Maven War Overlay
|
||||
|
||||
One of the best ways to build a custom deployment of this system is to use the Maven War Overlay mechanism. In essence, you make a new Maven project with a "war" disposition and make it depend on the openid-connect-server module with the Maven Overlay plugin configured. Any files in your new project will be built and injected into the war from the other project. This action will also overwrite any existing files.
|
||||
|
||||
For instance, to overwrite the data source configuration in the main server war file, create a file named src/main/webapp/WEB-INF/data-context.xml that contains the dataSource bean. This file will completely replace the one that's in the originally built war.
|
||||
|
||||
|
||||
***
|
||||
|
||||
*We are currently tracking against the development version of SECOAUTH, which is included in the build directories as a Git submodule. This submodule must be initialized before the main project can be built (see Build Instructions for details). Once SECOAUTH stabilizes to sufficient point, we will instead use a Maven dependency against a specific milestone / release version.
|
||||
|
||||
***
|
||||
[old]
|
||||
|
||||
There is a JWT library that handles serialization/deserialization and manipulation of JWTs. We have our own implementation of OAuth2AccessToken called OAuth2AccessTokenEntity which is backed by a JWT object and returns the serialized version of the JWT as the token's Value field.
|
||||
|
|
Loading…
Reference in New Issue