Jason Ferguson.  “Vell, Jason’s just zis guy, you know?”  In the Air Force for 16.5 years  Two trips to Afghanistan ▪ Can say “get to work” and “get.

Slides:



Advertisements
Similar presentations
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
Advertisements

Apache Struts Technology
Web Application Security SSE USTC Qing Ding. Agenda General security issues Web-tier security requirements and schemes HTTP basic authentication based.
Authentication and Security Joshua Scotton.  Sessions  Login and Authentication.
Securing web applications using Java EE Dr Jim Briggs 1.
A Brief Introduction 2012 Spring Security. What is it? Security toolkit for Java applications Primarily intended for web applications Open Source from.
WEB2P security Java web application security Dr Jim Briggs.
Development of a Web Based B&B Reservation System Elizabeth Gates 22July04.
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Blackboard Building Blocks Authentication Overview Tuesday, June 30, 2015 Tom Joyce, Product Manager, Platform Architecture & Database.
Apache Struts Technology A MVC Framework for Java Web Applications.
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.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Java Enterprise Edition Java Web Development Structure of a web project Introduction to Web Applications The first project Introduction to Java Web Development.
UNIT-V The MVC architecture and Struts Framework.
CST JavaScript Validating Form Data with JavaScript.
03/07/08 © 2008 DSR and LDAP Authentication Avocent Technical Support.
Module 10: Designing an AD RMS Infrastructure in Windows Server 2008.
Spring Overview, Application demo -Midhila Paineni 09/23/2011 Spring Overview, Application demo9/8/20151.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Coppin State University Integration Strategies for PeopleSoft Enterprise Portal June 7, 2006 at 10:45 AM Portal 2006 Conference Gettysburg, PA.
WaveMaker Visual AJAX Studio 4.0 Training Authentication.
Copyright 2000 eMation SECURITY - Controlling Data Access with
COMP3121 E-Commerce Technologies Richard Henson University of Worcester November 2011.
Fall CIS 764 Database Systems Design L8. Web ….
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Spring Security Just meat, no feathers 10/17/12Frank Schmager (inetwork.com)
DEV-09: User Authentication in an OpenEdge™ 10.1 Distributed Computing Environment Michael Jacobs Development Architect.
JSTL Lec Umair©2006, All rights reserved JSTL (ni) Acronym of  JavaServer Pages Standard Tag Library JSTL (like JSP) is a specification, not an.
Shibboleth 2.0 IdP Training: Authentication January, 2009.
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.
Module 11: Securing a Microsoft ASP.NET Web Application.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
JSP Tag Libraries Lec Last Lecture Example We incorporated JavaBeans in “Course Outline” Example But still have to write java code inside java.jsp.
CSCI 6962: Server-side Design and Programming Java Server Faces Scoping and Session Handling.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Permissions Lesson 13. Skills Matrix Security Modes Maintaining data integrity involves creating users, controlling their access and limiting their ability.
PHP Secure Communications Web Technologies Computing Science Thompson Rivers University.
Jason Platts Lead Technical Developer The Open University An overview of how the Open University has incorporated bibliographic.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
Access control 2/18/2009. TOMCAT Security Model Declarative Security:  the expression of application security external to the application, and it allows.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
©SoftMoore ConsultingSlide 1 Filters. Filters can be used in a web application to intercept, examine, and possibly transform requests or responses associated.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
DEVELOPING ENTERPRISE APPLICATIONS USING EJB
Beavercreek High School BYOD Student Training: Wi-Fi Login and Authentication Portal.
15 Copyright © 2004, Oracle. All rights reserved. Adding JAAS Security to the Client.
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.
Web Application Design. Data –What data is available? –How do we store it or how is it stored in the DB? Schema Data types Etc. –Where is the data?
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
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()
Apache Struts Technology A MVC Framework for Java Web Applications.
BIT 286: Web Applications Lecture 04 : Thursday, January 15, 2015 ASP.Net MVC -
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
CS 562 Advanced Java and Internet Application Computer Warehouse Web Application By Team Alpha :-  Puja Mehta (102163)  Mona Nagpure (102147)
Chapter 5 Validating Form Data with JavaScript
Ask the Experts – Building Login-Based Sites in AEM
CS520 Web Programming Declarative Security (II)
CS5220 Advanced Topics in Web Programming Declarative Security
CollegeSource Security Application &
Registration, Login, Thymeleaf
CS520 Web Programming Declarative Security
CS520 Web Programming Spring – Inversion of Control
CS5220 Advanced Topics in Web Programming Secure REST API
Presentation transcript:

Jason Ferguson

 “Vell, Jason’s just zis guy, you know?”  In the Air Force for 16.5 years  Two trips to Afghanistan ▪ Can say “get to work” and “get in line” in Pashto and Dari  Java Programmer for 6 years  A military programming shop is NOTHING LIKE a commercial shop  12 weeks of training  Morning PT

 You’re familiar with Java  You’re at least somewhat familiar with Spring  You can read a Javadoc to get information I am not covering  You can create a database schema in the database of your choice and configure JDBC/Hibernate/whatever

 What Spring Security Is And What It Does  Core Concepts  Configuration  Developing With Spring Security  Method-Level Security  JSP Tag Libraries

 Core Security Filters  Majority of the Security Namespace  Session Management

 Provides Enterprise-Level Authentication and Authorization Services  Authentication is based on implementation of GrantedAuthority interface  Usually “ROLE_USER”,”ROLE_ADMIN”, etc  Authorization is based on Access Control List  Don’t have time to cover tonight

 Simple answer: “just about any”  Unless you’re “weird”  Types:  Simple Form-Based  HTTP Basic and Digest  LDAP  X.509 Client Certificate  OpenID  Etc, etc.

 Originally was the ACEGI project  Configuration was “death by XML”  Project lead liked it that way  ACEGI was rebranded as “Spring Security” around the Spring 2.0 release  With the Security Namespace and as additional modules became available, death by XML gave way to Configuration By Convention

 Authentication is the equivalent of logging in with a username and password  Based on that username/password, an access control mechanism allows or disallows the user to perform certain tasks  Authorization is the equivalent of an Access Control List (ACL)  An AccessDecisionManager decides to allow/disallow access to a secure object based on the Authentication

 Authentication represents the principal (person logging into the application)  GrantedAuthority – what permissions the principal has  SecurityContext holds the Authentication  SecurityContextHolder provides access to the SecurityContext

 UserDetails provides information to build an Authentication  UserDetailsService creates a UserDetails object from a passed String

 Add following to dependencies to pom.xml:  spring-security-core  spring-security-web  spring-security-config  Optional dependencies:  spring-security-taglibs  spring-security-ldap  spring-security-acl  spring-security-cas-client  spring-security-openid

 The “simple” schema: create table users( username varchar_ignorecase(50) not null primary key, password varchar_ignorecase(50) not null, enabled boolean not null ); create table authorities ( username varchar_ignorecase(50) not null, authority varchar_ignorecase(50) not null, constraint fk_authorities_users foreign key(username) references users(username)); create unique index ix_auth_username on authorities (username,authority);

 Add to web.xml: springSecurityFilterChain org.springframework.web.filter.DelegatingFilt erProxy springSecurityFilterChain /*

 Specifying the Security Namespace : <beans xmlns=" xmlns:xsi=" xmlns:context=" xmlns:security=" xsi:schemaLocation=" xsd context-3.0.xsd security-3.0.xsd">

 Web Security enabled via tag:  // blah blah we’ll get to this later

 Simplest way: create a class that implements UserDetailsService interface, then use it as the authentication provider 

 Common Expressions:  hasRole(rolename)  hasAnyRole(rolename, rolename,…)  isAuthenticated()  isFullyAuthenticated()  permitAll()

 Securing By URL uses the tag:  Pattern is the URL to secure, access is the expression to use to secure the URL

 An individual user is represented by a UserDetails Object  API Link API Link  Sample Implementation of User object

 UserDetailsService implementations do one thing: return a UserDetails implementation  API Link API Link  Sample Implementation of UserDetailsService

 Form-based login is most common (really?)  Uses the tag  Attributes:  login-page specifies name of custom login page ▪ Generated automagically if we don’t create our own  login-processing-url specifies URL to process the login action  JSP default uses “j_username” and “j_password” fields

 Steps to implement hashing/salting:  Create a tag within the tag ▪ MD5 or SHA-1: use the hash=“md5” or hash=“sha” attribute ▪ Stronger SHA: ▪ Create a bean named “saltSource” with a class of org.springframework.security.providers.encoding.ShaPasswordEncoder ▪ Use a with XXX being the higher strength  Use tag within to specify user property to user for hashing

 One problem: need a specific tag specifically for the login page, or the login page will be secured as well  Creates an infinite loop in the logs  Example:

 Full support for LDAP authentication  Process overview:  Obtain DN from username  Authenticate User  Load GrantedAuthority collection for user

 LDAP Test Server  Authentication Provider:  Security Context Source  Bean with class org.springframework.security.ldap.DefaultSpringSecurityContextSource  Constructor argument for LDAP server address  Properties for userDn and password

 Create a bean named “contextSource” with a class of org.springframework.security.ld ap.DefaultSpringSecurityContext Source  Pass the server as a constructor argument  Pass userDn and password as properties

 Create a bean named “ldapAuthProvider” of class org.springframework.security.ldap.authent ication.LdapAuthenticationProvider  Create a constructor argument of a bean w/ class org.springframework.security.ldap.authent ication.BindAuthenticator  Constructor argument of the context source  Property “ userDnPatterns ”: list of userDn “wildcards”  Continued…

 Create another constructor argument bean of class org.springframework.security.ldap.userdetail s.DefaultLdapAuthoritiesPopulator  Constructor arg of the context source  Constructor arg w/ the value “ou=groups”  Property “groupRoleAttribute” w/ value “ou”

uid={0},ou=people

 Using a X.509 client certificate is simple: 

 Spring Security can secure methods at the service layer  Application Context configuration:  Methods are Secured With annotation

 Used with Domain Object (ACL) security  Filters a returned collection based on a given expression (hasRole(), etc)

 Spring Security Provides a Tag Library for accessing the SecurityContext and using security constraints in JSPs  What can it do?  Restrict display of certain content by GrantedAuthority

 Declaration in JSP:

 The tag is used to restrict the display of content based on GrantedAuthority  Example: Admin Menu

 used to access the current Authentication object in the Security Context   display content based on permissions granted to a Domain Object 