#SummitNow CORS 6 Nov 2013 / 14 Nov 2013 Jared Ottley / Alfresco Software.

Slides:



Advertisements
Similar presentations
Enabling Secure Internet Access with ISA Server
Advertisements

The OWASP Foundation Web Application Security Host Apps Firewall Host Apps Database Host Web serverApp serverDB server Securing the.
Using JavaScript in Linked Data Applications Oshani Seneviratne Oct 12, 2010.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
How the web works: HTTP and CGI explained
Implementing ISA Server Caching. Caching Overview ISA Server supports caching as a way to improve the speed of retrieving information from the Internet.
Hypertext Transport Protocol CS Dick Steflik.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Presented by…. Group 2 1. Programming language 2Introduction.
August 25, SSO with Microsoft Active Directory Presented by: Craig Larrabee.
Ajax Basics The XMLHttpRequest Object. Ajax is…. Ajax is not…. Ajax is not a programming language. Ajax is not a programming language. Ajax is a methodology.
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Getting Started with the ASP.NET Web API Dhananjay Kumar Infragistics Consultant Microsoft MVP
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Chapter 6 Server-side Programming: Java Servlets
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
1 Installing and Maintaining ISA Server Planning an ISA Server Deployment Understand the current network infrastructure. Review company security.
Module 7: Advanced Application and Web Filtering.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
Your friend, Bluestem. What is Bluestem? “Bluestem is a software system which enables one or more high-security SSL HTTP servers in a domain (entrusted.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
ICM – API Server & Forms Gary Ratcliffe.
Securing Angular Apps Brian Noyes
Web Technologies Lecture 11 Implementing RESTful services.
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
Outline Server side Dependencies Installing it Configuring it Client side coding Browser setup.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
WEB-API & MVC5 - Identity & Security Mait Poska & Andres Käver, IT Kolledž 2014.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
JavaScript, Sixth Edition Chapter 11 Updating Web Pages with Ajax.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
CITA 330 Section 10 Web Remoting Techniques. Web Remoting Web Remoting is a term used to categorize the technique of using JavaScript to directly make.
#SummitNow What's Coming Arrived in CMIS November, 2013 Gregory Melahn/Alfresco Software
Redmond Protocols Plugfest 2016 Tarun Chopra Accessing APIs through Add-Ins Sr. Escalation Engineer.
National College of Science & Information Technology.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
ArcGIS for Server Security: Advanced
CS3220 Web and Internet Programming RESTful Web Service
Amazon Web Services (aws)
NodeJS Security Using PassportJS and HelmetJS:
Module 3: Enabling Access to Internet Resources
Azure Identity Premier Fast Start
Enabling Secure Internet Access with TMG
World Wide Web policy.
API Security Auditing Be Aware,Be Safe
Ad-blocker circumvention System
Data Virtualization Tutorial… CORS and CIS
WEB-API & MVC5 - Identity & Security
Hypertext Transport Protocol
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
XMLHttp Object.
WEB API.
Asynchronous Javascript And XML
Configuring Internet-related services
Module P3 Practical: Building a webapp in nodejs and
HTTP GET vs POST SE-2840 Dr. Mark L. Hornick.
Web API with Angular 2 Front End
Western Mass Microsoft Technology Users Group
Presentation transcript:

#SummitNow CORS 6 Nov 2013 / 14 Nov 2013 Jared Ottley / Alfresco Software

#SummitNow CORS 6 Nov 2013 / 14 Nov 2013 Jared Ottley / Alfresco Software

#SummitNow What is CORS? Cross-Origin Resource Sharing Cross Domain AJAX Calls Implemented in Browser and Server 3

#SummitNow What Browsers Support CORS? Partial 8 &

#SummitNow How Does CORS Work? Nothing to implement in your javascript. The Browser & the Server do the heavy lifting. 5

#SummitNow How Does CORS Work? 6 Browser OPTIONS API Request

#SummitNow Example Code $.ajax ({ type: ”HTTP METHOD”, url: “Place to go to”, dataType: 'json’, async: false, data: '{}', beforeSend: function (xhr){ xhr.setRequestHeader('Authorization', setAuthTokenHere() }, success: function (response){ //do something }, failure: function (response) { //do something } }); 7

#SummitNow What About the Server Side? Alfresco does not ship with CORS support. Alfresco uses CORS as part of “Alfresco for Salesforce” to talk to Alfresco Cloud. 8

#SummitNow How to Enable CORS in Alfresco Add the following jars to WEB-INF/lib cors-filter java-property-utils Both can be found at 9

#SummitNow How to Enable CORS in Alfresco Modify WEB-INF/web.xml CORS com.thetransactioncompany.cors.CORSFilter CORS /service/* 10

#SummitNow How to Enable CORS in Alfresco What services will be called by your app? CORS /service/* /cmisatom/* /cmisbrowser/* 11

#SummitNow How to Enable CORS in Alfresco 12 Browser OPTIONS API Request Authentication

#SummitNow Filter can be placed anywhere in web.xml However… Filter mapping MUST be before authentication filters How to Enable CORS in Alfresco 13

#SummitNow How to Enable CORS in Alfresco Place after Global Localization Filter but before CMIS security context cleaning filter. This is true for 4.2…but may not be true for other versions of Alfresco. By rule BEFORE any security/authentication filters 14

#SummitNow Filter Configuration By default the CORS Filter will apply a "public access" CORS policy, allowing all cross-site requests through (including credentials/cookies). Leaving the CORS Filter at this setting would actually be fine for most situations as CORS is not about adding server security; its primary intent is to protect the browser - the legitimate JavaScript apps running in it and the user's confidential data, such as cookies. 15

#SummitNow Filter Configuration (cont.) cors.configurationFile properties file Setting the location using System Property (-D) init-param Or Individual init-param 16

#SummitNow Filter Configuration (cont.) Do not change the following defaults: cors.allowGenericHttpRequests {true|false} defaults to true cors.supportsCredentials {true|false} defaults to true. cors.maxAge {int} defaults to -1 (unspecified) How long should pre-flight requests be cached. Recommended value is 3600 (1 hour) 17

#SummitNow Filter Configuration (cont.) cors.allowOrigin {"*"|origin-list} defaults to * Which calling domains are allowed? ex: Returns 403 if the domain is not allowed 18

#SummitNow Filter Configuration (cont.) cors.allowSubdomains {true|false} defaults to false Your application may run in a hosted service where the subdomain is dynamically assigned ex. salesforce.com ex. 19

#SummitNow Filter Configuration (cont.) cors.supportedMethods {method-list} defaults to "GET, POST, HEAD, OPTIONS” cors.supportedHeaders {"*"|header-list} defaults to * origin, authorization, accept 20

#SummitNow Filter Configuration (cont.) cors.exposedHeaders {header-list} defaults to empty list Response headers limited to: Cache- Control, Content-Language, Content- Type, Expires, Last-Modified Pragma Add additional headers to be exposed 21

#SummitNow Demo 22

#SummitNow CORS Resources

#SummitNow CORS Resources