Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO...

13
May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 1 Configuring Anonymous Access to Analysis Files in TIBCO Spotfire 7.5 Introduction Use Cases for Anonymous Authentication Anonymous Authentication in TIBCO Spotfire 7.5 Enabling Anonymous Authentication on the Spotfire Server Enabling the special user guest@ANONYMOUS Granting Spotfire Licenses to the special user guest@ANONYMOUS Enabling Anonymous Library Folder access URL Linking Example JavaScript API Example Introduction The main shift from TIBCO Spotfire 7.0 and earlier versions to TIBCO Spotfire 7.5 is a seemingly simple architecture change: The TIBCO Spotfire Server is now the entry point and TIBCO Spotfire Web Player and TIBCO Spotfire Automation Services have become a set of scalable backend services. Figure 1 shows how the clients all connect to the Spotfire Server in order to be serviced. Figure 1 TIBCO Spotfire 7.5 Architecture - Clients Connect to Spotfire Server Other documents including the TIBCO Spotfire Server Installation Manual have detailed information about the architectural differences. This document focuses on just what is important in light of anonymous authentication to the Spotfire environment. Many customers want to embed TIBCO Spotfire Web Player into a portal or other web application and have these analysis files available to users who are not authenticated. In TIBCO Spotfire 7.5, since the

Transcript of Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO...

Page 1: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page1

Configuring Anonymous Access to Analysis Files in TIBCO Spotfire 7.5

• Introduction• UseCasesforAnonymousAuthentication• AnonymousAuthenticationinTIBCOSpotfire7.5• EnablingAnonymousAuthenticationontheSpotfireServer• Enablingthespecialuserguest@ANONYMOUS• GrantingSpotfireLicensestothespecialuserguest@ANONYMOUS• EnablingAnonymousLibraryFolderaccess• URLLinkingExample• JavaScriptAPIExample

Introduction ThemainshiftfromTIBCOSpotfire7.0andearlierversionstoTIBCOSpotfire7.5isaseeminglysimplearchitecturechange:TheTIBCOSpotfireServerisnowtheentrypointandTIBCOSpotfireWebPlayerandTIBCOSpotfireAutomationServiceshavebecomeasetofscalablebackendservices.Figure1showshowtheclientsallconnecttotheSpotfireServerinordertobeserviced.

Figure1TIBCOSpotfire7.5Architecture-ClientsConnecttoSpotfireServer

OtherdocumentsincludingtheTIBCOSpotfireServerInstallationManualhavedetailedinformationaboutthearchitecturaldifferences.ThisdocumentfocusesonjustwhatisimportantinlightofanonymousauthenticationtotheSpotfireenvironment.ManycustomerswanttoembedTIBCOSpotfireWebPlayerintoaportalorotherwebapplicationandhavetheseanalysisfilesavailabletouserswhoarenotauthenticated.InTIBCOSpotfire7.5,sincethe

Page 2: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page2

SpotfireServerishandlingallclientrequestsandauthentication,thereareasetofoptionsthatallowanonymousaccesstocertainanalysisfileswithintheSpotfireLibrary.Thisdocumentwalksthroughtheexactstepstoexposeoneormoreanalysisfilestoanonymoususers.

Use Cases for Anonymous Authentication TIBCOSpotfiresupportsanalmostunlimitedsetofpossibleconfigurations.Forthepurposesofthisdocument,wehavefocusedonthefollowingmajorusecases:Iwantto...

AllowuserstoopenSpotfireAnalyseswithoutrequiringuserstologintoSpotfireWebPlayerorpassinglogininformationinheadersetc.

EmbedSpotfireVisualizationsinmyWebportalapplicationusingtheSpotfireJavaScriptAPI,withoutrequiringuserstologintoSpotfireorpassinglogininformationinheadersetc.

Anonymous Authentication in TIBCO Spotfire 7.5 WiththenewSpotfire7.5architecture,settingupanonymousaccessisverysimpleandconsistsofthefollowingsteps:

1) ConfigureanonymousaccessasdescribedintheTIBCOSpotfireServerAdministrationManualinthesectiontitled“Configuringanonymousauthentication”

2) GranttheappropriateSpotfireLicensestothespecialuserguest@ANONYMOUS3) SetthepermissionsontheSpotfireLibraryfoldercontainingtheAnalysisFile(s)toallowaccess

bythespecialuserguest@ANONYMOUS.Thefollowingsectiongivesastep-by-stepwalkthroughusingtheexamplefileBaseballthatshipswithSpotfire7.5.

Page 3: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page3

Enabling Anonymous Authentication on the Spotfire Server WewillusetheSpotfireServerConfigurationTooltoenableAnonymousAuthentication.TheConfigurationToolislocatedunderourinstallationfolder.Inmycasethefullpathis:

C:\tibco\tss\7.5.0\tomcat\bin\uiconfig.bat

OncetheConfigurationToolstarts,weclickontheConfigurationtab,enableanonymousauthenticationandclickon“Saveconfiguration…”:

TheConfigurationToolwillpromptforwheretosavethenewconfiguration.IselectDatabaseandclickNext:

Page 4: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page4

TheConfigurationToolwillpromptmeforasuitablecomment.IenteroneandtheclickFinish:

The Configuration Tool then reminds me that I will need to restart the Spotfire Server before myconfiguration changes take effect. Youmay see a slightly differentmessage depending on how yourSpotfireServerisconfigured.

AtthispointIrestartmySpotfireServerviatheWindowsServicesControlPanel:

Page 5: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page5

Enabling the special user guest@ANONYMOUS Bydefault,thisspecialuseraccountisdisabledwhenSpotfireServerisfirstinstalled.Toenableit,wewillusethecommandlineversionoftheConfigurationTool.

Openawindowscommandpromptandenterthehighlightedcommands.EntertheConfigurationToolpasswordifprompted:

cdc:\tibco\tss\7.5.0\tomcat\binconfigenable-user–-username=ANONYMOUS\guestToolpassword:Successfullyupdatedthestatusofuser'guest@ANONYMOUS'toenabled:true

Remember:YourConfigurationToolmaybeinadifferentfolder,somakesuretousethecorrectpathforyourinstallation.

Page 6: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page6

Granting Spotfire Licenses to the special user guest@ANONYMOUS Atthispoint,thespecialuserguest@ANONYMOUSisenabled,butdoesnothaveanySpotfireLicenses.

TograntLicenseswerunSpotfireAnalystandselecttheToolsàAdministrationManagermenuitem.WithintheAdministrationManager,ifwesearchfortheuserguest@ANONYMOUS,wecanseethattheyareamemberofthegroup“AnonymousUser”,anddonotcurrentlyhaveanylicensesgranted:

Wewillgrantlicensesatthegrouplevelsoweswitchtothe“GroupandLicenses”tabandselectthe“AnonymousUser”group:

Page 7: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page7

Weclickthe“Edit”buttonandgrantthe“TIBCOSpotfireConsumer”and“TIBCOSpotfireEnterprisePlayer”licenses:

Oncedone,wecanswitchbacktothe“Users”tabandconfirmthatourspecialusernowhastherequiredlicenses:

Page 8: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page8

Enabling Anonymous Library Folder access ThelastconfigurationstepistosetthepermissionsonaSpotfireLibraryFoldertoallowaccessbyanonymoususers.Inourcasewewillcreateanewfoldercalled“Anonymous”andsetthepermissionsonthatfolder.

FromSpotfireAnalyst,weopentheLibraryAdministrationdialogbyclickingonthe“Tools”à“LibraryAdministration”menuitem.

Forourexamplewewillcreateournew“Anonymous”FolderatthetoplevelofourLibrary,theclickonthePermissions“Edit…”buttontochangethedefaultInheritedPermissions:

OntheFolderPermissionsDialog:

• Deselectthecheckbox“InheritpermissionsfromParentFolder”• Searchandlocatethegroup“AnonymousUser”• Addthegroup“AnonymousUser”tothe“Browse+Access”section

Page 9: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page9

ClickingOKwecanseethechangesinpermissions:

Page 10: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page10

URL Linking Example ForourexamplewewillusethesamplefileBaseball.SoinSpotfireAnalystwegoaheadandopenthefilefromitscurrentlocationintheLibrary:

Demo/AnalysisFile/Baseball/Baseball

andsaveittoournewAnonymousfolder:

Anonymous/Baseball

AttheendoftheSaveoperation,SpotfirerespondswithadialogcontainingtheWebPlayerURLforournewitem:

Thisisthelinkwewilluseinourexample.

ThefollowingexampledisplaysourBaseballsampleembeddedinaniFrameinablankwebpage,alongwithalinktoopenthevisualizationinaseparatepage.

Inmycase,Icreatedafilecalledlinking_and_embedding_demo.htmlintherootfolderofmyIISWebServer.Ithenplacedthefollowingcodeinthefile:

<html><head></head><body><iframesrc="http://localhost:9090/spotfire/wp/OpenAnalysis?file=/Anonymous/Baseball"height="450"width="800"></iframe><p><ahref="http://localhost:9090/spotfire/wp/OpenAnalysis?file=/Anonymous/Baseball"target="_blank">Clickheretoopeninanewpage</a></body></html>

Remember:YouwillneedtoupdatetheserverURLtoreflectthepathforyourconfiguration.

Page 11: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page11

Nowifweopenthisexampleinourwebbrowser,wecanconfirmthatwecannowaccessthisURLwithouthavingtologin:

Ifweclickonthelink,itopensthevisualizationinanewtab,alsowithouthavingtologin:

Page 12: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page12

JavaScript API Example

TheconfigurationabovealsoallowsustousetheSpotfireJavaScriptAPItoembedspecificpagesfromaSpotfireAnalysisfileintoawebpage.Thefollowingexampledisplaysthe“WinShares”pagefromourBaseballsampleintoablankwebpage.

Inmycase,Icreatedafilecalledmashup_demo.htmlintherootfolderofmyIISWebServer.Ithenplacedthefollowingcodeinthefile:

<html><head><scripttype="text/javascript"src="http://localhost:9090/spotfire/wp/GetJavaScriptApi.ashx?Version=7.5"></script><script>varc_serverUrl="http://localhost:9090/spotfire/wp/";varc_analysisPath="/Anonymous/Baseball";varc_parameters="";//Optionalconfigurationblockvarcustomization=newspotfire.webPlayer.Customization();varapp;varc_reloadAnalysisInstance=false;window.onload=function(){app=newspotfire.webPlayer.Application(c_serverUrl,customization,c_analysisPath,c_parameters,c_reloadAnalysisInstance);//HideUIelementscustomization.showDodPanel=false;customization.showStatusBar=false;customization.showToolBar=false;customization.showPageNavigation=false;customization.showClose=false;customization.showAnalysisInfo=true;customization.showExportFile=true;customization.showExportVisualization=true;customization.showUndoRedo=true;customization.showFilterPanel=true;

varviewOne=app.openDocument("demoViz","WinShares",customization);}</script></head><body>

Page 13: Configuring Anonymous Access to Analysis Files in …...May 2016 Anonymous Authentication TIBCO Spotfire 7.5 Page 4 The Configuration Tool will prompt me for a suitable comment. I

May2016

AnonymousAuthenticationTIBCOSpotfire7.5 Page13

<divid="demoViz"></div></body></html>

Remember:YouwillneedtoupdatethescriptpathandtheserverURLtoreflectthepathsforyourconfiguration.

Nowifweopenthisexampleinourwebbrowser,wecanconfirmthatwecannowaccessthisURLwithouthavingtologin: