Mobile Security Jump Start. Wayne Henshaw & Mike Jacobs Progress OpenEdge October 8, 2013



Similar documents
Debugging Mobile Apps

Advanced OpenEdge REST/Mobile Security

Progress OpenEdge REST

Ricardo Perdigao, Solutions Architect Edsel Garcia, Principal Software Engineer Jean Munro, Senior Systems Engineer Dan Mitchell, Principal Systems

ACCESSING THE PROGRESS OPENEDGE APPSERVER FROM PROGRESS ROLLBASE USING JSDO CODE

Configuration Guide. BES12 Cloud

From the Intranet to Mobile. By Divya Mehra and Stian Thorgersen

Business Applications for a Mobile World

Authenticating REST services in OpenEdge

Configuration Guide BES12. Version 12.3

Getting Started with Clearlogin A Guide for Administrators V1.01

Crawl Proxy Installation and Configuration Guide

SSO Plugin. Authentication service for HP, Kinetic, Jasper, SAP and CA products. J System Solutions. JSS SSO Plugin Authentication service

SSO Plugin. HP Service Request Catalog. J System Solutions. Version 3.6

TROUBLESHOOTING RSA ACCESS MANAGER SINGLE SIGN-ON FOR WEB-BASED APPLICATIONS

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

Configuration Guide BES12. Version 12.2

Working with Indicee Elements

VMware Identity Manager Connector Installation and Configuration

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

A Guide to New Features in Propalms OneGate 4.0

INUVIKA OPEN VIRTUAL DESKTOP ENTERPRISE

OneLogin Integration User Guide

Fairsail. Implementer. Single Sign-On with Fairsail and Microsoft Active Directory Federation Services 2.0. Version 1.92 FS-SSO-XXX-IG R001.

Centrify Mobile Authentication Services

Gateway Apps - Security Summary SECURITY SUMMARY

Configure Single Sign on Between Domino and WPS

File Share Navigator Online 1

AVG Business SSO Partner Getting Started Guide

XEN Web Portal Instructions

USG40HE Content Filter Customization

Use Enterprise SSO as the Credential Server for Protected Sites

Configuration Guide. BlackBerry Enterprise Service 12. Version 12.0

vcommander will use SSL and session-based authentication to secure REST web services.

Configuration Guide BES12. Version 12.1

BlackBerry Enterprise Service 10. Version: Configuration Guide

Administering Jive for Outlook

Medstar Health Dell Services

Samsung KNOX EMM Authentication Services. SDK Quick Start Guide

M86 Web Filter USER GUIDE for M86 Mobile Security Client. Software Version: Document Version:

SSO Plugin. Authentication service for HP, Kinetic, Jasper, SAP and CA products. J System Solutions. Page 1 of 23.

CA Performance Center

esoc SSA DC-I Part 1 - Single Sign-On and Access Management ICD

Certified Selenium Professional VS-1083

VMware vcenter Support Assistant 5.1.1

Creating a generic user-password application profile

Securing access to Citrix applications using Citrix Secure Gateway and SafeWord. PremierAccess. App Note. December 2001

Portal Instructions for Mac

Configuring Single Sign-on for WebVPN

CERTIFICATE-BASED SSO FOR MYDOCUMENTUM OUTLOOK WITH IBM TAM WEBSEAL

Siteminder Integration Guide

Course MS55077A Project Server 2013 Development. Length: 5 Days

SSO Plugin. J System Solutions. Upgrading SSO Plugin 3x to 4x - BMC AR System & Mid Tier.

SSO Plugin. J System Solutions. Troubleshooting SSO Plugin - BMC AR System & Mid Tier.

Configuring Single Sign-On from the VMware Identity Manager Service to Office 365

Cloud Powered Mobile Apps with Azure

2013 ACT Special Study Learn to Administer the ACT Aspire Online Test

Adobe Marketing Cloud Bloodhound for Mac 3.0

SSL VPN Server Guide. Access Manager 3.2 SP2. June 2013

OpenAM. 1 open source 1 community experience distilled. Single Sign-On (SSO) tool for securing your web. applications in a fast and easy way

Check list for web developers

Configuration Guide - OneDesk to SalesForce Connector

MaaS360 Mobile Enterprise Gateway

How Simple Is It To Develop a Mobile App? Uma Sudhan OpenEdge Developer 7 th Oct 2013

SINGLE SIGN-ON FOR MTWEB

Acrolinx IQ. Acrolinx IQ Plug-in for Adobe CQ Rich Text Editor Installation Guide Version: 2.9

BASELINE SECURITY TEST PLAN FOR EDUCATIONAL WEB AND MOBILE APPLICATIONS

MaaS360 Mobile Enterprise Gateway

ShoreTel Advanced Applications Web Utilities

IIS, FTP Server and Windows

Pacific Application Server for OpenEdge: Getting Started. Progress OpenEdge 11.5 Workshop

Introduction to the AirWatch Browser Guide

Configuring IBM Cognos Controller 8 to use Single Sign- On

BlackBerry Enterprise Service 10. Universal Device Service Version: Administration Guide

Centrify Mobile Authentication Services for Samsung KNOX

Instructions for Configuring Your Browser Settings and Online Security FAQ s. ios8 Settings for iphone and ipad app

Administration Guide imanager April 30, 2012

Sale Grammar School Remote Desktop Services User Instructions

Mobile Admin Security

Media Server Installation & Administration Guide

Weston Public Schools Virtual Desktop Access Instructions

Reference Guide for WebCDM Application 2013 CEICData. All rights reserved.

SSL VPN Server Guide Access Manager 3.1 SP5 January 2013

Net 2. NetApp Electronic Library. User Guide for Net 2 Client Version 6.0a

Phone: Fax: Box: 230

CA Spectrum and CA Embedded Entitlements Manager

PassKey Manager. Schoolwires Centricity

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP Edge Gateway for Layered Security and Acceleration Services

VMware Software Manager - Download Service User's Guide

MultiSite Manager. User Guide

Web Application Vulnerability Testing with Nessus

Advanced Administration

BlackBerry Business Cloud Services. Administration Guide

SSO Plugin. Troubleshooting. J System Solutions. Version 3.4

Reverse Proxy Scenarios for Single Sign-On

Criteria for web application security check. Version

SchoolBooking SSO Integration Guide

2 Downloading Access Manager 3.1 SP4 IR1

Version 3.2 Release Note. V3.2 Release Note

Transcription:

Mobile Security Jump Start Wayne Henshaw & Mike Jacobs Progress OpenEdge October 8, 2013

Agenda Architectural basics REST service Mobile client Making required choices Authentication model User sessions AppServer SSO Diving into the code REST service Mobile client What to do when things go sideways 2

Some Assembly Required... OpenEdge (OE) Web applications provide the starting point for your application s security New in Mobile & REST services you will configure and use these security layers Web server ( i.e. Tomcat 7+ ) 1. Everything will use SSL/TLS for web application s client to web server 2. Web server [login] session management 3. Web server or Mobile/REST web application user authentication 4. Mobile/REST web application role-based authorization to HTTP resources OpenEdge AppServer 1. OpenEdge AppServer for application level authorization 3

Web Application Security Goals Your web application will be probed by hackers & bots within 60 seconds Design and build security into my web application from day 1 Use strong perimeter security before accessing business servers Use OWASP web application security guidelines (www.owasp.org) Use strong, peer reviewed, industry security technologies Push identity from perimeter security to back-end servers for application authorization 4

Spring Security Anatomy of an OpenEdge Mobile/REST Web Application Standard Java web application architecture & functionality Spring Security replaces Java container authentication & authorization security Combinations of REST api & OpenEdge Mobile components Java Container (http/https) HTTP session manager Mobile device Mobile / REST Web Application REST web service AppServer JSDO catalog Web browser Mobile App UI 5

Spring Security General REST Web Application Architecture HTTP session manager Mobile device Mobile / REST Web Application REST web service AppServer Web browser WEB-INF/ WEB-INF/ WEB-INF/classes/ WEB-INF/adapter/log/ web.xml (Java web application descriptor) appsecurity-xxxx-yyyy.xml log4j.properties (Spring & REST Adapter logging) <app-context>.log (Spring & Adapter log file) Spring Security Templates 6

Spring Security Using an AppServer for Application Level Authorization The Spring Security s authentication credentials are transformed into a sealed Client-Principal that is accessible via SESSION s REQUEST-INFO object Sealed ABL Client-Principal (SSO state) HTTP session manager Mobile device Mobile / REST Web Application REST web service AppServer Web browser Plug-in Authentication Role-based Authorization CORS 7

CORS - Cross Origin Resource Scripting Javascript engines always block resource access to a domain external from the page CORS is a W3C group standard that allows Javascript to access Web application resources in a DNS domain different from the one the current HTTP page and JavaScript were loaded from CORS works by using HTTP headers that allow servers to grant/deny Javascript resource access to permitted client domains Developer Studio Mobile App Builder <domain 1> Javascript Engine JSDO (REST http request) HTML Page <= CORS = > http headers <domain 2> REST Web Application CORS 8

Spring Security OpenEdge Mobile Client Architecture Mobile Device or Web Browser Mobile App Java Container (http/https) HTTP session manager Session JSDO JSDO catalog Mobile / REST Web Application JSDO catalog REST web service 9

OpenEdge Mobile Client JavaScript Session Object progress.data.session : Log in to mobile service, sending necessary credentials Get and store the JSDO catalog Add session and credential information to the requests that a JSDO sends to mobile service Log out 10

OpenEdge Mobile Client Architecture Mobile Device or Web Browser Mobile / REST Web Application Session1 Mobile App Session2 catalog1 REST web service 1 Catalog1 Catalog2 Catalog3 Mobile / REST Web Application JSDO1 JSDO1 JSDO1 catalog2 REST web service 2 catalog3 11

Agenda Architectural basics REST service Mobile client Making required choices Authentication model User sessions AppServer SSO Diving into the code REST service Mobile client What to do when things go sideways 12

Major Security Technology Decisions Required choices The web application s user authentication model (note: NOT where user accounts exist) The web application s user login session model ( provided by the Web Server ) The web application s role-based authorization ( application defined role names or production defined role names ) Secondary choices The web application s CORS configuration ( restrict client domain access ) The web application s AppServer SSO ( use Client-Princpals to control access to application and OpenEdge ) * Other authentication models available - not certified 13

Web Application Authentication Models Anonymous The no user authentication or login session [ default ] ( NOT recommended for production applications used for test & debug ) HTTP BASIC authentication Client sends base64 encoded user name/password to web application in each http request HTTP header: Authorization No user login session No user logout HTTP FORM authentication The client logs into and out of the web application once per session HTTP form passed to REST web application for login & HTTP session management HTTP cookie returned to client client echoes cookie for each HTTP request HTTP request used to logout from REST web application & delete HTTP session 14

Choose Your User Login Session Model Three different concepts of session Mobile client ( server connection ) Web server user [login] session common to all web application clients Application user session Only two web application session models: stateless (BASIC default) stateful (FORM default) Web servers control user sessions (not OpenEdge or your AppServer application) Web servers do not share user sessions across web applications Client & server web server user session models must ALWAYS agree 15

OpenEdge Web Application Security Templates appsecurity-anonymous.xml Anonymous security - every internet/intranet user is allowed full access appsecurity-basic-local.xml HTTP BASIC model using an unsecured user.properties text file appsecurity-form-local.xml HTTP FORM model using an unsecured user.properties text file appsecurity-container.xml Spring Security SSO from Java container s authentication token 11.2.1+ appsecurity-basic-ldap.xml appsecurity-form-ldap.xml 11.3+ appsecurity-basic-oerealm.xml appsecurity-form-oerelam.xml 16

Agenda Architectural basics REST service Mobile client Making required choices Authentication model User sessions AppServer SSO Diving into the code REST service Mobile client What to do when things go sideways 17

Example: Choosing the Spring Security Template You edit the web.xml file to set the security configuration Default location C:\Progress\OpenEdge\rest\server\WEB-INF See param-values in the <!--USER EDIT section for contextconfiglocation 18

Example: Choosing the Session Management Model Controls Tomcat session manager {stateless never always ifrequired} HTTP Basic Real name shown to users 19

Example: User Account Authentication Control Username and encoded password and authorities 20

user.properties NOT A SECURE SOURCE OF PRODUCTION USER ACCOUNTS Simple to maintain source of user roles and roles for testing Format: <userid>=<password>,role_<rolename>[,role_...],{enable disable} Clear-text password All role names have ROLE_ prefix (so Spring can distinguish between userids & roles) Must restart web application for edits to take affect User-id Password Roles Enabled state 21

Session API at its simplest pdsession = new progress.data.session(); pdsession.authenticationmodel = progress.data.session.auth_type_form; var loginresult = pdsession.login(serviceuri [, uname, pw] ); pdsession.addcatalog( cataloguri ); ( create and use JSDO(s) ) Mobile Client Session Catalog JSDO pdsession.logout( ); 22

Session API 23

Using the Session API: The Reality + 11 more 24

Session Services in the Mobile App Builder 25

