Ask the Experts – Building Login-Based Sites in AEM

Slides:



Advertisements
Similar presentations
MFA for Business Banking – Security Code Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing these QT sheets.
Advertisements

Suchin Rengan Principal Technical Architect Salesforce.com
Implementing Tableau Server in an Enterprise Environment
Different Approaches to Single-Sign-On Jeff Kahn, Verbena Consulting.
OAuth 2.0 By “PJ” (JP on meetup.com) iOS and PHP developer, and occasional lawyer Contact me via:
UAG Authentication and Authorization- part1
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
SharePoint 2010 Business Productivity: What's new for Developers in Microsoft SharePoint 2010 Matthew McDermott, MVP Aptillon, Able Blue
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Managing Identity and Permissions
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Building Secure Applications.
Authenticating REST/Mobile clients using LDAP and OERealm
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
1 ASP.NET SECURITY Presenter: Van Nguyen. 2 Introduction Security is an integral part of any Web-based application. Understanding ASP.NET security will.
Copyright 2007, Information Builders. Slide 1 WebFOCUS Authentication Mark Nesson, Vashti Ragoonath Information Builders Summit 2008 User Conference June.
Session 11: Security with ASP.NET
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Survey of Identity Repository Security Models JSR 351, Sep 2012.
RECALL THE MAIN COMPONENTS OF KIM Functional User Interfaces We just looked at these Reference Implementation We will talk about these later Service Interface.
Integrating with UCSF’s Shibboleth system
TNC2004 Rhodes 1 Authentication and access control in Sympa mailing list manager Serge Aumont & Olivier Salaün May 2004.
Copyright ©2012 Ping Identity Corporation. All rights reserved.1.
SSL, Single Sign On, and External Authentication Presented By Jeff Kelley April 12, 2005.
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
Feedback #2 (under assignments) Lecture Code:
TWSd - Security Workshop Part I of III T302 Tuesday, 4/20/2010 TWS Distributed & Mainframe User Education April 18-21, 2010  Carefree Resort  Carefree,
SharePoint Security Fundamentals Introduction to Claims-based Security Configuring Claims-based Security Development Opportunities.
Shibboleth 2.0 IdP Training: Authentication January, 2009.
CAS Lightning Talk Jasig-Sakai 2012 Tuesday June 12th 2012 Atlanta, GA Andrew Petro - Unicon, Inc.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Module 11: Securing a Microsoft ASP.NET Web Application.
Using Enterprise Logins in Portal for ArcGIS via SAML Greg Ponto & Tom Shippee.
2/26/021 Pegasus Security Architecture Author: Nag Boranna Hewlett-Packard Company.
SSO Case Study Suchin Rengan Principal Technical Architect Salesforce.com.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Access control 2/18/2009. TOMCAT Security Model Declarative Security:  the expression of application security external to the application, and it allows.
The OWASP Foundation guarding your applications Koen Vanderloock
ICM – API Server & Forms Gary Ratcliffe.
Securing Angular Apps Brian Noyes
15 Copyright © 2004, Oracle. All rights reserved. Adding JAAS Security to the Client.
Securing Web Applications Lesson 4B / Slide 1 of 34 J2EE Web Components Pre-assessment Questions 1. Identify the correct return type returned by the doStartTag()
COOKIES AND SESSIONS.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
#SummitNow Consuming OAuth Services in Alfresco Share Alfresco Summit 2013 Will Abson
Unlocking the Secrets of Alfresco Authentication Mehdi BELMEKKI, Consultancy Team Alfresco.
Justin Scheitlin Daisey Fahringer
Alain Bethuyne Web Security Architect BNPParibas Fortis
Cookies Tutorial Cavisson Systems Inc..
562: Power of Single Sign-On in OpenEdge
Security In your webSite.
Consuming OAuth Services in Alfresco Share
Single Sign-On Led by Terrice McClain, Jen Paulin, & Leighton Wingerd
Node.js Express Web Applications
Authentication & .htaccess
Beyond the BDC\BCS Model
Data Virtualization Tutorial… OAuth Example using Google Sheets
Prime Service Catalog 12.0 SAML 2.0 Single Sign-On Support
Radius, LDAP, Radius used in Authenticating Users
Creating Novell Portal Services Gadgets: An Architectural Overview
SSOScan: Automated Testing of Web Applications for Single Sign-On Vulnerabilities Yuchen Zhou, and David Evans 23rd USENIX Security Symposium, August,
To Join the Teleconference
Controllers.
Configuring Internet-related services
Authorization in Asp.Net Core
Central Authentication Service
SharePoint Online Authentication Patterns
Saravana Kumar CEO/Founder - Kovai Atomic Scope – Product Update.
Technical Integration Guide
Presentation transcript:

Ask the Experts – Building Login-Based Sites in AEM Justin Edelson | AEM Evangelist

Agenda Overview of AEM (Sling) Security Architecture Adding Login Adding Security Adding Personalization

The Players Authentication in AEM is a collaboration between three players: Sling Authentication interacts with the user’s HTTP request LoginModules validate credentials Repository Access Control determines if an action is allowed Developing AEM applications requires understanding all of these.

Sling Authentication Every request*… * With some exceptions

Sling Authentication – AuthenticationHandler Each AuthenticationHandler can be assigned a path prefix. In practice, most of the time, the path is / AuthenticationHandlers are ordered based on service ranking For extractCredentials() – first non-null result wins For requestCredentials() – first true response wins For dropCredentials() – all handlers are called There is also a optional AuthenticationFeedbackHandler interface which AuthenticationHandler can implement to… get feedback.

OOTB AuthenticationHandlers HttpBasicAuthenticationHandler Handles HTTP Basic Authentication CQ LoginSelectorHandler Handles path-specific login page redirects CRX TokenAuthenticationHandler Handles form based login and token cookies Granite OAuth Bearer AuthenticationHandler Facebook, Twitter, supported OOTB; others possible SAML Authentication Handler Supports SAML 2.0 SSO Authentication Handler Generic SSO Support – cookies, headers, parameters

Is Anonymous Access Allowed? By default: Author – no Publish – yes Exceptions defined two ways: Configuration of the SlingAuthenticator OSGi component Don’t reconfigure this. Just be aware. Every OSGi service can have a sling.auth.requirements property For example, to allow anonymous access to /mypath @Property(name=“sling.auth.requirements” value=“-/mypath”) See /system/console/slingauth for the current aggregated configuration

LoginModule A LoginModule is responsible for validating credentials. Defined by the JAAS specification. Multiple LoginModules can be configured. By default, AEM uses a single LoginModule Authenticates against the repository. For CRX2: Jackrabbit provides a base AbstractLoginModule specifically for working with Jackrabbit/CRX. Read: http://bit.ly/18blUI2 For Oak: Generally, you’ll use the new ExternalLoginModule by implementing External Identity Provider Note: Sling includes something called a LoginModulePlugin. Don’t use this. It was a bad idea and doesn’t work.

Token Authentication As part of login, CRX’s default LoginModule creates tokens in the repository which enables cookie- based login on subsequent requests. These tokens are stored in the repository, e.g. /home/users/a/admin/.tokens This is NOT the same as “Remember Me”. Tokens Expire: Cookies are session-bound. Tokens in the repository have an expiration date and are purged. Tokens present challenges with clustering. Login Request -> master, writes token to repository Request #2 (with login-token cookie) -> slave, tries to read token Fails if slave hasn’t sync’d yet

JCR Access Control ACLs are an integral part of the repository In JCR not only the enforcement is specified, but also APIs to modify ACLs. Privileges include read, modify, create, remove, readAccessControl, writeAccessControl, and more.. Custom privileges are also possible. Example: AEM Replication ACL inheritance by path For all JCR API calls the ACLs are considered when returning the results: A JCR session is created for a specific user Only readable nodes are returned in “node.getNodes()” A search result only contains nodes visible to that user.

Do I Need To Write an AuthenticationHandler? If… You need to support some custom type of credentials You need SSO and you don’t support SAML 2.0. You need SSO and your SSO system can’t work with the SSO Authentication Handler. This can happen when the header is encrypted in some way. Think about using a Filter instead of reimplementing the SSO Authentication Handler. You need to support “Remember Me”

Do I Need To Write a LoginModule (or External Identity Provider)? If… You need to integrate with an external identity provider at the credentials level. For example: LDAP (except this is supported out of the box) You need custom authentication for CRX DE Lite, CRX Explorer, or OSGi Console These systems generally do not support Sling AuthenticationHandler. You need custom authentication for WebDAV or Adobe Drive These only support basic authentication. You need custom authentication for another JCR client application This will probably never be the case

“Live” Coding

Live Coding Based on AEM 6.0 SP2; tested on 5.6.1 Written in JSP Users exist already Users are local Using Form Based Login

Form Based Login Logging in via a form requires two parameters: j_username - username j_password – password POST to <anything>/j_security_check And two optional parameters: resource – the path to redirect to on a successful login j_validate– used for Ajax logins

Let’s Do This!

Resources Code: http://bit.ly/aem-ate-login-code Permission Sensitive Caching Docs: http://adobe.ly/1vSCs3v Sling Authentication Docs: http://bit.ly/1zl0e3Z Oak External Login Module Docs: http://bit.ly/1FnkNUw