Developing Applications with Alfresco s Unified REST APIs. Will Abson, Alfresco

Similar documents
Configuring Anonymous Access to Analysis Files in TIBCO Spotfire 7.5

KonaKart Shopping Widgets. 3rd January DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on CloudFoundry. Tony Erwin,

Creating a REST API which exposes an existing SOAP Service with IBM API Management

IronWASP (Iron Web application Advanced Security testing Platform)

Security. CSC309 TA: Sukwon Oh

Sessions. Mendel Rosenblum. CS142 Lecture Notes - Sessions

Beginner s Guide to Cordova and Mobile Application Development

Persistence. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Angular 2 Programming

eb Security Software Studio

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Building Alfresco's digital business platform. 20th of June Berlin

Tuesday, January 13, Backend III: Node.js with Databases

Implementing Security for ArcGIS Server Java Solutions

Web Services Configuration Guide

What is Node.js? Tim Davis Director, The Turtle Partnership Ltd

Contents Introduction... 5 Configuring Single Sign-On... 7 Configuring Identity Federation Using SAML 2.0 Authentication... 29

Application Security Introduction. Tara Gu IBM Product Security Incident Response Team

VMware Content Gateway to Unified Access Gateway Migration Guide

August, HPE Propel Microservices & Jumpstart

Oracle Access Manager Configuration Guide

Web Security. Web Programming.

Web AppBuilder for ArcGIS: A Deep Dive in Enterprise Deployments. Nick Brueggemann and Mark Torrey

Healthcare Database Connector

55191: Advanced SharePoint Development

Chrome Extension Security Architecture

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

INF5750. Introduction to JavaScript and Node.js

Cloud Help for Community Managers...3. Release Notes System Requirements Administering Jive for Office... 6

Troubleshooting External Services (External Message Store, Calendar Integrations, Calendar Information for PCTRs) in Cisco Unity Connection 8.

Enabling Mobile Automation Testing using Open Source Tools

DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE

Web 2.0 and AJAX Security. OWASP Montgomery. August 21 st, 2007

Serverless Microservices Are The New Black. Lorna Mitchell, IBM

Edge Foundational Training

Google Cloud. Tomislav Čoh, Calyx d.o.o.

Overview of BlackBerry Dynamics Platform

WHY CSRF WORKS. Implicit authentication by Web browsers

SAP API Management Unit 4.4: Closer look at API Owner Policy Designer PUBLIC

DreamFactory Security Guide

Modern Web Application Development. Sam Hogarth

Node.js. Node.js Overview. CS144: Web Applications

Ten interesting features of Google s Angular Project

StorageGRID Webscale NAS Bridge Management API Guide

DEPLOYING A 3SCALE API GATEWAY ON RED HAT OPENSHIFT

Chat with a hacker. Increase attack surface for Pentest. A talk by Egor Karbutov and Alexey Pertsev

LEARN HOW TO USE CA PPM REST API in 2 Minutes!

SECURING ASP.NET CORE APPLICATIONS

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

PROCE55 Mobile: Web API App. Web API.

VMware AirWatch Content Gateway for Linux. VMware Workspace ONE UEM 1811 Unified Access Gateway

8.0 Help for Community Managers Release Notes System Requirements Administering Jive for Office... 6

Creating a REST API which exposes an existing SOAP Service with IBM API Management

Advance Mobile& Web Application development using Angular and Native Script

Programming with the Finesse API

Project Zygote. Rapid prototyping for the Internet of Things

ForgeRock Access Management Customization and APIs

Mobile Apps Sample Solution

How A Website Works. - Shobha

EMPLOYEE LOCATION TRACKING SERVICE

SLI Learning Search Connect For Magento 2

VMware AirWatch Content Gateway Guide for Linux For Linux

Developing ASP.NET MVC 4 Web Applications

Security overview Setup and configuration Securing GIS Web services. Securing Web applications. Web ADF applications

WorldSpace Attest Quick Start Guide

5th April Installation Manual. Department of Computing and Networking Software Development Degree

Unit 3 - Week 2 lectures: Building your webapp

How to Configure SSL VPN Portal for Forcepoint NGFW TECHNICAL DOCUMENT

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Courslets, a golf improvement web service. Peter Battaglia

Introduction... 5 Configuring Single Sign-On... 7 Prerequisites for Configuring Single Sign-On... 7 Installing Oracle HTTP Server...

CS 498RK FALL RESTFUL APIs

AD FS v3. Deployment Guide

Build Native-like Experiences in HTML5

Modern and Responsive Mobile-enabled Web Applications

0. Introduction On-demand. Manual Backups Full Backup Custom Backup Store Your Data Only Exclude Folders.

About This Document 3. Overview 3. System Requirements 3. Installation & Setup 4

This tutorial is intended to make you comfortable in getting started with the Firebase backend platform and its various functions.

uick Start Guide 1. Install Oracle Java SE Development Kit (JDK) version or later or 1.7.* and set the JAVA_HOME environment variable.

WebSphere Puts Business In Motion. Put People In Motion With Mobile Apps

ExtraHop 7.3 ExtraHop Trace REST API Guide

Error Sending Dav Request. Http Code 400 Status 'bad Request'

Bambu API Documentation

Come to this session or get lost. James McCarthy (MAD) Zachary Seguin (IST) Michael Tjendra (MAD)

Homework 8: Ajax, JSON and Responsive Design Travel and Entertainment Search (Bootstrap/Angular/AJAX/JSON/jQuery /Cloud Exercise)

Unifer Documentation. Release V1.0. Matthew S

Adobe Marketing Cloud Bloodhound for Mac 3.0

DDS Connector Sept, Gianpiero Napoli, Senior Software Engineer

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

Developing ASP.NET MVC 4 Web Applications

Easily Secure your Microservices with Keycloak. Sébastien Blanc Red

ASP.NET MVC Training

EPHP a tool for learning the basics of PHP development. Nick Whitelegg School of Media Arts and Technology Southampton Solent University

DATACENTER MANAGEMENT Goodbye ADFS, Hello Modern Authentication! Osman Akagunduz

CSCE 120: Learning To Code

Security. SWE 432, Fall 2017 Design and Implementation of Software for the Web

AngularJS Fundamentals

Connexion Documentation

Surrogate Dependencies (in

Transcription:

Developing Applications with Alfresco s Unified REST APIs Will Abson, Alfresco

Alfresco JavaScript API A set of JavaScript libraries to allow easy access to Alfresco s REST APIs Part of the Application Development Framework (ADF) Used internally by all ADF (Angular2) Components and demo apps Supports Node.js scripts as well as client-side JS

Alfresco JavaScript API How to import the library in a server side Node.js project: var AlfrescoApi = require('alfresco-jsapi'); Client Side Server Side Authentication API How to import the library in a client side JavaScript project: <script src="node_modules/alfresco-js-api/ alfresco-js-api.js"></script> Content API Process API Search API... Unified JS API

Using the API

Node Example var AlfrescoApi = require('alfresco-js-api'); var alfrescojsapi = new AlfrescoApi({ provider:'ecm' });

Node Example var AlfrescoApi = require('alfresco-js-api'); var alfrescojsapi = new AlfrescoApi({ provider:'ecm' }); alfrescojsapi.login('admin', 'admin').then(function (ticket) { console.log('login called successfully', ticket); // logic goes here }, function (error) { console.error('login error', error); });

Authentication Notes Usual mechanism returns a promise, though events also supported Provider must be one of ECM, BPM or ALL If you already have a ticket use loginticket() instead of login() method (ticket will be validated) or ticketecm or ticketbpm in constructor (no validation) Specify base URL(s) in the constructor using hostbpm and hostecm properties, e.g. http://localhost:8080, or context values using contextbpm and contextecm

Browser Security CORS Both content and process servers allow the use of CORS to enable the browser to make cross-origin requests to the backend APIs The HTTP Origin is the combination of protocol + hostname + port, e.g. http://server.myco.com:7777 For Content Services use enablecors JAR by Gethin James (v5.1+) or uncomment sections in web.xml For Process Services set property cors.enabled=true in activitiapp.properties Alternatively you can use a proxy to front your ADF app and content and process backends under the same origin

Browser Security CSRF Process Services applies a stateless CSRF protection to all API endpoints including the public REST APIs This can be turned off in activiti-app.properties but the JS-API will automatically send appropriate cookie + header values to work around the protection (unless disablecsrf property is set to true)

Making API Requests Top-level API class allows accessing all APIs via properties Process Services API group: alfrescojsapi.activiti Content Services Core API group: alfrescojsapi.core Content Services Search API group: alfrescojsapi.search Content Services web scripts: alfrescojsapi.webscript Below each primary group the API is broken down further, corresponding to the logical groupings in the API Explorer

Content Services Core APIs APIs broken down further into sub-groups Activities: alfrescojsapi.core.activitiesapi Nodes: alfrescojsapi.core.nodesapi or alias alfrescojsapi.nodes Sites: alfrescojsapi.core.sitesapi People: alfrescojsapi.core.peopleapi Inside each group are the individual endpoints, e.g. alfrescojsapi.core.nodesapi.createnode() Reference: https://github.com/alfresco/alfresco-js-api/tree/master/src/alfresco-core-rest-api

Node Example var AlfrescoApi = require('alfresco-js-api'); var alfrescojsapi = new AlfrescoApi({ provider:'ecm' }); alfrescojsapi.login('admin', 'admin').then(function (ticket) { console.log('login called successfully', ticket); alfrescojsapi.core.nodesapi.createnode('-root-', { name: 'test', nodetype: 'cm:folder' }).then(function(data) { console.log('created folder', data); }); }, function (error) { console.error('login error', error); });

Node Demo

An Example App

Alfresco Healthcare App Implemented during an early week-long internal hackathon within the ADF team Aims to show customising an application to suit audiences in a particular vertical sector Uses ADF Components and JS-API Client-side components and Node.js scripts

Soft-wiring Apps Alfresco allows us to compose core business logic and user interactions We call this soft-wiring Alfresco content services store all content and makes this available complemented by process interactions We can rapidly build new custom apps that respond to changes in the underlying platforms, using the Alfresco Angular2 components Option to prototype early using native UIs

Health Care App Demo

Loading Data Initially sample data was loaded manually, this was very painful! Users Folder structure Custom Content Models Custom Processes, Forms & App Initial attempt to script this using curl Now using JS-API!

Health Care Data Demo

JS-API Summary ü Easy to include in your App ü Get started quickly ü Browser and Node.js support

More Information https://github.com/alfresco/alfresco-js-api https://github.com/alfresco/health-care-app https://github.com/covolution/enablecors

Speaker contacts Email: will.abson@alfresco.com Twitter: @wabson