Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Updates #1209

Merged
merged 3 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Primary configuration file. Contains:
- PhantomJS path
- Header logo (see [Logo Image Guide](logo-image.html) for details)
- Database configuration
- Integration settings (see [Integrations](integrations.html) for details)

### datawarehouse.json

Expand Down
52 changes: 52 additions & 0 deletions docs/integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Integrations

Open XDMoD can be integrated with other applications such as [Open OnDemand](https://openondemand.org/)

To enable integration, the Open XDMoD instance must be configured to give explicit permission to the browser.
The Open XDMoD application settings to enabled this are described below.

## Open XDMoD Settings

### Cross-Origin Resource Sharing (CORS)
To allow CORS a list of domains that are allowed to communicate with Open XDMoD is configured in
the `domains` setting in the `cors` section of `portal_settings.ini`.

plessbd marked this conversation as resolved.
Show resolved Hide resolved
This setting is a comma separated list where each item contains the scheme, host, and optional port.
```
[cors]
domains=https://integratedapp.example.tld,https://dev-integratedapp.example.tld:8080
```

**NOTE: This setting can open up Open XDMoD to security risks if used improperly.
Only enable it if you know what you are doing**

plessbd marked this conversation as resolved.
Show resolved Hide resolved
## Integration Guide

### Single Sign-on (SSO) Embedding
Open XDMoD allows for single sign on embedding so that end users do not have to explicitly sign
in to XDMoD after they have already signed in to the other integrated application.
When [SSO](simpleSAMLphp.html) is configured with the same IdP XDMoD can be embedded in an
iframe at the login endpoint and iusers will be automatically logged in.

When Open XDMoD detects a login within an iframe it will send a `postMessage` to `window.top`

The following is an example of how to handle this

```javascript
window.addEventListener("message", receiveMessage, false);

function receiveMessage(event) {
if (event.origin !== "{FQDN OF XDMOD INSTANCE WITH PROTOCOL AND PORT IF NEEDED}"){
console.log('Received message from untrusted origin, discarding');
return;
}
if(event.data.application == 'xdmod'){
if(event.data.message == 'loginComplete'){
console.log('XDMoD has logged in successfully');
}
if(event.data.message == 'error'){
console.log('ERROR: ' + event.data.info);
}
}
}
```
4 changes: 4 additions & 0 deletions docs/simpleSAMLphp.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ $ node app.js \
--httpsPrivateKey <PATH TO PRIVATE KEY> --httpsCert <PATH TO PRIVATE KEY> --https true
```

## Single Sign-on (SSO) Embedding
see [Integrations][integrations] for more information

[integrations]: integrations.html
[ssp]: https://simplesamlphp.org/
[ssp-config]: https://simplesamlphp.org/docs/stable/simplesamlphp-sp
[ssp-globusconfig]: https://github.com/ubccr/simplesamlphp-module-authglobus
Expand Down