Showing posts with label sso. Show all posts
Showing posts with label sso. Show all posts

Tuesday, June 14, 2016

How to connect OpenAM and Spring Security to do Single Sign On (SSO)?

There is a list of previous steps for doing SSO between a Web app and OpenAm and the most important things are:
  1.  Start OpenAM and well configurated server.
  2.  Create users and specificate the rol names.
  3.  Install agentapp inside webserver
  4.  Execute agentadmin to create a policy between webapp and openam.
All those steps require some time, in the application context we need to do some configuration in context for conclude AAA, Authentication is taking for OpenAM, Authorization is given by Spring Security and OpenAM interconnection and Accounting is doing for WebApp when it asign the corresponding roles and access to the client (by now we are going to do some federation), so here the short list of configuration for doing with Spring security:

1. First required artifact in the app:

2. Start spring context with spring security:

3. The most import part filters and connection to retry OpenAM config:

4. Create the shared cookie:

5. The amconfig properties to taking url, user and password

For the application is kind of simple for just federate permissions between components.

Important link: