cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Integrate SiSense as a sub-domain of your web application and embed SiSense into your web application with SSO.  Note: SiSense also works when embedded in cross-domain iframes. 
1.  Add your website to IIS entitled example_website.com
In the site bindings enter the host name as example_website.com on port 80
alt
2.  Change PrismWeb host name to sisense.example_website.com on port 80.
alt
3.  Open the file C:\Windows\System32\drivers\etc\hosts and add mapping for the sites:
192.168.5.148 sisense.example_website.com
192.168.5.148 example_website.com
4.  Sign in to your SiSense application at sisense.example_website.com and configure the SSO as pictured below:
alt
5.  Place the following SSO script in the server location corresponding to the Remote Login URL in the server's root directory.  Please note that the SSO script can be implemented in any server-side language.  This example uses Python.  Example code has been attached for C#, PHP, and Python.  
sso-sub-domain.py from example_website.com
import time
import jwt # JWT library for python is available from https://github.com/progrium/pyjwt
import urllib

payload = {
    "iat": int(time.time()),
    "sub": "[email protected]",
    # "exp": int(time.time()) + 1000000  #optional- expiration time
    # "aud": "sisense" # optional- audiences parameter. can be either string or array of strings. Must contain the value "sisense"
}

# Shared key from SiSense SSO
shared_key = "807878265444cd943f40751704bd77d2"

# Create JWT token
jwt_string = jwt.encode(payload, shared_key)
 
# Encode JWT token for URL
encoded_jwt = urllib.quote_plus(jwt_string)

# SSO URL
ssoURL = 'http://sisense.example_website.com/jwt?jwt=' + encoded_jwt

# Redirection
print 'Location: %s' % ssoURL
print 'Content-Type: text/html'
print ''
  
6.  In index.html from example_website.com, the iframe source is the SiSense dashboard URL:  
index.html from example_website.com
<html>
<head>
<title>Example Website</title>
</head>
  <body>
    <p><b>example_website.com</b> - <b>SSO</b> login with embedded dashboard from    <b>sisense.example_website.com</b></p>
<iframe width="100%" height="100%" src='http://sisense.example_website.com/app/main#/dashboards/53b29843751b655443000018?embed=true' />
  </body>
</html>
7.  Navigate to example_website.com and you should see the specific dashboard you embedded.
Download:
Version history
Last update:
‎03-02-2023 08:42 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: