Post on 21-Mar-2020
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
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.
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:
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:
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.
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:
May2016
AnonymousAuthenticationTIBCOSpotfire7.5 Page7
Weclickthe“Edit”buttonandgrantthe“TIBCOSpotfireConsumer”and“TIBCOSpotfireEnterprisePlayer”licenses:
Oncedone,wecanswitchbacktothe“Users”tabandconfirmthatourspecialusernowhastherequiredlicenses:
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
May2016
AnonymousAuthenticationTIBCOSpotfire7.5 Page9
ClickingOKwecanseethechangesinpermissions:
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.
May2016
AnonymousAuthenticationTIBCOSpotfire7.5 Page11
Nowifweopenthisexampleinourwebbrowser,wecanconfirmthatwecannowaccessthisURLwithouthavingtologin:
Ifweclickonthelink,itopensthevisualizationinanewtab,alsowithouthavingtologin:
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>
May2016
AnonymousAuthenticationTIBCOSpotfire7.5 Page13
<divid="demoViz"></div></body></html>
Remember:YouwillneedtoupdatethescriptpathandtheserverURLtoreflectthepathsforyourconfiguration.
Nowifweopenthisexampleinourwebbrowser,wecanconfirmthatwecannowaccessthisURLwithouthavingtologin: