SlideShare a Scribd company logo
1 of 45
Download to read offline
Vienna, October 16-17 2017
Integrating IBM Connections Docs 2.0
with Box
Roberto Boccadoro
@robboc59
blog http://robertoboccadoro.com/
roberto.boccadoro@eldeng.it
Vienna, October 16-17 2017
PLATINUM SPONSORS
GOLD SPONSORS
SILVER SPONSORS
BRONZE SPONSORS
Vienna, October 16-17 2017
The recipe
• What we want to configure, at very high level, is the following:
• Create an UI extension on BOX to allow the user to invoke IBM DOCs via the BOX User Interface
• The extension should clearly define the IBM DOCs endpoint that needs to be reached
• We do not want to exchange username/passwords. So we need to have BOX generate the OAuth keys
that will be used by IBM DOCs when it will need to talk with BOX.
At the same time, we need to tell BOX which instance of IBM DOCs it will need to work with
• After the user will use the BOX UI extension, we expect that IBM DOCs would need to invoke BOX to get
the document to be edited, to get information about the user editing it, to send the modified document
back to BOX.
Thus we need to tell IBM DOCs which are the BOX APIs to call and how to authenticate at BOX. This
authentication needs to be the most transparent as possible as we do not want to perform multiple
logins
• As IBM DOCs is a WebSphere Application Server application, we also need to define the security
artefacts that would allow the J2EE engine to interact with BOX
Vienna, October 16-17 2017
How is it done ?
There are a few steps needed
1. Create an app in Box
2. Edit the Docs configuration file
3. Set up Oauth credential for Box
4. Add box.com certificates in WAS trust store
Vienna, October 16-17 2017
1) Create a Box application
• Log in to the Box developer console at https://developers.box.com/
• On the right side of the page click on “Create a Box Application”
• Choose a name for the application and click “Create Application”
Vienna, October 16-17 2017
• In the next page in the section General Information make sure Content
API Access Only is selected
Vienna, October 16-17 2017
• In the section OAuth2 Parameters take note of client_id and
client_secret for the Box application. You need to import the OAuth
credentials to the IBM Docs system.
• The redirect_uri in the OAuth2 Parameters section should be the
same used in docs_call_back_url of the IBM Docs non-IBM product
integration, such as
"https://<docs_server>:<port>/docs/driverscallback".
• Set the user type to Standard Box users.
Vienna, October 16-17 2017
Vienna, October 16-17 2017
• Go to the Web App Integrations section and click Create a
New Web App Integration.
Vienna, October 16-17 2017
In the General Information section:
• Choose a name for the web application, and fill in the description
for the application.
• Add supported extensions for Docs: .docx, .pptx, .xlsx, .doc, .xls,
.ppt, .ods, .odt, .odp, .csv, .txt.
• Under Permissions requirement, select Full permissions are
required.
• In the Scoped to field, select The parent folder of the file/folder
from which this integration is invoked.
• Set the category to Editing.
• Set the file type category to Documents.
• Set the integration status to Online.
Vienna, October 16-17 2017
Vienna, October 16-17 2017
In the Callback Configuration section:
• Make the integration open a popup in a new tab.
• Use REST method.
• Leave the Preliminary Callback URL field empty.
• The client callback URL should be the callback URL of the IBM Docs
non-IBM product integration and must use the https protocol, such as
"https://docs_server/docs/driverscallback".
Vienna, October 16-17 2017
In the Callback Parameters section click on “add callback parameter”
Add the file_id parameter
Add the repository parameter
Add code parameter
Vienna, October 16-17 2017
• Leave the other fields as default.
• Save the Web App Integration
• Save the Box Application
Vienna, October 16-17 2017
2) Edit Docs configuration file
Go in <WAS install root>/profiles/Dmgr01/config/cells/<cell
name>/IBMDocs-config/ and edit concord.config.json
Tip : use Notepad++ or another «smart» editor, this will help you a lot with the correct syntax
At the beginning of the file add the following code
"x-frame-options": {
"allow_option":"ALLOW-FROM",
"allow_uri":https://app.box.com
}
Don’t get mad trying to copy the text from the slides. Grab the document we wrote and you’ll find all the needed code in there
https://www.ibm.com/developerworks/community/files/form/anonymous/api/library/98a7ab0c-9742-463d-bf96-
1c4ff2a65138/document/8f2d3c09-7874-4566-b6d4-
cb410bbba54d/media/Integrate%20IBM%20Connections%20Docs%202.0%20with%20BOX.docx
Vienna, October 16-17 2017
• Search the JSON code related to the class
"com.ibm.docs.repository.external.rest.ExternalRestRepository" for the id
“external.rest” as shown here:
Vienna, October 16-17 2017
• Add the following code
"s2s_method" : "oauth2"
"customer_id" : "box.com"
"oauth2_endpoint" : https://app.box.com/api/oauth2/token
"media_meta_url" : https://api.box.com/2.0/files/{ID}
"media_get_url" : https://api.box.com/2.0/files/{ID}/content
"media_set_url" : https://upload.box.com/api/2.0/files/{ID}/content
"docs_callback_endpoint" : https://<docs_servername>:<port>/docs/driverscallback
"repository_home" : https://app.box.com
This will make the JSON fragment look like the one here below:
Vienna, October 16-17 2017
• Search the JSON code related to the class
"com.ibm.docs.authentication.filters.ExternalAuth" for the id
“external.rest” as shown here:
• Add the following code
s2s_method : “oauth2”
This will make the JSON fragment look like the one here below:
Vienna, October 16-17 2017
• Search the JSON code related to the class
"com.ibm.docs.directory.external.ExternalDirectory" for the id
“external.rest” as shown here:
Vienna, October 16-17 2017
• Add the following code
“s2s_method” : “oauth2”
"profiles_url": https://api.box.com/2.0/users/{ID}
"current_user_profiles_url":https://api.box.com/2.0/users/me
"bypass_sso":"true"
"docs_callback_endpoint": https://<docs_server name>:<port>/docs/driverscallback
"oauth2_endpoint": https://app.box.com/api/oauth2/token
"customer_id": "box.com"
"keys": "org_id_key": "org_id"
"keys": "photo_url_key": "avatar_url"
"keys": "url_query_key": "ID"
"keys": "display_name_key": "name"
"keys": "name_key": "name"
"keys": "id_key": "id"
"keys": "email_key": "login"
This will make the JSON fragment look like the one here:
Vienna, October 16-17 2017
• Search the " socialConfig " item
• Modify the following parameter as
follows :
"url":
https://api.box.com/2.0/users/{ID}”
Vienna, October 16-17 2017
• Sync the nodes
• and then from the WebSphere console, restart the application servers
where the Editor Application is installed.
Vienna, October 16-17 2017
3) Set up Oauth credential for Box
• On the IBM Docs server, go to the folder ${WAS_INSTALL_ROOT}/profiles/AppSrv1/bin and run the following command:
• wsadmin.bat -lang jython -username xx -password xx -f ${PATH}/customer_credential_mgr.py -action add -customer customer_id -key
key -value value"
where:
• customer_credential_mgr.py is located in the IBM Docs installation package, ${PATH} is the location of the file, for example,
CN30NML.zipIBMConnectionsDocsrepo nativeDocsApp_2.0.0.zipinstallerdocstasks (extract the necessary files before using)
• customer_id is the value specified in customer_id in ${WAS_INSTALL_ROOT}/profiles/AppSrv1/config/cells/{cell}/IBMDocs-
config/concord-config.json.
• key could be oauth2_client_id or oauth2_client_secret and value should be the one that the repository server assigned to the IBM Docs
application. You can get the value when you create the IBM Docs app
Vienna, October 16-17 2017
For example:
wsadmin.bat -lang jython -user xx -password xx -f customer_credential_mgr.py -action
add -customer abc.com -key oauth2_client_id -value
"l7xxf61984f99f404575a781d47c6bfebdca"
wsadmin.bat -lang jython -user xx -password xx -f customer_credential_mgr.py -action
add -customer abc.com -key oauth2_client_secret -value
"cc692ce34451418e86d9b231ee34af65"
Vienna, October 16-17 2017
4) Add box.com https certificates into the WebSphere local trust store
• Log into the WebSphere Application Server Administrative Console.
• Expand Security and click SSL certificate and key management.
• Under Configuration settings, click Manage endpoint security configurations.
Vienna, October 16-17 2017
• Select the appropriate outbound
configuration to get to the (cell)
management scope.
Vienna, October 16-17 2017
• Under Related Items, click Key stores and certificates.
• Click the CellDefaultTrustStore key store
Vienna, October 16-17 2017
• Under Additional Properties, click Signer certificates > Retrieve From Port
• In the Host field, enter api.box.com, the port_number value 443 in the Port
field, and the api.box.com in the Alias field.
• Click Retrieve Signer Information.
Vienna, October 16-17 2017
• Verify that the certificate information is for a certificate that you can trust
• Click Apply and Save
• Restart Deployment Manager, all nodes and app servers.
Vienna, October 16-17 2017
Test the integration
Vienna, October 16-17 2017
Vienna, October 16-17 2017
•Log into your BOX account
Vienna, October 16-17 2017
•Select the document you want to edit and navigate to the “Edit with IBM DOCs” extension that was previously created
Vienna, October 16-17 2017
•Click on the “Edit with IBM DOCs” and then click “Okay”
Vienna, October 16-17 2017
•You do not need to be logged in IBM DOCs / IBM Connections.
IBM DOCs will open the document to be edited under the name of the BOX user :
NOTE : IBM
DOCs was also
able to get the
user’s picture
from BOX.
Vienna, October 16-17 2017
•Comments are also included under the name of the BOX user as shown below:
Vienna, October 16-17 2017
Once finished, you can force the “Save to Repository” which actually creates a new version of the document inside BOX:
Vienna, October 16-17 2017
Vienna, October 16-17 2017
Nothing changes to the behavior described above if am logged into
IBM Connections or IBM DOCs.
Vienna, October 16-17 2017
Runtime flow of information between IBM DOCs and BOX.
1. A BOX user asks BOX to give IBM DOCs permission to access one of her files.
This step maps the action of the BOX user clicking on the new menu item “Edit in IBM DOCs” from the
BOX’s file contextual menu
2. BOX retrieves the id of the currently logged-in BOX user and the BOX Application’s id (the API Key)
One of the information that BOX generates when the “Edit in IBM DOCs” BOX application is created is
the API Key (you find it just at the bottom of the Application page as shown here):
Vienna, October 16-17 2017
3.BOX generates the “auth_code”.
This auth_code will be generated based on some schema to ensure its uniqueness; then it will be internally managed
by BOX together with the “Box user id” and the “API Key”.
4. The Browser will be redirected to the IBM DOCs “redirect_uri” with the auth_code, the file_id and the string
“rest” in the query string
5. IBM DOCs exchanges the “auth_code” and the OAUTH2 keys (stored in WebSphere) against the BOX OAUTH2
Token by invoking the BOX API specified by the “oauth2_endpoint” parameter in the concord-config.json
parameter.
In this way, BOX will be able to retrieve the information about the BOX user and the Application that is invoked
(via the auth_code), thus replacing the need for the first leg of the OAUTH2 dance (which cannot happen because
this conversation happens from the IBM DOCs server to the BOX runtime)
Runtime flow of information between IBM DOCs and BOX.
Vienna, October 16-17 2017
6.Now, IBM DOCs has the OAUTH2 token to perform all the other calls to BOX (the media_meta_url, media_get_url
and media_set_url parameters previously specified in concord-config.json)
7.IBM DOCs invokes the media_meta_url to get, from BOX, the metadata about the file to be edited.
Metadata include the “mime type”, the “user” and the “timestamp for the last version”.
8.If IBM DOCs did not cache an older version of the document on respect to the one specified by the timestamp, it
invokes the media_get_url to ask BOX to retrieve the content of the file.
In case IBM DOCs cached the last version, the media_get_url api is not invoked but the cached content is used.
9.Once the user on IBM DOCs decides to save a modified version of the file, the media_set_url of BOX is invoked to
push the content of the modified version
Runtime flow of information between IBM DOCs and BOX.
Vienna, October 16-17 2017
Thank you
Vienna, October 16-17 2017
Vienna, October 16-17 2017
PLATINUM SPONSORS
GOLD SPONSORS
SILVER SPONSORS
BRONZE SPONSORS

More Related Content

Similar to Integrating IBM Connections Docs with BOX

Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
MongoDB
 
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptxSH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
MongoDB
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
Danny Jessee
 
Windows Hosting Documentation
Windows Hosting DocumentationWindows Hosting Documentation
Windows Hosting Documentation
webhostingguy
 

Similar to Integrating IBM Connections Docs with BOX (20)

Forge - DevCon 2016: Building Value-Added Integrations with Autodesk’s IoT APIs
Forge - DevCon 2016: Building Value-Added Integrations with Autodesk’s IoT APIsForge - DevCon 2016: Building Value-Added Integrations with Autodesk’s IoT APIs
Forge - DevCon 2016: Building Value-Added Integrations with Autodesk’s IoT APIs
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB Stitch
 
Z101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apisZ101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apis
 
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
 
Developing IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using DominoDeveloping IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using Domino
 
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean it
 
Consuming web services_ax2012
Consuming web services_ax2012Consuming web services_ax2012
Consuming web services_ax2012
 
ArcSight Actor Model Import Connector for Microsoft Active Directory Configur...
ArcSight Actor Model Import Connector for Microsoft Active Directory Configur...ArcSight Actor Model Import Connector for Microsoft Active Directory Configur...
ArcSight Actor Model Import Connector for Microsoft Active Directory Configur...
 
No REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsNo REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIs
 
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptxSH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
 
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles ServiceAraport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
 
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
 
GirishBhatia_AWS S3 Static Website Hosting and CICD Pipeline using GitHub 202...
GirishBhatia_AWS S3 Static Website Hosting and CICD Pipeline using GitHub 202...GirishBhatia_AWS S3 Static Website Hosting and CICD Pipeline using GitHub 202...
GirishBhatia_AWS S3 Static Website Hosting and CICD Pipeline using GitHub 202...
 
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the CloudSharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
 
Active server pages
Active server pagesActive server pages
Active server pages
 
Windows Hosting Documentation
Windows Hosting DocumentationWindows Hosting Documentation
Windows Hosting Documentation
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
 
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS LambdaBuild a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
Build a Text Enabled Keg-orator Robot with Alexa, AWS IoT & AWS Lambda
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
 

More from LetsConnect

Oh $h@# - How to deal with emotional outbursts and hate in social situations
Oh $h@# - How to deal with emotional outbursts and hate in social situationsOh $h@# - How to deal with emotional outbursts and hate in social situations
Oh $h@# - How to deal with emotional outbursts and hate in social situations
LetsConnect
 
It is not About Connections vs Office 365 - You can have the best of the both...
It is not About Connections vs Office 365 - You can have the best of the both...It is not About Connections vs Office 365 - You can have the best of the both...
It is not About Connections vs Office 365 - You can have the best of the both...
LetsConnect
 
IBM Collaboration Framework in action: Customer success stories
IBM Collaboration Framework in action: Customer success storiesIBM Collaboration Framework in action: Customer success stories
IBM Collaboration Framework in action: Customer success stories
LetsConnect
 
New Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
New Ways to Deliver Business Outcomes with INtelligent Workstream CollaborationNew Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
New Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
LetsConnect
 

More from LetsConnect (20)

Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
 
Oh $h@# - How to deal with emotional outbursts and hate in social situations
Oh $h@# - How to deal with emotional outbursts and hate in social situationsOh $h@# - How to deal with emotional outbursts and hate in social situations
Oh $h@# - How to deal with emotional outbursts and hate in social situations
 
It is not About Connections vs Office 365 - You can have the best of the both...
It is not About Connections vs Office 365 - You can have the best of the both...It is not About Connections vs Office 365 - You can have the best of the both...
It is not About Connections vs Office 365 - You can have the best of the both...
 
Using ibm connections to enhance university courses
Using ibm connections to enhance university coursesUsing ibm connections to enhance university courses
Using ibm connections to enhance university courses
 
IBM Connections 6 Component Pack
IBM Connections 6 Component PackIBM Connections 6 Component Pack
IBM Connections 6 Component Pack
 
IBM Connections 6.0 CR3 New Features
IBM Connections 6.0 CR3 New FeaturesIBM Connections 6.0 CR3 New Features
IBM Connections 6.0 CR3 New Features
 
10 years of IBM Connections
10 years of IBM Connections10 years of IBM Connections
10 years of IBM Connections
 
IBM Collaboration Framework in action: Customer success stories
IBM Collaboration Framework in action: Customer success storiesIBM Collaboration Framework in action: Customer success stories
IBM Collaboration Framework in action: Customer success stories
 
Design for the Digital Workspace
Design for the Digital WorkspaceDesign for the Digital Workspace
Design for the Digital Workspace
 
New Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
New Ways to Deliver Business Outcomes with INtelligent Workstream CollaborationNew Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
New Ways to Deliver Business Outcomes with INtelligent Workstream Collaboration
 
Power up your Salesforce Opportunities by using IBM Watson Workspace as your ...
Power up your Salesforce Opportunities by using IBM Watson Workspace as your ...Power up your Salesforce Opportunities by using IBM Watson Workspace as your ...
Power up your Salesforce Opportunities by using IBM Watson Workspace as your ...
 
There is nothing more practical than a good theory
There is nothing more practical than a good theoryThere is nothing more practical than a good theory
There is nothing more practical than a good theory
 
Kubernetes Basics for Connections Admins
Kubernetes Basics for Connections AdminsKubernetes Basics for Connections Admins
Kubernetes Basics for Connections Admins
 
Intelligent Collaboration driving Digital Transformation
Intelligent Collaboration driving Digital TransformationIntelligent Collaboration driving Digital Transformation
Intelligent Collaboration driving Digital Transformation
 
IBM Connections - Have it YOUR Way!
IBM Connections - Have it YOUR Way!IBM Connections - Have it YOUR Way!
IBM Connections - Have it YOUR Way!
 
You Get What You Give
You Get What You GiveYou Get What You Give
You Get What You Give
 
Building Custom ibm Watson Workspace Templates to make you and your team more...
Building Custom ibm Watson Workspace Templates to make you and your team more...Building Custom ibm Watson Workspace Templates to make you and your team more...
Building Custom ibm Watson Workspace Templates to make you and your team more...
 
ICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open SourceICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open Source
 
Communities as the fundament of social learning
Communities as the fundament of social learningCommunities as the fundament of social learning
Communities as the fundament of social learning
 
It's not IBM or O365 - Integrate and Embrace
It's not IBM or O365 - Integrate and EmbraceIt's not IBM or O365 - Integrate and Embrace
It's not IBM or O365 - Integrate and Embrace
 

Recently uploaded

Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
vineshkumarsajnani12
 
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
yulianti213969
 
Contact +971581248768 for 100% original and safe abortion pills available for...
Contact +971581248768 for 100% original and safe abortion pills available for...Contact +971581248768 for 100% original and safe abortion pills available for...
Contact +971581248768 for 100% original and safe abortion pills available for...
DUBAI (+971)581248768 BUY ABORTION PILLS IN ABU dhabi...Qatar
 

Recently uploaded (20)

Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptxGoal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdfProgress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
 
Home Furnishings Ecommerce Platform Short Pitch 2024
Home Furnishings Ecommerce Platform Short Pitch 2024Home Furnishings Ecommerce Platform Short Pitch 2024
Home Furnishings Ecommerce Platform Short Pitch 2024
 
The Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and UncertaintyThe Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and Uncertainty
 
HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 
UJJAIN CALL GIRL ❤ 8272964427❤ CALL GIRLS IN UJJAIN ESCORTS SERVICE PROVIDE
UJJAIN CALL GIRL ❤ 8272964427❤ CALL GIRLS IN UJJAIN ESCORTS SERVICE PROVIDEUJJAIN CALL GIRL ❤ 8272964427❤ CALL GIRLS IN UJJAIN ESCORTS SERVICE PROVIDE
UJJAIN CALL GIRL ❤ 8272964427❤ CALL GIRLS IN UJJAIN ESCORTS SERVICE PROVIDE
 
JAJPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JAJPUR ESCORTS SERVICE PROVIDE
JAJPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JAJPUR  ESCORTS SERVICE PROVIDEJAJPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JAJPUR  ESCORTS SERVICE PROVIDE
JAJPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JAJPUR ESCORTS SERVICE PROVIDE
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
JIND CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JIND ESCORTS SERVICE PROVIDE
JIND CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JIND ESCORTS SERVICE PROVIDEJIND CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JIND ESCORTS SERVICE PROVIDE
JIND CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JIND ESCORTS SERVICE PROVIDE
 
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
 
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
 
Contact +971581248768 for 100% original and safe abortion pills available for...
Contact +971581248768 for 100% original and safe abortion pills available for...Contact +971581248768 for 100% original and safe abortion pills available for...
Contact +971581248768 for 100% original and safe abortion pills available for...
 
The Vietnam Believer Newsletter_May 13th, 2024_ENVol. 007.pdf
The Vietnam Believer Newsletter_May 13th, 2024_ENVol. 007.pdfThe Vietnam Believer Newsletter_May 13th, 2024_ENVol. 007.pdf
The Vietnam Believer Newsletter_May 13th, 2024_ENVol. 007.pdf
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Moradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in PenacovaMoradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in Penacova
 
A DAY IN THE LIFE OF A SALESPERSON .pptx
A DAY IN THE LIFE OF A SALESPERSON .pptxA DAY IN THE LIFE OF A SALESPERSON .pptx
A DAY IN THE LIFE OF A SALESPERSON .pptx
 
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDEJHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
 

Integrating IBM Connections Docs with BOX

  • 1. Vienna, October 16-17 2017 Integrating IBM Connections Docs 2.0 with Box Roberto Boccadoro @robboc59 blog http://robertoboccadoro.com/ roberto.boccadoro@eldeng.it
  • 2. Vienna, October 16-17 2017 PLATINUM SPONSORS GOLD SPONSORS SILVER SPONSORS BRONZE SPONSORS
  • 3. Vienna, October 16-17 2017 The recipe • What we want to configure, at very high level, is the following: • Create an UI extension on BOX to allow the user to invoke IBM DOCs via the BOX User Interface • The extension should clearly define the IBM DOCs endpoint that needs to be reached • We do not want to exchange username/passwords. So we need to have BOX generate the OAuth keys that will be used by IBM DOCs when it will need to talk with BOX. At the same time, we need to tell BOX which instance of IBM DOCs it will need to work with • After the user will use the BOX UI extension, we expect that IBM DOCs would need to invoke BOX to get the document to be edited, to get information about the user editing it, to send the modified document back to BOX. Thus we need to tell IBM DOCs which are the BOX APIs to call and how to authenticate at BOX. This authentication needs to be the most transparent as possible as we do not want to perform multiple logins • As IBM DOCs is a WebSphere Application Server application, we also need to define the security artefacts that would allow the J2EE engine to interact with BOX
  • 4. Vienna, October 16-17 2017 How is it done ? There are a few steps needed 1. Create an app in Box 2. Edit the Docs configuration file 3. Set up Oauth credential for Box 4. Add box.com certificates in WAS trust store
  • 5. Vienna, October 16-17 2017 1) Create a Box application • Log in to the Box developer console at https://developers.box.com/ • On the right side of the page click on “Create a Box Application” • Choose a name for the application and click “Create Application”
  • 6. Vienna, October 16-17 2017 • In the next page in the section General Information make sure Content API Access Only is selected
  • 7. Vienna, October 16-17 2017 • In the section OAuth2 Parameters take note of client_id and client_secret for the Box application. You need to import the OAuth credentials to the IBM Docs system. • The redirect_uri in the OAuth2 Parameters section should be the same used in docs_call_back_url of the IBM Docs non-IBM product integration, such as "https://<docs_server>:<port>/docs/driverscallback". • Set the user type to Standard Box users.
  • 9. Vienna, October 16-17 2017 • Go to the Web App Integrations section and click Create a New Web App Integration.
  • 10. Vienna, October 16-17 2017 In the General Information section: • Choose a name for the web application, and fill in the description for the application. • Add supported extensions for Docs: .docx, .pptx, .xlsx, .doc, .xls, .ppt, .ods, .odt, .odp, .csv, .txt. • Under Permissions requirement, select Full permissions are required. • In the Scoped to field, select The parent folder of the file/folder from which this integration is invoked. • Set the category to Editing. • Set the file type category to Documents. • Set the integration status to Online.
  • 12. Vienna, October 16-17 2017 In the Callback Configuration section: • Make the integration open a popup in a new tab. • Use REST method. • Leave the Preliminary Callback URL field empty. • The client callback URL should be the callback URL of the IBM Docs non-IBM product integration and must use the https protocol, such as "https://docs_server/docs/driverscallback".
  • 13. Vienna, October 16-17 2017 In the Callback Parameters section click on “add callback parameter” Add the file_id parameter Add the repository parameter Add code parameter
  • 14. Vienna, October 16-17 2017 • Leave the other fields as default. • Save the Web App Integration • Save the Box Application
  • 15. Vienna, October 16-17 2017 2) Edit Docs configuration file Go in <WAS install root>/profiles/Dmgr01/config/cells/<cell name>/IBMDocs-config/ and edit concord.config.json Tip : use Notepad++ or another «smart» editor, this will help you a lot with the correct syntax At the beginning of the file add the following code "x-frame-options": { "allow_option":"ALLOW-FROM", "allow_uri":https://app.box.com } Don’t get mad trying to copy the text from the slides. Grab the document we wrote and you’ll find all the needed code in there https://www.ibm.com/developerworks/community/files/form/anonymous/api/library/98a7ab0c-9742-463d-bf96- 1c4ff2a65138/document/8f2d3c09-7874-4566-b6d4- cb410bbba54d/media/Integrate%20IBM%20Connections%20Docs%202.0%20with%20BOX.docx
  • 16. Vienna, October 16-17 2017 • Search the JSON code related to the class "com.ibm.docs.repository.external.rest.ExternalRestRepository" for the id “external.rest” as shown here:
  • 17. Vienna, October 16-17 2017 • Add the following code "s2s_method" : "oauth2" "customer_id" : "box.com" "oauth2_endpoint" : https://app.box.com/api/oauth2/token "media_meta_url" : https://api.box.com/2.0/files/{ID} "media_get_url" : https://api.box.com/2.0/files/{ID}/content "media_set_url" : https://upload.box.com/api/2.0/files/{ID}/content "docs_callback_endpoint" : https://<docs_servername>:<port>/docs/driverscallback "repository_home" : https://app.box.com This will make the JSON fragment look like the one here below:
  • 18. Vienna, October 16-17 2017 • Search the JSON code related to the class "com.ibm.docs.authentication.filters.ExternalAuth" for the id “external.rest” as shown here: • Add the following code s2s_method : “oauth2” This will make the JSON fragment look like the one here below:
  • 19. Vienna, October 16-17 2017 • Search the JSON code related to the class "com.ibm.docs.directory.external.ExternalDirectory" for the id “external.rest” as shown here:
  • 20. Vienna, October 16-17 2017 • Add the following code “s2s_method” : “oauth2” "profiles_url": https://api.box.com/2.0/users/{ID} "current_user_profiles_url":https://api.box.com/2.0/users/me "bypass_sso":"true" "docs_callback_endpoint": https://<docs_server name>:<port>/docs/driverscallback "oauth2_endpoint": https://app.box.com/api/oauth2/token "customer_id": "box.com" "keys": "org_id_key": "org_id" "keys": "photo_url_key": "avatar_url" "keys": "url_query_key": "ID" "keys": "display_name_key": "name" "keys": "name_key": "name" "keys": "id_key": "id" "keys": "email_key": "login" This will make the JSON fragment look like the one here:
  • 21. Vienna, October 16-17 2017 • Search the " socialConfig " item • Modify the following parameter as follows : "url": https://api.box.com/2.0/users/{ID}”
  • 22. Vienna, October 16-17 2017 • Sync the nodes • and then from the WebSphere console, restart the application servers where the Editor Application is installed.
  • 23. Vienna, October 16-17 2017 3) Set up Oauth credential for Box • On the IBM Docs server, go to the folder ${WAS_INSTALL_ROOT}/profiles/AppSrv1/bin and run the following command: • wsadmin.bat -lang jython -username xx -password xx -f ${PATH}/customer_credential_mgr.py -action add -customer customer_id -key key -value value" where: • customer_credential_mgr.py is located in the IBM Docs installation package, ${PATH} is the location of the file, for example, CN30NML.zipIBMConnectionsDocsrepo nativeDocsApp_2.0.0.zipinstallerdocstasks (extract the necessary files before using) • customer_id is the value specified in customer_id in ${WAS_INSTALL_ROOT}/profiles/AppSrv1/config/cells/{cell}/IBMDocs- config/concord-config.json. • key could be oauth2_client_id or oauth2_client_secret and value should be the one that the repository server assigned to the IBM Docs application. You can get the value when you create the IBM Docs app
  • 24. Vienna, October 16-17 2017 For example: wsadmin.bat -lang jython -user xx -password xx -f customer_credential_mgr.py -action add -customer abc.com -key oauth2_client_id -value "l7xxf61984f99f404575a781d47c6bfebdca" wsadmin.bat -lang jython -user xx -password xx -f customer_credential_mgr.py -action add -customer abc.com -key oauth2_client_secret -value "cc692ce34451418e86d9b231ee34af65"
  • 25. Vienna, October 16-17 2017 4) Add box.com https certificates into the WebSphere local trust store • Log into the WebSphere Application Server Administrative Console. • Expand Security and click SSL certificate and key management. • Under Configuration settings, click Manage endpoint security configurations.
  • 26. Vienna, October 16-17 2017 • Select the appropriate outbound configuration to get to the (cell) management scope.
  • 27. Vienna, October 16-17 2017 • Under Related Items, click Key stores and certificates. • Click the CellDefaultTrustStore key store
  • 28. Vienna, October 16-17 2017 • Under Additional Properties, click Signer certificates > Retrieve From Port • In the Host field, enter api.box.com, the port_number value 443 in the Port field, and the api.box.com in the Alias field. • Click Retrieve Signer Information.
  • 29. Vienna, October 16-17 2017 • Verify that the certificate information is for a certificate that you can trust • Click Apply and Save • Restart Deployment Manager, all nodes and app servers.
  • 30. Vienna, October 16-17 2017 Test the integration
  • 32. Vienna, October 16-17 2017 •Log into your BOX account
  • 33. Vienna, October 16-17 2017 •Select the document you want to edit and navigate to the “Edit with IBM DOCs” extension that was previously created
  • 34. Vienna, October 16-17 2017 •Click on the “Edit with IBM DOCs” and then click “Okay”
  • 35. Vienna, October 16-17 2017 •You do not need to be logged in IBM DOCs / IBM Connections. IBM DOCs will open the document to be edited under the name of the BOX user : NOTE : IBM DOCs was also able to get the user’s picture from BOX.
  • 36. Vienna, October 16-17 2017 •Comments are also included under the name of the BOX user as shown below:
  • 37. Vienna, October 16-17 2017 Once finished, you can force the “Save to Repository” which actually creates a new version of the document inside BOX:
  • 39. Vienna, October 16-17 2017 Nothing changes to the behavior described above if am logged into IBM Connections or IBM DOCs.
  • 40. Vienna, October 16-17 2017 Runtime flow of information between IBM DOCs and BOX. 1. A BOX user asks BOX to give IBM DOCs permission to access one of her files. This step maps the action of the BOX user clicking on the new menu item “Edit in IBM DOCs” from the BOX’s file contextual menu 2. BOX retrieves the id of the currently logged-in BOX user and the BOX Application’s id (the API Key) One of the information that BOX generates when the “Edit in IBM DOCs” BOX application is created is the API Key (you find it just at the bottom of the Application page as shown here):
  • 41. Vienna, October 16-17 2017 3.BOX generates the “auth_code”. This auth_code will be generated based on some schema to ensure its uniqueness; then it will be internally managed by BOX together with the “Box user id” and the “API Key”. 4. The Browser will be redirected to the IBM DOCs “redirect_uri” with the auth_code, the file_id and the string “rest” in the query string 5. IBM DOCs exchanges the “auth_code” and the OAUTH2 keys (stored in WebSphere) against the BOX OAUTH2 Token by invoking the BOX API specified by the “oauth2_endpoint” parameter in the concord-config.json parameter. In this way, BOX will be able to retrieve the information about the BOX user and the Application that is invoked (via the auth_code), thus replacing the need for the first leg of the OAUTH2 dance (which cannot happen because this conversation happens from the IBM DOCs server to the BOX runtime) Runtime flow of information between IBM DOCs and BOX.
  • 42. Vienna, October 16-17 2017 6.Now, IBM DOCs has the OAUTH2 token to perform all the other calls to BOX (the media_meta_url, media_get_url and media_set_url parameters previously specified in concord-config.json) 7.IBM DOCs invokes the media_meta_url to get, from BOX, the metadata about the file to be edited. Metadata include the “mime type”, the “user” and the “timestamp for the last version”. 8.If IBM DOCs did not cache an older version of the document on respect to the one specified by the timestamp, it invokes the media_get_url to ask BOX to retrieve the content of the file. In case IBM DOCs cached the last version, the media_get_url api is not invoked but the cached content is used. 9.Once the user on IBM DOCs decides to save a modified version of the file, the media_set_url of BOX is invoked to push the content of the modified version Runtime flow of information between IBM DOCs and BOX.
  • 43. Vienna, October 16-17 2017 Thank you
  • 45. Vienna, October 16-17 2017 PLATINUM SPONSORS GOLD SPONSORS SILVER SPONSORS BRONZE SPONSORS