Session Services in the Mobile App Builder WHAT THE MOBILE APP BUILDER + TEMPLATES DO FOR YOU UI Login and Logout buttons UI fields for user to enter credentials UI fields and Settings values mapped to the calls made to the server Event handlers for the Login and Logout buttons Error and Success handlers for the Login service WHAT YOU DO FOR THE MOBILE APP BUILDER Define three settings 26

Session Service Settings 27

Session Service Settings 28

Session Service Settings 29

Express template appconfig.js file }; var appconfig = { "cataloguri": "http://mymachine:8980/xphoneservice/static/mobile/myservice.json", "serviceuri": "http://mymachine:8980/myservice", "tablename": "Customer", "resourcename": "Customer", "tableref": "ttcustomer", "listfields": "Name" 30

Example: OpenEdge CORS support 1. Identify and open the security configuration you applied to your REST application 2. In the security configuration file, appsecurity-xxx.xml, uncomment only the required properties and you must assign a value to those properties OECORSFilter allowall* allowdomains* MessageHeaders repsonseheaders 31

AppServer Single Sign-On ClientPrincipal authentication token created from Spring authentication token ClientPrincipal passed with each request to Agent AppServer client request context information available via session:current-request-info:getclientprincipal(). session:current-request-info:clientcontextid. session:current-request-info:procedurename. ABL Client-Principal handle can be UNKNOWN is using Anonymous security model ABL Client-Principal SESSION-ID attribute can be zero (0) BASIC authentication with default stateless session model Same Client-Principal validation using domain-name and domain-access-code Cannot use with OpenEdge AppServer before 11.2 32

Example: OpenEdge Client-Principal Single Sign-On AppServer Single Sign-On Security filter that turns a Spring token into an OpenEdge CLIENT-PRINCIPAL 33

Agenda Architectural basics REST service Mobile client Making required choices Authentication model User sessions AppServer SSO Diving into the code REST service Mobile client What to do when things go sideways 34

Diagnostic Steps: Browser Development Tools Use browser from Windows or OS-X Browser development tools: Console Network traffic Debugger ( Sources ) etc. Inspect Element from context menu Developer Menu (different places on different browsers) Shortcut keys (e.g., F12 on Chrome, Firefox) 35

Diagnostic Steps: Check the Traffic Check the HTTP(s) traffic between your application and the server 200 4xx 5xx No request being sent! Server returns 200 but you re getting a NETWORK ERROR on client From browser developer tools Network tab Standalone HTTP monitor 36

HTTP Monitors : Fiddler 2 and Other Standalones 37

Check Your Settings! Especially if you re getting strange errors Ex: login failure, getting an internal server error on a GET of /static/home.html 38

Diagnostic Steps: Where Does It Fail? Access the service directly from a browser address bar Login? http://hostname:port/<webapplicationname> Is the catalog accessible? http://hostname:port/<webapplicationname>/static/mobile/<catalogfilename> Is the REST adapter available? http://hostname:port/<webapplicationname>/rest Can you get data? http://hostname:port/<webapplicationname>/rest/<servicename>/<resourcename> Ex: http://localhost:8980/mobiletestapplication/rest/mobiletestservice/customer 39

Diagnostic steps: What s Happening on the Back End? Internal Server Error (HTTP status 5xx), or simply no data Is the AppServer running? Is the Database running? Check logs Debug! (see Developer Tools) 40

Browser Debugger Useful breakpoints progress.session.js this.login = function this.addcatalog = function this._openrequest = function (JSDO uses this to prepare requests) 41

Debugging Apps Running on Devices Try running it in emulator in browser Run an HTTP monitor on your computer and set it as a proxy on the device Remote debuggers ios: Web inspector from Safari on OS-X Android: Android Debug Bridge (ADB) through USB connection to computer Weinre (web inspector remote) 42

Logs WRKDIR/ (development) or CATALINA_BASE/logs (production) catalina.<date>.log or catalina.out localhost.<date>.log localhost_access_log.<date>.txt /webapps/<web service application>/web-inf/adapters/logs <service-name>.log AppServer broker logs 43

Debugging in the REST Adapter Edit WEB-INF/classes/log4j.properties Change ERROR to DEBUG for these packages: Debug core Spring security process Debug Spring Security authn/authz 44 Debug OpenEdge Client-Principal and CORS handling

Troubleshooting Document For more information see: http://communities.progress.com/pcom/people/mcmann?view=overview 45

Summary Authenticate and authorize at the perimeter Client and server have to agree on authentication & session model Change the code on both client & server before testing Integrate OE Realm after local authentication works Beware of CORS configurations during initial testing Integrate AppServer SSO after the other things are done 46