Track 3: Extending Blackberry Beyond Email Extending Web-Based Applications with the Blackberry Browser Agenda
Total Page:16
File Type:pdf, Size:1020Kb
Track 3: Extending BlackBerry Beyond Email Extending Web-Based Applications with the BlackBerry Browser Agenda • Introduction to BlackBerry® Browser • Mark-Up Language, Security and Connectivity Options • Optimizing Web Content for BlackBerry • Server-Side PUSH Applications • What’s New in BlackBerry Enterprise Server™ and BlackBerry Browser v4.0 •Demo BlackBerry Solution: Architecture Recap .NET Corporate Application Servers J2EE Corporate Application Servers HTTP(S) BlackBerry Corporate Systems Enterprise (ERP, CRM, Databases, etc.) Server Web Servers (IIS, Apache-Tomcat) Extending Browser-Based Solutions to BlackBerry From the developer’s perspective… HTTP HTML / WML BlackBerry Web / App Browser 3DES Encryption Server Push and Pull of Data Network-independent BlackBerry Browser Overview • Main BlackBerry Browser versions include: – BlackBerry Browser v3.6 and v3.7 • All GPRS, iDEN and CDMA Java™-enabled BlackBerry handhelds • Support for color and monochrome screen handhelds – BlackBerry Browser v3.8 and v4.0 • Upgrade from BlackBerry Browser v3.7 with new features (JavaScript, Offline Forms, etc.) – RIM Browser v2.5 and v2.6 • RIM 850™, RIM 857™, RIM 950™ and RIM 957™ handhelds • DataTAC and Mobitex wireless networks in North America Mark-up Connectivity Wireless Browser-Based Security User Experience Solutions in the Enterprise Dynamic Content Push • Key questions for consideration: 1. What mark-up languages are supported? 2. How will I connect to my corporate web servers? 3. Is security important? If so, how can I address this? 4. How can I ensure that the applications will be adopted by users and will make them more productive? 5. How can I make the content dynamic or push updated pages to my users? Mark-up Connectivity BlackBerry Browser: Security User Experience Mark-Up Languages Dynamic Content Push • BlackBerry Browser v3.6 and v3.7 –HTML – XHTML Basic, cHTML – WML 1.3, WML Script 1.2 – WBMP, PNG, GIF, JPEG images • BlackBerry Browser v3.8 and v4.0 adds… – JavaScript support – HTML Tables – Animated GIFs, WAP 2.0 Style Sheets • RIM Browser v2.5 and 2.6 for Mobitex/DataTAC –WML 1.3 – WBMP images Mark-up Connectivity Security Connectivity and Security User Experience Dynamic Content Push • Network Connectivity: – Intranet-based Web servers can be connected to via the BlackBerry Enterprise Server’s Mobile Data Service (MDS) • Simply enter the same internal URL that you would on a desktop browser on your intranet! • Browser connects through the Intranet by default, even if requesting an Internet site •Security: – All browser traffic through MDS is 3DES encrypted between the handheld and MDS – HTTPS (SSL/TLS) is also supported Mark-up Connectivity Security Connectivity and Security User Experience Dynamic Content Push HTTP HTTP Connectivity Corporate INTERNET Firewall MDS Web Server Security Optional TLS/SSL Optional TLS/SSL 3DES Mark-up Connectivity Security User Authentication User Experience Dynamic Content Push • MDS also supports a variety of corporate authentication schemes: – HTTP Basic –Kerberos – NT LAN Manager (NTLM) • If authentication is required for internal web site access, user will be challenged for credentials • MDS can optionally cache user credentials for future browsing sessions by that user Mark-up Connectivity Encryption and Security User Experience Authentication Dynamic Content Push • A closer look at the role of MDS for encryption and authentication… App/Web Server BlackBerry MDS 3DES De/Encryption TLS / SSL Handshaking 3DES 3DES TLS/SSL De/Encryption SECURITY Optional TLS / SSL Encryption Request Challenge AUTH Credentials Authentication (Kerberos, Basic, NTLM) Mark-up Connectivity Connectivity and Security User Experience Management Features Dynamic Content Push • MDS provide a number of other features for managing browser sessions: – Cache cookies and user credentials – Access control: manage which users are allowed to connect to the intranet via the browser – MDS transcodes and optimizes content for wireless delivery: • HTML – cHTML transcoder • All images are scaled and converted to PNG format • Unsupported tags are stripped, content is tokenized – MDS logs all browser requests Mark-up Connectivity MDS Connectivity to Web Security User Experience Servers Dynamic Content Push • What does the web server see when a BlackBerry Browser connects via MDS? – User-Agent = BlackBerry<Handheld>/<Version> – Accept Type = html, chtml, xhtml basic, wml • Note: WML only for RIM 800 Series and RIM 900 Series handhelds – Source IP Address = MDS machine IP Address • Note: MDS can optionally add the requesting handheld’s PIN or email address as a header to each request Mark-up Connectivity Server-Side Content Security User Experience Management Dynamic Content Push • Use any standard web development tools to publish content on intranet web servers – Static Content: • HTML or WML pages – Dynamic Content: • Java™ Server Pages (JSPs) or Active Server Pages (ASPs) • Perl Script, etc. • Recommendations: – Consider optimizing content to drive user experience • Avoid or limit tables, frames & large images in HTML pages – Leverage PUSH technology to deliver content proactively Mark-up Connectivity Optimizing Content for Security User Experience BlackBerry: Tips Dynamic Content Push • Tips on Optimizing the User Experience – Use the “Accept” and “User-Agent” HTTP headers to detect the BlackBerry Browser – Loading a page from cache is much quicker than over the air – Do not discourage text entry – Email addresses and phone numbers automatically act as hot links to the handheld Email and Phone applications – Use cookies and cache controls to manage sessions and expiry Mark-up Connectivity BlackBerry Browser: Security User Experience Server-Side PUSH Dynamic Content Push • BlackBerry enables you to pro-actively PUSH new web pages and links to your users’ handhelds – Alerts based on events that occur on the server – Silently update frequently accessed pages within the browser’s local cache – Push a permanent link to a frequently accessed site (such as an internal portal or entry point to an application) Leverage the value of push for your own corporate data, without developing a custom client application or getting messages lost in the email inbox! Mark-up Connectivity Developing a PUSH Security User Experience Application Dynamic Content Push • To push a web page to the BlackBerry Browser, you must develop a push application which: A. Determines: i. URL of the web page to be pushed ii. Email Address or PIN of the destination user B. Reads in the contents of the web page from the origin server (InputStream over an HTTP GET request) C. Writes out the contents of the web page to MDS, along with the information from step (a) above (OutputStream over an HTTP POST request) Mark-up Connectivity Developing a PUSH Security User Experience Application – Sample Code Dynamic Content Push Server-side sample code for pushing web page (J2EE): Determine Source Content URL & Destination User URL sourceContent = “http://corpWebServer01/inventory/productID=5”; String userEmail = “[email protected]”; Open an Input Stream to the Web Server HttpURLConnection getConn = (HttpURLConnection)sourceContent.openConnection(); connection.setRequestMethod(“GET"); //HTTP GET InputStream cin = getConn.getInputStream(); //Open input stream to web server to read in web page InputStreamReader insr = new InputStreamReader(cin); //Attach an InputStream reader //We are now ready to read in the web page from the web server Mark-up Connectivity Developing a PUSH Security User Experience Application – Sample Code Dynamic Content Push Construct the push URL // (http://<MDS host>:<port>/push?DESTINATION=<email>&PORT=<Browser Listen Port>) String mdsServer = “corpBesMds01:8300”; //Internal MDS server address + push listen port String mdsPushURL = "http://" + mdsServer + "/push?DESTINATION=" + userEmail + "&PORT=7874"; Set up the HTTP POST Push Connection to MDS HttpURLConnection postConn = (HttpURLConnection)mdsPushURL.openConnection(); connection.setRequestMethod("POST"); //HTTP POST connection.setRequestProperty("Content-Location", sourceURL); //URL where the web page lives connection.setRequestProperty(“Content-Type”, “text/html”); connection.setRequestProperty("X-RIM-Push-Title", “Product Alert!"); //BlackBerry-Specific Push headers Connect the Streams – Open the connection to MDS and write the data from the Web Server OutputStream outs = postConn.getOutputStream(); //Open the OutputStream to MDS int c; while ((c = cin.read()) >= 0) { //Read in bytes of web page from web server outs.write(c); } //Write out all of the bytes to MDS outs.close(); Mark-up Connectivity PUSH Management Within Security User Experience MDS Dynamic Content Push • What happens at MDS? 1. MDS receives HTTP POST and reads in the data 2. MDS checks database for existence of the user 3. If user exists, MDS responds to server app with confirmation (HTTP 200 OK) and closes connection 4. BlackBerry Server determines status of destination of handheld (online/offline, network, etc.) – If handheld is in coverage, data is pushed immediately – If handheld is out of coverage, push request is queued within MDS (currently within RAM, optionally in a database in BlackBerry Enterprise Server v4.0) Mark-up Connectivity PUSH Management Within Security User Experience MDS Dynamic Content Push MDS Push Queuing for out of coverage handhelds • Flow Control: – 5 push packets will be queued in MDS for the flow control timeout period (Default = 10 minutes) – No further packets will be pushed until these 5 are