LDS Account and the Java Stack
Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites: – Basic Java knowledge – Basic Spring knowledge
History Historically each application handled authentication as a one off – Troublesome for users (many credentials to remember) – User information duplicated over and over throughout the enterprise – Difficult to get user information at all Screaming for consolidation and a single, central solution
LDS Account "LDS Account is a single user name and password for any person who interacts with online LDS Church resources. LDS Account is the primary account authentication credentials for most Church sites and applications. It reduces development costs that would be incurred as the user interfaces change, or as upgrades to security and the registration process are required. Unlike previous authentication systems, LDS Account is a branded single sign-on solution that is centrally managed at ldsaccount.lds.org."
LDS Account (cont.) "LDS Account has become the key to accessing all the resources the Church has to offer, such as family history tools, ward and stake websites, employment resources, and more.... The idea is to have only one username and password that you can use with all password-protected websites the Church has."
What is LDS Account? LDS Account is meant to be the single source for user authentication and basic user information LDS Account is implemented with LDAP LDS Account is an application for maintaining user attributes
LDS Account Uses LDAP Lightweight Directory Access Protocol Distributed directory of information – Much like a database – Not queried with SQL – For further information about the Directory structure, please see the corresponding section at: Access_Protocol LDS Account = LDAP WAM = Single Sign-on
User Details LDS Account also provides user information – User details – User details can be exposed through LDAP attributes WAM headers SAML attributes
LDS Account User Details Integration The LDS Account module acts as a Java model for LDS Account information LdsAccountDetails.java is the abstraction layer for LDS Account user details integration Factories generate LdsAccountDetails object for each user – Factories handle the different formats in which the raw user details attributes are provide to the application LDAP attributes, WAM headers, SAML, …
Lab 1 _-_Part_1#Lab_1
LDS Account Spring Security Integration
Authentication vs. Authorization Authentication - "you are who you say you are" – Identification of an individual user of the application – Credential-based authentication Authorization - "you have appropriate permissions to perform the operation you are attempting" – Availability of functionality and data to users who are authorized (or allowed) to access it – ication_vs._authorization
Spring Security Spring Security is a highly customizable and pluggable enterprise authentication / authorization security framework – Provides tools for managing application access (authentication) – Rules for what users can access what url (authorization) – Securing methods (authorization),... Overcomes lack of depth in J2EE Servlet Specification Further information can be found here: security/site/docs/3.1.x/reference/springsecurity- single.html
Spring Security (authentication) Spring comes with many pluggable authentication providers – Support provided for authenticating with: LDAP X.509 (Certificates) Databases (JDBC) JAAS OAuth HTTP BASIC Form-based …
Spring Security Authentication Manager Basic configuration: In memory authentication provider configuration (applicationContext.xml)...
Spring Security Configuration Configure filter in web.xml Configure applicationContext.xml springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy springSecurityFilterChain /*
Demo
Spring Security/LDS Account Integration LDS Account authentication provider hooks into Spring Security In-memory implementation Namespace handlers simplify the configuration sites/stack/module.html?module=lds- account/stack-lds-account- spring/index.html#LDAP_Global_Directory_Auth entication
Spring Security/In-memory Authentication In-memory authentication provides quick setup Useful for testing sites/stack/module.html?module=lds- account/stack-lds-account- spring/index.html#In_Memory_Authentication
Access LdsAccountDetails Through injection Through static private LdsAccountDetails ldsAccountDetails; LdsAccountDetails ldsAccountDetails = ((LdsAccountUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getLdsAccountDetails();
Demo
Lab 2 _-_Part_1#Lab_2
Conclusion Draw your own
Credit Where Credit is Due security/site/docs/3.1.x/reference/springsecurity -single.html Spring Security 3 – by Peter Mularien