This guide illustrates how GlobaLeaks can be integrated into an existing website.
Main Components to Integrate¶
There are two main components that need to be integrated into an initiative’s website. They are:
- Submission interface (this lets a whistleblower make a new submission): /#/submission
- Receipt interface (this lets a whistleblower interact with an existing submission): /#/receipt
These are the main examples which are typically required. In general, though, every URL in GlobaLeaks can be embedded on the host’s website. If the URL Parameter ?embedded=true is appended to a GlobaLeaks URL, the page’s header and footer is removed and the page becomes embeddable within another page.
Depending on the integration requirements, the following configurations are possible:
- Plugin based integration (suggested)
- iframe based integration
Plugin Based Integration¶
The plugin safely loads the platform as a widget by calling the function StartGlobaLeaks(). This function can be used to embed specific platform resources. In the following example the submission interface is loaded when the link is clicked.
Iframe Based Integration¶
Using iframes to integrate GlobaLeaks into a website is not recommended because browsers are known to leak information about a whistleblowers browsing activity. However, they have been used in the past in low-risk environments and are worth mentioning. Including the two main components is similar to the plugin based solution discussed above.
<iframe width="100%" height="100%" frameborder="0" src="https://PublicWebsite/globaleaks/#/submission"></iframe>
<iframe width="100%" height="100%" frameborder="0" src="https://PublicWebsite/globaleaks/#/receipt"></iframe>
There are several URL parameters that a web developer can use to change the GlobaLeaks platform’s behaviour when integrating the platform into a website.
The lang URL parameter pre-selects the language used in the interface. The example below loads the submission interface in English.
The context URL parameter selects a specific submission context to load by passing a UUID. For example:
Note that a context’s UUIDs can be found on the platform in the context configuration section of the administration interface.
The receivers URL parameter selects specific recipients to the submission by passing a list of UUIDs. For example:
This configuration requires that the context parameter is set and the recipients are selected from among those configured for the specified context.
The UUIDs of recipients can be found on the platform in configuration section for each context.