https://oxpedia.org/wiki/api.php?action=feedcontributions&user=Cutmasta&feedformat=atom
Open-Xchange - User contributions [en]
2024-03-29T06:40:43Z
User contributions
MediaWiki 1.31.0
https://oxpedia.org/wiki/index.php?title=AppSuite:Client_Onboarding&diff=21879
AppSuite:Client Onboarding
2016-04-28T12:31:36Z
<p>Cutmasta: /* How can I quickly setup a default/test configuration ? */</p>
<hr />
<div><div class="title">Client Onboarding</div><br />
<br />
{{VersionFrom|7.8.1}}<br />
<br />
__TOC__<br />
<br />
= Configuration guide for Open-Xchange Client Onboarding =<br />
<br />
With Open-Xchange Server v7.8.1 a new module is added allowing users to integrate several different clients and devices with Open-Xchange; such as providing a link to a commercial App Store to install certain apps on mobile devices.<br />
<br />
By default, Open-Xchange ships with several built-in providers; thereof<br />
<br />
* CalDAV<br />
* CardDAV<br />
* OX Mail App<br />
* OX Drive App<br />
* Connector for Microsoft Outlook®<br />
* Sync App for Android<br />
* Microsoft ActiveSync<br />
* eM Client<br />
* Mail (IMAP/SMTP)<br />
* Generic Mobile App provider<br />
<br />
Those providers allow accessing and/or synchronizing with certain data held by Open-Xchange on a supported device.<br />
<br />
== Installation ==<br />
<br />
To install the Client Onboarding module, the package open-xchange-client-onboarding needs to be installed.<br />
<br />
Moreover the property <code>"com.openexchange.client.onboarding.enabled"</code>; in installed file <code>/opt/open-xchange/etc/client-onboarding.properties</code> needs to be set to <code>"true"</code> (default). So getting rid off the entire client on-boarding module simply requires setting the mentioned property to <code>"false"</code> (and executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool).<br />
<br />
== Onboarding scenarios ==<br />
<br />
The way to specify what and how a certain device is able to get “on-boarded” is mainly determined by so called scenarios. A scenario describes what gets deployed using which providers that contribute their onboarding possibilities and how it is made accessible to the client’s device.<br />
<br />
A scenario consists of the following configuration attributes/options<br />
<br />
* A unique scenario identifier<br />
* A flag determining if scenario is enabled or not. If set to 'false' the scenario will not be available, useful for testing/enabling the scenario later on<br />
* A scenario type, which is one of &quot;plist&quot;, &quot;manual&quot;, or &quot;link&quot;<br />
** &quot;plist&quot; for generating a PLIST configuration file for iOS and OSX devices,<br />
** &quot;manual&quot; for a description for the user for a manual set-up/configuration<br />
** &quot;link&quot; for a link/URL to either Apple App Store / Google Play Store or to downloadable executable<br />
* The &quot;link&quot; attribute, which is only considered it type is set to &quot;link&quot;. That attribute consists of the sub-attributes &quot;url&quot; and &quot;type&quot;.<br />
** &quot;url&quot; provides the actual link/URL to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. For specifying a property that provides the actual link, please use special &quot;property&quot; scheme; e.g. &quot;property://com.openexchange.client.onboarding.app.mylink&quot;<br />
** &quot;type&quot; indicates if &quot;url&quot; holds a link for either Apple App Store, Apple Mac Store or Google Play Store. Must only be specified in case &quot;url&quot; points either of those commercial stores. Supported values are &quot;appstore&quot;, &quot;macstore&quot; and &quot;playstore&quot;<br />
* The identifiers for the providers, which contribute to the scenario;<br /><br />
please check command-line tool <code>/opt/open-xchange/sbin/listonboardingproviders</code> to check, which ones are available<br />
* The identifiers for alternative scenarios. This is typically used to provide alternative manual setup possibility.<br />
* The comma-separated names of Font Awesome icons that are supposed to be displayed for the scenario<br /><br />
(only the ones from v4.4.0 are currently supported)<br />
* The translatable display name; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
* The translatable description; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
<br />
== Onboarding providers ==<br />
<br />
As described in the previous section, a scenario specifies what providers contribute to it. A provider represents a certain App or (synchronization) protocol that a device can install, download and/or communicate with.<br />
<br />
Moreover a provider specifies what Onboarding types are supported (&quot;plist&quot;, &quot;manual&quot;, and/or &quot;link&quot;). Hence, once a provider is chosen to contribute to a certain scenario, the supported on-boarding type needs to match the one of the scenario itself. E.g. a scenario, which indicates to be of type &quot;link&quot;, will always fail if the associated provider signals to support types &quot;plist&quot; and &quot;manual&quot;.<br />
<br />
To check what providers are available on your system, please execute the <code>/opt/open-xchange/sbin/listonboardingproviders</code> command-line tool, which outputs something like:<br />
<br />
[[File:onboarding_1.png]]<br />
<br />
Each provider might require one or more capabilities/permissions to be available for the requesting user. If capabilities/permissions are not satisfied, the associated scenario cannot be applied, but will be displayed to the user for upsell opportunities.<br />
<br />
=== Generic Onboarding provider for Apps ===<br />
<br />
Identifier: <code>app</code><br />
<br />
The generic onboarding provider for apps allows specifying custom scenarios of type &quot;link&quot; for arbitrary links/URLs pointing to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. The link can be set directly or via a property.<br />
<br />
This provider requires no capability/permission.<br />
<br />
An exemplary section in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file might look like (check &quot;Configuring Onboarding scenarios&quot; chapter for more details):<br />
<br />
[[File:onboarding_2.png]]<br />
<br />
=== CalDAV/CardDAV ===<br />
<br />
Identifiers: <code>caldav</code> &amp; <code>carddav</code><br />
<br />
In order for a scenario (having CalDAV/CardDAV in its provider listing) to be executable by a user, the &quot;caldav&quot; capability and &quot;carddav&quot; capability respectively are required.<br />
<br />
Moreover, the appropriate *DAV end-points are supposed to be configured through property <code>com.openexchange.client.onboarding.caldav.url</code> in <code>client-onboarding-caldav.properties</code> file and property <code>com.openexchange.client.onboarding.carddav.url</code> in <code>client-onboarding-carddav.properties</code> file.<br />
<br />
=== Drive/Mail Apps ===<br />
<br />
Identifiers: <code>driveapp</code> &amp; <code>mailapp</code><br />
<br />
Open-Xchange ships with built-in providers for Drive App and Mail App. The Drive-associated providers do require the &quot;drive&quot; capability and the Mail App requires the &quot;mobile_mail_app&quot; one.<br />
<br />
The appropriate links to the apps in the corresponding stores are configured in associated .properties files:<br />
<br />
* <code>client-onboarding-driveapp.properties</code><br />
* <code>client-onboarding-mailapp.properties</code><br />
<br />
By default the links to the official apps are set, but may be changed to ones for branded versions.<br />
<br />
=== Drive Windows Client ===<br />
<br />
Identifier: <code>drivewindowsclient</code><br />
<br />
The provider for the windows Drive Client. Requires the &quot;drive&quot; capability, but has no configuration options. However, this provider requires the &quot;open-xchange-drive-client-windows&quot; and the orderly configured binaries (e.g. through installing appropriate package according to the brand).<br />
<br />
Please check [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows ''this''] documentation for more details.<br />
<br />
<!-- === eM Client ===<br />
<br />
Identifier: <code>emclient</code><br />
<br />
The provider for the eM Client needs the &quot;emclient&quot; capability.<br />
<br />
Allows to configure the URL pointing to the executable file through <code>com.openexchange.client.onboarding.emclient.url</code> in file 'client-onboarding-emclient.properties' file.<br />
<br />
=== Sync App ===<br />
<br />
Identifier: <code>syncapp</code><br />
<br />
The provider for the Sync App for Android. Requires &quot;caldav&quot; and &quot;carddav&quot; capabilities.<br />
<br />
The link to Google Play Store is specified via property <code>com.openexchange.client.onboarding.syncapp.store.google.playstore</code> in <code>client-onboarding-syncapp.properties</code> file. --><br />
<br />
=== Mail (IMAP/SMTP) ===<br />
<br />
Identifier: <code>mail</code><br />
<br />
The provider for deploying the IMAP/STMP account on target device using native/stock mail app. All IMAP/SMTP related settings are settable in file 'client-onboarding-mail.properties'.<br />
<br />
=== Microsoft ActiveSync (EAS) ===<br />
<br />
Identifier: <code>eas</code><br />
<br />
Configures the ActiveSync account on target device. Allows specifying the EAS end-point through <code>com.openexchange.client.onboarding.eas.url</code> property in 'client-onboarding-eas.properties'.<br />
<br />
=== OX Updater ===<br />
<br />
Identifier: <code>oxupdater</code><br />
<br />
The provider offering the download for the OX Client Updater ([http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''http:''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''//oxpedia''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''org/wiki/index''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''php''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''?''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''title=AppSuite''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater '':''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''Open-Xchange_Updater'']). The provider is available as soon as the according package is installed and at least one product can be installed/updated via it by the user. A pre-configured scenario 'oxupdaterinstall' is already contained in <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code>.<br />
<br />
== Configuring Onboarding scenarios ==<br />
<br />
Onboarding scenarios are configured through the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Each scenario starts with its own &quot;section&quot; in that YAML file by typing its unique identifier. All further attributes as outlined in chapter &quot;Onboarding scenarios&quot; are nested below that identifier.<br />
<br />
=== Easily enabling/disabling scenarios ===<br />
<br />
By default, Open-Xchange ships with a set of pre-defined scenarios that might apply to the most common installations. Each scenario can easily be enabled/disabled through its &quot;enabled&quot; Boolean attribute in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool applies the changes without the need for restart.<br />
<br />
=== Translatable strings ===<br />
<br />
Those attributes ending with &quot;_t10e&quot; refer to localizable strings and are placed into &quot;client-onboarding-scenarios.pot&quot; file. Once such attributes ending with &quot;_t10e&quot; are changed/customized and/or added, the appropriate &quot;client-onboarding-scenarios.pot&quot; file needs to be re-created in order to get translated. For generating that &quot;client-onboarding-scenarios.pot&quot; file, please execute the /opt/open-xchange/sbin/parsei18nyaml command-line tool. That .pot file needs then be turned to the .po files for the individual languages.<br />
<br />
Thus changing any of the attributes ending with &quot;_t10e&quot; requires (provided that appropriate .po files are available in <code>/opt/open-xchange/i18n</code> directory) either a restart or executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool together with stop/start of the &quot;com.openexchange.i18n&quot; bundle.<br />
<br />
=== Scenario scope ===<br />
<br />
While the previously mentioned &quot;enabled&quot; attribute offers some kind of generic on/off switch, the properties outlined in this section allow defining the scope for a scenario. Scope in terms of<br />
<br />
* For what devices (from the set of those specified by providers) is that scenario available and<br />
* For which users is it available<br />
<br />
As explained above, each scenario specifies one or more type-compatible providers associated with it. In turn, each provider determines to which devices the scenario applies. In order to further control, which device and which users are allowed to access a certain scenario, there are appropriate options available in file <code>/opt/open-xchange/etc/client-onboarding.properties</code>. Every option is fully [http://oxpedia.org/wiki/index.php?title=ConfigCascade ''config-cascade''] aware and therefore can be controlled on a global, per context set, per context and per user basis.<br />
<br />
Thus, to make a scenario available for certain devices (as dictated by scenario’s providers) and for users as well, the scenario identifier needs to be added to the appropriate properties ending with &quot;.scenarios&quot; (for devices) and added to the &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property (for user) as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.apple.mac.scenarios<br /><br />
com.openexchange.client.onboarding.apple.ipad.scenarios<br /><br />
com.openexchange.client.onboarding.apple.iphone.scenarios<br /><br />
com.openexchange.client.onboarding.android.tablet.scenarios<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios<br /><br />
com.openexchange.client.onboarding.windows.desktop.scenarios<br />
<br />
com.openexchange.client.onboarding.enabledScenarios<br />
</blockquote><br />
Once a scenario is made accessible through configuration it is visible to users trying to perform a client onboarding using one of associated devices. However, whether a user is effectively allowed to execute that scenario is determined by the required capabilities of the denoted providers; if not allowed it gets displayed as an upsell opportunity.<br />
<br />
=== Configuring actions ===<br />
<br />
The type for a scenario determines what actions are associated with it to &quot;''transport''&quot; the onboarding information to the client. The types &quot;manual&quot; and &quot;link&quot; only show static information like displaying a link. In contrast the type &quot;plist&quot; allows several actions to transport the configuration profile onto the client. Thereof<br />
<br />
* E-Mail<br />
* SMS<br />
<br />
In order to utilize the &quot;E-Mail&quot; action, a special transport must be configured for system-composed E-Mails [http://oxpedia.org/wiki/index.php?title=AppSuite:Sharing_and_Guest_Mode#Share_Notifications ''as it is for using the sharing functionality'']. This transport is configured in noreply.properties. All properties therein are config-cascade capable, so their values can be sensitive to the current user or context.<br />
<br />
Using the SMS action requires a SIP Gate being available. Please check [http://oxpedia.org/wiki/index.php?title=AppSuite:SMS_Sipgate ''this documentation''] how to setup a SIP Gate for sending SMS to capable clients.<br />
<br />
Moreover, scenarios of type &quot;plist&quot; require having PLIST-signing enabled. Otherwise the device will show a warning when importing a received PLIST configuration profile. Please follow the instructions as outlined in [http://oxpedia.org/wiki/index.php?title=AppSuite:PList_signing ''this article''] how to enable and configure signing for PLIST files.<br />
<br />
== Adding custom scenarios ==<br />
<br />
The first thing to do, is to add an appropriate scenario configuration to the 'client-onboarding-scenarios.yml' file; e.g.<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The next step is to make that scenario accessible through adapting 'client-onboarding.properties' file. Hence, the scenario identifier needs to be added to the devices, to which it applies (Android devices in this case):<br />
<br />
<blockquote>com.openexchange.client.onboarding.android.tablet.scenarios=..., mygoogleapp<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios=..., mygoogleapp<br />
</blockquote><br />
Furthermore, that scenario needs to be made accessible to users as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.enabledScenarios=..., mygoogleapp<br />
</blockquote><br />
At last, a .pot file is supposed to be generated from the translatable strings using /opt/open-xchange/sbin/parsei18nyaml command-line tool to yield the .po files for the individual languages.<br />
<br />
Provided that target users do hold appropriate capabilities, they are allowed to execute that scenario. In the example above the &quot;app&quot; provider is specified, which does no require any capabilities. Hence, that scenario is available.<br />
<br />
== HowTos ==<br />
<br />
=== How can I quickly setup a default/test configuration ? ===<br />
<br />
# Install open-xchange-client-onboarding package<br />
# Edit <code>/opt/open-xchange/etc/client-onboarding.properties</code> and set <code>com.openexchange.client.onboarding.enabled</code> to <code>true</code> <br />
# Edit <code>noreply.properties</code> to enable autoconfig sending via email. PS: Have a fully working smtp login available like “noreply@yourdomain.tld”<br />
# Edit client-onboarding-scenarios.yml and set “enable” for : “driveappinstall” , “davsync” “davmanual” “mailsync” “mailmanual” to <code>true</code> <br />
# Now set the correct caldav/carddav server FQDNs in the corresponding files for your setup<br />
#*<code>client-onboarding-caldav.properties</code> <br />
#*<code>client-onboarding-carddav.properties</code><br />
# Restart OX process<br />
# Login to AppSuite. Click on Settings - Connect your device<br />
# Verify that you have following onboarding options available: <br />
#* windows -> imap/smtp details<br />
#* android/fon+tablet -> imap/smtp details<br />
#* android/fon+tablet -> drive app <br />
#* apple -> iphone -> imap/smtp config button<br />
#* apple -> iphone -> imap/smtp details for experts<br />
#* apple -> iphone -> calendar/addressbok -> config button<br />
#* apple -> iphone -> calendar/addressbok -> details for dav setup<br />
#* apple -> iphone -> drive app<br />
#* apple -> ipad -> imap/smtp config send email<br />
#* apple -> ipad -> imap/smtp config button<br />
#* apple -> ipad -> imap/smtp details for experts<br />
#* apple -> ipad -> calendar/addressbook config send email<br />
#* apple -> ipad -> calendar/addressbook config button<br />
#* apple -> ipad -> calendar/addressbook details for experts<br />
#* apple -> ipad -> drive app<br />
<br />
=== How can I quickly disable a certain scenario ===<br />
<br />
Simply enter the 'client-onboarding-scenarios.yml' file and go to the section specifying the target scenario. Switch the 'enabled' flag to &quot;false&quot; and execute /opt/open-xchange/sbin/reloadconfiguration command-line tool.<br />
<br />
E.g. to disable the OX Drive App:<br />
<br />
[[File:onboarding_3.png]]<br />
<br />
=== How can I add my own App? ===<br />
<br />
Provided that the App is accessible by a link (pointing to a commercial App Store or to a downloadable executable/installer), the generic &quot;app&quot; is the suitable provider to choose.<br />
<br />
Hence, an appropriate section is supposed to be added to the 'client-onboarding-scenarios.yml' file having a unique name and &quot;provider&quot; attribute set to &quot;[app]&quot;:<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The attribute &quot;type&quot; needs to be set to &quot;link&quot;.<br />
<br />
The attribute &quot;link&quot; should be configured with:<br />
<br />
* &quot;url&quot; sub-attribute containing the actual link pointing to the URL location<br />
* &quot;type&quot; sub-attribute specifying of what type that link is: either &quot;appstore&quot;, &quot;macappstore&quot;, &quot;playstore&quot; or &quot;common&quot;.<br /><br />
The type &quot;common&quot; is supposed to be used for links that do not point to a commercial App Store, but to a downloadable executable/installer file.<br />
<br />
The &quot;icon&quot; attribute is supposed to contain a comma-separated list of Font Awesome icons (only the ones from v4.4.0 are currently supported) that represent the App; e.g.<br />
<br />
* &quot;fa-cloud&quot; for Drive/file-related nature<br />
* &quot;fa-calendar, fa-users&quot; for Calendar and Address Book synchronization<br />
* &quot;fa-envelope-o&quot; for Mail nature<br />
<br />
Next, the translatable display name and description should be set through setting the attributes &quot;displayName_t10e&quot; and &quot;description_t10e&quot;. As described previously, executing the /opt/open-xchange/sbin/parsei18nyaml command-line tool yields an appropriate .pot file, which can then be used for generating the individual .po file for the different translations.<br />
<br />
Finally, the 'client-onboarding.properties' file needs to be modified to specify the &quot;scope&quot; for that new scenario. Add the scenario’s unique name to the appropriate device properties and add it to &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property as well.<br />
<br />
After executing /opt/open-xchange/sbin/reloadconfiguration command-line tool the new client onboarding scenario is available for the selected users/devices.<br />
<br />
=== How can I upsell my own app? ===<br />
<br />
Having the same prerequisites/steps as for &quot;How can I add my own App?&quot; the scenario description in the 'client-onboarding-scenarios.yml' file simply needs to be extended by the desired capabilities, which are supposed to be used for managing the upsell.<br />
<br />
Example<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
'''capabilities: &quot;mygoogleapp_capability&quot;'''<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The special &quot;capabilities&quot; attribute is only supported for scenarios of type &quot;link&quot; with the special &quot;app&quot; provider.<br />
<br />
With such a &quot;capabilities&quot; attribute only users, which have the &quot;mygoogleapp_capability&quot; capability are allowed to get the link. For those who don’t, the upsell opportunity will be displayed; e.g.<br />
<br />
<blockquote>[[File:onboarding_4.png]]<br />
</blockquote></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Client_Onboarding&diff=21878
AppSuite:Client Onboarding
2016-04-28T12:31:11Z
<p>Cutmasta: /* How can I quickly setup a default/test configuration ? */</p>
<hr />
<div><div class="title">Client Onboarding</div><br />
<br />
{{VersionFrom|7.8.1}}<br />
<br />
__TOC__<br />
<br />
= Configuration guide for Open-Xchange Client Onboarding =<br />
<br />
With Open-Xchange Server v7.8.1 a new module is added allowing users to integrate several different clients and devices with Open-Xchange; such as providing a link to a commercial App Store to install certain apps on mobile devices.<br />
<br />
By default, Open-Xchange ships with several built-in providers; thereof<br />
<br />
* CalDAV<br />
* CardDAV<br />
* OX Mail App<br />
* OX Drive App<br />
* Connector for Microsoft Outlook®<br />
* Sync App for Android<br />
* Microsoft ActiveSync<br />
* eM Client<br />
* Mail (IMAP/SMTP)<br />
* Generic Mobile App provider<br />
<br />
Those providers allow accessing and/or synchronizing with certain data held by Open-Xchange on a supported device.<br />
<br />
== Installation ==<br />
<br />
To install the Client Onboarding module, the package open-xchange-client-onboarding needs to be installed.<br />
<br />
Moreover the property <code>"com.openexchange.client.onboarding.enabled"</code>; in installed file <code>/opt/open-xchange/etc/client-onboarding.properties</code> needs to be set to <code>"true"</code> (default). So getting rid off the entire client on-boarding module simply requires setting the mentioned property to <code>"false"</code> (and executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool).<br />
<br />
== Onboarding scenarios ==<br />
<br />
The way to specify what and how a certain device is able to get “on-boarded” is mainly determined by so called scenarios. A scenario describes what gets deployed using which providers that contribute their onboarding possibilities and how it is made accessible to the client’s device.<br />
<br />
A scenario consists of the following configuration attributes/options<br />
<br />
* A unique scenario identifier<br />
* A flag determining if scenario is enabled or not. If set to 'false' the scenario will not be available, useful for testing/enabling the scenario later on<br />
* A scenario type, which is one of &quot;plist&quot;, &quot;manual&quot;, or &quot;link&quot;<br />
** &quot;plist&quot; for generating a PLIST configuration file for iOS and OSX devices,<br />
** &quot;manual&quot; for a description for the user for a manual set-up/configuration<br />
** &quot;link&quot; for a link/URL to either Apple App Store / Google Play Store or to downloadable executable<br />
* The &quot;link&quot; attribute, which is only considered it type is set to &quot;link&quot;. That attribute consists of the sub-attributes &quot;url&quot; and &quot;type&quot;.<br />
** &quot;url&quot; provides the actual link/URL to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. For specifying a property that provides the actual link, please use special &quot;property&quot; scheme; e.g. &quot;property://com.openexchange.client.onboarding.app.mylink&quot;<br />
** &quot;type&quot; indicates if &quot;url&quot; holds a link for either Apple App Store, Apple Mac Store or Google Play Store. Must only be specified in case &quot;url&quot; points either of those commercial stores. Supported values are &quot;appstore&quot;, &quot;macstore&quot; and &quot;playstore&quot;<br />
* The identifiers for the providers, which contribute to the scenario;<br /><br />
please check command-line tool <code>/opt/open-xchange/sbin/listonboardingproviders</code> to check, which ones are available<br />
* The identifiers for alternative scenarios. This is typically used to provide alternative manual setup possibility.<br />
* The comma-separated names of Font Awesome icons that are supposed to be displayed for the scenario<br /><br />
(only the ones from v4.4.0 are currently supported)<br />
* The translatable display name; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
* The translatable description; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
<br />
== Onboarding providers ==<br />
<br />
As described in the previous section, a scenario specifies what providers contribute to it. A provider represents a certain App or (synchronization) protocol that a device can install, download and/or communicate with.<br />
<br />
Moreover a provider specifies what Onboarding types are supported (&quot;plist&quot;, &quot;manual&quot;, and/or &quot;link&quot;). Hence, once a provider is chosen to contribute to a certain scenario, the supported on-boarding type needs to match the one of the scenario itself. E.g. a scenario, which indicates to be of type &quot;link&quot;, will always fail if the associated provider signals to support types &quot;plist&quot; and &quot;manual&quot;.<br />
<br />
To check what providers are available on your system, please execute the <code>/opt/open-xchange/sbin/listonboardingproviders</code> command-line tool, which outputs something like:<br />
<br />
[[File:onboarding_1.png]]<br />
<br />
Each provider might require one or more capabilities/permissions to be available for the requesting user. If capabilities/permissions are not satisfied, the associated scenario cannot be applied, but will be displayed to the user for upsell opportunities.<br />
<br />
=== Generic Onboarding provider for Apps ===<br />
<br />
Identifier: <code>app</code><br />
<br />
The generic onboarding provider for apps allows specifying custom scenarios of type &quot;link&quot; for arbitrary links/URLs pointing to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. The link can be set directly or via a property.<br />
<br />
This provider requires no capability/permission.<br />
<br />
An exemplary section in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file might look like (check &quot;Configuring Onboarding scenarios&quot; chapter for more details):<br />
<br />
[[File:onboarding_2.png]]<br />
<br />
=== CalDAV/CardDAV ===<br />
<br />
Identifiers: <code>caldav</code> &amp; <code>carddav</code><br />
<br />
In order for a scenario (having CalDAV/CardDAV in its provider listing) to be executable by a user, the &quot;caldav&quot; capability and &quot;carddav&quot; capability respectively are required.<br />
<br />
Moreover, the appropriate *DAV end-points are supposed to be configured through property <code>com.openexchange.client.onboarding.caldav.url</code> in <code>client-onboarding-caldav.properties</code> file and property <code>com.openexchange.client.onboarding.carddav.url</code> in <code>client-onboarding-carddav.properties</code> file.<br />
<br />
=== Drive/Mail Apps ===<br />
<br />
Identifiers: <code>driveapp</code> &amp; <code>mailapp</code><br />
<br />
Open-Xchange ships with built-in providers for Drive App and Mail App. The Drive-associated providers do require the &quot;drive&quot; capability and the Mail App requires the &quot;mobile_mail_app&quot; one.<br />
<br />
The appropriate links to the apps in the corresponding stores are configured in associated .properties files:<br />
<br />
* <code>client-onboarding-driveapp.properties</code><br />
* <code>client-onboarding-mailapp.properties</code><br />
<br />
By default the links to the official apps are set, but may be changed to ones for branded versions.<br />
<br />
=== Drive Windows Client ===<br />
<br />
Identifier: <code>drivewindowsclient</code><br />
<br />
The provider for the windows Drive Client. Requires the &quot;drive&quot; capability, but has no configuration options. However, this provider requires the &quot;open-xchange-drive-client-windows&quot; and the orderly configured binaries (e.g. through installing appropriate package according to the brand).<br />
<br />
Please check [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows ''this''] documentation for more details.<br />
<br />
<!-- === eM Client ===<br />
<br />
Identifier: <code>emclient</code><br />
<br />
The provider for the eM Client needs the &quot;emclient&quot; capability.<br />
<br />
Allows to configure the URL pointing to the executable file through <code>com.openexchange.client.onboarding.emclient.url</code> in file 'client-onboarding-emclient.properties' file.<br />
<br />
=== Sync App ===<br />
<br />
Identifier: <code>syncapp</code><br />
<br />
The provider for the Sync App for Android. Requires &quot;caldav&quot; and &quot;carddav&quot; capabilities.<br />
<br />
The link to Google Play Store is specified via property <code>com.openexchange.client.onboarding.syncapp.store.google.playstore</code> in <code>client-onboarding-syncapp.properties</code> file. --><br />
<br />
=== Mail (IMAP/SMTP) ===<br />
<br />
Identifier: <code>mail</code><br />
<br />
The provider for deploying the IMAP/STMP account on target device using native/stock mail app. All IMAP/SMTP related settings are settable in file 'client-onboarding-mail.properties'.<br />
<br />
=== Microsoft ActiveSync (EAS) ===<br />
<br />
Identifier: <code>eas</code><br />
<br />
Configures the ActiveSync account on target device. Allows specifying the EAS end-point through <code>com.openexchange.client.onboarding.eas.url</code> property in 'client-onboarding-eas.properties'.<br />
<br />
=== OX Updater ===<br />
<br />
Identifier: <code>oxupdater</code><br />
<br />
The provider offering the download for the OX Client Updater ([http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''http:''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''//oxpedia''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''org/wiki/index''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''php''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''?''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''title=AppSuite''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater '':''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''Open-Xchange_Updater'']). The provider is available as soon as the according package is installed and at least one product can be installed/updated via it by the user. A pre-configured scenario 'oxupdaterinstall' is already contained in <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code>.<br />
<br />
== Configuring Onboarding scenarios ==<br />
<br />
Onboarding scenarios are configured through the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Each scenario starts with its own &quot;section&quot; in that YAML file by typing its unique identifier. All further attributes as outlined in chapter &quot;Onboarding scenarios&quot; are nested below that identifier.<br />
<br />
=== Easily enabling/disabling scenarios ===<br />
<br />
By default, Open-Xchange ships with a set of pre-defined scenarios that might apply to the most common installations. Each scenario can easily be enabled/disabled through its &quot;enabled&quot; Boolean attribute in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool applies the changes without the need for restart.<br />
<br />
=== Translatable strings ===<br />
<br />
Those attributes ending with &quot;_t10e&quot; refer to localizable strings and are placed into &quot;client-onboarding-scenarios.pot&quot; file. Once such attributes ending with &quot;_t10e&quot; are changed/customized and/or added, the appropriate &quot;client-onboarding-scenarios.pot&quot; file needs to be re-created in order to get translated. For generating that &quot;client-onboarding-scenarios.pot&quot; file, please execute the /opt/open-xchange/sbin/parsei18nyaml command-line tool. That .pot file needs then be turned to the .po files for the individual languages.<br />
<br />
Thus changing any of the attributes ending with &quot;_t10e&quot; requires (provided that appropriate .po files are available in <code>/opt/open-xchange/i18n</code> directory) either a restart or executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool together with stop/start of the &quot;com.openexchange.i18n&quot; bundle.<br />
<br />
=== Scenario scope ===<br />
<br />
While the previously mentioned &quot;enabled&quot; attribute offers some kind of generic on/off switch, the properties outlined in this section allow defining the scope for a scenario. Scope in terms of<br />
<br />
* For what devices (from the set of those specified by providers) is that scenario available and<br />
* For which users is it available<br />
<br />
As explained above, each scenario specifies one or more type-compatible providers associated with it. In turn, each provider determines to which devices the scenario applies. In order to further control, which device and which users are allowed to access a certain scenario, there are appropriate options available in file <code>/opt/open-xchange/etc/client-onboarding.properties</code>. Every option is fully [http://oxpedia.org/wiki/index.php?title=ConfigCascade ''config-cascade''] aware and therefore can be controlled on a global, per context set, per context and per user basis.<br />
<br />
Thus, to make a scenario available for certain devices (as dictated by scenario’s providers) and for users as well, the scenario identifier needs to be added to the appropriate properties ending with &quot;.scenarios&quot; (for devices) and added to the &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property (for user) as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.apple.mac.scenarios<br /><br />
com.openexchange.client.onboarding.apple.ipad.scenarios<br /><br />
com.openexchange.client.onboarding.apple.iphone.scenarios<br /><br />
com.openexchange.client.onboarding.android.tablet.scenarios<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios<br /><br />
com.openexchange.client.onboarding.windows.desktop.scenarios<br />
<br />
com.openexchange.client.onboarding.enabledScenarios<br />
</blockquote><br />
Once a scenario is made accessible through configuration it is visible to users trying to perform a client onboarding using one of associated devices. However, whether a user is effectively allowed to execute that scenario is determined by the required capabilities of the denoted providers; if not allowed it gets displayed as an upsell opportunity.<br />
<br />
=== Configuring actions ===<br />
<br />
The type for a scenario determines what actions are associated with it to &quot;''transport''&quot; the onboarding information to the client. The types &quot;manual&quot; and &quot;link&quot; only show static information like displaying a link. In contrast the type &quot;plist&quot; allows several actions to transport the configuration profile onto the client. Thereof<br />
<br />
* E-Mail<br />
* SMS<br />
<br />
In order to utilize the &quot;E-Mail&quot; action, a special transport must be configured for system-composed E-Mails [http://oxpedia.org/wiki/index.php?title=AppSuite:Sharing_and_Guest_Mode#Share_Notifications ''as it is for using the sharing functionality'']. This transport is configured in noreply.properties. All properties therein are config-cascade capable, so their values can be sensitive to the current user or context.<br />
<br />
Using the SMS action requires a SIP Gate being available. Please check [http://oxpedia.org/wiki/index.php?title=AppSuite:SMS_Sipgate ''this documentation''] how to setup a SIP Gate for sending SMS to capable clients.<br />
<br />
Moreover, scenarios of type &quot;plist&quot; require having PLIST-signing enabled. Otherwise the device will show a warning when importing a received PLIST configuration profile. Please follow the instructions as outlined in [http://oxpedia.org/wiki/index.php?title=AppSuite:PList_signing ''this article''] how to enable and configure signing for PLIST files.<br />
<br />
== Adding custom scenarios ==<br />
<br />
The first thing to do, is to add an appropriate scenario configuration to the 'client-onboarding-scenarios.yml' file; e.g.<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The next step is to make that scenario accessible through adapting 'client-onboarding.properties' file. Hence, the scenario identifier needs to be added to the devices, to which it applies (Android devices in this case):<br />
<br />
<blockquote>com.openexchange.client.onboarding.android.tablet.scenarios=..., mygoogleapp<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios=..., mygoogleapp<br />
</blockquote><br />
Furthermore, that scenario needs to be made accessible to users as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.enabledScenarios=..., mygoogleapp<br />
</blockquote><br />
At last, a .pot file is supposed to be generated from the translatable strings using /opt/open-xchange/sbin/parsei18nyaml command-line tool to yield the .po files for the individual languages.<br />
<br />
Provided that target users do hold appropriate capabilities, they are allowed to execute that scenario. In the example above the &quot;app&quot; provider is specified, which does no require any capabilities. Hence, that scenario is available.<br />
<br />
== HowTos ==<br />
<br />
=== How can I quickly setup a default/test configuration ? ===<br />
<br />
# Install open-xchange-client-onboarding package<br />
# Edit <code>/opt/open-xchange/etc/client-onboarding.properties</code> and set <code>com.openexchange.client.onboarding.enabled</code> to <code>true</code> <br />
# Edit <code>noreply.properties</code> to enable autoconfig sending via email. PS: Have a fully working smtp login available like “noreply@yourdomain.tld”<br />
# Edit client-onboarding-scenarios.yml and set “enable” for : “driveappinstall” , “davsync” “davmanual” “mailsync” “mailmanual” to <code>true</code> <br />
# Now set the correct caldav/carddav server FQDNs in the corresponding files for your setup<br />
#*<code>client-onboarding-caldav.properties</code> <br />
#*<code>client-onboarding-carddav.properties</code><br />
# Restart OX process<br />
# Login to AppSuite. Click on Settings - Connect your device<br />
# Verify that you have following onboarding options available: <br />
#* windows -> imap/smtp details<br />
#* android/fon+tablet -> imap/smtp details<br />
#* android/fon+tablet -> drive app <br />
#* apple -> iphone -> imap/smtp konfig button<br />
#* apple -> iphone -> imap/smtp details for experts<br />
#* apple -> iphone -> calendar/addressbok -> konfig button<br />
#* apple -> iphone -> calendar/addressbok -> details for dav setup<br />
#* apple -> iphone -> drive app<br />
#* apple -> ipad -> imap/smtp konfig send email<br />
#* apple -> ipad -> imap/smtp konfig button<br />
#* apple -> ipad -> imap/smtp details for experts<br />
#* apple -> ipad -> calendar/addressbook konfig send email<br />
#* apple -> ipad -> calendar/addressbook konfig button<br />
#* apple -> ipad -> calendar/addressbook details for experts<br />
#* apple -> ipad -> drive app<br />
<br />
=== How can I quickly disable a certain scenario ===<br />
<br />
Simply enter the 'client-onboarding-scenarios.yml' file and go to the section specifying the target scenario. Switch the 'enabled' flag to &quot;false&quot; and execute /opt/open-xchange/sbin/reloadconfiguration command-line tool.<br />
<br />
E.g. to disable the OX Drive App:<br />
<br />
[[File:onboarding_3.png]]<br />
<br />
=== How can I add my own App? ===<br />
<br />
Provided that the App is accessible by a link (pointing to a commercial App Store or to a downloadable executable/installer), the generic &quot;app&quot; is the suitable provider to choose.<br />
<br />
Hence, an appropriate section is supposed to be added to the 'client-onboarding-scenarios.yml' file having a unique name and &quot;provider&quot; attribute set to &quot;[app]&quot;:<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The attribute &quot;type&quot; needs to be set to &quot;link&quot;.<br />
<br />
The attribute &quot;link&quot; should be configured with:<br />
<br />
* &quot;url&quot; sub-attribute containing the actual link pointing to the URL location<br />
* &quot;type&quot; sub-attribute specifying of what type that link is: either &quot;appstore&quot;, &quot;macappstore&quot;, &quot;playstore&quot; or &quot;common&quot;.<br /><br />
The type &quot;common&quot; is supposed to be used for links that do not point to a commercial App Store, but to a downloadable executable/installer file.<br />
<br />
The &quot;icon&quot; attribute is supposed to contain a comma-separated list of Font Awesome icons (only the ones from v4.4.0 are currently supported) that represent the App; e.g.<br />
<br />
* &quot;fa-cloud&quot; for Drive/file-related nature<br />
* &quot;fa-calendar, fa-users&quot; for Calendar and Address Book synchronization<br />
* &quot;fa-envelope-o&quot; for Mail nature<br />
<br />
Next, the translatable display name and description should be set through setting the attributes &quot;displayName_t10e&quot; and &quot;description_t10e&quot;. As described previously, executing the /opt/open-xchange/sbin/parsei18nyaml command-line tool yields an appropriate .pot file, which can then be used for generating the individual .po file for the different translations.<br />
<br />
Finally, the 'client-onboarding.properties' file needs to be modified to specify the &quot;scope&quot; for that new scenario. Add the scenario’s unique name to the appropriate device properties and add it to &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property as well.<br />
<br />
After executing /opt/open-xchange/sbin/reloadconfiguration command-line tool the new client onboarding scenario is available for the selected users/devices.<br />
<br />
=== How can I upsell my own app? ===<br />
<br />
Having the same prerequisites/steps as for &quot;How can I add my own App?&quot; the scenario description in the 'client-onboarding-scenarios.yml' file simply needs to be extended by the desired capabilities, which are supposed to be used for managing the upsell.<br />
<br />
Example<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
'''capabilities: &quot;mygoogleapp_capability&quot;'''<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The special &quot;capabilities&quot; attribute is only supported for scenarios of type &quot;link&quot; with the special &quot;app&quot; provider.<br />
<br />
With such a &quot;capabilities&quot; attribute only users, which have the &quot;mygoogleapp_capability&quot; capability are allowed to get the link. For those who don’t, the upsell opportunity will be displayed; e.g.<br />
<br />
<blockquote>[[File:onboarding_4.png]]<br />
</blockquote></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Client_Onboarding&diff=21877
AppSuite:Client Onboarding
2016-04-28T12:30:27Z
<p>Cutmasta: /* How can I quickly setup a default/test configuration ? */</p>
<hr />
<div><div class="title">Client Onboarding</div><br />
<br />
{{VersionFrom|7.8.1}}<br />
<br />
__TOC__<br />
<br />
= Configuration guide for Open-Xchange Client Onboarding =<br />
<br />
With Open-Xchange Server v7.8.1 a new module is added allowing users to integrate several different clients and devices with Open-Xchange; such as providing a link to a commercial App Store to install certain apps on mobile devices.<br />
<br />
By default, Open-Xchange ships with several built-in providers; thereof<br />
<br />
* CalDAV<br />
* CardDAV<br />
* OX Mail App<br />
* OX Drive App<br />
* Connector for Microsoft Outlook®<br />
* Sync App for Android<br />
* Microsoft ActiveSync<br />
* eM Client<br />
* Mail (IMAP/SMTP)<br />
* Generic Mobile App provider<br />
<br />
Those providers allow accessing and/or synchronizing with certain data held by Open-Xchange on a supported device.<br />
<br />
== Installation ==<br />
<br />
To install the Client Onboarding module, the package open-xchange-client-onboarding needs to be installed.<br />
<br />
Moreover the property <code>"com.openexchange.client.onboarding.enabled"</code>; in installed file <code>/opt/open-xchange/etc/client-onboarding.properties</code> needs to be set to <code>"true"</code> (default). So getting rid off the entire client on-boarding module simply requires setting the mentioned property to <code>"false"</code> (and executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool).<br />
<br />
== Onboarding scenarios ==<br />
<br />
The way to specify what and how a certain device is able to get “on-boarded” is mainly determined by so called scenarios. A scenario describes what gets deployed using which providers that contribute their onboarding possibilities and how it is made accessible to the client’s device.<br />
<br />
A scenario consists of the following configuration attributes/options<br />
<br />
* A unique scenario identifier<br />
* A flag determining if scenario is enabled or not. If set to 'false' the scenario will not be available, useful for testing/enabling the scenario later on<br />
* A scenario type, which is one of &quot;plist&quot;, &quot;manual&quot;, or &quot;link&quot;<br />
** &quot;plist&quot; for generating a PLIST configuration file for iOS and OSX devices,<br />
** &quot;manual&quot; for a description for the user for a manual set-up/configuration<br />
** &quot;link&quot; for a link/URL to either Apple App Store / Google Play Store or to downloadable executable<br />
* The &quot;link&quot; attribute, which is only considered it type is set to &quot;link&quot;. That attribute consists of the sub-attributes &quot;url&quot; and &quot;type&quot;.<br />
** &quot;url&quot; provides the actual link/URL to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. For specifying a property that provides the actual link, please use special &quot;property&quot; scheme; e.g. &quot;property://com.openexchange.client.onboarding.app.mylink&quot;<br />
** &quot;type&quot; indicates if &quot;url&quot; holds a link for either Apple App Store, Apple Mac Store or Google Play Store. Must only be specified in case &quot;url&quot; points either of those commercial stores. Supported values are &quot;appstore&quot;, &quot;macstore&quot; and &quot;playstore&quot;<br />
* The identifiers for the providers, which contribute to the scenario;<br /><br />
please check command-line tool <code>/opt/open-xchange/sbin/listonboardingproviders</code> to check, which ones are available<br />
* The identifiers for alternative scenarios. This is typically used to provide alternative manual setup possibility.<br />
* The comma-separated names of Font Awesome icons that are supposed to be displayed for the scenario<br /><br />
(only the ones from v4.4.0 are currently supported)<br />
* The translatable display name; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
* The translatable description; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
<br />
== Onboarding providers ==<br />
<br />
As described in the previous section, a scenario specifies what providers contribute to it. A provider represents a certain App or (synchronization) protocol that a device can install, download and/or communicate with.<br />
<br />
Moreover a provider specifies what Onboarding types are supported (&quot;plist&quot;, &quot;manual&quot;, and/or &quot;link&quot;). Hence, once a provider is chosen to contribute to a certain scenario, the supported on-boarding type needs to match the one of the scenario itself. E.g. a scenario, which indicates to be of type &quot;link&quot;, will always fail if the associated provider signals to support types &quot;plist&quot; and &quot;manual&quot;.<br />
<br />
To check what providers are available on your system, please execute the <code>/opt/open-xchange/sbin/listonboardingproviders</code> command-line tool, which outputs something like:<br />
<br />
[[File:onboarding_1.png]]<br />
<br />
Each provider might require one or more capabilities/permissions to be available for the requesting user. If capabilities/permissions are not satisfied, the associated scenario cannot be applied, but will be displayed to the user for upsell opportunities.<br />
<br />
=== Generic Onboarding provider for Apps ===<br />
<br />
Identifier: <code>app</code><br />
<br />
The generic onboarding provider for apps allows specifying custom scenarios of type &quot;link&quot; for arbitrary links/URLs pointing to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. The link can be set directly or via a property.<br />
<br />
This provider requires no capability/permission.<br />
<br />
An exemplary section in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file might look like (check &quot;Configuring Onboarding scenarios&quot; chapter for more details):<br />
<br />
[[File:onboarding_2.png]]<br />
<br />
=== CalDAV/CardDAV ===<br />
<br />
Identifiers: <code>caldav</code> &amp; <code>carddav</code><br />
<br />
In order for a scenario (having CalDAV/CardDAV in its provider listing) to be executable by a user, the &quot;caldav&quot; capability and &quot;carddav&quot; capability respectively are required.<br />
<br />
Moreover, the appropriate *DAV end-points are supposed to be configured through property <code>com.openexchange.client.onboarding.caldav.url</code> in <code>client-onboarding-caldav.properties</code> file and property <code>com.openexchange.client.onboarding.carddav.url</code> in <code>client-onboarding-carddav.properties</code> file.<br />
<br />
=== Drive/Mail Apps ===<br />
<br />
Identifiers: <code>driveapp</code> &amp; <code>mailapp</code><br />
<br />
Open-Xchange ships with built-in providers for Drive App and Mail App. The Drive-associated providers do require the &quot;drive&quot; capability and the Mail App requires the &quot;mobile_mail_app&quot; one.<br />
<br />
The appropriate links to the apps in the corresponding stores are configured in associated .properties files:<br />
<br />
* <code>client-onboarding-driveapp.properties</code><br />
* <code>client-onboarding-mailapp.properties</code><br />
<br />
By default the links to the official apps are set, but may be changed to ones for branded versions.<br />
<br />
=== Drive Windows Client ===<br />
<br />
Identifier: <code>drivewindowsclient</code><br />
<br />
The provider for the windows Drive Client. Requires the &quot;drive&quot; capability, but has no configuration options. However, this provider requires the &quot;open-xchange-drive-client-windows&quot; and the orderly configured binaries (e.g. through installing appropriate package according to the brand).<br />
<br />
Please check [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows ''this''] documentation for more details.<br />
<br />
<!-- === eM Client ===<br />
<br />
Identifier: <code>emclient</code><br />
<br />
The provider for the eM Client needs the &quot;emclient&quot; capability.<br />
<br />
Allows to configure the URL pointing to the executable file through <code>com.openexchange.client.onboarding.emclient.url</code> in file 'client-onboarding-emclient.properties' file.<br />
<br />
=== Sync App ===<br />
<br />
Identifier: <code>syncapp</code><br />
<br />
The provider for the Sync App for Android. Requires &quot;caldav&quot; and &quot;carddav&quot; capabilities.<br />
<br />
The link to Google Play Store is specified via property <code>com.openexchange.client.onboarding.syncapp.store.google.playstore</code> in <code>client-onboarding-syncapp.properties</code> file. --><br />
<br />
=== Mail (IMAP/SMTP) ===<br />
<br />
Identifier: <code>mail</code><br />
<br />
The provider for deploying the IMAP/STMP account on target device using native/stock mail app. All IMAP/SMTP related settings are settable in file 'client-onboarding-mail.properties'.<br />
<br />
=== Microsoft ActiveSync (EAS) ===<br />
<br />
Identifier: <code>eas</code><br />
<br />
Configures the ActiveSync account on target device. Allows specifying the EAS end-point through <code>com.openexchange.client.onboarding.eas.url</code> property in 'client-onboarding-eas.properties'.<br />
<br />
=== OX Updater ===<br />
<br />
Identifier: <code>oxupdater</code><br />
<br />
The provider offering the download for the OX Client Updater ([http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''http:''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''//oxpedia''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''org/wiki/index''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''php''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''?''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''title=AppSuite''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater '':''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''Open-Xchange_Updater'']). The provider is available as soon as the according package is installed and at least one product can be installed/updated via it by the user. A pre-configured scenario 'oxupdaterinstall' is already contained in <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code>.<br />
<br />
== Configuring Onboarding scenarios ==<br />
<br />
Onboarding scenarios are configured through the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Each scenario starts with its own &quot;section&quot; in that YAML file by typing its unique identifier. All further attributes as outlined in chapter &quot;Onboarding scenarios&quot; are nested below that identifier.<br />
<br />
=== Easily enabling/disabling scenarios ===<br />
<br />
By default, Open-Xchange ships with a set of pre-defined scenarios that might apply to the most common installations. Each scenario can easily be enabled/disabled through its &quot;enabled&quot; Boolean attribute in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool applies the changes without the need for restart.<br />
<br />
=== Translatable strings ===<br />
<br />
Those attributes ending with &quot;_t10e&quot; refer to localizable strings and are placed into &quot;client-onboarding-scenarios.pot&quot; file. Once such attributes ending with &quot;_t10e&quot; are changed/customized and/or added, the appropriate &quot;client-onboarding-scenarios.pot&quot; file needs to be re-created in order to get translated. For generating that &quot;client-onboarding-scenarios.pot&quot; file, please execute the /opt/open-xchange/sbin/parsei18nyaml command-line tool. That .pot file needs then be turned to the .po files for the individual languages.<br />
<br />
Thus changing any of the attributes ending with &quot;_t10e&quot; requires (provided that appropriate .po files are available in <code>/opt/open-xchange/i18n</code> directory) either a restart or executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool together with stop/start of the &quot;com.openexchange.i18n&quot; bundle.<br />
<br />
=== Scenario scope ===<br />
<br />
While the previously mentioned &quot;enabled&quot; attribute offers some kind of generic on/off switch, the properties outlined in this section allow defining the scope for a scenario. Scope in terms of<br />
<br />
* For what devices (from the set of those specified by providers) is that scenario available and<br />
* For which users is it available<br />
<br />
As explained above, each scenario specifies one or more type-compatible providers associated with it. In turn, each provider determines to which devices the scenario applies. In order to further control, which device and which users are allowed to access a certain scenario, there are appropriate options available in file <code>/opt/open-xchange/etc/client-onboarding.properties</code>. Every option is fully [http://oxpedia.org/wiki/index.php?title=ConfigCascade ''config-cascade''] aware and therefore can be controlled on a global, per context set, per context and per user basis.<br />
<br />
Thus, to make a scenario available for certain devices (as dictated by scenario’s providers) and for users as well, the scenario identifier needs to be added to the appropriate properties ending with &quot;.scenarios&quot; (for devices) and added to the &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property (for user) as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.apple.mac.scenarios<br /><br />
com.openexchange.client.onboarding.apple.ipad.scenarios<br /><br />
com.openexchange.client.onboarding.apple.iphone.scenarios<br /><br />
com.openexchange.client.onboarding.android.tablet.scenarios<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios<br /><br />
com.openexchange.client.onboarding.windows.desktop.scenarios<br />
<br />
com.openexchange.client.onboarding.enabledScenarios<br />
</blockquote><br />
Once a scenario is made accessible through configuration it is visible to users trying to perform a client onboarding using one of associated devices. However, whether a user is effectively allowed to execute that scenario is determined by the required capabilities of the denoted providers; if not allowed it gets displayed as an upsell opportunity.<br />
<br />
=== Configuring actions ===<br />
<br />
The type for a scenario determines what actions are associated with it to &quot;''transport''&quot; the onboarding information to the client. The types &quot;manual&quot; and &quot;link&quot; only show static information like displaying a link. In contrast the type &quot;plist&quot; allows several actions to transport the configuration profile onto the client. Thereof<br />
<br />
* E-Mail<br />
* SMS<br />
<br />
In order to utilize the &quot;E-Mail&quot; action, a special transport must be configured for system-composed E-Mails [http://oxpedia.org/wiki/index.php?title=AppSuite:Sharing_and_Guest_Mode#Share_Notifications ''as it is for using the sharing functionality'']. This transport is configured in noreply.properties. All properties therein are config-cascade capable, so their values can be sensitive to the current user or context.<br />
<br />
Using the SMS action requires a SIP Gate being available. Please check [http://oxpedia.org/wiki/index.php?title=AppSuite:SMS_Sipgate ''this documentation''] how to setup a SIP Gate for sending SMS to capable clients.<br />
<br />
Moreover, scenarios of type &quot;plist&quot; require having PLIST-signing enabled. Otherwise the device will show a warning when importing a received PLIST configuration profile. Please follow the instructions as outlined in [http://oxpedia.org/wiki/index.php?title=AppSuite:PList_signing ''this article''] how to enable and configure signing for PLIST files.<br />
<br />
== Adding custom scenarios ==<br />
<br />
The first thing to do, is to add an appropriate scenario configuration to the 'client-onboarding-scenarios.yml' file; e.g.<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The next step is to make that scenario accessible through adapting 'client-onboarding.properties' file. Hence, the scenario identifier needs to be added to the devices, to which it applies (Android devices in this case):<br />
<br />
<blockquote>com.openexchange.client.onboarding.android.tablet.scenarios=..., mygoogleapp<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios=..., mygoogleapp<br />
</blockquote><br />
Furthermore, that scenario needs to be made accessible to users as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.enabledScenarios=..., mygoogleapp<br />
</blockquote><br />
At last, a .pot file is supposed to be generated from the translatable strings using /opt/open-xchange/sbin/parsei18nyaml command-line tool to yield the .po files for the individual languages.<br />
<br />
Provided that target users do hold appropriate capabilities, they are allowed to execute that scenario. In the example above the &quot;app&quot; provider is specified, which does no require any capabilities. Hence, that scenario is available.<br />
<br />
== HowTos ==<br />
<br />
=== How can I quickly setup a default/test configuration ? ===<br />
<br />
# Install open-xchange-client-onboarding package<br />
# Edit <code>/opt/open-xchange/etc/client-onboarding.properties</code> and set <code>com.openexchange.client.onboarding.enabled</code> to <code>true</code> <br />
# Edit <code>noreply.properties</code> to enable autoconfig sending via email. PS: Have a fully working smtp login available like “noreply@yourdomain.tld”<br />
# Edit client-onboarding-scenarios.yml and set “enable” for : “driveappinstall” , “davsync” “davmanual” “mailsync” “mailmanual” to <code>true</code> <br />
# Now set the correct caldav/carddav server FQDNs in the corresponding files for your setup<br />
#*<code>client-onboarding-caldav.properties</code> <br />
#*<code>client-onboarding-carddav.properties</code><br />
# Restart OX process<br />
# Click on settings - connect your device<br />
# verify that you have available following options: <br />
#* windows -> imap/smtp details<br />
#* android/fon+tablet -> imap/smtp details<br />
#* android/fon+tablet -> drive app <br />
#* apple -> iphone -> imap/smtp konfig button<br />
#* apple -> iphone -> imap/smtp details for experts<br />
#* apple -> iphone -> calendar/addressbok -> konfig button<br />
#* apple -> iphone -> calendar/addressbok -> details for dav setup<br />
#* apple -> iphone -> drive app<br />
#* apple -> ipad -> imap/smtp konfig send email<br />
#* apple -> ipad -> imap/smtp konfig button<br />
#* apple -> ipad -> imap/smtp details for experts<br />
#* apple -> ipad -> calendar/addressbook konfig send email<br />
#* apple -> ipad -> calendar/addressbook konfig button<br />
#* apple -> ipad -> calendar/addressbook details for experts<br />
#* apple -> ipad -> drive app<br />
<br />
=== How can I quickly disable a certain scenario ===<br />
<br />
Simply enter the 'client-onboarding-scenarios.yml' file and go to the section specifying the target scenario. Switch the 'enabled' flag to &quot;false&quot; and execute /opt/open-xchange/sbin/reloadconfiguration command-line tool.<br />
<br />
E.g. to disable the OX Drive App:<br />
<br />
[[File:onboarding_3.png]]<br />
<br />
=== How can I add my own App? ===<br />
<br />
Provided that the App is accessible by a link (pointing to a commercial App Store or to a downloadable executable/installer), the generic &quot;app&quot; is the suitable provider to choose.<br />
<br />
Hence, an appropriate section is supposed to be added to the 'client-onboarding-scenarios.yml' file having a unique name and &quot;provider&quot; attribute set to &quot;[app]&quot;:<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The attribute &quot;type&quot; needs to be set to &quot;link&quot;.<br />
<br />
The attribute &quot;link&quot; should be configured with:<br />
<br />
* &quot;url&quot; sub-attribute containing the actual link pointing to the URL location<br />
* &quot;type&quot; sub-attribute specifying of what type that link is: either &quot;appstore&quot;, &quot;macappstore&quot;, &quot;playstore&quot; or &quot;common&quot;.<br /><br />
The type &quot;common&quot; is supposed to be used for links that do not point to a commercial App Store, but to a downloadable executable/installer file.<br />
<br />
The &quot;icon&quot; attribute is supposed to contain a comma-separated list of Font Awesome icons (only the ones from v4.4.0 are currently supported) that represent the App; e.g.<br />
<br />
* &quot;fa-cloud&quot; for Drive/file-related nature<br />
* &quot;fa-calendar, fa-users&quot; for Calendar and Address Book synchronization<br />
* &quot;fa-envelope-o&quot; for Mail nature<br />
<br />
Next, the translatable display name and description should be set through setting the attributes &quot;displayName_t10e&quot; and &quot;description_t10e&quot;. As described previously, executing the /opt/open-xchange/sbin/parsei18nyaml command-line tool yields an appropriate .pot file, which can then be used for generating the individual .po file for the different translations.<br />
<br />
Finally, the 'client-onboarding.properties' file needs to be modified to specify the &quot;scope&quot; for that new scenario. Add the scenario’s unique name to the appropriate device properties and add it to &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property as well.<br />
<br />
After executing /opt/open-xchange/sbin/reloadconfiguration command-line tool the new client onboarding scenario is available for the selected users/devices.<br />
<br />
=== How can I upsell my own app? ===<br />
<br />
Having the same prerequisites/steps as for &quot;How can I add my own App?&quot; the scenario description in the 'client-onboarding-scenarios.yml' file simply needs to be extended by the desired capabilities, which are supposed to be used for managing the upsell.<br />
<br />
Example<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
'''capabilities: &quot;mygoogleapp_capability&quot;'''<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The special &quot;capabilities&quot; attribute is only supported for scenarios of type &quot;link&quot; with the special &quot;app&quot; provider.<br />
<br />
With such a &quot;capabilities&quot; attribute only users, which have the &quot;mygoogleapp_capability&quot; capability are allowed to get the link. For those who don’t, the upsell opportunity will be displayed; e.g.<br />
<br />
<blockquote>[[File:onboarding_4.png]]<br />
</blockquote></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Client_Onboarding&diff=21876
AppSuite:Client Onboarding
2016-04-28T12:29:42Z
<p>Cutmasta: /* How can I quickly setup a default/test configuration ? */</p>
<hr />
<div><div class="title">Client Onboarding</div><br />
<br />
{{VersionFrom|7.8.1}}<br />
<br />
__TOC__<br />
<br />
= Configuration guide for Open-Xchange Client Onboarding =<br />
<br />
With Open-Xchange Server v7.8.1 a new module is added allowing users to integrate several different clients and devices with Open-Xchange; such as providing a link to a commercial App Store to install certain apps on mobile devices.<br />
<br />
By default, Open-Xchange ships with several built-in providers; thereof<br />
<br />
* CalDAV<br />
* CardDAV<br />
* OX Mail App<br />
* OX Drive App<br />
* Connector for Microsoft Outlook®<br />
* Sync App for Android<br />
* Microsoft ActiveSync<br />
* eM Client<br />
* Mail (IMAP/SMTP)<br />
* Generic Mobile App provider<br />
<br />
Those providers allow accessing and/or synchronizing with certain data held by Open-Xchange on a supported device.<br />
<br />
== Installation ==<br />
<br />
To install the Client Onboarding module, the package open-xchange-client-onboarding needs to be installed.<br />
<br />
Moreover the property <code>"com.openexchange.client.onboarding.enabled"</code>; in installed file <code>/opt/open-xchange/etc/client-onboarding.properties</code> needs to be set to <code>"true"</code> (default). So getting rid off the entire client on-boarding module simply requires setting the mentioned property to <code>"false"</code> (and executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool).<br />
<br />
== Onboarding scenarios ==<br />
<br />
The way to specify what and how a certain device is able to get “on-boarded” is mainly determined by so called scenarios. A scenario describes what gets deployed using which providers that contribute their onboarding possibilities and how it is made accessible to the client’s device.<br />
<br />
A scenario consists of the following configuration attributes/options<br />
<br />
* A unique scenario identifier<br />
* A flag determining if scenario is enabled or not. If set to 'false' the scenario will not be available, useful for testing/enabling the scenario later on<br />
* A scenario type, which is one of &quot;plist&quot;, &quot;manual&quot;, or &quot;link&quot;<br />
** &quot;plist&quot; for generating a PLIST configuration file for iOS and OSX devices,<br />
** &quot;manual&quot; for a description for the user for a manual set-up/configuration<br />
** &quot;link&quot; for a link/URL to either Apple App Store / Google Play Store or to downloadable executable<br />
* The &quot;link&quot; attribute, which is only considered it type is set to &quot;link&quot;. That attribute consists of the sub-attributes &quot;url&quot; and &quot;type&quot;.<br />
** &quot;url&quot; provides the actual link/URL to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. For specifying a property that provides the actual link, please use special &quot;property&quot; scheme; e.g. &quot;property://com.openexchange.client.onboarding.app.mylink&quot;<br />
** &quot;type&quot; indicates if &quot;url&quot; holds a link for either Apple App Store, Apple Mac Store or Google Play Store. Must only be specified in case &quot;url&quot; points either of those commercial stores. Supported values are &quot;appstore&quot;, &quot;macstore&quot; and &quot;playstore&quot;<br />
* The identifiers for the providers, which contribute to the scenario;<br /><br />
please check command-line tool <code>/opt/open-xchange/sbin/listonboardingproviders</code> to check, which ones are available<br />
* The identifiers for alternative scenarios. This is typically used to provide alternative manual setup possibility.<br />
* The comma-separated names of Font Awesome icons that are supposed to be displayed for the scenario<br /><br />
(only the ones from v4.4.0 are currently supported)<br />
* The translatable display name; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
* The translatable description; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
<br />
== Onboarding providers ==<br />
<br />
As described in the previous section, a scenario specifies what providers contribute to it. A provider represents a certain App or (synchronization) protocol that a device can install, download and/or communicate with.<br />
<br />
Moreover a provider specifies what Onboarding types are supported (&quot;plist&quot;, &quot;manual&quot;, and/or &quot;link&quot;). Hence, once a provider is chosen to contribute to a certain scenario, the supported on-boarding type needs to match the one of the scenario itself. E.g. a scenario, which indicates to be of type &quot;link&quot;, will always fail if the associated provider signals to support types &quot;plist&quot; and &quot;manual&quot;.<br />
<br />
To check what providers are available on your system, please execute the <code>/opt/open-xchange/sbin/listonboardingproviders</code> command-line tool, which outputs something like:<br />
<br />
[[File:onboarding_1.png]]<br />
<br />
Each provider might require one or more capabilities/permissions to be available for the requesting user. If capabilities/permissions are not satisfied, the associated scenario cannot be applied, but will be displayed to the user for upsell opportunities.<br />
<br />
=== Generic Onboarding provider for Apps ===<br />
<br />
Identifier: <code>app</code><br />
<br />
The generic onboarding provider for apps allows specifying custom scenarios of type &quot;link&quot; for arbitrary links/URLs pointing to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. The link can be set directly or via a property.<br />
<br />
This provider requires no capability/permission.<br />
<br />
An exemplary section in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file might look like (check &quot;Configuring Onboarding scenarios&quot; chapter for more details):<br />
<br />
[[File:onboarding_2.png]]<br />
<br />
=== CalDAV/CardDAV ===<br />
<br />
Identifiers: <code>caldav</code> &amp; <code>carddav</code><br />
<br />
In order for a scenario (having CalDAV/CardDAV in its provider listing) to be executable by a user, the &quot;caldav&quot; capability and &quot;carddav&quot; capability respectively are required.<br />
<br />
Moreover, the appropriate *DAV end-points are supposed to be configured through property <code>com.openexchange.client.onboarding.caldav.url</code> in <code>client-onboarding-caldav.properties</code> file and property <code>com.openexchange.client.onboarding.carddav.url</code> in <code>client-onboarding-carddav.properties</code> file.<br />
<br />
=== Drive/Mail Apps ===<br />
<br />
Identifiers: <code>driveapp</code> &amp; <code>mailapp</code><br />
<br />
Open-Xchange ships with built-in providers for Drive App and Mail App. The Drive-associated providers do require the &quot;drive&quot; capability and the Mail App requires the &quot;mobile_mail_app&quot; one.<br />
<br />
The appropriate links to the apps in the corresponding stores are configured in associated .properties files:<br />
<br />
* <code>client-onboarding-driveapp.properties</code><br />
* <code>client-onboarding-mailapp.properties</code><br />
<br />
By default the links to the official apps are set, but may be changed to ones for branded versions.<br />
<br />
=== Drive Windows Client ===<br />
<br />
Identifier: <code>drivewindowsclient</code><br />
<br />
The provider for the windows Drive Client. Requires the &quot;drive&quot; capability, but has no configuration options. However, this provider requires the &quot;open-xchange-drive-client-windows&quot; and the orderly configured binaries (e.g. through installing appropriate package according to the brand).<br />
<br />
Please check [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows ''this''] documentation for more details.<br />
<br />
<!-- === eM Client ===<br />
<br />
Identifier: <code>emclient</code><br />
<br />
The provider for the eM Client needs the &quot;emclient&quot; capability.<br />
<br />
Allows to configure the URL pointing to the executable file through <code>com.openexchange.client.onboarding.emclient.url</code> in file 'client-onboarding-emclient.properties' file.<br />
<br />
=== Sync App ===<br />
<br />
Identifier: <code>syncapp</code><br />
<br />
The provider for the Sync App for Android. Requires &quot;caldav&quot; and &quot;carddav&quot; capabilities.<br />
<br />
The link to Google Play Store is specified via property <code>com.openexchange.client.onboarding.syncapp.store.google.playstore</code> in <code>client-onboarding-syncapp.properties</code> file. --><br />
<br />
=== Mail (IMAP/SMTP) ===<br />
<br />
Identifier: <code>mail</code><br />
<br />
The provider for deploying the IMAP/STMP account on target device using native/stock mail app. All IMAP/SMTP related settings are settable in file 'client-onboarding-mail.properties'.<br />
<br />
=== Microsoft ActiveSync (EAS) ===<br />
<br />
Identifier: <code>eas</code><br />
<br />
Configures the ActiveSync account on target device. Allows specifying the EAS end-point through <code>com.openexchange.client.onboarding.eas.url</code> property in 'client-onboarding-eas.properties'.<br />
<br />
=== OX Updater ===<br />
<br />
Identifier: <code>oxupdater</code><br />
<br />
The provider offering the download for the OX Client Updater ([http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''http:''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''//oxpedia''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''org/wiki/index''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''php''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''?''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''title=AppSuite''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater '':''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''Open-Xchange_Updater'']). The provider is available as soon as the according package is installed and at least one product can be installed/updated via it by the user. A pre-configured scenario 'oxupdaterinstall' is already contained in <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code>.<br />
<br />
== Configuring Onboarding scenarios ==<br />
<br />
Onboarding scenarios are configured through the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Each scenario starts with its own &quot;section&quot; in that YAML file by typing its unique identifier. All further attributes as outlined in chapter &quot;Onboarding scenarios&quot; are nested below that identifier.<br />
<br />
=== Easily enabling/disabling scenarios ===<br />
<br />
By default, Open-Xchange ships with a set of pre-defined scenarios that might apply to the most common installations. Each scenario can easily be enabled/disabled through its &quot;enabled&quot; Boolean attribute in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool applies the changes without the need for restart.<br />
<br />
=== Translatable strings ===<br />
<br />
Those attributes ending with &quot;_t10e&quot; refer to localizable strings and are placed into &quot;client-onboarding-scenarios.pot&quot; file. Once such attributes ending with &quot;_t10e&quot; are changed/customized and/or added, the appropriate &quot;client-onboarding-scenarios.pot&quot; file needs to be re-created in order to get translated. For generating that &quot;client-onboarding-scenarios.pot&quot; file, please execute the /opt/open-xchange/sbin/parsei18nyaml command-line tool. That .pot file needs then be turned to the .po files for the individual languages.<br />
<br />
Thus changing any of the attributes ending with &quot;_t10e&quot; requires (provided that appropriate .po files are available in <code>/opt/open-xchange/i18n</code> directory) either a restart or executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool together with stop/start of the &quot;com.openexchange.i18n&quot; bundle.<br />
<br />
=== Scenario scope ===<br />
<br />
While the previously mentioned &quot;enabled&quot; attribute offers some kind of generic on/off switch, the properties outlined in this section allow defining the scope for a scenario. Scope in terms of<br />
<br />
* For what devices (from the set of those specified by providers) is that scenario available and<br />
* For which users is it available<br />
<br />
As explained above, each scenario specifies one or more type-compatible providers associated with it. In turn, each provider determines to which devices the scenario applies. In order to further control, which device and which users are allowed to access a certain scenario, there are appropriate options available in file <code>/opt/open-xchange/etc/client-onboarding.properties</code>. Every option is fully [http://oxpedia.org/wiki/index.php?title=ConfigCascade ''config-cascade''] aware and therefore can be controlled on a global, per context set, per context and per user basis.<br />
<br />
Thus, to make a scenario available for certain devices (as dictated by scenario’s providers) and for users as well, the scenario identifier needs to be added to the appropriate properties ending with &quot;.scenarios&quot; (for devices) and added to the &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property (for user) as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.apple.mac.scenarios<br /><br />
com.openexchange.client.onboarding.apple.ipad.scenarios<br /><br />
com.openexchange.client.onboarding.apple.iphone.scenarios<br /><br />
com.openexchange.client.onboarding.android.tablet.scenarios<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios<br /><br />
com.openexchange.client.onboarding.windows.desktop.scenarios<br />
<br />
com.openexchange.client.onboarding.enabledScenarios<br />
</blockquote><br />
Once a scenario is made accessible through configuration it is visible to users trying to perform a client onboarding using one of associated devices. However, whether a user is effectively allowed to execute that scenario is determined by the required capabilities of the denoted providers; if not allowed it gets displayed as an upsell opportunity.<br />
<br />
=== Configuring actions ===<br />
<br />
The type for a scenario determines what actions are associated with it to &quot;''transport''&quot; the onboarding information to the client. The types &quot;manual&quot; and &quot;link&quot; only show static information like displaying a link. In contrast the type &quot;plist&quot; allows several actions to transport the configuration profile onto the client. Thereof<br />
<br />
* E-Mail<br />
* SMS<br />
<br />
In order to utilize the &quot;E-Mail&quot; action, a special transport must be configured for system-composed E-Mails [http://oxpedia.org/wiki/index.php?title=AppSuite:Sharing_and_Guest_Mode#Share_Notifications ''as it is for using the sharing functionality'']. This transport is configured in noreply.properties. All properties therein are config-cascade capable, so their values can be sensitive to the current user or context.<br />
<br />
Using the SMS action requires a SIP Gate being available. Please check [http://oxpedia.org/wiki/index.php?title=AppSuite:SMS_Sipgate ''this documentation''] how to setup a SIP Gate for sending SMS to capable clients.<br />
<br />
Moreover, scenarios of type &quot;plist&quot; require having PLIST-signing enabled. Otherwise the device will show a warning when importing a received PLIST configuration profile. Please follow the instructions as outlined in [http://oxpedia.org/wiki/index.php?title=AppSuite:PList_signing ''this article''] how to enable and configure signing for PLIST files.<br />
<br />
== Adding custom scenarios ==<br />
<br />
The first thing to do, is to add an appropriate scenario configuration to the 'client-onboarding-scenarios.yml' file; e.g.<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The next step is to make that scenario accessible through adapting 'client-onboarding.properties' file. Hence, the scenario identifier needs to be added to the devices, to which it applies (Android devices in this case):<br />
<br />
<blockquote>com.openexchange.client.onboarding.android.tablet.scenarios=..., mygoogleapp<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios=..., mygoogleapp<br />
</blockquote><br />
Furthermore, that scenario needs to be made accessible to users as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.enabledScenarios=..., mygoogleapp<br />
</blockquote><br />
At last, a .pot file is supposed to be generated from the translatable strings using /opt/open-xchange/sbin/parsei18nyaml command-line tool to yield the .po files for the individual languages.<br />
<br />
Provided that target users do hold appropriate capabilities, they are allowed to execute that scenario. In the example above the &quot;app&quot; provider is specified, which does no require any capabilities. Hence, that scenario is available.<br />
<br />
== HowTos ==<br />
<br />
=== How can I quickly setup a default/test configuration ? ===<br />
<br />
# Install open-xchange-client-onboarding package<br />
# Edit <code>/opt/open-xchange/etc/client-onboarding.properties</code> and set <code>com.openexchange.client.onboarding.enabled</code> to <code>true</code> <br />
# Edit <code>noreply.properties</code> to enable autoconfig sending via email. PS: Have a fully working smtp login available like “noreply@yourdomain.tld”<br />
# Edit client-onboarding-scenarios.yml and set “enable” for : “driveappinstall” , “davsync” “davmanual” “mailsync” “mailmanual” to <code>true</code> <br />
# Now set the correct caldav/carddav server FQDNs for your setup.<br />
#*<code>client-onboarding-caldav.properties</code> <br />
#*<code>client-onboarding-carddav.properties</code><br />
# Restart OX process<br />
# Click on settings - connect your device<br />
# verify that you have available following options: <br />
#* windows -> imap/smtp details<br />
#* android/fon+tablet -> imap/smtp details<br />
#* android/fon+tablet -> drive app <br />
#* apple -> iphone -> imap/smtp konfig button<br />
#* apple -> iphone -> imap/smtp details for experts<br />
#* apple -> iphone -> calendar/addressbok -> konfig button<br />
#* apple -> iphone -> calendar/addressbok -> details for dav setup<br />
#* apple -> iphone -> drive app<br />
#* apple -> ipad -> imap/smtp konfig send email<br />
#* apple -> ipad -> imap/smtp konfig button<br />
#* apple -> ipad -> imap/smtp details for experts<br />
#* apple -> ipad -> calendar/addressbook konfig send email<br />
#* apple -> ipad -> calendar/addressbook konfig button<br />
#* apple -> ipad -> calendar/addressbook details for experts<br />
#* apple -> ipad -> drive app<br />
<br />
=== How can I quickly disable a certain scenario ===<br />
<br />
Simply enter the 'client-onboarding-scenarios.yml' file and go to the section specifying the target scenario. Switch the 'enabled' flag to &quot;false&quot; and execute /opt/open-xchange/sbin/reloadconfiguration command-line tool.<br />
<br />
E.g. to disable the OX Drive App:<br />
<br />
[[File:onboarding_3.png]]<br />
<br />
=== How can I add my own App? ===<br />
<br />
Provided that the App is accessible by a link (pointing to a commercial App Store or to a downloadable executable/installer), the generic &quot;app&quot; is the suitable provider to choose.<br />
<br />
Hence, an appropriate section is supposed to be added to the 'client-onboarding-scenarios.yml' file having a unique name and &quot;provider&quot; attribute set to &quot;[app]&quot;:<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The attribute &quot;type&quot; needs to be set to &quot;link&quot;.<br />
<br />
The attribute &quot;link&quot; should be configured with:<br />
<br />
* &quot;url&quot; sub-attribute containing the actual link pointing to the URL location<br />
* &quot;type&quot; sub-attribute specifying of what type that link is: either &quot;appstore&quot;, &quot;macappstore&quot;, &quot;playstore&quot; or &quot;common&quot;.<br /><br />
The type &quot;common&quot; is supposed to be used for links that do not point to a commercial App Store, but to a downloadable executable/installer file.<br />
<br />
The &quot;icon&quot; attribute is supposed to contain a comma-separated list of Font Awesome icons (only the ones from v4.4.0 are currently supported) that represent the App; e.g.<br />
<br />
* &quot;fa-cloud&quot; for Drive/file-related nature<br />
* &quot;fa-calendar, fa-users&quot; for Calendar and Address Book synchronization<br />
* &quot;fa-envelope-o&quot; for Mail nature<br />
<br />
Next, the translatable display name and description should be set through setting the attributes &quot;displayName_t10e&quot; and &quot;description_t10e&quot;. As described previously, executing the /opt/open-xchange/sbin/parsei18nyaml command-line tool yields an appropriate .pot file, which can then be used for generating the individual .po file for the different translations.<br />
<br />
Finally, the 'client-onboarding.properties' file needs to be modified to specify the &quot;scope&quot; for that new scenario. Add the scenario’s unique name to the appropriate device properties and add it to &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property as well.<br />
<br />
After executing /opt/open-xchange/sbin/reloadconfiguration command-line tool the new client onboarding scenario is available for the selected users/devices.<br />
<br />
=== How can I upsell my own app? ===<br />
<br />
Having the same prerequisites/steps as for &quot;How can I add my own App?&quot; the scenario description in the 'client-onboarding-scenarios.yml' file simply needs to be extended by the desired capabilities, which are supposed to be used for managing the upsell.<br />
<br />
Example<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
'''capabilities: &quot;mygoogleapp_capability&quot;'''<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The special &quot;capabilities&quot; attribute is only supported for scenarios of type &quot;link&quot; with the special &quot;app&quot; provider.<br />
<br />
With such a &quot;capabilities&quot; attribute only users, which have the &quot;mygoogleapp_capability&quot; capability are allowed to get the link. For those who don’t, the upsell opportunity will be displayed; e.g.<br />
<br />
<blockquote>[[File:onboarding_4.png]]<br />
</blockquote></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Client_Onboarding&diff=21875
AppSuite:Client Onboarding
2016-04-28T12:28:48Z
<p>Cutmasta: /* How can I quickly setup a default configuration scenario */</p>
<hr />
<div><div class="title">Client Onboarding</div><br />
<br />
{{VersionFrom|7.8.1}}<br />
<br />
__TOC__<br />
<br />
= Configuration guide for Open-Xchange Client Onboarding =<br />
<br />
With Open-Xchange Server v7.8.1 a new module is added allowing users to integrate several different clients and devices with Open-Xchange; such as providing a link to a commercial App Store to install certain apps on mobile devices.<br />
<br />
By default, Open-Xchange ships with several built-in providers; thereof<br />
<br />
* CalDAV<br />
* CardDAV<br />
* OX Mail App<br />
* OX Drive App<br />
* Connector for Microsoft Outlook®<br />
* Sync App for Android<br />
* Microsoft ActiveSync<br />
* eM Client<br />
* Mail (IMAP/SMTP)<br />
* Generic Mobile App provider<br />
<br />
Those providers allow accessing and/or synchronizing with certain data held by Open-Xchange on a supported device.<br />
<br />
== Installation ==<br />
<br />
To install the Client Onboarding module, the package open-xchange-client-onboarding needs to be installed.<br />
<br />
Moreover the property <code>"com.openexchange.client.onboarding.enabled"</code>; in installed file <code>/opt/open-xchange/etc/client-onboarding.properties</code> needs to be set to <code>"true"</code> (default). So getting rid off the entire client on-boarding module simply requires setting the mentioned property to <code>"false"</code> (and executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool).<br />
<br />
== Onboarding scenarios ==<br />
<br />
The way to specify what and how a certain device is able to get “on-boarded” is mainly determined by so called scenarios. A scenario describes what gets deployed using which providers that contribute their onboarding possibilities and how it is made accessible to the client’s device.<br />
<br />
A scenario consists of the following configuration attributes/options<br />
<br />
* A unique scenario identifier<br />
* A flag determining if scenario is enabled or not. If set to 'false' the scenario will not be available, useful for testing/enabling the scenario later on<br />
* A scenario type, which is one of &quot;plist&quot;, &quot;manual&quot;, or &quot;link&quot;<br />
** &quot;plist&quot; for generating a PLIST configuration file for iOS and OSX devices,<br />
** &quot;manual&quot; for a description for the user for a manual set-up/configuration<br />
** &quot;link&quot; for a link/URL to either Apple App Store / Google Play Store or to downloadable executable<br />
* The &quot;link&quot; attribute, which is only considered it type is set to &quot;link&quot;. That attribute consists of the sub-attributes &quot;url&quot; and &quot;type&quot;.<br />
** &quot;url&quot; provides the actual link/URL to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. For specifying a property that provides the actual link, please use special &quot;property&quot; scheme; e.g. &quot;property://com.openexchange.client.onboarding.app.mylink&quot;<br />
** &quot;type&quot; indicates if &quot;url&quot; holds a link for either Apple App Store, Apple Mac Store or Google Play Store. Must only be specified in case &quot;url&quot; points either of those commercial stores. Supported values are &quot;appstore&quot;, &quot;macstore&quot; and &quot;playstore&quot;<br />
* The identifiers for the providers, which contribute to the scenario;<br /><br />
please check command-line tool <code>/opt/open-xchange/sbin/listonboardingproviders</code> to check, which ones are available<br />
* The identifiers for alternative scenarios. This is typically used to provide alternative manual setup possibility.<br />
* The comma-separated names of Font Awesome icons that are supposed to be displayed for the scenario<br /><br />
(only the ones from v4.4.0 are currently supported)<br />
* The translatable display name; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
* The translatable description; check <code>/opt/open-xchange/sbin/parsei18nyaml</code> command-line tool to generate a .pot file from translatable texts<br />
<br />
== Onboarding providers ==<br />
<br />
As described in the previous section, a scenario specifies what providers contribute to it. A provider represents a certain App or (synchronization) protocol that a device can install, download and/or communicate with.<br />
<br />
Moreover a provider specifies what Onboarding types are supported (&quot;plist&quot;, &quot;manual&quot;, and/or &quot;link&quot;). Hence, once a provider is chosen to contribute to a certain scenario, the supported on-boarding type needs to match the one of the scenario itself. E.g. a scenario, which indicates to be of type &quot;link&quot;, will always fail if the associated provider signals to support types &quot;plist&quot; and &quot;manual&quot;.<br />
<br />
To check what providers are available on your system, please execute the <code>/opt/open-xchange/sbin/listonboardingproviders</code> command-line tool, which outputs something like:<br />
<br />
[[File:onboarding_1.png]]<br />
<br />
Each provider might require one or more capabilities/permissions to be available for the requesting user. If capabilities/permissions are not satisfied, the associated scenario cannot be applied, but will be displayed to the user for upsell opportunities.<br />
<br />
=== Generic Onboarding provider for Apps ===<br />
<br />
Identifier: <code>app</code><br />
<br />
The generic onboarding provider for apps allows specifying custom scenarios of type &quot;link&quot; for arbitrary links/URLs pointing to Apple App Store, Apple Mac Store Google Play Store or to downloadable executable. The link can be set directly or via a property.<br />
<br />
This provider requires no capability/permission.<br />
<br />
An exemplary section in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file might look like (check &quot;Configuring Onboarding scenarios&quot; chapter for more details):<br />
<br />
[[File:onboarding_2.png]]<br />
<br />
=== CalDAV/CardDAV ===<br />
<br />
Identifiers: <code>caldav</code> &amp; <code>carddav</code><br />
<br />
In order for a scenario (having CalDAV/CardDAV in its provider listing) to be executable by a user, the &quot;caldav&quot; capability and &quot;carddav&quot; capability respectively are required.<br />
<br />
Moreover, the appropriate *DAV end-points are supposed to be configured through property <code>com.openexchange.client.onboarding.caldav.url</code> in <code>client-onboarding-caldav.properties</code> file and property <code>com.openexchange.client.onboarding.carddav.url</code> in <code>client-onboarding-carddav.properties</code> file.<br />
<br />
=== Drive/Mail Apps ===<br />
<br />
Identifiers: <code>driveapp</code> &amp; <code>mailapp</code><br />
<br />
Open-Xchange ships with built-in providers for Drive App and Mail App. The Drive-associated providers do require the &quot;drive&quot; capability and the Mail App requires the &quot;mobile_mail_app&quot; one.<br />
<br />
The appropriate links to the apps in the corresponding stores are configured in associated .properties files:<br />
<br />
* <code>client-onboarding-driveapp.properties</code><br />
* <code>client-onboarding-mailapp.properties</code><br />
<br />
By default the links to the official apps are set, but may be changed to ones for branded versions.<br />
<br />
=== Drive Windows Client ===<br />
<br />
Identifier: <code>drivewindowsclient</code><br />
<br />
The provider for the windows Drive Client. Requires the &quot;drive&quot; capability, but has no configuration options. However, this provider requires the &quot;open-xchange-drive-client-windows&quot; and the orderly configured binaries (e.g. through installing appropriate package according to the brand).<br />
<br />
Please check [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Drive#OX_Drive_for_Windows ''this''] documentation for more details.<br />
<br />
<!-- === eM Client ===<br />
<br />
Identifier: <code>emclient</code><br />
<br />
The provider for the eM Client needs the &quot;emclient&quot; capability.<br />
<br />
Allows to configure the URL pointing to the executable file through <code>com.openexchange.client.onboarding.emclient.url</code> in file 'client-onboarding-emclient.properties' file.<br />
<br />
=== Sync App ===<br />
<br />
Identifier: <code>syncapp</code><br />
<br />
The provider for the Sync App for Android. Requires &quot;caldav&quot; and &quot;carddav&quot; capabilities.<br />
<br />
The link to Google Play Store is specified via property <code>com.openexchange.client.onboarding.syncapp.store.google.playstore</code> in <code>client-onboarding-syncapp.properties</code> file. --><br />
<br />
=== Mail (IMAP/SMTP) ===<br />
<br />
Identifier: <code>mail</code><br />
<br />
The provider for deploying the IMAP/STMP account on target device using native/stock mail app. All IMAP/SMTP related settings are settable in file 'client-onboarding-mail.properties'.<br />
<br />
=== Microsoft ActiveSync (EAS) ===<br />
<br />
Identifier: <code>eas</code><br />
<br />
Configures the ActiveSync account on target device. Allows specifying the EAS end-point through <code>com.openexchange.client.onboarding.eas.url</code> property in 'client-onboarding-eas.properties'.<br />
<br />
=== OX Updater ===<br />
<br />
Identifier: <code>oxupdater</code><br />
<br />
The provider offering the download for the OX Client Updater ([http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''http:''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''//oxpedia''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''org/wiki/index''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''.''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''php''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''?''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''title=AppSuite''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater '':''][http://oxpedia.org/wiki/index.php?title=AppSuite:Open-Xchange_Updater ''Open-Xchange_Updater'']). The provider is available as soon as the according package is installed and at least one product can be installed/updated via it by the user. A pre-configured scenario 'oxupdaterinstall' is already contained in <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code>.<br />
<br />
== Configuring Onboarding scenarios ==<br />
<br />
Onboarding scenarios are configured through the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Each scenario starts with its own &quot;section&quot; in that YAML file by typing its unique identifier. All further attributes as outlined in chapter &quot;Onboarding scenarios&quot; are nested below that identifier.<br />
<br />
=== Easily enabling/disabling scenarios ===<br />
<br />
By default, Open-Xchange ships with a set of pre-defined scenarios that might apply to the most common installations. Each scenario can easily be enabled/disabled through its &quot;enabled&quot; Boolean attribute in the <code>/opt/open-xchange/etc/client-onboarding-scenarios.yml</code> YAML file. Executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool applies the changes without the need for restart.<br />
<br />
=== Translatable strings ===<br />
<br />
Those attributes ending with &quot;_t10e&quot; refer to localizable strings and are placed into &quot;client-onboarding-scenarios.pot&quot; file. Once such attributes ending with &quot;_t10e&quot; are changed/customized and/or added, the appropriate &quot;client-onboarding-scenarios.pot&quot; file needs to be re-created in order to get translated. For generating that &quot;client-onboarding-scenarios.pot&quot; file, please execute the /opt/open-xchange/sbin/parsei18nyaml command-line tool. That .pot file needs then be turned to the .po files for the individual languages.<br />
<br />
Thus changing any of the attributes ending with &quot;_t10e&quot; requires (provided that appropriate .po files are available in <code>/opt/open-xchange/i18n</code> directory) either a restart or executing <code>/opt/open-xchange/sbin/reloadconfiguration</code> command-line tool together with stop/start of the &quot;com.openexchange.i18n&quot; bundle.<br />
<br />
=== Scenario scope ===<br />
<br />
While the previously mentioned &quot;enabled&quot; attribute offers some kind of generic on/off switch, the properties outlined in this section allow defining the scope for a scenario. Scope in terms of<br />
<br />
* For what devices (from the set of those specified by providers) is that scenario available and<br />
* For which users is it available<br />
<br />
As explained above, each scenario specifies one or more type-compatible providers associated with it. In turn, each provider determines to which devices the scenario applies. In order to further control, which device and which users are allowed to access a certain scenario, there are appropriate options available in file <code>/opt/open-xchange/etc/client-onboarding.properties</code>. Every option is fully [http://oxpedia.org/wiki/index.php?title=ConfigCascade ''config-cascade''] aware and therefore can be controlled on a global, per context set, per context and per user basis.<br />
<br />
Thus, to make a scenario available for certain devices (as dictated by scenario’s providers) and for users as well, the scenario identifier needs to be added to the appropriate properties ending with &quot;.scenarios&quot; (for devices) and added to the &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property (for user) as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.apple.mac.scenarios<br /><br />
com.openexchange.client.onboarding.apple.ipad.scenarios<br /><br />
com.openexchange.client.onboarding.apple.iphone.scenarios<br /><br />
com.openexchange.client.onboarding.android.tablet.scenarios<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios<br /><br />
com.openexchange.client.onboarding.windows.desktop.scenarios<br />
<br />
com.openexchange.client.onboarding.enabledScenarios<br />
</blockquote><br />
Once a scenario is made accessible through configuration it is visible to users trying to perform a client onboarding using one of associated devices. However, whether a user is effectively allowed to execute that scenario is determined by the required capabilities of the denoted providers; if not allowed it gets displayed as an upsell opportunity.<br />
<br />
=== Configuring actions ===<br />
<br />
The type for a scenario determines what actions are associated with it to &quot;''transport''&quot; the onboarding information to the client. The types &quot;manual&quot; and &quot;link&quot; only show static information like displaying a link. In contrast the type &quot;plist&quot; allows several actions to transport the configuration profile onto the client. Thereof<br />
<br />
* E-Mail<br />
* SMS<br />
<br />
In order to utilize the &quot;E-Mail&quot; action, a special transport must be configured for system-composed E-Mails [http://oxpedia.org/wiki/index.php?title=AppSuite:Sharing_and_Guest_Mode#Share_Notifications ''as it is for using the sharing functionality'']. This transport is configured in noreply.properties. All properties therein are config-cascade capable, so their values can be sensitive to the current user or context.<br />
<br />
Using the SMS action requires a SIP Gate being available. Please check [http://oxpedia.org/wiki/index.php?title=AppSuite:SMS_Sipgate ''this documentation''] how to setup a SIP Gate for sending SMS to capable clients.<br />
<br />
Moreover, scenarios of type &quot;plist&quot; require having PLIST-signing enabled. Otherwise the device will show a warning when importing a received PLIST configuration profile. Please follow the instructions as outlined in [http://oxpedia.org/wiki/index.php?title=AppSuite:PList_signing ''this article''] how to enable and configure signing for PLIST files.<br />
<br />
== Adding custom scenarios ==<br />
<br />
The first thing to do, is to add an appropriate scenario configuration to the 'client-onboarding-scenarios.yml' file; e.g.<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The next step is to make that scenario accessible through adapting 'client-onboarding.properties' file. Hence, the scenario identifier needs to be added to the devices, to which it applies (Android devices in this case):<br />
<br />
<blockquote>com.openexchange.client.onboarding.android.tablet.scenarios=..., mygoogleapp<br /><br />
com.openexchange.client.onboarding.android.phone.scenarios=..., mygoogleapp<br />
</blockquote><br />
Furthermore, that scenario needs to be made accessible to users as well:<br />
<br />
<blockquote>com.openexchange.client.onboarding.enabledScenarios=..., mygoogleapp<br />
</blockquote><br />
At last, a .pot file is supposed to be generated from the translatable strings using /opt/open-xchange/sbin/parsei18nyaml command-line tool to yield the .po files for the individual languages.<br />
<br />
Provided that target users do hold appropriate capabilities, they are allowed to execute that scenario. In the example above the &quot;app&quot; provider is specified, which does no require any capabilities. Hence, that scenario is available.<br />
<br />
== HowTos ==<br />
<br />
=== How can I quickly setup a default/test configuration ? ===<br />
<br />
# Install open-xchange-client-onboarding package<br />
# Edit <code>/opt/open-xchange/etc/client-onboarding.properties</code> and set <code>com.openexchange.client.onboarding.enabled</code> to <code>true</code> <br />
# Edit <code>noreply.properties</code> to enable autoconfig sending via email. PS: Have a fully working smtp login available like “noreply@yourdomain.tld”<br />
# Edit onboarding yaml and set “enable” for : “driveappinstall” , “davsync” “davmanual” “mailsync” “mailmanual” to <code>true</code> <br />
# Now set the correct caldav/carddav server FQDNs for your setup.<br />
#*<code>client-onboarding-caldav.properties</code> <br />
#*<code>client-onboarding-carddav.properties</code><br />
# Restart OX process<br />
# Click on settings - connect your device<br />
# verify that you have available following options: <br />
#* windows -> imap/smtp details<br />
#* android/fon+tablet -> imap/smtp details<br />
#* android/fon+tablet -> drive app <br />
#* apple -> iphone -> imap/smtp konfig button<br />
#* apple -> iphone -> imap/smtp details for experts<br />
#* apple -> iphone -> calendar/addressbok -> konfig button<br />
#* apple -> iphone -> calendar/addressbok -> details for dav setup<br />
#* apple -> iphone -> drive app<br />
#* apple -> ipad -> imap/smtp konfig send email<br />
#* apple -> ipad -> imap/smtp konfig button<br />
#* apple -> ipad -> imap/smtp details for experts<br />
#* apple -> ipad -> calendar/addressbook konfig send email<br />
#* apple -> ipad -> calendar/addressbook konfig button<br />
#* apple -> ipad -> calendar/addressbook details for experts<br />
#* apple -> ipad -> drive app<br />
<br />
=== How can I quickly disable a certain scenario ===<br />
<br />
Simply enter the 'client-onboarding-scenarios.yml' file and go to the section specifying the target scenario. Switch the 'enabled' flag to &quot;false&quot; and execute /opt/open-xchange/sbin/reloadconfiguration command-line tool.<br />
<br />
E.g. to disable the OX Drive App:<br />
<br />
[[File:onboarding_3.png]]<br />
<br />
=== How can I add my own App? ===<br />
<br />
Provided that the App is accessible by a link (pointing to a commercial App Store or to a downloadable executable/installer), the generic &quot;app&quot; is the suitable provider to choose.<br />
<br />
Hence, an appropriate section is supposed to be added to the 'client-onboarding-scenarios.yml' file having a unique name and &quot;provider&quot; attribute set to &quot;[app]&quot;:<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The attribute &quot;type&quot; needs to be set to &quot;link&quot;.<br />
<br />
The attribute &quot;link&quot; should be configured with:<br />
<br />
* &quot;url&quot; sub-attribute containing the actual link pointing to the URL location<br />
* &quot;type&quot; sub-attribute specifying of what type that link is: either &quot;appstore&quot;, &quot;macappstore&quot;, &quot;playstore&quot; or &quot;common&quot;.<br /><br />
The type &quot;common&quot; is supposed to be used for links that do not point to a commercial App Store, but to a downloadable executable/installer file.<br />
<br />
The &quot;icon&quot; attribute is supposed to contain a comma-separated list of Font Awesome icons (only the ones from v4.4.0 are currently supported) that represent the App; e.g.<br />
<br />
* &quot;fa-cloud&quot; for Drive/file-related nature<br />
* &quot;fa-calendar, fa-users&quot; for Calendar and Address Book synchronization<br />
* &quot;fa-envelope-o&quot; for Mail nature<br />
<br />
Next, the translatable display name and description should be set through setting the attributes &quot;displayName_t10e&quot; and &quot;description_t10e&quot;. As described previously, executing the /opt/open-xchange/sbin/parsei18nyaml command-line tool yields an appropriate .pot file, which can then be used for generating the individual .po file for the different translations.<br />
<br />
Finally, the 'client-onboarding.properties' file needs to be modified to specify the &quot;scope&quot; for that new scenario. Add the scenario’s unique name to the appropriate device properties and add it to &quot;com.openexchange.client.onboarding.enabledScenarios&quot; property as well.<br />
<br />
After executing /opt/open-xchange/sbin/reloadconfiguration command-line tool the new client onboarding scenario is available for the selected users/devices.<br />
<br />
=== How can I upsell my own app? ===<br />
<br />
Having the same prerequisites/steps as for &quot;How can I add my own App?&quot; the scenario description in the 'client-onboarding-scenarios.yml' file simply needs to be extended by the desired capabilities, which are supposed to be used for managing the upsell.<br />
<br />
Example<br />
<br />
<blockquote>mygoogleapp:<br /><br />
enabled: true<br /><br />
type: link<br /><br />
link:<br /><br />
url: http://play.google.com/store/apps?id=mygoogleapp.invalid<br /><br />
type: playstore<br /><br />
'''capabilities: &quot;mygoogleapp_capability&quot;'''<br /><br />
providers: [app]<br /><br />
alternatives: []<br /><br />
icon: fa-cloud<br /><br />
displayName_t10e: &quot;My App for synchronizing files&quot;<br /><br />
description_t10e: &quot;Synchronize your files with our Drive application.&quot;<br />
</blockquote><br />
The special &quot;capabilities&quot; attribute is only supported for scenarios of type &quot;link&quot; with the special &quot;app&quot; provider.<br />
<br />
With such a &quot;capabilities&quot; attribute only users, which have the &quot;mygoogleapp_capability&quot; capability are allowed to get the link. For those who don’t, the upsell opportunity will be displayed; e.g.<br />
<br />
<blockquote>[[File:onboarding_4.png]]<br />
</blockquote></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Upsell&diff=20886
AppSuite:Upsell
2015-11-11T15:41:23Z
<p>Cutmasta: /* Capabilities and Upsell triggers */</p>
<hr />
<div><div class="title">Upsell</div><br />
<br />
'''Abstract.''' This article is mainly for UI developers and introduces the concept of upsell from a technical point of view. In short: End-user has a set of so-called ''capabilities''. UI, however, offers functionality beyond that limited set for promotion purposes. Actions, e.g. inline links, that require missing capabilities trigger an '''in-app upsell'''. This process leads to a trial period or a new subscription. Technical challenge for the UI developer is to check what the end-user has, what can be shown beyond that, and how to handle upsell. It is also possible for hosting companies to easily integrate their own online shop into OX Upsell, since the internal mechanisms are ''loosely coupled'' via events.<br />
__TOC__<br />
==Enable upsell==<br />
In order to configure upsell server-side, just create a new file '''upsell-appsuite.properties''' or append to existing '''appsuite.properties''' (mind the '''double-slash'''; this in not a typo!). If you configure upsell in the '''upsell-appsuite.properties''' the properties are loaded when you trigger the '''live reload''' function. <br />
<br />
<pre class="language-settings"> <br />
io.ox/core//upsell/enabled/infostore=true<br />
io.ox/core//upsell/enabled/portal=true<br />
io.ox/core//upsell/enabled/tasks=true<br />
</pre><br />
Each line enables a specific [[AppSuite:Upsell#Capabilities|capability]] for upsell. That means whenever a feature misses one these capabilities a special upsell-related event is triggered.<br />
<br />
Hint: For simple demo purposes, you can enable an internal upsell configuration by appending '''"&demo=upsell"''' to the URL. Needs to reload page, of course.<br />
<br />
==Custom upsell links==<br />
Since other upsell triggers than the usual links would require custom development of the UI, the appsuite provides several upsell triggers which can be configured via settings. Those triggers will appear, when the expression of required capabilities is not satisfied and the required set of upsell triggers is satisfied. If you configure the upsell settings, the custom upsell triggers will be enabled by default but you can disable them if you want to. <br />
<br />
===Example===<br />
<br />
To clearify, when triggers are shown or not, we proceed with an example: A hoster can provide a custom upsell trigger in the secondary toolbar (next to the reload icon). This upsell trigger is inteded to sell a premium account to a user and has the default requirement of '''active_sync''' OR '''caldav''' OR '''carddav'''. That means, if one of those capabilities is not set for a user and the upsell is activated for '''active_sync''' AND '''caldav''' AND '''carddav''' the upsell trigger will be shown. You can enable upsell for those capabilities with<br />
<pre class="language-settings"><br />
io.ox/core//upsell/enabled/active_sync=true<br />
io.ox/core//upsell/enabled/caldav=true<br />
io.ox/core//upsell/enabled/carddav=true<br />
</pre> <br />
inside an existing or new '''.properties''' file. Note that you have to restart the server so that the changes take place.<br />
<br />
If a user clicks on the upsell trigger, a upsell event of type 'custom' and with id 'secondary-toolbar' is triggered so that the page or dialog which will be opened can react depending on the clicked link. <br />
<br />
===Change appearance===<br />
<br />
Any custom upsell triggers which have icons will use a '''fa-star''' as default icon. You can change the default icon to any font-awesome icon (or a set of space separated icons) via<br />
<pre class="language-settings"><br />
io.ox/core//upsell/defaultIcon="fa-star"<br />
</pre><br />
<br />
You can also change the icon of individual custom triggers with<br />
<pre class="language-settings"><br />
io.ox/core//features/upsell/$id/icon="fa-star"<br />
</pre><br />
where $id is the id of the upsell trigger.<br />
<br />
The color of custom upsell links can be changed with <br />
<pre class="language-settings"><br />
io.ox/core//features/upsell/$id/color="#f00"<br />
</pre><br />
where $id is the id of the upsell trigger and the color string can be any css color string.<br />
<br />
If you want to disable a custom upsell trigger, then you can add <br />
<pre class="language-settings"><br />
io.ox/core//features/upsell/$id/enabled=false<br />
</pre><br />
to a '''.properties''' file. <br />
<br />
===Customize strings===<br />
<br />
Some of the custom upsell triggers use have a title (or other strings) which a hoster could customize. It is important, that several translations are provided. You can provide your own texts via <br />
<pre class="language-settings"><br />
io.ox/core//features/upsell/$id/i18n/$lang/title="A custom title"<br />
</pre><br />
where $lang is the current language identifier (e.g. "en_US"). You can see the current language identifier when you open the webconsole and type <br />
<pre class="language-settings"><br />
ox.language<br />
</pre><br />
<br />
===Customize required capabilities===<br />
If you want certain upsell triggers to appear on different capabilities, you can configure this inside a .properties file. Therefore, you have to configure the '''requires''' field of the appropriate trigger. This field expects a logical expression of capabilities. The following example requires eas and caldav or not carddav. If the actual capabilities does not satisfy the expression and the upsell capabilites satisfy this expression, the upsell trigger will be drawn. <br />
<pre class="language-settings"><br />
io.ox/core//features/upsell/$id/requires="active_sync && (caldav || !carddav)"<br />
</pre><br />
<br />
===List of custom triggers===<br />
<br />
This sections lists the custom triggers and how they can be configured.<br />
<br />
{|<br />
|-<br />
! ID !! Config !! Texts !! Default capabilities !! Description<br />
|-<br />
| secondary-launcher<br />
| icon, color<br />
| title<br />
| active_sync or caldav or carddav<br />
| This trigger is located in the secondary toolbar left of the notifications icon. It can contain an icon and text and can be colored. It is intended as '''upgrade to premium''' trigger. This trigger is not shown on mobile devices due to space limitations. <br />
|-<br />
| folderview/mail<br />
| icon, color<br />
| title<br />
| active_sync<br />
| This trigger is located below the folderview of mails. <br />
|-<br />
| folderview/contacts<br />
| icon, color<br />
| title<br />
| carddav<br />
| This trigger is located below the folderview of the address book. <br />
|-<br />
| folderview/calendar<br />
| icon, color<br />
| title<br />
| caldav<br />
| This trigger is located below the folderview of the calendar. <br />
|-<br />
| topbar-dropdown<br />
| icon, color<br />
| title<br />
| active_sync or caldav or carddav<br />
| This trigger is located on the first position of the dropdown in the secondary toolbar. It contains a text and an icon. <br />
|-<br />
| portal-widget<br />
| imageURL, removable (boolean), icon<br />
| title<br />
| active_sync or caldav or carddav<br />
| This trigger adds a draggable portal widget to the appsuite portal. This widget is not removable by default and displays a default text. A customer can add a backgroundimage with '''imageURL''' and can make this widget removable by setting '''removable''' to true. If no image is used, the widget displays the title in the center with a customizable space separated list of font-awesome icons. <br />
|-<br />
| mail-folderview-quota<br />
| upsellLimit, icon, color<br />
| title<br />
| active_sync or caldav or carddav<br />
| This trigger is appended below the mail quota in the folderview. You can set the '''upsellLimit''' (in Bytes). If the maximum mail quota is larger than '''upsellLimit''', the upsell button will not be shown. This upsell trigger has no icon by default. <br />
|}<br />
<br />
==Upsell Wizard==<br />
<div style="color: #3A87AD; text-align: right; margin: -1em 0 1em 0; padding: 0.5em; background-color: #D9EDF7;">Shipped with 7.2.1</div><br />
Hosters usually want to offer context-sensitive content in an IFRAME if the upsell is triggered. Therefore, App Suite comes with an integrated but optional plugin that takes care of this. Just [[AppSuite:UI_manifests_explained#Loading_custom_manifest_during_development|enable]] ''plugins/upsell/simple-wizard''. This plugin registers for the event ''"upsell:requires-upsell"'', opens a modal popup, and loads a custom URL in an embedded IFRAME.<br />
<br />
[[File:Simple_upsell_wizard.png|800 px|Custom content in an IFRAME]]<br />
<br />
===Wizard settings===<br />
In order to configure this server-side, just create a new file '''upsell.properties''' or append to existing '''appsuite.properties''' (mind the '''double-slash'''; this in not a typo! plus: changing such settings requires a backend restart):<br />
<pre class="language-settings"><br />
plugins/upsell/simple-wizard//url=blank.html?user=$user,user_id=$user_id,context_id=$context_id<br />
plugins/upsell/simple-wizard//overlayOpacity=0.5<br />
plugins/upsell/simple-wizard//overlayColor=black<br />
plugins/upsell/simple-wizard//zeroPadding=true<br />
plugins/upsell/simple-wizard//width=750<br />
plugins/upsell/simple-wizard//height=390<br />
plugins/upsell/simple-wizard//closeButton=true<br />
</pre><br />
<br />
{|<br />
|-<br />
! Settings !! Description<br />
|-<br />
| url<br />
| Custom URL that is loaded in IFRAME; can contain special [[AppSuite:Upsell#Custom_URL_variables|variables]].<br />
|-<br />
| overlayOpacity <br />
| CSS opacity value for overlay; default is 0.5<br />
|-<br />
| overlayColor<br />
| CSS background color for overlay; default is black<br />
|-<br />
| zeroPadding<br />
| If true (default) there is no inner padding inside modal dialog, i.e. the IFRAME covers the popup<br />
|-<br />
| width<br />
| Width of outer popup (not IFRAME) in pixel<br />
|-<br />
| height<br />
| Height of IFRAME in pixel<br />
|-<br />
| closeButton<br />
| If true (default) the wizard shows its own close button<br />
|}<br />
<br />
===Custom URL variables===<br />
The plugin offers a set of variables that help providing context-sensitive content. ''$missing'' is probably the most prominent one. Other variables help identifying the user. An example:<br />
<br />
<pre class="language-setting"><br />
upsell.php?user_id=$user_id&context_id=$context_id&language=$language&missing=$missing<br />
</pre><br />
{|<br />
|-<br />
! Variable !! Description<br />
|-<br />
| $context_id<br />
| context_id of current user<br />
|-<br />
| $hostname<br />
| hostname of current session, e.g. www.one-of-countless-virtual-hosts.com<br />
|-<br />
| $id<br />
| The trigger's identifier, e.g. "io.ox/files". Can refer to an app, an inline action, or a portal plugin. See $type<br />
|-<br />
| $imap_login<br />
| The current user's imap login<br />
|-<br />
| $language<br />
| The current user's language, e.g. de_DE or en_US<br />
|-<br />
| $mail<br />
| The current user's primary email address<br />
|-<br />
| $missing<br />
| The set of missing capabilities, comma separated, e.g. "files"<br />
|-<br />
| $session<br />
| The current user's session id<br />
|-<br />
| $type<br />
| Either app, inline-action, or portal-widget. Describes what triggered the upsell. See $id<br />
|-<br />
| $user<br />
| The current user's login name (can include context name, i.e somebody@foo)<br />
|-<br />
| $user_id<br />
| The current user's numeric id<br />
|-<br />
| $user_login<br />
| The current user's login (usually without context name)<br />
|}<br />
<br />
===Develop and debug===<br />
While experimenting or developing, you can use the following helpful functions:<br />
<pre class="language-javascript"> <br />
// get plugin (this must be properly loaded, otherwise you get a runtime error)<br />
var wizard = require('plugins/upsell/simple-wizard/register');<br />
<br />
// if you have no chance to enabled this plugin server-side, use the following approach <br />
// but don't use this in production plugins, it's just a hack for console: <br />
// if you don't know the difference please take a look at <br />
// http://requirejs.org/docs/errors.html#notloaded <br />
var wizard; require(['plugins/upsell/simple-wizard/register'], function (w) { wizard = w; });<br />
<br />
// get variables (optional: options from upsell:require-upgrade event)<br />
wizard.getVariables({ type: 'app', id: 'io.ox/files', missing: 'files' });<br />
<br />
// get URL (optional: options from upsell:require-upgrade event)<br />
// replaces placeholders ($foo) by variable values<br />
wizard.getURL({ type: 'app', id: 'io.ox/files', missing: 'files' });<br />
<br />
// get all settings (can be changed on the fly)<br />
console.log(wizard.settings);<br />
<br />
// global upsell events; parameters: (e, popup)<br />
ox.on('upsell:simple-wizard:show:before', _.inspect);<br />
ox.on('upsell:simple-wizard:show', _.inspect);<br />
ox.on('upsell:simple-wizard:close', _.inspect);<br />
<br />
// special event to customize settings (e, variables, settings)<br />
// triggered before creating dialog instance;<br />
// 2nd parameter has variables like type, missing, user_id etc.<br />
// 3rd parameter refers to a local copy of wizard settings<br />
ox.on('upsell:simple-wizard:init', _.inspect);<br />
<br />
// open wizard manually<br />
wizard.open();<br />
<br />
// close wizard manually<br />
wizard.close();<br />
<br />
// disable wizard (unregisters upsell event)<br />
wizard.disable();<br />
<br />
// and of course: enable wizard (registers for upsell event)<br />
wizard.enable();<br />
</pre><br />
Some examples for customizations in UI plugins or in console:<br />
<pre class="language-javascript"><br />
// get plugin (this muse be properly loaded, otherwise you get a runtime error)<br />
var wizard = require('plugins/upsell/simple-wizard/register'); <br />
<br />
// extend IFRAME constructor (see http://underscorejs.org/#compose)<br />
var custom = function (iframe) {<br />
return iframe.css({ border: '5px solid #08c', boxSizing: 'border-box' });<br />
};<br />
wizard.getIFrame = _.compose(custom, wizard.getIFrame);<br />
<br />
// use an event to customize the IFRAME<br />
ox.on('upsell:simple-wizard:show:before', function (e, popup) {<br />
popup.getContentNode().find('iframe')<br />
.css({ border: '5px solid #08c', boxSizing: 'border-box' });<br />
});<br />
</pre><br />
<br />
===Close wizard===<br />
The upsell wizard can easily be closed via javascript or by redirecting the IFRAME to a prepared HTML page. In order to see this in action, run the following code (step by step):<br />
<pre class="language-javascript"> <br />
// get plugin (this must be properly loaded, otherwise you get a runtime error)<br />
var wizard = require('plugins/upsell/simple-wizard/register');<br />
<br />
// open wizard<br />
wizard.open();<br />
<br />
// redirect now<br />
wizard.setSrc('apps/plugins/upsell/simple-wizard/close.html');<br />
</pre><br />
<br />
Custom backend systems that run on a different domain cannot use javascript to close the wizard [http://en.wikipedia.org/wiki/Cross-site_scripting]. However, such systems can redirect to ''close.html''. Since this page is part of the UI and therefore located on the same domain, it is allowed to call the wizard's close function.<br />
<br />
==Custom development==<br />
This section documents some of the inner workings of the upsell layer. It should provide some useful insights and hopefully helps at implementing custom upsell solutions.<br />
===Events===<br />
Whenever the user starts an app or clicks on an inline-action, a capability-check is performed. For example, all inline actions have native support for such checks:<br />
<br />
<pre class="language-javascript"> <br />
new Action('io.ox/calendar/detail/actions/sendmail', {<br />
// this action requires the capability "webmail"<br />
capabilities: 'webmail',<br />
action: function (baton) {<br />
// send mail<br />
}<br />
});<br />
</pre><br />
<br />
If the end-user does not have "webmail" (e.g. in a files-only setup) but calls this action, a proper event is fired:<br />
<br />
<pre class="language-javascript"> <br />
// if any action misses a capability<br />
ox.trigger('upsell:requires-upgrade');<br />
// which provides the following data for apps:<br />
{<br />
type: "app", // type of the upsell trigger<br />
id: "io.ox/mail/main", // upsell trigger ID<br />
missing: "webmail"<br />
}<br />
// and for inline-actions:<br />
{<br />
type: "inline-action",<br />
id: "io.ox/calendar/detail/actions/sendmail",<br />
missing: "webmail"<br />
}<br />
</pre><br />
<br />
===Capabilities and Upsell triggers===<br />
There are lots of different capabilities. They are defined on the server-side and basically they are just strings. Let's keep it simple and understand them as either services (e.g. mobility), specific functionalities (e.g. multiple_mail_accounts) or applications (e.g. calendar). Some obvious examples:<br />
<br />
{|<br />
|-<br />
! Capability !! Description !! Upsell trigger (if capability is missing)<br />
|-<br />
| calendar<br />
| User has "Calendar" app<br />
|<br />
* Mail/All recipients: Invite to appointment<br />
* Add portal widget<br />
* Top bar<br />
|-<br />
| contacts <br />
| User has "Address Book" app<br />
|<br />
* Mail/App recipients: Save as distribution list<br />
* Calendar: Save participants as distribution list<br />
* Top bar<br />
|-<br />
| infostore<br />
| User has "Files" app<br />
|<br />
* Mail: Save in infostore<br />
* Add portal widget (My latest files, Recently changed files)<br />
* Top bar<br />
|-<br />
| portal<br />
| User has "Portal" app<br />
|<br />
* Mail: Add to portal<br />
* Contacts: Add to portal<br />
* Files: Add to portal<br />
* Top bar<br />
|-<br />
| tasks<br />
| User has "Tasks" app<br />
|<br />
* Mail: Remind me<br />
* Add portal widget<br />
* Top bar<br />
|-<br />
| webmail<br />
| User has "Mail" app<br />
|<br />
* Calendar: Send mail to all participants<br />
* Contacts: Send mail<br />
* Contacts: Send vCard<br />
* Files: Send as link<br />
* Files: Send by mail<br />
* Add portal widget<br />
* Top bar<br />
|}<br />
<br />
<pre class="language-javascript"> <br />
// list all available capabilities<br />
_(ox.serverConfig.capabilities).pluck('id').sort();<br />
</pre><br />
<br />
An example: Free-mail users might just have '''webmail''' and '''contacts'''. If '''infostore''' is enabled for upsell, end-users will see the link to store mail attachments. But since this capability is missing, the event "upsell:requires-upgrade" is triggered which starts the upsell process. Upon successful completion this process should unlock the capability '''infostore''' for the end-user.<br />
<br />
The advantage of using rather atomic capabilities as the foundation for upsell is that developers don't have to consider and implement sales programs or marketing matrices in UI code.<br />
<br />
===Example dialog===<br />
Whenever the event ''"upsell:requires-upgrade"'' is triggered there should be some response for the end-user. Usually an upsell dialog should open. This can be implemented as follows:<br />
<br />
<pre class="language-javascript"> <br />
function showUpgradeDialog(e, options) {<br />
require(['io.ox/core/tk/dialogs'], function (dialogs) {<br />
new dialogs.ModalDialog({ easyOut: true })<br />
.build(function () {<br />
this.getHeader().append(<br />
$('<h4>').text('Upgrade required')<br />
);<br />
this.getContentNode().append(<br />
$.txt('This feature is not available.'),<br />
$.txt('You need to upgrade your account now.'),<br />
$.txt(' '),<br />
$.txt('The first 90 days are free.')<br />
);<br />
this.addPrimaryButton('upgrade', 'Get free upgrade');<br />
this.addButton('cancel', 'Cancel');<br />
})<br />
.setUnderlayStyle({<br />
opacity: 0.70,<br />
backgroundColor: '#08C'<br />
})<br />
.on('upgrade', function () {<br />
ox.trigger('upsell:upgrade', options);<br />
})<br />
.on('show', function () {<br />
ox.off('upsell:requires-upgrade', showUpgradeDialog);<br />
})<br />
.on('close', function () {<br />
ox.on('upsell:requires-upgrade', showUpgradeDialog);<br />
})<br />
.show();<br />
});<br />
}<br />
<br />
function upgrade(e, options) {<br />
console.debug('upgrade', options);<br />
alert('User decided to upgrade! (global event: upsell:upgrade)');<br />
}<br />
<br />
ox.on('upsell:requires-upgrade', showUpgradeDialog);<br />
<br />
/*<br />
* convention: 'upsell:upgrade' is used to trigger final upsell<br />
* the current user and user_id can be found in global variables ox.user and ox.user_id<br />
*/<br />
ox.on('upsell:upgrade', upgrade);<br />
<br />
</pre><br />
<br />
The second event '''"upsell:upgrade"''' can be understood as the final imperative to request the upsell server-side.<br />
<br />
===Example portal widget===<br />
Besides waiting for the user to click on such links, it's always a good idea to offer explicit controls to trigger an upsell. One option is creating a portal widget that advertises a premium subscription:<br />
<br />
<pre class="language-javascript"> <br />
/**<br />
* This work is provided under the terms of the CREATIVE COMMONS PUBLIC<br />
* LICENSE. This work is protected by copyright and/or other applicable<br />
* law. Any use of the work other than as authorized under this license<br />
* or copyright law is prohibited.<br />
*<br />
* http://creativecommons.org/licenses/by-nc-sa/2.5/<br />
* © 2013 Open-Xchange Inc., Tarrytown, NY, USA. info@open-xchange.com<br />
*<br />
* @author Matthias Biggeleben <matthias.biggeleben@open-xchange.com><br />
*/<br />
<br />
define('plugins/portal/upsell/register',<br />
['io.ox/core/extensions',<br />
'io.ox/files/api',<br />
'gettext!plugins/portal'], function (ext, api, gt) {<br />
<br />
'use strict';<br />
<br />
var title = gt('Upgrade to premium');<br />
<br />
ext.point('io.ox/portal/widget/upsell').extend({<br />
<br />
title: title,<br />
<br />
preview: function (baton) {<br />
<br />
this.addClass('hide-title').append(<br />
$('&lt;div class="content centered" style="cursor: pointer; padding-top: 3em;">').append(<br />
$('&lt;h2>').append(<br />
$.txt(title + ' '),<br />
$('&lt;i class="icon-star">')<br />
),<br />
$('&lt;div>').text(gt('Click here for free trial.'))<br />
)<br />
.on('click', function () {<br />
ox.trigger('upsell:upgrade', {<br />
type: 'widget',<br />
id: 'io.ox/portal/widget/upsell',<br />
missing: ''<br />
});<br />
})<br />
);<br />
}<br />
});<br />
});<br />
</pre><br />
<br />
===Accessing upsell settings===<br />
The upsell configuration is located in the namespace ''"io.ox/core"'', the path is ''"upsell/enabled"''. Example:<br />
<br />
<pre class="language-javascript"> <br />
// get all capabilities that can trigger upsell<br />
require('settings!io.ox/core').get('upsell/enabled');<br />
<br />
// contains data like this<br />
{<br />
infostore: true,<br />
portal: true,<br />
tasks: true<br />
}<br />
</pre><br />
<br />
If upsell is '''not''' enabled and the end-user lacks specific capabilities, the app or the inline-action is not shown. If upsell is enabled by the upper configuration, inline-actions are shown and trigger the upsell event ''"upsell:requires-upgrade"'' if clicked (but do not execute the action itself).<br />
<br />
<pre class="language-javascript"> <br />
/* <br />
* if you want to create your own controls, you can use the following helpers <br />
*/<br />
var upsell = require('io.ox/core/upsell');<br />
<br />
// check capabilities (space-separated) <br />
upsell.has('portal webmail');<br />
<br />
// get missing capabilities (would return "calendar" in demo mode) <br />
upsell.missing(['portal webmail', 'contacts', 'calendar']);<br />
<br />
/* checks if upsell is enabled for a set of capabilities <br />
* true if at least one set matches <br />
*/<br />
upsell.enabled(['portal webmail', 'webmail calendar']);<br />
<br />
/* convenience function: "visible" <br />
* checks if something should be visible depending on required capabilities <br />
* true if any item matches requires capabilities <br />
* true if any item does not match its requirements but is enabled for upsell <br />
* this function is used for any inline link, for example, to decide whether or not showing it <br />
*/<br />
upsell.visible(['portal webmail', 'contacts', 'calendar']);<br />
<br />
// likewise if neither capability set nor enabled for upsell, we get a false <br />
upsell.visible(['foo']);<br />
<br />
// in case something weird happens (usually bad configuration) debug() helps<br />
upsell.debug();<br />
<br />
// and this one<br />
_(ox.serverConfig.capabilities).pluck('id').sort();<br />
<br />
</pre><br />
<br />
==Upsell in OX6==<br />
Please also consider [[Upsell|this article]] as it also covers backend aspects.<br />
<br />
[[Category:Upsell]]<br />
[[Category:AppSuite]]<br />
[[Category:UI]]</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=OX6:Installing_OX_Language_Packages&diff=20777
OX6:Installing OX Language Packages
2015-10-14T20:20:07Z
<p>Cutmasta: Blanked the page</p>
<hr />
<div></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Metrics&diff=20543
AppSuite:Metrics
2015-09-22T12:58:00Z
<p>Cutmasta: /* Setup/Installation */</p>
<hr />
<div>{{Version|7.8.0}}<br />
<br />
== Metrics ==<br />
<br />
=== Introduction ===<br />
<br />
The Metrics module provides a very flexible and extendible way to track user behaviour and conditions within OX Appsuite.<br />
<br />
A common set of events is tracked by default. Out of the box PIWIK is supported as reference analytics framework. Every other analytics framework can be added easily by registering a new adapter within the metrics module where data and events are mapped to the special needs of the target analytics framework.<br />
<br />
=== Setup Metrics within AppSuite ===<br />
Please follow [[AppSuite:Metrics-Analytics-Solutions#Install_PIWIK | these steps ]] to configure AppSuite metrics + PIWIK.<br />
<br />
=== Basics ===<br />
<br />
The metrics framework is located in Appsuite’s front end and can be [[#backend|configured]] by backend properties. The components and their tasks are listed as follows:<br />
<br />
* listener/handler: waiting for events and call metrics module<br />
* metrics module: provides a central API for tracking and propagate events to enabled adapters<br />
* adapter: maps generic event data for a concrete analytics framework and calls their API<br />
<br />
<br />
==== Frontend ====<br />
<br />
The parts a separated by their role/task with high flexibility and extendability in mind.<br />
<br />
===== Components =====<br />
<br />
- metrics listener: waiting for a event (example: click on an ‘mail reply’)<br />
- metrics handler: submits data to the metrics module<br />
- metrics module: central facade with a generic API as connecting piece between event handlers and adapters<br />
- metrics adapter: communicates with a concrete analytics framework API<br />
<br />
===== Source code =====<br />
<br />
<code><br />
// core module<br />
io.ox/metrics/main.js<br />
<br />
// adapter for each target analytics framework<br />
io.ox/metrics/adapters<br />
<br />
// adapter for PIWIK<br />
io.ox/metrics/adapters/default.js<br />
<br />
// global listeners/handlers<br />
io.ox/metrics/extensions.js<br />
</code><br />
<br />
==== Backend: properties ====<br />
<br />
Use the following setting properties to enhance/adjust usage. Please be aware of the double slashes that are used as separator for the namespaces.<br />
<br />
===== Global =====<br />
<br />
<code><br />
// global switch [true/false]<br />
// current default: true<br />
io.ox/core//tracking/enabled<br />
</code><br />
<br />
<code><br />
// consider doNotTrack-flag in front end [true/false]<br />
// current default: false<br />
io.ox/core//tracking/donottrack<br />
</code><br />
<br />
===== Adapterspecific =====<br />
<br />
For more details visit the [[AppSuite:Metrics-Adapters | adapter article]].<br />
<code><br />
// ADAPTER BLOCK PIWIK: START <br />
<br />
// adapter switch (PIWIK) [true/false]<br />
// current default: true<br />
io.ox/core//tracking/piwik/enabled<br />
<br />
// platform base url [url]<br />
// current default: https://[insert-your-host-here]/piwik/<br />
io.ox/core//tracking/piwik/url<br />
<br />
// platform page id [url]<br />
// current default: 1<br />
io.ox/core//tracking/piwik/id<br />
<br />
// ADAPTER BLOCK PIWIK: END <br />
<br />
</code><br />
<br />
=== Further reading ===<br />
<br />
* [[AppSuite:Metrics-Details | Details ]]: the metrics framework components in detail<br />
* [[AppSuite:Metrics-Adapters | Adapters ]]: connections between Appsuite metrics and the Analytics solutions<br />
* [[AppSuite:Metrics-Analytics-Solutions | Analytics Solutions]]: details and how to setup<br />
* [[AppSuite:Metrics-Events | Events ]]: list of tracked events so far<br />
<br />
<br />
[[Category:AppSuite]]<br />
[[Category:UI]]<br />
[[Category:Metrics]]</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=OX6:OX6-Upsell&diff=19922
OX6:OX6-Upsell
2015-07-13T16:08:12Z
<p>Cutmasta: /* Introduction */</p>
<hr />
<div>= Upsell Layer =<br />
<br />
== Introduction ==<br />
<br />
''''' This documentation only applies to the former "Open-Xchange 6" product line. '''''<br />
<br />
'''''If you are looking for Upsell documentation for the AppSuite product line, please browse to [[AppSuite:Upsell]] '''''<br />
<br />
<br />
<br />
The Open-xchange Upsell packages provide the ability to show advertisements to an Open-Xchange user who is using a free for charge package like "Webmail" or "PIM". It gives hosting companies the possibility to take advantage of selling premium OX services (Mobility OXtender etc.) via "in app" technology. <br />
<br />
When a "freemail" user clicks on a feature like "Download Outlook Oxtender", "Enable Mobility" or wants to "Access Infostore" an Upsell Layer is shown where the user learns more about the missing functionality in form of text, screenshots and a video explaining the feature.<br />
<br />
Based on the configuration the user can request a free trial of a package like "Premium Groupware" or / and can buy the package within the Upsell Dialogue with one simple click.<br />
<br />
It is also possible for hosting companies to easily integrate their own online shop into the Open-Xchange Upsell Layer.<br />
<br />
The customer never has to leave the application to upsell - it's a native IN APP upsell.<br />
<br />
[[File:upsell.png|290px|thumb|left|Upsell Layer Mobility]] <br />
[[File:Upsell_infostore.png|290px|thumb|left|Upsell Layer Infostore]]<br />
[[File:upsell_calendar.png|290px|thumb|left|Upsell Layer Calendar]]<br />
<br />
<br />
We have implemented 3 different types how to process the upsell an user is requesting in the hosters backend:<br />
<br />
* Show the Upsell Layer window and trigger the upgrade via a generated email to an email address after user clicked "buy" or "trial".<br />
<br />
In this email there is the information which user from which contaxt wants to upgrade to which package. After receiving the email the hoster's sales team can put the customer into billing.<br />
<br />
* Show the Upsell Layer window and open a configurable URL including all needed parameters after the user clicked "buy" or "trial.<br />
<br />
This is the perfect automated way if the hoster wants to have a full automated upsell which he can easily integrate into his existing provisioning & billing system.<br />
<br />
* Directly display a configurable URL/Online SHOP (systemwide or/and per context configurable) within the upsell Layer window instead of standard OX upsell content.<br />
<br />
This is the perfect automated way for all hosters which have an online shop in place and wants to use it for the upsell, too.<br />
<br />
<br />
The upsell layer has full i18n (EN and DE are included) support integrated and offers following components for advertisement:<br />
<br />
* Text<br />
* Video <br />
* Screenshots<br />
<br />
to promote a certain feature for Open-Xchange.<br />
<br />
The important part of the upsell layer is the ability to pass all needed parameters from users session like username,id,cid etc. + the feature he wants to buy, to a third party online shop system or send these parameters via email in machine readable (configurable) format to a dedicated mailsystem which can process it via procmail or similar to trigger the upgrade process via the Open-Xchange API´s (SOAP,RMI,CLT).<br />
<br />
<br />
To implement different Upsell layers for different "brands" or "resellers", you can also set all the below listed properties per "brand". If you need information how to define and use "brands" in Open-Xchange, please have a look at the branding info page here [[CCBranding]] . It is a powerful way to have multiple "brands" in one single installation.<br />
<br />
<br />
{{InstallPlugin|pluginname=open-xchange-upsell-multiple open-xchange-upsell-multiple-gui|sopath=updates}}<br />
<br />
== Installation on Open-Xchange v6.22.x==<br />
<br />
=== Debian GNU/Linux 6.0 ===<br />
<br />
Add the following entry to /etc/apt/sources.list if not already present:<br />
<br />
deb http://software.open-xchange.com/OX6/6.22/6.22.0/backend/DebianSqueeze/all/<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
$ zypper ar http://software.open-xchange.com/OX6/6.22/6.22.0/backend/SLES11 ox<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== RedHat Enterprise Linux 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== CentOS 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
== After Installation ==<br />
<br />
After installation of these packages, you have installed one server side plugin and one gui-plugin. If you have dedicated apaches running in your setup, only install the "open-xchange-upsell-multiple-gui" package on them. The upsell layer is now available to ALL contexts/users of this OX application server/gui instance. All UI plugin contents are installed under following directory (on Debian based installations):<br />
<br />
<pre><br />
/var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/<br />
</pre><br />
<br />
It contains different subdirectories, for example:<br />
<br />
<pre><br />
css - All colors, styles are defined within this directory.<br />
</pre><br />
<br />
<pre><br />
lang - All translated PO files must be stored below this directory.<br />
</pre><br />
<br />
<pre><br />
templates - If you want to change/replace screenshots, videos, layouts etc. check this directory.<br />
</pre><br />
<br />
The server side plugin comes with some templates, for example to change the advertisement text which is sent to the user, or the mail which is sent to the upgrade processing email system. All of them are stored below /opt/open-xchange/etc/groupware<br />
<br />
<pre><br />
upsell_mail_body_ox_enduser.tmpl<br />
upsell_mail_body_ox_enduser.tmpl_de_DE<br />
upsell_mail_subject_ox_enduser.tmpl<br />
upsell_mail_subject_ox_enduser.tmpl_de_DE<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
Once installed, all necessary configuration can be done in one single file. This file can be found at the following directory on the OX application server:<br />
<br />
<pre><br />
/opt/open-xchange/etc/groupware/upsell.properties<br />
</pre><br />
<br />
Switching between the 3 different types of the upsell layer, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method=<br />
</pre><br />
<br />
Possible values: "direct", "static" or "email". <br />
<br />
direct = Redirect within IFRAME immediately to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
static = Redirect AFTER clicking a button within the shipped OX Upsell pages to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
email = Send email to specific address AFTER clicking a button within the shipped OX Upsell pages <br />
<br />
<br />
Defining the redirect URL for method "static" and "direct" for all contexts which are not specially provisioned, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.static.shop_redir_url=<br />
</pre><br />
<br />
Example:<br />
<br />
<pre><br />
http://shop.host.tld/store?src=ox&user=_USER_&userid=_USERID_&mail=_MAIL_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&lang=_LANG_&cid=_CID_<br />
</pre><br />
<br />
As you can see from the example, the server side upsell plugin will replace all placeholders (_USER_ , _USERID_ etc.) with the data from the users OX session while he is logged into OX. You can use following parameters in this URL: <br />
<br />
<pre><br />
"_USER_"<br />
"_USERID_"<br />
"_MAIL_"<br />
"_LOGIN_"<br />
"_IMAPLOGIN"<br />
"_CLICKED_FEATURE_"<br />
"_UPSELL_PLAN_" - Not in use.<br />
"_CID_"<br />
"_LANG_"<br />
"_PURCHASE_TYPE_" - Only used if email or static method is used due to the OX upsell layout/buttons<br />
"_INVITE_" - User checked "invite my friends" checkbox in upsell box<br />
</pre><br />
<br />
If you need a different URL than specified in this configuration for one or more OX Contexts, you must set the custom attribute:<br />
<br />
<pre><br />
"com.openexchange.upsell/url"<br />
</pre><br />
<br />
into the admin user of the context via SOAP,RMI OR Commandline Tools.<br />
<br />
WARNING: Due to Database restriction, you can only set the URL without any PAR<br />
AMETERS. PLEASE ONLY SET THE HOST+PATH to your WEBAPP. <br />
<br />
Following PARAMETERS will be automatically appended to the URL:<br />
<br />
<pre><br />
src=ox&user=_USER_&invite=_INVITE_&mail=_MAIL_&purchase_type=_PURCHASE_TYPE_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&upsell_plan=_U<br />
PSELL_PLAN_&cid=_CID_&lang=_LANG_<br />
</pre><br />
<br />
<br />
To set the custom attribute via Commandline Tools, use following example:<br />
<br />
<pre><br />
changeuser -i 2 -c 424242667 --com.openexchange.upsell/url="http://my.reseller1.com/path/to/webapp/or/php_page.php?"<br />
</pre><br />
<br />
<br />
Defining the email address where upsell plugin will send all infos to for processing this request in a machine readable format:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.address=<br />
</pre><br />
<br />
The mail will be send to this email address. It should be processed by some script via procmail or similar to trigger an API call later on.<br />
<br />
<br />
Email template to load for sending the machine readable mail, if not found, hardcoded text will be used:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.template=/opt/open-xchange/etc/groupware/upsell_mail_body.tmpl<br />
</pre><br />
<br />
All needed paramaters can be included in this email. You can use same placeholders as in the "REDIRECT URL", which is explained above.<br />
<br />
Defining email subject to use when sending upsell request mails. See available placeholder above:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.subject=<br />
</pre><br />
<br />
<br />
If you like, the upsell plugin can also send an info/advertisement email to ox enduser to inform about upsell after the machine readable mail was sent:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.enabled=<br />
</pre><br />
<br />
<br />
Defining email template to load for ox enduser, if mail to enduser is configured:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.template=<br />
</pre><br />
<br />
If you need i18n support within email templates, create template with suffix "_<LANGUAGE_CODE>" . Example: /var/upsell_mail_body_ox_enduser.tmpl_de_DE<br />
<br />
<br />
If you want to use the builtin upgrade methods, you must also configure the OX RMI API informations:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.rmi.host=<br />
com.openexchange.upsell.multiple.rmi.masteradmin=<br />
com.openexchange.upsell.multiple.rmi.masteradmin.pass=<br />
</pre><br />
<br />
== Adding new feature (e.g. video, screenshot)==<br />
<br />
* Open register.js (located in gui folder)<br />
* Search for upsell.config.features<br />
* add the following code ( description inline )<br />
<br />
<pre><br />
featurename: {<br />
name: ["trigger element"],<br />
title: _("upsell window title"),<br />
product_name: _("feature headline"),<br />
intro: _("upsell description text"),<br />
list: {<br />
list_item_1: _("enumeration"),<br />
list_item_2: _("enumeration"),<br />
list_item_3: _("..."),<br />
},<br />
outro: _("upsell text that shows at end"),<br />
videos: {<br />
video_1: {<br />
thumb: "name_of_video_thumbnail.png",<br />
video: "name_of_video_file.swf"<br />
}<br />
},<br />
images: {<br />
image_1: {<br />
thumb: "name_of_image_thumbnail.png",<br />
image: "name_of_lightbox_image.png"<br />
}<br />
},<br />
buttons: {<br />
trial: {<br />
content: _("buttonlabel"),<br />
action: "put javascript actions here if any"<br />
},<br />
},<br />
checkboxes: {<br />
invite:{<br />
content: _("checkboxlabel"),<br />
action: "put javascript actions here if any"<br />
}<br />
}<br />
},<br />
</pre><br />
<br />
* after the feature is implemented you should create the nessacarry files and place them as follow<br />
<br />
<pre><br />
-templates<br />
--_featurename<br />
---- language ( for example de_DE )<br />
-------- flash ( for videos )<br />
-------- img ( for images )<br />
</pre><br />
<br />
<br />
== Load required js/cs files ==<br />
<br />
* to load additional files open register.js and add the following code<br />
<br />
<pre><br />
upsell = {<br />
files: {<br />
jss: {<br />
name: {<br />
script: "name.js",<br />
},<br />
},<br />
css: {<br />
name: "name.css",<br />
},<br />
},<br />
}<br />
</pre><br />
<br />
* add name.js to jss/name.js<br />
* add name.css to css/name.css<br />
<br />
== Change look and feel (e.g. branding, colors and sizes) ==<br />
<br />
* you should edit the existing css located in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/css/upsell.css<br />
* you can add / edit background in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui//img<br />
<br />
<br />
== Possible triggers ==<br />
<pre><br />
modules/calendar/freebusy<br />
modules/calendar/team<br />
modules/calendar/mini_calender<br />
modules/calendar/new/add_participants<br />
modules/calendar/new/remove_participants<br />
modules/calendar/new/add_attachment<br />
modules/calendar/new/delete_attachment<br />
modules/contacts/new/add_attachment<br />
modules/contacts/new/delete_attachment<br />
modules/contacts/social/refresh<br />
modules/contacts/social/publish<br />
modules/mail/save_to_infostore<br />
modules/infostore/send_as_attachment<br />
modules/infostore/send_as_link<br />
modules/infostore/mail/save_to_infostore<br />
modules/infostore/social/refresh<br />
modules/infostore/social/publish<br />
modules/tasks/new/add_participants<br />
modules/tasks/new/remove_participants<br />
modules/tasks/new/add_attachment<br />
modules/tasks/new/delete_attachment<br />
configuration/mail/accounts/new<br />
modules/folders/users<br />
<br />
modules/infostore<br />
modules/calender<br />
modules/contacts<br />
modules/mail<br />
modules/portal<br />
modules/tasks<br />
modules/configuration<br />
<br />
modules/outlook<br />
modules/outlook.updater<br />
modules/mobility<br />
</pre></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=OX6:OX6-Upsell&diff=19921
OX6:OX6-Upsell
2015-07-13T16:07:54Z
<p>Cutmasta: /* Introduction */</p>
<hr />
<div>= Upsell Layer =<br />
<br />
== Introduction ==<br />
<br />
''''' This documentation only applies to the former "Open-Xchange 6" product line. <br />
<br />
If you are looking for Upsell documentation for the AppSuite product line, please browse to [[AppSuite:Upsell]] '''''<br />
<br />
<br />
<br />
The Open-xchange Upsell packages provide the ability to show advertisements to an Open-Xchange user who is using a free for charge package like "Webmail" or "PIM". It gives hosting companies the possibility to take advantage of selling premium OX services (Mobility OXtender etc.) via "in app" technology. <br />
<br />
When a "freemail" user clicks on a feature like "Download Outlook Oxtender", "Enable Mobility" or wants to "Access Infostore" an Upsell Layer is shown where the user learns more about the missing functionality in form of text, screenshots and a video explaining the feature.<br />
<br />
Based on the configuration the user can request a free trial of a package like "Premium Groupware" or / and can buy the package within the Upsell Dialogue with one simple click.<br />
<br />
It is also possible for hosting companies to easily integrate their own online shop into the Open-Xchange Upsell Layer.<br />
<br />
The customer never has to leave the application to upsell - it's a native IN APP upsell.<br />
<br />
[[File:upsell.png|290px|thumb|left|Upsell Layer Mobility]] <br />
[[File:Upsell_infostore.png|290px|thumb|left|Upsell Layer Infostore]]<br />
[[File:upsell_calendar.png|290px|thumb|left|Upsell Layer Calendar]]<br />
<br />
<br />
We have implemented 3 different types how to process the upsell an user is requesting in the hosters backend:<br />
<br />
* Show the Upsell Layer window and trigger the upgrade via a generated email to an email address after user clicked "buy" or "trial".<br />
<br />
In this email there is the information which user from which contaxt wants to upgrade to which package. After receiving the email the hoster's sales team can put the customer into billing.<br />
<br />
* Show the Upsell Layer window and open a configurable URL including all needed parameters after the user clicked "buy" or "trial.<br />
<br />
This is the perfect automated way if the hoster wants to have a full automated upsell which he can easily integrate into his existing provisioning & billing system.<br />
<br />
* Directly display a configurable URL/Online SHOP (systemwide or/and per context configurable) within the upsell Layer window instead of standard OX upsell content.<br />
<br />
This is the perfect automated way for all hosters which have an online shop in place and wants to use it for the upsell, too.<br />
<br />
<br />
The upsell layer has full i18n (EN and DE are included) support integrated and offers following components for advertisement:<br />
<br />
* Text<br />
* Video <br />
* Screenshots<br />
<br />
to promote a certain feature for Open-Xchange.<br />
<br />
The important part of the upsell layer is the ability to pass all needed parameters from users session like username,id,cid etc. + the feature he wants to buy, to a third party online shop system or send these parameters via email in machine readable (configurable) format to a dedicated mailsystem which can process it via procmail or similar to trigger the upgrade process via the Open-Xchange API´s (SOAP,RMI,CLT).<br />
<br />
<br />
To implement different Upsell layers for different "brands" or "resellers", you can also set all the below listed properties per "brand". If you need information how to define and use "brands" in Open-Xchange, please have a look at the branding info page here [[CCBranding]] . It is a powerful way to have multiple "brands" in one single installation.<br />
<br />
<br />
{{InstallPlugin|pluginname=open-xchange-upsell-multiple open-xchange-upsell-multiple-gui|sopath=updates}}<br />
<br />
== Installation on Open-Xchange v6.22.x==<br />
<br />
=== Debian GNU/Linux 6.0 ===<br />
<br />
Add the following entry to /etc/apt/sources.list if not already present:<br />
<br />
deb http://software.open-xchange.com/OX6/6.22/6.22.0/backend/DebianSqueeze/all/<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
$ zypper ar http://software.open-xchange.com/OX6/6.22/6.22.0/backend/SLES11 ox<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== RedHat Enterprise Linux 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== CentOS 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
== After Installation ==<br />
<br />
After installation of these packages, you have installed one server side plugin and one gui-plugin. If you have dedicated apaches running in your setup, only install the "open-xchange-upsell-multiple-gui" package on them. The upsell layer is now available to ALL contexts/users of this OX application server/gui instance. All UI plugin contents are installed under following directory (on Debian based installations):<br />
<br />
<pre><br />
/var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/<br />
</pre><br />
<br />
It contains different subdirectories, for example:<br />
<br />
<pre><br />
css - All colors, styles are defined within this directory.<br />
</pre><br />
<br />
<pre><br />
lang - All translated PO files must be stored below this directory.<br />
</pre><br />
<br />
<pre><br />
templates - If you want to change/replace screenshots, videos, layouts etc. check this directory.<br />
</pre><br />
<br />
The server side plugin comes with some templates, for example to change the advertisement text which is sent to the user, or the mail which is sent to the upgrade processing email system. All of them are stored below /opt/open-xchange/etc/groupware<br />
<br />
<pre><br />
upsell_mail_body_ox_enduser.tmpl<br />
upsell_mail_body_ox_enduser.tmpl_de_DE<br />
upsell_mail_subject_ox_enduser.tmpl<br />
upsell_mail_subject_ox_enduser.tmpl_de_DE<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
Once installed, all necessary configuration can be done in one single file. This file can be found at the following directory on the OX application server:<br />
<br />
<pre><br />
/opt/open-xchange/etc/groupware/upsell.properties<br />
</pre><br />
<br />
Switching between the 3 different types of the upsell layer, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method=<br />
</pre><br />
<br />
Possible values: "direct", "static" or "email". <br />
<br />
direct = Redirect within IFRAME immediately to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
static = Redirect AFTER clicking a button within the shipped OX Upsell pages to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
email = Send email to specific address AFTER clicking a button within the shipped OX Upsell pages <br />
<br />
<br />
Defining the redirect URL for method "static" and "direct" for all contexts which are not specially provisioned, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.static.shop_redir_url=<br />
</pre><br />
<br />
Example:<br />
<br />
<pre><br />
http://shop.host.tld/store?src=ox&user=_USER_&userid=_USERID_&mail=_MAIL_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&lang=_LANG_&cid=_CID_<br />
</pre><br />
<br />
As you can see from the example, the server side upsell plugin will replace all placeholders (_USER_ , _USERID_ etc.) with the data from the users OX session while he is logged into OX. You can use following parameters in this URL: <br />
<br />
<pre><br />
"_USER_"<br />
"_USERID_"<br />
"_MAIL_"<br />
"_LOGIN_"<br />
"_IMAPLOGIN"<br />
"_CLICKED_FEATURE_"<br />
"_UPSELL_PLAN_" - Not in use.<br />
"_CID_"<br />
"_LANG_"<br />
"_PURCHASE_TYPE_" - Only used if email or static method is used due to the OX upsell layout/buttons<br />
"_INVITE_" - User checked "invite my friends" checkbox in upsell box<br />
</pre><br />
<br />
If you need a different URL than specified in this configuration for one or more OX Contexts, you must set the custom attribute:<br />
<br />
<pre><br />
"com.openexchange.upsell/url"<br />
</pre><br />
<br />
into the admin user of the context via SOAP,RMI OR Commandline Tools.<br />
<br />
WARNING: Due to Database restriction, you can only set the URL without any PAR<br />
AMETERS. PLEASE ONLY SET THE HOST+PATH to your WEBAPP. <br />
<br />
Following PARAMETERS will be automatically appended to the URL:<br />
<br />
<pre><br />
src=ox&user=_USER_&invite=_INVITE_&mail=_MAIL_&purchase_type=_PURCHASE_TYPE_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&upsell_plan=_U<br />
PSELL_PLAN_&cid=_CID_&lang=_LANG_<br />
</pre><br />
<br />
<br />
To set the custom attribute via Commandline Tools, use following example:<br />
<br />
<pre><br />
changeuser -i 2 -c 424242667 --com.openexchange.upsell/url="http://my.reseller1.com/path/to/webapp/or/php_page.php?"<br />
</pre><br />
<br />
<br />
Defining the email address where upsell plugin will send all infos to for processing this request in a machine readable format:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.address=<br />
</pre><br />
<br />
The mail will be send to this email address. It should be processed by some script via procmail or similar to trigger an API call later on.<br />
<br />
<br />
Email template to load for sending the machine readable mail, if not found, hardcoded text will be used:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.template=/opt/open-xchange/etc/groupware/upsell_mail_body.tmpl<br />
</pre><br />
<br />
All needed paramaters can be included in this email. You can use same placeholders as in the "REDIRECT URL", which is explained above.<br />
<br />
Defining email subject to use when sending upsell request mails. See available placeholder above:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.subject=<br />
</pre><br />
<br />
<br />
If you like, the upsell plugin can also send an info/advertisement email to ox enduser to inform about upsell after the machine readable mail was sent:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.enabled=<br />
</pre><br />
<br />
<br />
Defining email template to load for ox enduser, if mail to enduser is configured:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.template=<br />
</pre><br />
<br />
If you need i18n support within email templates, create template with suffix "_<LANGUAGE_CODE>" . Example: /var/upsell_mail_body_ox_enduser.tmpl_de_DE<br />
<br />
<br />
If you want to use the builtin upgrade methods, you must also configure the OX RMI API informations:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.rmi.host=<br />
com.openexchange.upsell.multiple.rmi.masteradmin=<br />
com.openexchange.upsell.multiple.rmi.masteradmin.pass=<br />
</pre><br />
<br />
== Adding new feature (e.g. video, screenshot)==<br />
<br />
* Open register.js (located in gui folder)<br />
* Search for upsell.config.features<br />
* add the following code ( description inline )<br />
<br />
<pre><br />
featurename: {<br />
name: ["trigger element"],<br />
title: _("upsell window title"),<br />
product_name: _("feature headline"),<br />
intro: _("upsell description text"),<br />
list: {<br />
list_item_1: _("enumeration"),<br />
list_item_2: _("enumeration"),<br />
list_item_3: _("..."),<br />
},<br />
outro: _("upsell text that shows at end"),<br />
videos: {<br />
video_1: {<br />
thumb: "name_of_video_thumbnail.png",<br />
video: "name_of_video_file.swf"<br />
}<br />
},<br />
images: {<br />
image_1: {<br />
thumb: "name_of_image_thumbnail.png",<br />
image: "name_of_lightbox_image.png"<br />
}<br />
},<br />
buttons: {<br />
trial: {<br />
content: _("buttonlabel"),<br />
action: "put javascript actions here if any"<br />
},<br />
},<br />
checkboxes: {<br />
invite:{<br />
content: _("checkboxlabel"),<br />
action: "put javascript actions here if any"<br />
}<br />
}<br />
},<br />
</pre><br />
<br />
* after the feature is implemented you should create the nessacarry files and place them as follow<br />
<br />
<pre><br />
-templates<br />
--_featurename<br />
---- language ( for example de_DE )<br />
-------- flash ( for videos )<br />
-------- img ( for images )<br />
</pre><br />
<br />
<br />
== Load required js/cs files ==<br />
<br />
* to load additional files open register.js and add the following code<br />
<br />
<pre><br />
upsell = {<br />
files: {<br />
jss: {<br />
name: {<br />
script: "name.js",<br />
},<br />
},<br />
css: {<br />
name: "name.css",<br />
},<br />
},<br />
}<br />
</pre><br />
<br />
* add name.js to jss/name.js<br />
* add name.css to css/name.css<br />
<br />
== Change look and feel (e.g. branding, colors and sizes) ==<br />
<br />
* you should edit the existing css located in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/css/upsell.css<br />
* you can add / edit background in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui//img<br />
<br />
<br />
== Possible triggers ==<br />
<pre><br />
modules/calendar/freebusy<br />
modules/calendar/team<br />
modules/calendar/mini_calender<br />
modules/calendar/new/add_participants<br />
modules/calendar/new/remove_participants<br />
modules/calendar/new/add_attachment<br />
modules/calendar/new/delete_attachment<br />
modules/contacts/new/add_attachment<br />
modules/contacts/new/delete_attachment<br />
modules/contacts/social/refresh<br />
modules/contacts/social/publish<br />
modules/mail/save_to_infostore<br />
modules/infostore/send_as_attachment<br />
modules/infostore/send_as_link<br />
modules/infostore/mail/save_to_infostore<br />
modules/infostore/social/refresh<br />
modules/infostore/social/publish<br />
modules/tasks/new/add_participants<br />
modules/tasks/new/remove_participants<br />
modules/tasks/new/add_attachment<br />
modules/tasks/new/delete_attachment<br />
configuration/mail/accounts/new<br />
modules/folders/users<br />
<br />
modules/infostore<br />
modules/calender<br />
modules/contacts<br />
modules/mail<br />
modules/portal<br />
modules/tasks<br />
modules/configuration<br />
<br />
modules/outlook<br />
modules/outlook.updater<br />
modules/mobility<br />
</pre></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=OX6:OX6-Upsell&diff=19920
OX6:OX6-Upsell
2015-07-13T16:07:26Z
<p>Cutmasta: /* Introduction */</p>
<hr />
<div>= Upsell Layer =<br />
<br />
== Introduction ==<br />
<br />
''''' This documentation only applies to the former "Open-Xchange 6" product line. If you are looking for Upsell documentation for the AppSuite product line, please browse to [[AppSuite:Upsell]] '''''<br />
<br />
<br />
<br />
The Open-xchange Upsell packages provide the ability to show advertisements to an Open-Xchange user who is using a free for charge package like "Webmail" or "PIM". It gives hosting companies the possibility to take advantage of selling premium OX services (Mobility OXtender etc.) via "in app" technology. <br />
<br />
When a "freemail" user clicks on a feature like "Download Outlook Oxtender", "Enable Mobility" or wants to "Access Infostore" an Upsell Layer is shown where the user learns more about the missing functionality in form of text, screenshots and a video explaining the feature.<br />
<br />
Based on the configuration the user can request a free trial of a package like "Premium Groupware" or / and can buy the package within the Upsell Dialogue with one simple click.<br />
<br />
It is also possible for hosting companies to easily integrate their own online shop into the Open-Xchange Upsell Layer.<br />
<br />
The customer never has to leave the application to upsell - it's a native IN APP upsell.<br />
<br />
[[File:upsell.png|290px|thumb|left|Upsell Layer Mobility]] <br />
[[File:Upsell_infostore.png|290px|thumb|left|Upsell Layer Infostore]]<br />
[[File:upsell_calendar.png|290px|thumb|left|Upsell Layer Calendar]]<br />
<br />
<br />
We have implemented 3 different types how to process the upsell an user is requesting in the hosters backend:<br />
<br />
* Show the Upsell Layer window and trigger the upgrade via a generated email to an email address after user clicked "buy" or "trial".<br />
<br />
In this email there is the information which user from which contaxt wants to upgrade to which package. After receiving the email the hoster's sales team can put the customer into billing.<br />
<br />
* Show the Upsell Layer window and open a configurable URL including all needed parameters after the user clicked "buy" or "trial.<br />
<br />
This is the perfect automated way if the hoster wants to have a full automated upsell which he can easily integrate into his existing provisioning & billing system.<br />
<br />
* Directly display a configurable URL/Online SHOP (systemwide or/and per context configurable) within the upsell Layer window instead of standard OX upsell content.<br />
<br />
This is the perfect automated way for all hosters which have an online shop in place and wants to use it for the upsell, too.<br />
<br />
<br />
The upsell layer has full i18n (EN and DE are included) support integrated and offers following components for advertisement:<br />
<br />
* Text<br />
* Video <br />
* Screenshots<br />
<br />
to promote a certain feature for Open-Xchange.<br />
<br />
The important part of the upsell layer is the ability to pass all needed parameters from users session like username,id,cid etc. + the feature he wants to buy, to a third party online shop system or send these parameters via email in machine readable (configurable) format to a dedicated mailsystem which can process it via procmail or similar to trigger the upgrade process via the Open-Xchange API´s (SOAP,RMI,CLT).<br />
<br />
<br />
To implement different Upsell layers for different "brands" or "resellers", you can also set all the below listed properties per "brand". If you need information how to define and use "brands" in Open-Xchange, please have a look at the branding info page here [[CCBranding]] . It is a powerful way to have multiple "brands" in one single installation.<br />
<br />
<br />
{{InstallPlugin|pluginname=open-xchange-upsell-multiple open-xchange-upsell-multiple-gui|sopath=updates}}<br />
<br />
== Installation on Open-Xchange v6.22.x==<br />
<br />
=== Debian GNU/Linux 6.0 ===<br />
<br />
Add the following entry to /etc/apt/sources.list if not already present:<br />
<br />
deb http://software.open-xchange.com/OX6/6.22/6.22.0/backend/DebianSqueeze/all/<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
$ zypper ar http://software.open-xchange.com/OX6/6.22/6.22.0/backend/SLES11 ox<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== RedHat Enterprise Linux 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== CentOS 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
== After Installation ==<br />
<br />
After installation of these packages, you have installed one server side plugin and one gui-plugin. If you have dedicated apaches running in your setup, only install the "open-xchange-upsell-multiple-gui" package on them. The upsell layer is now available to ALL contexts/users of this OX application server/gui instance. All UI plugin contents are installed under following directory (on Debian based installations):<br />
<br />
<pre><br />
/var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/<br />
</pre><br />
<br />
It contains different subdirectories, for example:<br />
<br />
<pre><br />
css - All colors, styles are defined within this directory.<br />
</pre><br />
<br />
<pre><br />
lang - All translated PO files must be stored below this directory.<br />
</pre><br />
<br />
<pre><br />
templates - If you want to change/replace screenshots, videos, layouts etc. check this directory.<br />
</pre><br />
<br />
The server side plugin comes with some templates, for example to change the advertisement text which is sent to the user, or the mail which is sent to the upgrade processing email system. All of them are stored below /opt/open-xchange/etc/groupware<br />
<br />
<pre><br />
upsell_mail_body_ox_enduser.tmpl<br />
upsell_mail_body_ox_enduser.tmpl_de_DE<br />
upsell_mail_subject_ox_enduser.tmpl<br />
upsell_mail_subject_ox_enduser.tmpl_de_DE<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
Once installed, all necessary configuration can be done in one single file. This file can be found at the following directory on the OX application server:<br />
<br />
<pre><br />
/opt/open-xchange/etc/groupware/upsell.properties<br />
</pre><br />
<br />
Switching between the 3 different types of the upsell layer, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method=<br />
</pre><br />
<br />
Possible values: "direct", "static" or "email". <br />
<br />
direct = Redirect within IFRAME immediately to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
static = Redirect AFTER clicking a button within the shipped OX Upsell pages to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
email = Send email to specific address AFTER clicking a button within the shipped OX Upsell pages <br />
<br />
<br />
Defining the redirect URL for method "static" and "direct" for all contexts which are not specially provisioned, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.static.shop_redir_url=<br />
</pre><br />
<br />
Example:<br />
<br />
<pre><br />
http://shop.host.tld/store?src=ox&user=_USER_&userid=_USERID_&mail=_MAIL_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&lang=_LANG_&cid=_CID_<br />
</pre><br />
<br />
As you can see from the example, the server side upsell plugin will replace all placeholders (_USER_ , _USERID_ etc.) with the data from the users OX session while he is logged into OX. You can use following parameters in this URL: <br />
<br />
<pre><br />
"_USER_"<br />
"_USERID_"<br />
"_MAIL_"<br />
"_LOGIN_"<br />
"_IMAPLOGIN"<br />
"_CLICKED_FEATURE_"<br />
"_UPSELL_PLAN_" - Not in use.<br />
"_CID_"<br />
"_LANG_"<br />
"_PURCHASE_TYPE_" - Only used if email or static method is used due to the OX upsell layout/buttons<br />
"_INVITE_" - User checked "invite my friends" checkbox in upsell box<br />
</pre><br />
<br />
If you need a different URL than specified in this configuration for one or more OX Contexts, you must set the custom attribute:<br />
<br />
<pre><br />
"com.openexchange.upsell/url"<br />
</pre><br />
<br />
into the admin user of the context via SOAP,RMI OR Commandline Tools.<br />
<br />
WARNING: Due to Database restriction, you can only set the URL without any PAR<br />
AMETERS. PLEASE ONLY SET THE HOST+PATH to your WEBAPP. <br />
<br />
Following PARAMETERS will be automatically appended to the URL:<br />
<br />
<pre><br />
src=ox&user=_USER_&invite=_INVITE_&mail=_MAIL_&purchase_type=_PURCHASE_TYPE_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&upsell_plan=_U<br />
PSELL_PLAN_&cid=_CID_&lang=_LANG_<br />
</pre><br />
<br />
<br />
To set the custom attribute via Commandline Tools, use following example:<br />
<br />
<pre><br />
changeuser -i 2 -c 424242667 --com.openexchange.upsell/url="http://my.reseller1.com/path/to/webapp/or/php_page.php?"<br />
</pre><br />
<br />
<br />
Defining the email address where upsell plugin will send all infos to for processing this request in a machine readable format:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.address=<br />
</pre><br />
<br />
The mail will be send to this email address. It should be processed by some script via procmail or similar to trigger an API call later on.<br />
<br />
<br />
Email template to load for sending the machine readable mail, if not found, hardcoded text will be used:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.template=/opt/open-xchange/etc/groupware/upsell_mail_body.tmpl<br />
</pre><br />
<br />
All needed paramaters can be included in this email. You can use same placeholders as in the "REDIRECT URL", which is explained above.<br />
<br />
Defining email subject to use when sending upsell request mails. See available placeholder above:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.subject=<br />
</pre><br />
<br />
<br />
If you like, the upsell plugin can also send an info/advertisement email to ox enduser to inform about upsell after the machine readable mail was sent:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.enabled=<br />
</pre><br />
<br />
<br />
Defining email template to load for ox enduser, if mail to enduser is configured:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.template=<br />
</pre><br />
<br />
If you need i18n support within email templates, create template with suffix "_<LANGUAGE_CODE>" . Example: /var/upsell_mail_body_ox_enduser.tmpl_de_DE<br />
<br />
<br />
If you want to use the builtin upgrade methods, you must also configure the OX RMI API informations:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.rmi.host=<br />
com.openexchange.upsell.multiple.rmi.masteradmin=<br />
com.openexchange.upsell.multiple.rmi.masteradmin.pass=<br />
</pre><br />
<br />
== Adding new feature (e.g. video, screenshot)==<br />
<br />
* Open register.js (located in gui folder)<br />
* Search for upsell.config.features<br />
* add the following code ( description inline )<br />
<br />
<pre><br />
featurename: {<br />
name: ["trigger element"],<br />
title: _("upsell window title"),<br />
product_name: _("feature headline"),<br />
intro: _("upsell description text"),<br />
list: {<br />
list_item_1: _("enumeration"),<br />
list_item_2: _("enumeration"),<br />
list_item_3: _("..."),<br />
},<br />
outro: _("upsell text that shows at end"),<br />
videos: {<br />
video_1: {<br />
thumb: "name_of_video_thumbnail.png",<br />
video: "name_of_video_file.swf"<br />
}<br />
},<br />
images: {<br />
image_1: {<br />
thumb: "name_of_image_thumbnail.png",<br />
image: "name_of_lightbox_image.png"<br />
}<br />
},<br />
buttons: {<br />
trial: {<br />
content: _("buttonlabel"),<br />
action: "put javascript actions here if any"<br />
},<br />
},<br />
checkboxes: {<br />
invite:{<br />
content: _("checkboxlabel"),<br />
action: "put javascript actions here if any"<br />
}<br />
}<br />
},<br />
</pre><br />
<br />
* after the feature is implemented you should create the nessacarry files and place them as follow<br />
<br />
<pre><br />
-templates<br />
--_featurename<br />
---- language ( for example de_DE )<br />
-------- flash ( for videos )<br />
-------- img ( for images )<br />
</pre><br />
<br />
<br />
== Load required js/cs files ==<br />
<br />
* to load additional files open register.js and add the following code<br />
<br />
<pre><br />
upsell = {<br />
files: {<br />
jss: {<br />
name: {<br />
script: "name.js",<br />
},<br />
},<br />
css: {<br />
name: "name.css",<br />
},<br />
},<br />
}<br />
</pre><br />
<br />
* add name.js to jss/name.js<br />
* add name.css to css/name.css<br />
<br />
== Change look and feel (e.g. branding, colors and sizes) ==<br />
<br />
* you should edit the existing css located in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/css/upsell.css<br />
* you can add / edit background in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui//img<br />
<br />
<br />
== Possible triggers ==<br />
<pre><br />
modules/calendar/freebusy<br />
modules/calendar/team<br />
modules/calendar/mini_calender<br />
modules/calendar/new/add_participants<br />
modules/calendar/new/remove_participants<br />
modules/calendar/new/add_attachment<br />
modules/calendar/new/delete_attachment<br />
modules/contacts/new/add_attachment<br />
modules/contacts/new/delete_attachment<br />
modules/contacts/social/refresh<br />
modules/contacts/social/publish<br />
modules/mail/save_to_infostore<br />
modules/infostore/send_as_attachment<br />
modules/infostore/send_as_link<br />
modules/infostore/mail/save_to_infostore<br />
modules/infostore/social/refresh<br />
modules/infostore/social/publish<br />
modules/tasks/new/add_participants<br />
modules/tasks/new/remove_participants<br />
modules/tasks/new/add_attachment<br />
modules/tasks/new/delete_attachment<br />
configuration/mail/accounts/new<br />
modules/folders/users<br />
<br />
modules/infostore<br />
modules/calender<br />
modules/contacts<br />
modules/mail<br />
modules/portal<br />
modules/tasks<br />
modules/configuration<br />
<br />
modules/outlook<br />
modules/outlook.updater<br />
modules/mobility<br />
</pre></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=OX6:OX6-Upsell&diff=19919
OX6:OX6-Upsell
2015-07-13T16:06:12Z
<p>Cutmasta: /* Introduction */</p>
<hr />
<div>= Upsell Layer =<br />
<br />
== Introduction ==<br />
<br />
''''' This documentation only applies to the former OX 6 product. '''''<br />
<br />
The Open-xchange Upsell packages provide the ability to show advertisements to an Open-Xchange user who is using a free for charge package like "Webmail" or "PIM". It gives hosting companies the possibility to take advantage of selling premium OX services (Mobility OXtender etc.) via "in app" technology. <br />
<br />
When a "freemail" user clicks on a feature like "Download Outlook Oxtender", "Enable Mobility" or wants to "Access Infostore" an Upsell Layer is shown where the user learns more about the missing functionality in form of text, screenshots and a video explaining the feature.<br />
<br />
Based on the configuration the user can request a free trial of a package like "Premium Groupware" or / and can buy the package within the Upsell Dialogue with one simple click.<br />
<br />
It is also possible for hosting companies to easily integrate their own online shop into the Open-Xchange Upsell Layer.<br />
<br />
The customer never has to leave the application to upsell - it's a native IN APP upsell.<br />
<br />
[[File:upsell.png|290px|thumb|left|Upsell Layer Mobility]] <br />
[[File:Upsell_infostore.png|290px|thumb|left|Upsell Layer Infostore]]<br />
[[File:upsell_calendar.png|290px|thumb|left|Upsell Layer Calendar]]<br />
<br />
<br />
We have implemented 3 different types how to process the upsell an user is requesting in the hosters backend:<br />
<br />
* Show the Upsell Layer window and trigger the upgrade via a generated email to an email address after user clicked "buy" or "trial".<br />
<br />
In this email there is the information which user from which contaxt wants to upgrade to which package. After receiving the email the hoster's sales team can put the customer into billing.<br />
<br />
* Show the Upsell Layer window and open a configurable URL including all needed parameters after the user clicked "buy" or "trial.<br />
<br />
This is the perfect automated way if the hoster wants to have a full automated upsell which he can easily integrate into his existing provisioning & billing system.<br />
<br />
* Directly display a configurable URL/Online SHOP (systemwide or/and per context configurable) within the upsell Layer window instead of standard OX upsell content.<br />
<br />
This is the perfect automated way for all hosters which have an online shop in place and wants to use it for the upsell, too.<br />
<br />
<br />
The upsell layer has full i18n (EN and DE are included) support integrated and offers following components for advertisement:<br />
<br />
* Text<br />
* Video <br />
* Screenshots<br />
<br />
to promote a certain feature for Open-Xchange.<br />
<br />
The important part of the upsell layer is the ability to pass all needed parameters from users session like username,id,cid etc. + the feature he wants to buy, to a third party online shop system or send these parameters via email in machine readable (configurable) format to a dedicated mailsystem which can process it via procmail or similar to trigger the upgrade process via the Open-Xchange API´s (SOAP,RMI,CLT).<br />
<br />
<br />
To implement different Upsell layers for different "brands" or "resellers", you can also set all the below listed properties per "brand". If you need information how to define and use "brands" in Open-Xchange, please have a look at the branding info page here [[CCBranding]] . It is a powerful way to have multiple "brands" in one single installation.<br />
<br />
<br />
{{InstallPlugin|pluginname=open-xchange-upsell-multiple open-xchange-upsell-multiple-gui|sopath=updates}}<br />
<br />
== Installation on Open-Xchange v6.22.x==<br />
<br />
=== Debian GNU/Linux 6.0 ===<br />
<br />
Add the following entry to /etc/apt/sources.list if not already present:<br />
<br />
deb http://software.open-xchange.com/OX6/6.22/6.22.0/backend/DebianSqueeze/all/<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
$ zypper ar http://software.open-xchange.com/OX6/6.22/6.22.0/backend/SLES11 ox<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== RedHat Enterprise Linux 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
=== CentOS 6 ===<br />
<br />
Start a console and create a software repository file if not already present:<br />
<br />
$ vim /etc/yum.repos.d/ox.repo<br />
<br />
[ox]<br />
name=Open-Xchange<br />
baseurl=http://software.open-xchange.com/OX6/6.22/6.22.0/backend/RHEL6/<br />
gpgkey=http://software.open-xchange.com/oxbuildkey.pub<br />
enabled=1<br />
gpgcheck=1<br />
metadata_expire=0m<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-upsell-multiple open-xchange-upsell-multiple-gui<br />
<br />
== After Installation ==<br />
<br />
After installation of these packages, you have installed one server side plugin and one gui-plugin. If you have dedicated apaches running in your setup, only install the "open-xchange-upsell-multiple-gui" package on them. The upsell layer is now available to ALL contexts/users of this OX application server/gui instance. All UI plugin contents are installed under following directory (on Debian based installations):<br />
<br />
<pre><br />
/var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/<br />
</pre><br />
<br />
It contains different subdirectories, for example:<br />
<br />
<pre><br />
css - All colors, styles are defined within this directory.<br />
</pre><br />
<br />
<pre><br />
lang - All translated PO files must be stored below this directory.<br />
</pre><br />
<br />
<pre><br />
templates - If you want to change/replace screenshots, videos, layouts etc. check this directory.<br />
</pre><br />
<br />
The server side plugin comes with some templates, for example to change the advertisement text which is sent to the user, or the mail which is sent to the upgrade processing email system. All of them are stored below /opt/open-xchange/etc/groupware<br />
<br />
<pre><br />
upsell_mail_body_ox_enduser.tmpl<br />
upsell_mail_body_ox_enduser.tmpl_de_DE<br />
upsell_mail_subject_ox_enduser.tmpl<br />
upsell_mail_subject_ox_enduser.tmpl_de_DE<br />
</pre><br />
<br />
== Configuration ==<br />
<br />
Once installed, all necessary configuration can be done in one single file. This file can be found at the following directory on the OX application server:<br />
<br />
<pre><br />
/opt/open-xchange/etc/groupware/upsell.properties<br />
</pre><br />
<br />
Switching between the 3 different types of the upsell layer, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method=<br />
</pre><br />
<br />
Possible values: "direct", "static" or "email". <br />
<br />
direct = Redirect within IFRAME immediately to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
static = Redirect AFTER clicking a button within the shipped OX Upsell pages to parameter "com.openexchange.upsell.multiple.method.static.shop_redir_url" or to the context specific URL value after clicking one of the upsell triggers.<br />
<br />
email = Send email to specific address AFTER clicking a button within the shipped OX Upsell pages <br />
<br />
<br />
Defining the redirect URL for method "static" and "direct" for all contexts which are not specially provisioned, edit parameter:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.static.shop_redir_url=<br />
</pre><br />
<br />
Example:<br />
<br />
<pre><br />
http://shop.host.tld/store?src=ox&user=_USER_&userid=_USERID_&mail=_MAIL_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&lang=_LANG_&cid=_CID_<br />
</pre><br />
<br />
As you can see from the example, the server side upsell plugin will replace all placeholders (_USER_ , _USERID_ etc.) with the data from the users OX session while he is logged into OX. You can use following parameters in this URL: <br />
<br />
<pre><br />
"_USER_"<br />
"_USERID_"<br />
"_MAIL_"<br />
"_LOGIN_"<br />
"_IMAPLOGIN"<br />
"_CLICKED_FEATURE_"<br />
"_UPSELL_PLAN_" - Not in use.<br />
"_CID_"<br />
"_LANG_"<br />
"_PURCHASE_TYPE_" - Only used if email or static method is used due to the OX upsell layout/buttons<br />
"_INVITE_" - User checked "invite my friends" checkbox in upsell box<br />
</pre><br />
<br />
If you need a different URL than specified in this configuration for one or more OX Contexts, you must set the custom attribute:<br />
<br />
<pre><br />
"com.openexchange.upsell/url"<br />
</pre><br />
<br />
into the admin user of the context via SOAP,RMI OR Commandline Tools.<br />
<br />
WARNING: Due to Database restriction, you can only set the URL without any PAR<br />
AMETERS. PLEASE ONLY SET THE HOST+PATH to your WEBAPP. <br />
<br />
Following PARAMETERS will be automatically appended to the URL:<br />
<br />
<pre><br />
src=ox&user=_USER_&invite=_INVITE_&mail=_MAIL_&purchase_type=_PURCHASE_TYPE_&login=_LOGIN_&imaplogin=_IMAPLOGIN_&clicked_feat=_CLICKED_FEATURE_&upsell_plan=_U<br />
PSELL_PLAN_&cid=_CID_&lang=_LANG_<br />
</pre><br />
<br />
<br />
To set the custom attribute via Commandline Tools, use following example:<br />
<br />
<pre><br />
changeuser -i 2 -c 424242667 --com.openexchange.upsell/url="http://my.reseller1.com/path/to/webapp/or/php_page.php?"<br />
</pre><br />
<br />
<br />
Defining the email address where upsell plugin will send all infos to for processing this request in a machine readable format:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.address=<br />
</pre><br />
<br />
The mail will be send to this email address. It should be processed by some script via procmail or similar to trigger an API call later on.<br />
<br />
<br />
Email template to load for sending the machine readable mail, if not found, hardcoded text will be used:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.template=/opt/open-xchange/etc/groupware/upsell_mail_body.tmpl<br />
</pre><br />
<br />
All needed paramaters can be included in this email. You can use same placeholders as in the "REDIRECT URL", which is explained above.<br />
<br />
Defining email subject to use when sending upsell request mails. See available placeholder above:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.subject=<br />
</pre><br />
<br />
<br />
If you like, the upsell plugin can also send an info/advertisement email to ox enduser to inform about upsell after the machine readable mail was sent:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.enabled=<br />
</pre><br />
<br />
<br />
Defining email template to load for ox enduser, if mail to enduser is configured:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.method.email.oxuser.template=<br />
</pre><br />
<br />
If you need i18n support within email templates, create template with suffix "_<LANGUAGE_CODE>" . Example: /var/upsell_mail_body_ox_enduser.tmpl_de_DE<br />
<br />
<br />
If you want to use the builtin upgrade methods, you must also configure the OX RMI API informations:<br />
<br />
<pre><br />
com.openexchange.upsell.multiple.rmi.host=<br />
com.openexchange.upsell.multiple.rmi.masteradmin=<br />
com.openexchange.upsell.multiple.rmi.masteradmin.pass=<br />
</pre><br />
<br />
== Adding new feature (e.g. video, screenshot)==<br />
<br />
* Open register.js (located in gui folder)<br />
* Search for upsell.config.features<br />
* add the following code ( description inline )<br />
<br />
<pre><br />
featurename: {<br />
name: ["trigger element"],<br />
title: _("upsell window title"),<br />
product_name: _("feature headline"),<br />
intro: _("upsell description text"),<br />
list: {<br />
list_item_1: _("enumeration"),<br />
list_item_2: _("enumeration"),<br />
list_item_3: _("..."),<br />
},<br />
outro: _("upsell text that shows at end"),<br />
videos: {<br />
video_1: {<br />
thumb: "name_of_video_thumbnail.png",<br />
video: "name_of_video_file.swf"<br />
}<br />
},<br />
images: {<br />
image_1: {<br />
thumb: "name_of_image_thumbnail.png",<br />
image: "name_of_lightbox_image.png"<br />
}<br />
},<br />
buttons: {<br />
trial: {<br />
content: _("buttonlabel"),<br />
action: "put javascript actions here if any"<br />
},<br />
},<br />
checkboxes: {<br />
invite:{<br />
content: _("checkboxlabel"),<br />
action: "put javascript actions here if any"<br />
}<br />
}<br />
},<br />
</pre><br />
<br />
* after the feature is implemented you should create the nessacarry files and place them as follow<br />
<br />
<pre><br />
-templates<br />
--_featurename<br />
---- language ( for example de_DE )<br />
-------- flash ( for videos )<br />
-------- img ( for images )<br />
</pre><br />
<br />
<br />
== Load required js/cs files ==<br />
<br />
* to load additional files open register.js and add the following code<br />
<br />
<pre><br />
upsell = {<br />
files: {<br />
jss: {<br />
name: {<br />
script: "name.js",<br />
},<br />
},<br />
css: {<br />
name: "name.css",<br />
},<br />
},<br />
}<br />
</pre><br />
<br />
* add name.js to jss/name.js<br />
* add name.css to css/name.css<br />
<br />
== Change look and feel (e.g. branding, colors and sizes) ==<br />
<br />
* you should edit the existing css located in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui/css/upsell.css<br />
* you can add / edit background in /var/www/ox6/plugins/com.openexchange.upsell.multiple.gui//img<br />
<br />
<br />
== Possible triggers ==<br />
<pre><br />
modules/calendar/freebusy<br />
modules/calendar/team<br />
modules/calendar/mini_calender<br />
modules/calendar/new/add_participants<br />
modules/calendar/new/remove_participants<br />
modules/calendar/new/add_attachment<br />
modules/calendar/new/delete_attachment<br />
modules/contacts/new/add_attachment<br />
modules/contacts/new/delete_attachment<br />
modules/contacts/social/refresh<br />
modules/contacts/social/publish<br />
modules/mail/save_to_infostore<br />
modules/infostore/send_as_attachment<br />
modules/infostore/send_as_link<br />
modules/infostore/mail/save_to_infostore<br />
modules/infostore/social/refresh<br />
modules/infostore/social/publish<br />
modules/tasks/new/add_participants<br />
modules/tasks/new/remove_participants<br />
modules/tasks/new/add_attachment<br />
modules/tasks/new/delete_attachment<br />
configuration/mail/accounts/new<br />
modules/folders/users<br />
<br />
modules/infostore<br />
modules/calender<br />
modules/contacts<br />
modules/mail<br />
modules/portal<br />
modules/tasks<br />
modules/configuration<br />
<br />
modules/outlook<br />
modules/outlook.updater<br />
modules/mobility<br />
</pre></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19896
AppSuite:OX Guard
2015-07-08T16:37:19Z
<p>Cutmasta: /* Update OX Guard v1.2 to OX Guard v2.0.0 */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!<br />
<br />
The Guard installation must be able to determine if an email recipient is a local OX user or if it should be a guest account. The default MailResolver uses the context domain name to do this. On many installations, domains may extend across multiple context and multiple database shards. In these cases, the default MailResolver won't work. In addition, if a custom authentication package is used, the Mail Resolver will likely not work.<br />
<br />
Be sure to test the mail resolver using<br />
<br />
/opt/open-xchange/guard/sbin/guard test email@domain <br />
<br />
to see if the mail Resolver works.<br />
<br />
If the test does not work, you will likely need a custom Mail Resolver. Please see [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
This resolver software ''depends heavily on your local deployment''.<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
IMPORTANT: '''''If you did not run GUARD 1.2 already, do NOT execute the "upgradePGP" command!'''''<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes! See [[AppSuite:GuardCluster | Ox Guard Clustering]] for details.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table. It must be the same on all Guard servers.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
For details in clustering Guard servers, please see [[AppSuite:GuardCluster | OxGuard Clustering]] . It is critical that all Guard servers have the same oxguardpass file. Please see the clustering link for details. Do not run ./guard init on more than one server.<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
In contrast to the rest of the OX Guard requests, the OX Guard support API requests are accessible using: /guardsupport. This distinction allows more flexible configuration since the support API should not always be accessible from everywhere. But if you want to expose the Guard Support API using Apache a very basic Apache configuration could look like this:<br />
<br />
<code><br />
<Location /appsuite/api/guardsupport> <br />
ProxyPass http://localhost:8080/guardsupport <br />
#...<br />
</Location> <br />
</code><br />
<br />
it might also be preferable to add a new balancer directive for guardsupport<br />
<code><br />
<Location /appsuite/api/guardsupport> <br />
ProxyPass balancer://oxguardsupport <br />
</Location> <br />
<Proxy balancer://oxguardsupport> <br />
#...<br />
BalancerMember http://localhost:8080/guardsupport #...<br />
#...<br />
</Proxy><br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19895
AppSuite:OX Guard
2015-07-08T16:35:34Z
<p>Cutmasta: /* Update OX Guard v1.2 to OX Guard v2.0.0 */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!<br />
<br />
The Guard installation must be able to determine if an email recipient is a local OX user or if it should be a guest account. The default MailResolver uses the context domain name to do this. On many installations, domains may extend across multiple context and multiple database shards. In these cases, the default MailResolver won't work. In addition, if a custom authentication package is used, the Mail Resolver will likely not work.<br />
<br />
Be sure to test the mail resolver using<br />
<br />
/opt/open-xchange/guard/sbin/guard test email@domain <br />
<br />
to see if the mail Resolver works.<br />
<br />
If the test does not work, you will likely need a custom Mail Resolver. Please see [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
This resolver software ''depends heavily on your local deployment''.<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
IMPORTANT: ''If you did not run GUARD 1.2 already, do NOT execute the "upgradePGP" command!''<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes! See [[AppSuite:GuardCluster | Ox Guard Clustering]] for details.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table. It must be the same on all Guard servers.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
For details in clustering Guard servers, please see [[AppSuite:GuardCluster | OxGuard Clustering]] . It is critical that all Guard servers have the same oxguardpass file. Please see the clustering link for details. Do not run ./guard init on more than one server.<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
In contrast to the rest of the OX Guard requests, the OX Guard support API requests are accessible using: /guardsupport. This distinction allows more flexible configuration since the support API should not always be accessible from everywhere. But if you want to expose the Guard Support API using Apache a very basic Apache configuration could look like this:<br />
<br />
<code><br />
<Location /appsuite/api/guardsupport> <br />
ProxyPass http://localhost:8080/guardsupport <br />
#...<br />
</Location> <br />
</code><br />
<br />
it might also be preferable to add a new balancer directive for guardsupport<br />
<code><br />
<Location /appsuite/api/guardsupport> <br />
ProxyPass balancer://oxguardsupport <br />
</Location> <br />
<Proxy balancer://oxguardsupport> <br />
#...<br />
BalancerMember http://localhost:8080/guardsupport #...<br />
#...<br />
</Proxy><br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver&diff=19817
AppSuite:GuardMailResolver
2015-07-02T19:01:39Z
<p>Cutmasta: </p>
<hr />
<div>= Mail Resolver =<br />
<br />
When a Guard user sends an email to a recipient, Guard must be able to determine if the recipient is an OX user, or if that person uses a different email service. If the recipient is an OX user, Guard must be able to determine the users ID and context. This is done through the OX backend by default, which in turn looks up the email address using the default login2context table. Guard can, however, be configured to use a different URL for third party or custom handlers.<br />
<br />
<br />
== Default Handler ==<br />
<br />
By default, Guard will try to resolve the email address against the OX backend. The Ox Backend must be able to resolve the email address using the login lookup tables. Email domains must not span multiple contexts. In addition, if a context is defined as a default login, the context must also be defined with the domains that exist within.<br />
<br />
For example, if you created a default context (say context 1) using<br />
<br />
/opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \<br />
-u oxadmin -d "Context Admin" -g Admin -s User -p admin_password **-L defaultcontext** ...<br />
<br />
You must add the domain (substitue for company.com) for that context using<br />
<br />
./changecontext -A oxadminmaster -P secret -c 1 -L company.com<br />
You can add multiple domains to the context at the same time, seperating by ”,”<br />
<br />
<br />
<br />
<br />
== Custom Mail Resolver ==<br />
<br />
If you have a ''custom authenticaion / login'' system, Guard will need to be configured to access your custom mail Resolver, and your custom system will need to provide the information required for Guard to process the recipient.<br />
<br />
Set the custom URL in the /etc/open-xchange/guard/etc/guard.properties file (Guard backend) by adding the setting com.openexchange.guard.mailResolverUrl<br />
<br />
com.openexchange.guard.mailResolverUrl = https://yyyyy.com/resolver/?email= <br />
<br />
Guard will be adding the email address to be resolved at the end of the URL. If the line ends with a ”=”, please include a whitespace after the line for the parser<br />
<br />
Guard will expect a JSON response. If the user is not an OX user, then a blank JSON should be returned ”{}”<br />
<br />
If the user exists, a JSON response should be returned in the following format:<br />
<br />
{<br />
"tester@open-xchange.com":<br />
{"uid":4,"user":<br />
{"language":"en_US","displayName":"Tester, OX"},<br />
"cid":1}<br />
}<br />
<br />
If the user does not exist, a blank JSON should be returned<br />
{}<br />
<br />
Email address should be the identifier, followed by the uid (user id), cid (the context Id), and user data including language and display name.<br />
<br />
''Note:'' If there are multiple OX Backends served by this mail resolver, then only the user information to which Guard has access should be provided. The mailResolver should not provide userid/contextid information for a database that Guard doesn't have access to.<br />
<br />
Most probably, the OX CID is already available in one of your existing LDAP / databases systems, to map your customer/contract-IDs to the corresponding OX AppSuite tenant/context ID. Then you need to lookup the userid + language + displayname of this email address, if its an AppSuite email address.<br />
<br />
<br />
We recommend that you do a loadtest against your custom resolver endpoint. E.g via JMETER + CSV input for random email addresses.</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver&diff=19814
AppSuite:GuardMailResolver
2015-07-02T15:35:49Z
<p>Cutmasta: /* Custom Mail Resolver */</p>
<hr />
<div>= Mail Resolver =<br />
<br />
When a Guard user sends an email to a recipient, Guard must be able to determine if the recipient is an OX user, or if that person uses a different email service. If the recipient is an OX user, Guard must be able to determine the users ID and context. This is done through the OX backend by default, which in turn looks up the email address using the default login2context table. Guard can, however, be configured to use a different URL for third party or custom handlers.<br />
<br />
<br />
== Default Handler ==<br />
<br />
By default, Guard will try to resolve the email address against the OX backend. The Ox Backend must be able to resolve the email address using the login lookup tables. Email domains must not span multiple contexts. In addition, if a context is defined as a default login, the context must also be defined with the domains that exist within.<br />
<br />
For example, if you created a default context (say context 1) using<br />
<br />
/opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \<br />
-u oxadmin -d "Context Admin" -g Admin -s User -p admin_password **-L defaultcontext** ...<br />
<br />
You must add the domain (substitue for company.com) for that context using<br />
<br />
./changecontext -A oxadminmaster -P secret -c 1 -L company.com<br />
You can add multiple domains to the context at the same time, seperating by ”,”<br />
<br />
<br />
<br />
<br />
== Custom Mail Resolver ==<br />
<br />
If you have a ''custom authenticaion / login'' system, Guard will need to be configured to access your custom mail Resolver, and your custom system will need to provide the information required for Guard to process the recipient.<br />
<br />
Set the custom URL in the /etc/open-xchange/guard/etc/guard.properties file (Guard backend) by adding the setting com.openexchange.guard.mailResolverUrl<br />
<br />
com.openexchange.guard.mailResolverUrl = https://yyyyy.com/resolver/?email= <br />
<br />
Guard will be adding the email address to be resolved at the end of the URL. If the line ends with a ”=”, please include a whitespace after the line for the parser<br />
<br />
Guard will expect a JSON response. If the user is not an OX user, then a blank JSON should be returned ”{}”<br />
<br />
If the user exists, a JSON response should be returned in the following format:<br />
<br />
{<br />
"tester@open-xchange.com":<br />
{"uid":4,"user":<br />
{"language":"en_US","displayName":"Tester, OX"},<br />
"cid":1}<br />
}<br />
<br />
Email address should be the identifier, followed by the uid (user id), cid (the context Id), and user data including language and display name.<br />
<br />
''Note:'' If there are multiple OX Backends served by this mail resolver, then only the user information to which Guard has access should be provided. The mailResolver should not provide userid/contextid information for a database that Guard doesn't have access to.<br />
<br />
Most probably, the OX CID is already available in one of your existing LDAP / databases systems, to map your customer/contract-IDs to the corresponding OX AppSuite tenant/context ID. Then you need to lookup the userid + language + displayname of this email address, if its an AppSuite email address.</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19813
AppSuite:OX Guard
2015-07-02T15:31:03Z
<p>Cutmasta: /* Mail Resolver */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!<br />
<br />
Your GUARD installation will in 99% require a custom Mailresolver, which checks, if an eMail address can be mapped to an AppSuite user or not. <br />
<br />
This piece of software (HTTP GET Endpoint) must get implemented by you, else the ''GUARD features will NOT WORK''. <br />
<br />
This resolver software ''depends heavily on your local deployment''. <br />
<br />
For more details, you must check out the [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes! See [[AppSuite:GuardCluster | Ox Guard Clustering]] for details.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table. It must be the same on all Guard servers.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
For details in clustering Guard servers, please see [[AppSuite:GuardCluster | OxGuard Clustering]] . It is critical that all Guard servers have the same oxguardpass file. Please see the clustering link for details. Do not run ./guard init on more than one server.<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19812
AppSuite:OX Guard
2015-07-02T15:29:27Z
<p>Cutmasta: /* Mail Resolver */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!<br />
<br />
Your GUARD installation will in 99% require a custom Mailresolver, which checks, if an eMail address can be mapped to an AppSuite user or not. ''Without this'' custom piece of software, which needs to get implemented by yourself, the ''GUARD features will NOT WORK''<br />
<br />
This ''depends heavily on your local deployment''. <br />
<br />
For more details, you must check out the [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes! See [[AppSuite:GuardCluster | Ox Guard Clustering]] for details.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table. It must be the same on all Guard servers.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
For details in clustering Guard servers, please see [[AppSuite:GuardCluster | OxGuard Clustering]] . It is critical that all Guard servers have the same oxguardpass file. Please see the clustering link for details. Do not run ./guard init on more than one server.<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19811
AppSuite:OX Guard
2015-07-02T15:27:31Z
<p>Cutmasta: /* Mail Resolver */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!<br />
<br />
Your GUARD installation may require a custom Mailresolver, which checks, if an eMail address can be mapped to an AppSuite user or not. <br />
This ''depends heavily on your local deployment''. <br />
<br />
For more details, you must check out the [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes! See [[AppSuite:GuardCluster | Ox Guard Clustering]] for details.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table. It must be the same on all Guard servers.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
For details in clustering Guard servers, please see [[AppSuite:GuardCluster | OxGuard Clustering]] . It is critical that all Guard servers have the same oxguardpass file. Please see the clustering link for details. Do not run ./guard init on more than one server.<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19800
AppSuite:OX Guard
2015-07-02T11:59:06Z
<p>Cutmasta: /* Initiating the Guard database and key store */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a fully integrated security add-on to OX App Suite that provides end users with a flexible email and file encryption solution. OX Guard is a highly scalable, multi server, feature rich solution that is so simple-to-use that end users will actually use it. With a single click a user can take control of their security and send secure emails and share encrypted files. This can be done from any device to both OX App Suite and non-OX App Suite users. <br />
<br />
OX Guard uses standard PGP encryption for the encryption of email and files. PGP has been around for a long time, yet has not really caught on with the masses. This is generally blamed on the confusion and complications of managing the keys, understanding trust, PGP format types, and lack of trusted central key repositories. Guard simplifies all of this, making PGP encryption as easy as a one click process, with no keys to keep track of, yet the options of advanced PGP management for those that know how.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
Your GUARD installation may require a custom Mailresolver, which basically checks, if an eMail address can be mapped to an AppSuite user or not. This depends heavily on your local deployment. For more details, check out the [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
Before upgrading Guard to version 2.0.0 you need to install the package <code>open-xchange-guard-backend</code> on all groupware nodes used by Guard throught the REST api. In other words, every groupware node have <code>open-xchange-rest</code> installed, now needs to have <code>open-xchange-guard-backend</code> installed.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r guard-stable-guard-backend-updates<br />
$ zypper dup -r guard-stable-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
=== Update OX Guard v1.2 to OX Guard v2.0.0 ===<br />
<br />
If you have an existing Guard v1.2 database, and are upgrading to v2.0, additional PGP key table need to be created and populated. Once the Guard package has been updated, type<br />
<br />
/opt/open-xchange/guard/sbin/guard upgradePGP<br />
<br />
This process will alter the needed database tables and populate the needed lookup tables. Guard 1.2 can continue to run in the background. Once complete, Guard 2.0 can be started.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Finally, the OX backend needs to know where the Guard server is located. This is used to notify the Guard server of changes in users, and to send emails marked for signature. The URL for the Guard server should include the url suffix /guardadmin<br />
<br />
# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin<br />
# Default is empty<br />
com.openexchange.guard.endpoint=http://guardserver:8080/guardadmin<br />
<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
'''Please Note:''' If you run a cluster of OX / Guard nodes, only execute this command on ONE node. Not on all nodes!<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table.<br />
<br />
== Test Setup ==<br />
<br />
Not required, but it is a good idea to test the Guard setup before starting the initialization. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.<br />
<br />
To test, use an email address that exists on the OX backend (john@example.com for this example)<br />
<br />
/opt/open-xchange/guard/sbin/guard test john@example.com<br />
<br />
Guard should return information from the OX backend regarding the user associated with john@example.com. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.<br />
<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19756
AppSuite:OX Mail
2015-06-30T11:56:22Z
<p>Cutmasta: /* Server-side Installation and Configuration */</p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Requirements ==<br />
<br />
<br />
=== Server-side Installation and Configuration ===<br />
<br />
With the OX Mail app, Open-Xchange AppSuite can also provide server based PUSH functionalities. <br />
<br />
IMPORTANT: The PUSH functionality depends on the used mail backend. <br />
<br />
<br />
<br />
Dovecot Pro Customers - Out of the box:<br />
<br />
- PUSH functionality will be available for Dovecot Pro, in combination with additional plugins! <br />
<br />
<br />
<br />
Not using Dovecot Pro?<br />
<br />
- If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
<br />
Please contact your assigned pre-sales / prof. services contact for details.<br />
<br />
<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19755
AppSuite:OX Mail
2015-06-30T11:56:13Z
<p>Cutmasta: /* Server-side Installation and Configuration */</p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Requirements ==<br />
<br />
<br />
=== Server-side Installation and Configuration ===<br />
<br />
With the OX Mail app, Open-Xchange AppSuite can also provide server based PUSH functionalities. <br />
<br />
IMPORTANT: The PUSH functionality depends on the used mail backend. <br />
<br />
Dovecot Pro Customers - Out of the box:<br />
<br />
- PUSH functionality will be available for Dovecot Pro, in combination with additional plugins! <br />
<br />
<br />
<br />
Not using Dovecot Pro?<br />
<br />
- If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
<br />
Please contact your assigned pre-sales / prof. services contact for details.<br />
<br />
<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19754
AppSuite:OX Mail
2015-06-30T11:55:52Z
<p>Cutmasta: /* Server-side Installation and Configuration */</p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Requirements ==<br />
<br />
<br />
=== Server-side Installation and Configuration ===<br />
<br />
With the OX Mail app, Open-Xchange AppSuite can also provide server based PUSH functionalities. <br />
<br />
IMPORTANT: The PUSH functionality depends on the used mail backend. <br />
<br />
Dovecot Pro Customers - Out of the box:<br />
- PUSH functionality will be available for Dovecot Pro, in combination with additional plugins! <br />
<br />
Not using Dovecot Pro?<br />
- If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
Please contact your assigned pre-sales / prof. services contact for details.<br />
<br />
<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19753
AppSuite:OX Mail
2015-06-30T11:54:09Z
<p>Cutmasta: </p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Requirements ==<br />
<br />
<br />
=== Server-side Installation and Configuration ===<br />
<br />
With OX Mail, Open-Xchange will also provide server based PUSH functionalities. <br />
<br />
The PUSH functionality depends on the used mail backend. Out of the box, PUSH functionality will be available for Dovecot Pro, in combination with additional plugins (Only available for Dovecot Pro customers). <br />
<br />
If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
Please contact your assigned pre-sales / prof. services contact for details.<br />
<br />
<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19752
AppSuite:OX Mail
2015-06-30T11:53:42Z
<p>Cutmasta: </p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
== Requirements ==<br />
<br />
<br />
=== Server-side Installation and Configuration ===<br />
<br />
With OX Mail, Open-Xchange will also provide server based PUSH functionalities. <br />
<br />
The PUSH functionality depends on the used mail backend. Out of the box, PUSH functionality will be available for Dovecot Pro, in combination with additional plugins (Only available for Dovecot Pro customers). <br />
<br />
If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
Please contact your assigned pre-sales / prof. services contact for details.<br />
<br />
<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19751
AppSuite:OX Mail
2015-06-30T11:52:55Z
<p>Cutmasta: /* Server-side Installation and Configuration */</p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
== Requirements ==<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail&diff=19736
AppSuite:OX Mail
2015-06-24T08:15:12Z
<p>Cutmasta: /* Server-side Installation and Configuration */</p>
<hr />
<div>= Pre-Information - OX Mail (In Production) =<br />
<br />
OX Mail is a native mobile phone app built specifically for smartphones users that also have a valid OX App Suite account. The app is designed to lets users access their OX App Suite email environment directly from a native mobile phone client.<br />
<br />
OX Mail enables users to synchronize mails between a variety of devices (phones, tablets and laptops) and OX App Suite. OX Mail consists of two elements: The OX Mail component that is built into OX App Suite and the native OX Mail app.<br />
<br />
OX Mail is a native app designed specifically for an associated platforms and devices. This gives a user full access to their mails anytime, anywhere and on any device. <br />
<br />
The OX Mail app has been designed specifically for ease-of-use and is available for both iOS and Android.<br />
<br />
'''Please Note: OX Mail app and the server side push functionality will be finally available beginning of August. With the new native app, Open-Xchange also provides a new branding concept for the customers and partners. More information in the chapter [http://oxpedia.org/wiki/index.php?title=AppSuite:OX_Mail#Integrated_Branding.2FCustomization_Concept_for_Partners_and_Customers Integrated Branding/Customization Concept for Partners and Customers]'''<br />
<br />
== Key features ==<br />
<br />
* Easy to use start-up wizard.<br />
* Standard folders plus the ability to create folders and sub- folders.<br />
* Standard compose fields such as To, Subject, Cc, Bcc and Attachments. <br />
* Received email attachments can be displayed.<br />
* Contact integration of local contacts and OX App Suite address book contacts.<br />
* Support for PUSH notifications (available only if the OX App Suite Server provides the corresponding push functionality). Note: PUSH notifications require a server side OX App Suite middleware plugin. This plugin is only available for a limited number of email servers. Dovecot Pro is supported out of the box.<br />
* Custom mail signature.<br />
* Integration of an easy branding/customizing concept<br />
<br />
A more detailed overview of all the improvements to OX Mail, can be found at:<br />
http://software.open-xchange.com/products/mail/doc/OX_Mail_Product_Guide.pdf<br />
<br />
== Integrated Branding/Customization Concept for Partners and Customers ==<br />
<br />
To enable Open-Xchange customers and partners to use the new OX Mail, Open-Xchange integrated an easy branding/customizing option. The OX Mail has integrated a functionality to provide a defined provider list directly at the login screen of the new OX Mail app. With this new concept, it is possible to provide an own brand easily during runtime. This means:<br />
<br />
* The App is „super flat“, there aren’t much elements that need to styled to match any brand<br />
* The App does not use any logos inside, it simply disclaims the use of pixel images at any point.<br />
* The App has a hosted config service and startup wizard. During the wizard an enduser can select his provider from a list. The App then get’s the branding information from the config service and changes it’s theme<br />
<br />
If any customer is interested to be participate as launch partner and will be willing to integrate the Mail App into his offering until the launch, '''please contact your Open-Xchange Sales representative'''. Open-Xchange will provide further information about the necessary information like<br />
<br />
* Commitment that you have installed latest App Suite 7.6.2 incl. latest patch (upcoming Patch 2569 - schedule for CW 27).<br />
* Full URL, where the App Suite service is reachable for web clients.<br />
* Two Test-Accounts of your App Suite based service, where we can verify that the App Suite system works as expected.<br />
* A “logo”, “name”, “description” of your service. Those infos will be used in the app itself and App Store description.<br />
* A preferred color (CI color), which Open-Xchange will use inside the app, once the user has choose to use your service via the provider list.<br />
<br />
== Pricing & Availability ==<br />
<br />
This email app is available for both iOS and Android and can be downloaded for free from the corresponding App Stores. The availability of the various clients depends on the approval process of the supplying provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels. The Open-Xchange Middleware components can be downloaded from the respective download repositories.<br />
<br />
Please contact Open-Xchange Sales for further information about branding and pricing details.<br />
<br />
== Requirements ==<br />
<br />
{|border="2" rules="all" align="left"><br />
|'''Requirement'''<br />
|'''System / Platform / User Interface / Server Capability'''<br />
|- <br />
|&nbsp;<br />
|&nbsp;<br />
|-<br />
|OX App Suite<br />
|OX App Suite v7.6.2 (latest patch version 2569 W27)<br />
|-<br />
|OX Mail (App) for iOS<br />
|Apple iOS 7, Apple iOS 8 (tablet support in a later version)<br />
|-<br />
|OX Mail (App) for Android<br />
|Smartphone on Android 4.1 or later (tablet support in a later version)<br />
|-<br />
|Server Capability<br />
|Ensure that all user who should get access to the Mail App have the capability ''com.openexchange.capability.mobile_mail_app''<br />
|-<br />
|}<br />
<br />
= Server-side Installation and Configuration =<br />
<br />
With OX Mail, Open-Xchange will also provide server based PUSH functionalities. <br />
<br />
The PUSH functionality depends on the used mail backend. Out of the box, PUSH functionality will be available for Dovecot Pro, in combination with addtional plugins (Only available for Dovecot Prot customers). <br />
<br />
<br />
If you are not using Dovecot Pro as the mail backend, your mail backend has to actively notify the Open-Xchange middleware servers about new eMails. This implies the creation of an additional OX middleware plugin, to receive those notifications. <br />
<br />
Please contact your assigned pre-sales / prof. servives contact for details.<br />
<br />
= Enabling OX Mail for Users =<br />
<br />
OX Mail is enabled for all users that have the capability ''com.openexchange.capability.mobile_mail_app'' <br />
<br />
More details about capabilities can be found at [[AppSuite:Capabilities]]. Furthermore, this capability can be defined in a more granular way using the Config Cascade as described at [[ConfigCascade]].<br />
<br />
IMPORTANT: <br />
By default, the capability for the OX Mail app is set to false for all users. <br />
It can be changed by editing the corresponding capability in the "permissions.properties" config file, or if you need a more fine grained selection of enabled users, you can use the well known provisioning tools / config cascade.<br />
<br />
= Installation of the Clients =<br />
<br />
The OX Mail will be available via the different App Stores for iOS and Android by August 2015</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver&diff=19674
AppSuite:GuardMailResolver
2015-06-08T08:02:58Z
<p>Cutmasta: </p>
<hr />
<div>= Mail Resolver =<br />
<br />
When a Guard user sends an email to a recipient, Guard must be able to determine if the recipient is an OX user, or if that person uses a different email service. If the recipient is an OX user, Guard must be able to determine the users ID and context. This is done through the OX backend by default, which in turn looks up the email address using the default login2context table. Guard can, however, be configured to use a different URL for third party or custom handlers.<br />
<br />
<br />
== Default Handler ==<br />
<br />
By default, Guard will try to resolve the email address against the OX backend. The Ox Backend must be able to resolve the email address using the login lookup tables. Email domains must not span multiple contexts. In addition, if a context is defined as a default login, the context must also be defined with the domains that exist within.<br />
<br />
For example, if you created a default context (say context 1) using<br />
<br />
/opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \<br />
-u oxadmin -d "Context Admin" -g Admin -s User -p admin_password **-L defaultcontext** ...<br />
<br />
You must add the domain (substitue for company.com) for that context using<br />
<br />
./changecontext -A oxadminmaster -P secret -c 1 -L company.com<br />
You can add multiple domains to the context at the same time, seperating by ”,”<br />
<br />
<br />
<br />
<br />
== Custom Mail Resolver ==<br />
<br />
If you have a custom login system, Guard will need to be configured to access your custom mail Resolver, and your custom system will need to provide the information required for Guard to process the recipient.<br />
<br />
Set the custom URL in the /etc/open-xchange/guard/etc/guard.properties file (Guard backend) by adding the setting com.openexchange.guard.mailResolverUrl<br />
<br />
com.openexchange.guard.mailResolverUrl = https://yyyyy.com/resolver/?email= <br />
<br />
Guard will be adding the email address to be resolved at the end of the URL. If the line ends with a ”=”, please include a whitespace after the line for the parser<br />
<br />
Guard will expect a JSON response. If the user is not an OX user, then a blank JSON should be returned ”{}”<br />
<br />
If the user exists, a JSON response should be returned in the following format:<br />
<br />
{<br />
"tester@open-xchange.com":<br />
{"uid":4,"user":<br />
{"language":"en_US","displayName":"Tester, OX"},<br />
"cid":1}<br />
}<br />
<br />
Email address should be the identifier, followed by the uid (user id), cid (the context Id), and user data including language and display name.<br />
<br />
''Note:'' If there are multiple OX Backends served by this mail resolver, then only the user information to which Guard has access should be provided. The mailResolver should not provide userid/contextid information for a database that Guard doesn't have access to.</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19673
AppSuite:OX Guard
2015-06-08T08:02:20Z
<p>Cutmasta: /* Mail Resolver */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a security solution that provides protection for email communications and files. Fully integrated with both OX as a Service and standard OX App Suite installations, it allows users to send and read encrypted messages and store and share encrypted files – and requires no additional setup or knowledge. OX Guard offers a simple way to increase security by limiting the opportunity for unauthorized access while data is en-route or in-storage, creating extra peace of mind.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
Your GUARD installation may require a custom Mailresolver, which basically checks, if an eMail address can be mapped to an AppSuite user or not. This depends heavily on your local deployment. For more details, check out the [[AppSuite:GuardMailResolver| Mail Resolver page]]<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-backend}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-backend}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-backend}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
http://software.open-xchange.com/products/appsuite/stable/guard-backend/updates/DebianWheezy/<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r appsuite-7.6.0-guard-backend-updates<br />
$ zypper dup -r appsuite-7.6.0-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table.<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19672
AppSuite:OX Guard
2015-06-08T08:01:10Z
<p>Cutmasta: /* Important Notes */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a security solution that provides protection for email communications and files. Fully integrated with both OX as a Service and standard OX App Suite installations, it allows users to send and read encrypted messages and store and share encrypted files – and requires no additional setup or knowledge. OX Guard offers a simple way to increase security by limiting the opportunity for unauthorized access while data is en-route or in-storage, creating extra peace of mind.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
<br />
=== Mail Resolver ===<br />
<br />
Your GUARD installation may require a custom Mailresolver, which basically checks, if an eMail address can be mapped to an AppSuite user or not. This depends heavily on your local deployment. For more details, check our http://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-backend}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-backend}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-backend}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
http://software.open-xchange.com/products/appsuite/stable/guard-backend/updates/DebianWheezy/<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r appsuite-7.6.0-guard-backend-updates<br />
$ zypper dup -r appsuite-7.6.0-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table.<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19671
AppSuite:OX Guard
2015-06-08T08:00:32Z
<p>Cutmasta: /* Important Notes */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a security solution that provides protection for email communications and files. Fully integrated with both OX as a Service and standard OX App Suite installations, it allows users to send and read encrypted messages and store and share encrypted files – and requires no additional setup or knowledge. OX Guard offers a simple way to increase security by limiting the opportunity for unauthorized access while data is en-route or in-storage, creating extra peace of mind.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
=== Customization ===<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
Your GUARD installation may require a custom Mailresolver, which basically checks, if an eMail address can be mapped to an AppSuite user or not. This depends heavily on your local deployment. For more details, check our http://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-backend}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-backend}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-backend}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
http://software.open-xchange.com/products/appsuite/stable/guard-backend/updates/DebianWheezy/<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r appsuite-7.6.0-guard-backend-updates<br />
$ zypper dup -r appsuite-7.6.0-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table.<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard&diff=19670
AppSuite:OX Guard
2015-06-08T08:00:02Z
<p>Cutmasta: /* Please Note */</p>
<hr />
<div>= OX Guard =<br />
<br />
OX Guard is a security solution that provides protection for email communications and files. Fully integrated with both OX as a Service and standard OX App Suite installations, it allows users to send and read encrypted messages and store and share encrypted files – and requires no additional setup or knowledge. OX Guard offers a simple way to increase security by limiting the opportunity for unauthorized access while data is en-route or in-storage, creating extra peace of mind.<br />
<br />
This article will guide you through the installation of Guard and describes the basic configuration and software requirements. As it is intended as a quick walk-through it assumes an existing installation of the operating system including a single server App Suite setup as well as average system administration skills. This guide will also show you how to setup a basic installation with none of the typically used distributed environment settings. The objective of this guide is:<br />
<br />
* To setup a single server installation<br />
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster<br />
* To use the database service on the existing Open-Xchange installation for Guard, no replication<br />
* To provide a basic configuration setup, no mailserver configuration<br />
<br />
== Key features ==<br />
<br />
* Simple security at the touch of a button<br />
* Provides user based security - Separate from provider<br />
* Supplementary security to Provider based security - Layered<br />
* Powerful features yet simple to use and understand<br />
* Security - Inside and outside of the OX environment<br />
* Email and Drive integration<br />
* Uses proven PGP security<br />
<br />
== Availability ==<br />
<br />
If an OX App Suite customer would like to evaluate OX Guard integration, the first step is to contact OX Sales. OX Sales will then work on the request and send prices and license/API (for the hosted infrastructure) key details to the customer.<br />
<br />
== Requirements ==<br />
<br />
Please review following URL for remaining requirements <br />
<br />
Please review [[AppSuite:OX_System_Requirements#OX_Guard|OX Guard Requirements]] for a full list of requirements.<br />
<br />
Since OX Guard is a Microservice it can either be added to an existing Open-Xchange installation or it can be deployed on a dedicated environment without having any of the other Open-Xchange App Suite core services installed. OX App Suite v7.6.0 or later is required to operate this extension both in a single or multi server environments.<br />
<br />
Prerequisites:<br />
* Open-Xchange REST API<br />
* Grizzly HTTP connector (open-xchange-grizzly)<br />
* A supported Java Virtual Machine (Java 7)<br />
* An Open-Xchange App Suite installation v7.6.0 or later<br />
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [[AppSuite:UpdatingOXPackages|Updating OX-Packages]] explains how that can be done.<br />
<br />
== Important Notes ==<br />
<br />
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Additional details will be provided in customization documentation. Check bottom of this page. <br />
<br />
Your GUARD installation may require a custom Mailresolver, which basically checks, if an eMail address can be mapped to an AppSuite user or not. This depends heavily on your local deployment. For more details, check our http://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver<br />
<br />
= Download and Installation =<br />
<br />
=== General ===<br />
The installation of the open-xchange-rest package which is required for Guard will eventually execute database update tasks if installed and activated. Please take this into account.<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-backend}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-backend}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-backend}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|guard/stable/guard-ui}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-ui open-xchange-guard-ui-static<br />
<br />
Guard requires Java 1.7, which will be installed through the Guard packages, still SUSE Linux Enterprise Server 11 will not use Java 1.7 by default. Therefor we have to set Java 1.7 as the default instead of Java 1.6:<br />
<br />
$ update-alternatives --config java<br />
<br />
Now select the Java 1.7 JRE, example:<br />
<br />
There are 2 alternatives which provide `java'.<br />
<br />
Selection Alternative<br />
-----------------------------------------------<br />
* 1 /usr/lib64/jvm/jre-1.6.0-ibm/bin/java<br />
+ 2 /usr/lib64/jvm/jre-1.7.0-ibm/bin/java<br />
<br />
Press enter to keep the default[*], or type selection number: 2<br />
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.<br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the installation of the OX Guard at your already available environment.<br />
<br />
'''Please note:''' By default, OX Guard generates the link to the secure content for external recipients on the basis of the local fully qualified domain name (FQDN). If the local FQDN is not reachable from the internet, it has to be specified manually. This can be done by setting a UCR variable, e.g. via the UMC module "Univention Configuration Registry". The variable has to contain the external FQDN of the OX Guard system:<br />
<br />
oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME<br />
<br />
= Update OX Guard =<br />
<br />
=== Redhat Enterprise Linux 6 or CentOS 6 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange yum configuration:<br />
<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=YUMRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=rhelname|pc2v=RHEL6|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ yum update<br />
$ yum upgrade<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
If not already done, add the following repositories to your Open-Xchange apt configuration:<br />
<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=APTRepo|pv=reponame|pc1n=path|pc1v=products|pc2n=debianname|pc2v=DebianWheezy|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
http://software.open-xchange.com/products/appsuite/stable/guard-backend/updates/DebianWheezy/<br />
Then run<br />
<br />
$ apt-get update<br />
$ apt-get dist-upgrade<br />
<br />
If you want to see, what apt-get is going to do without actually doing it, you can run:<br />
<br />
$ apt-get dist-upgrade -s<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ /etc/init.d/open-xchange-guard restart</pre><br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using zypper if not already present:<br />
<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-backend/updates}}<br />
{{for loop||call=SUSERepo|pv=reponame|pc1n=path|pc1v=products|pc2n=susename|pc2v=SLES11|pc3n=ldbaccount|pc3v=LDBUSER:LDBPASSWORD|guard/stable/guard-ui/updates}}<br />
<br />
and run<br />
<br />
$ zypper dup -r appsuite-7.6.0-guard-backend-updates<br />
$ zypper dup -r appsuite-7.6.0-guard-ui-updates<br />
<br />
You might need to run<br />
<br />
$ zypper ref<br />
<br />
to update the repository metadata before running ''zypper up''.<br />
<br />
After the new packages are installed, the guard process needs a restart:<br />
<br />
<pre>$ open-xchange-guard restart</pre><br />
<br />
=== Univention Corporate Server ===<br />
<br />
If you have purchased the OX App Suite for UCS, the OX Guard is part of the offering. OX Guard is available in the Univention App Center. Please check the UMC module App Center for the update of the OX Guard.<br />
<br />
= Configuration =<br />
<br />
The following gives an overview of the most important settings to enable Guard for users on the Open-Xchange installation. Some of those settings have to be modified in order to establish the database and REST API access from the Guard service. All settings relating to the Guard backend component are located in the configuration file guard.properties located in /opt/open-xchange/guard/etc. The default configuration should be sufficient for a basic "up-and-running" setup (with the exception of defining the database username and password). Please refer to the inline documentation of the configuration file for more advanced options. Additional information can be found here [[AppSuite:GuardConfiguration|Guard Configuration]]<br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
Open-Xchange config_db host - Guard will establish a connection to the config_db<br />
<br />
com.openexchange.guard.configdbHostname=localhost<br />
<br />
Guard database for storing user keys<br />
<br />
com.openexchange.guard.oxguardDatabaseHostname=localhost<br />
<br />
Username and Password for the two databases above<br />
<br />
com.openexchange.guard.databaseUsername=openexchange<br />
com.openexchange.guard.databasePassword=db_password<br />
<br />
Open-Xchange REST API host<br />
<br />
com.openexchange.guard.restApiHostname=localhost<br />
<br />
Open-Xchange REST API username and password (need to be defined in the OX backend in the "Configure services" below)<br />
<br />
com.openexchange.guard.restApiUsername=apiusername<br />
com.openexchange.guard.restApiPassword=apipassword<br />
<br />
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients<br />
<br />
com.openexchange.guard.externalEmailURL=URL_TO_OX<br />
<br />
== Configure services ==<br />
<br />
=== Apache ===<br />
<br />
Configure the mod_proxy_http module by adding the Guard API.<br />
<br />
'''Redhat Enterprise Linux 6 or CentOS 6'''<br />
$ vim /etc/httpd/conf.d/proxy_http.conf<br />
<br />
'''Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11'''<br />
$ vim /etc/apache2/conf.d/proxy_http.conf<br />
<br />
<Proxy balancer://oxguard><br />
Order deny,allow<br />
Allow from all<br><br />
BalancerMember http://localhost:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br><br />
<br />
ProxyPass /appsuite/api/oxguard balancer://oxguard<br />
<br />
'''Please Note:''' The Guard API settings must be inserted before the existing “<Proxy /appsuite/api>” parameter.<br />
<br />
After the configuration is done, restart the Apache webserver<br />
<br />
$ apachectl restart<br />
<br />
=== Open-Xchange ===<br />
<br />
Starting in Guard 2.0, there is an administrative component to the Open-Xchange backend that notifies Guard when a user or context is deleted. Install the package open-xchange-guard-backend on all OX backend servers. On a debian install, this command would be:<br />
<br />
apt-get install open-xchange-guard-backend<br />
<br />
There is also a configuration file for the OX backend regarding some general Guard settings. Please remove comments in front of the following settings to the configuration file guard.properties on the Open-Xchange backend servers:<br />
<br />
$ vim /opt/open-xchange/etc/guard.properties<br />
<br />
# OX GUard general permission, required to activate Guard in the AppSuite UI.<br />
com.openexchange.capability.guard=true<br />
<br />
# Default theme template id for all users that have no custom template id configured.<br />
com.openexchange.guard.templateID=0<br />
<br />
Configure the API username and password that you assigned to Guard in the server.properties file<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
# Specify the user name used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.login=apiusername<br />
<br />
# Specify the password used for HTTP basic auth by internal REST servlet<br />
com.openexchange.rest.services.basic-auth.password=apipassword<br />
<br />
Restart the OX backend<br />
<br />
$ /etc/init.d/open-xchange restart<br />
<br />
=== SELinux ===<br />
<br />
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8080, which is where the Guard backend service listens to. In order to allow localhost connections to 8080 execute the following:<br />
<br />
$ setsebool -P httpd_can_network_connect 1<br />
<br />
== Initiating the Guard database and key store ==<br />
<br />
Once the Guard configuration (database and backend configuration) and the service configuration has been applied, the Guard administration script needs to be executed in order to create the Guard databases. The administration script also takes care of the creation of the master keys and the master password file in /opt/open-xchange/guard. The initiation only needs to be done once for a multi server setup, for details please see “Optional / Clustering”.<br />
<br />
/opt/open-xchange/guard/sbin/guard init<br />
<br />
'''Please Note:''' It is important to understand that the master password file located at /opt/open-xchange/guard/oxguardpass is required to reset user passwords, without them the administrator will not be able to reset user passwords anymore in the future. The file contains the passwords used to encrypt the master database key, as well as passwords used to encrypt protected data in the users table.<br />
<br />
== Start Guard ==<br />
<br />
The services have been configured and the database has been initiated, it's time to start Guard<br />
<br />
$ /etc/init.d/open-xchange-guard start<br />
<br />
== Enabling Guard for Users ==<br />
<br />
Guard provides two capabilities for users in the environment as well as a basic "core" level:<br />
<br />
* '''Guard:''' com.openexchange.capability.guard<br />
* '''Guard Mail:''' com.openexchange.capability.guard-mail<br />
* '''Guard Drive:''' com.openexchange.capability.guard-drive<br />
<br />
The "core" Guard enabled a basic read functionality for Guard encrypted emails. We recommend enabling this for all users, as this allows all recipients to read Guard emails sent to them. Great opportunity for upsell. Recipients with only Guard enabled can then do a secure reply to the sender, but they can't start a new email or add recipients.<br />
<br />
"Guard Mail" and "Guard Drive" are additional options for users. "Guard Mail" allows users the full functionality of Guard emails. "Guard Drive" allows for encryption and decryption of drive files.<br />
<br />
Each of those two Guard components is enabled for all users that have the according capability configured. Please note that users need to have the Drive permission set to use Guard Drive. So the users that have Guard Drive enabled must be a subset of those users with OX Drive permission. Since v7.6.0 we enforce this via the default configuration. Those capabilities can be activated for specific user by using the Open-Xchange provisioning scripts:<br />
<br />
'''Guard Mail:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true<br />
<br />
'''Guard Drive:'''<br />
$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true<br />
<br />
'''Please Note:''' Guard Drive requires Guard Mail to be configured for the user as well. In addition, these capabilities may be configured globally by editing the guard.properties file on the OX bakend<br />
<br />
== Optional ==<br />
<br />
=== SSL Configuration ===<br />
<br />
Per default the connection between the Guard backend and the configured Open-Xchange REST API host is unencrypted. Even though that Guard will never transmit unencrypted emails to or from the REST API you can optionally encrypt the whole communication between those two components by using SSL. To enforce Guard to use SSL in the communication between those two components enable the follwing configuration in Guard configuration file. <br />
<br />
$ vim /opt/open-xchange/guard/etc/guard.properties<br />
<br />
com.openexchange.guard.backend_ssl=true<br />
<br />
The Guard backend is most commonly placed behind a load balancer (APACHE or other) and defaults to HTTP for incoming and outgoing traffic, using the load balancer to do SSL with the users. If you want Guard to use SSL for all communications, you need to set up the SSL key to use.<br />
<br />
Please note that you have to provide access to the certificates.<br />
<br />
com.openexchange.guard.useSSL: true<br />
com.openexchange.guard.SSLPort: 8443<br />
com.openexchange.guard.SSLKeyStore: //keystore location//<br />
com.openexchange.guard.SSLKeyName: //alias name here//<br />
com.openexchange.guard.SSLKeyPass: //ssl password//<br />
<br />
'''Please Note:''' Enabling SSL might decrease performance and/or create more system load due to additional encoding of the HTTP streams.<br />
<br />
For details on SSL installation and configuration, please see [[AppSuite:GuardSSL|OX Guard SSL Installation]]<br />
<br />
== Recipient key detection ==<br />
<br />
=== Local ===<br />
<br />
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user. <br />
<br />
To detect if the recipient is an account on the same OX Guard system there is a mechanism needed to map a recipient mail address to the correct local OX context. The default implementation delivered in the product achieves that by looking up the mail domain (@example.com) within the list of context mappings. That is at least not possible in case of ISPs where different users/contexts use the same mail domain. In case your OX system does not use mail domains in context mappings it is required to deploy an OX OSGi bundle implementing the com.openexchange.mailmapping.MailResolver class or by interfacing Guard with your mail resolver system.<br />
Please see [[Appsuite:GuardMailResolver|OX Guard Mail Resolver]] for details<br />
<br />
=== External ===<br />
<br />
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys. In addition, Guard will also look up SRV records for PGP Key servers for a recipients domain. This follows the standards [http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#page-9 OpenPGP Draft].<br />
<br />
External PGP servers to use can be configured in the guard.properties file on the Guard servers.<br />
<br />
com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371<br />
<br />
If you would like this Guard installation discoverable by other Guard servers, then create a SRV record for each domain ("example.com" in this illustration)<br />
<br />
_hkp._tcp.example.com<br />
<br />
You will also need to make additional entries in the apache proxy_http.conf file.<br />
<br />
<Proxy balancer://oxguardpgp><br />
Order deny,allow<br />
Allow from all, add<br />
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3<br />
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON<br />
SetEnv proxy-initial-not-pooled<br />
SetEnv proxy-sendchunked<br />
</Proxy><br />
<br />
<Proxy /pks><br />
ProxyPass balancer://oxguardpgp<br />
</Proxy><br />
<br />
'''Please Note''' PGP Public key servers by default append use the url server/pks when the record is obtained from a SRV record. The proxy above routes anything with the apache domain/pks to the Oxguard PGP server<br />
<br />
== Clustering ==<br />
<br />
You can run multiple OX Guard servers in your environment to ensure high availability or enhance scalability. OX Guard integrates seamlessly into the existing Open-Xchange infrastructure by using the existing interface standards and is therefor transparent to the environment. A couple of things have to be prepared in order to loosely couple OX Guard servers with Open-Xchange servers in a cluster.<br />
<br />
=== MySQL ===<br />
<br />
The MySQL servers need to be configured in order to allow access to the configdb of Open-Xchange. To do so you need to set the following configuration in the MySQL my.cnf:<br />
<br />
bind = 0.0.0.0<br />
<br />
This allows the Guard backend to bind to the MySQL host which is configured in the guard.properties file with com.openexchange.guard.configdbHostname. After the bind for the MySQL instance is configured and the OX Guard backend would be able to connect to the configured host, you have to grant access for the OX Guard service on the MySQL instance to manage the databases. Do so by connecting to the MySQL server via the mysql client. Authenticate if necessary and execute the following, please note that you have to modify the hostname / IP address of the client who should be able to connect to this database, it should include all possible OX Guard servers:<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;<br />
<br />
=== Apache ===<br />
<br />
OX Guard uses the Open-Xchange REST API to store and fetch data from the Open-Xchange databases. The REST API is a servlet running in the Grizzly container. By default it is not exposed as a servlet through Apache and is only accessibly via port 8009. In order to use Apache's load balancing via mod_proxy we need to add a servlet called "preliminary" to proxy_http.conf, example based on a clustered mod_proxy configuration:<br />
<br />
<Location /preliminary><br />
Order Deny,Allow<br />
Deny from all<br />
# Only allow access from Guard servers within the network. Do not expose this<br />
# location outside of your network. In case you use a load balancing service in front<br />
# of your Apache infrastructure you should make sure that access to /preliminary will<br />
# be blocked from the internet / outside clients. Examples:<br />
# Allow from 192.168.0.1<br />
# Allow from 192.168.1.1 192.168.1.2<br />
# Allow from 192.168.0.<br />
ProxyPass /preliminary balancer://oxcluster/preliminary<br />
</Location><br />
<br />
Make sure that the balancer is properly configured in the mod_proxy configuration. Examples on how to do so can be found in our clustering configuration for Open-Xchange AppSuite. Like explained in the example above, please make sure that this location is only available in your internal network, there is no need to expose /preliminary to the public, it is only used by Guard servers to connect to the OX backend. If you have a load balancer in front of the Apache cluster you should consider blocking access to /preliminary from WAN to restrict access to the servlet to internal network services only.<br />
<br />
Now add the OX Guard BalancerMembers to the oxguard balancer configuration (also in proxy_http.conf) to address all your OX Guard nodes in the cluster in this balancer configuration. The configuration has to be applied to all Apache nodes within the cluster.<br />
<br />
If the Apache server is a dedicated server / instance you also have to install the OX Guard UI-Static package on all Apache nodes in the cluster in order to provide static files like images or CSS to the OX Guard client. Example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui-static<br />
<br />
=== Open-Xchange ===<br />
<br />
Disable the Open-Xchange IPCheck for session verification. This is required because OX Guard will use the users session cookie to connect to the Open-Xchange REST API, but as a different IP address than the OX Guard server has been used during authentication the request would fail if you don't disable the IPCheck:<br />
<br />
$ vim /opt/open-xchange/etc/server.properties<br />
<br />
and set:<br />
<br />
com.openexchange.IPCheck=false<br />
<br />
The OX Guard UI package has to be installed on all Open-Xchange backend nodes as well, example for Debian (the OX Guard repository has to be configured in the package management prior):<br />
<br />
$ apt-get install open-xchange-guard-ui<br />
<br />
Restart the Open-Xchange service afterwards.<br />
<br />
=== OX Guard ===<br />
<br />
After all the services like MySQL, Apache and Open-Xchange have been configured you need to update the OX Guard backend configuration to point to the correct API endpoints. Set the REST API endpoint to an Apache server by setting the following value in /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.restApiHostname=apache.example.com<br />
<br />
Per default Guard will try to connect to port 8009 to this host, but as we configured the REST API to be proxies thorugh the serblet /preliminary on every Apache we now also need to change the target port for the REST API. You can do so by adding the following line into /opt/open-xchange/guard/etc/guard.properties:<br />
<br />
com.openexchange.guard.oxBackendPort=80<br />
<br />
Please also change all settings in regards to MySQL like com.openexchange.guard.configdbHostname, com.openexchange.guard.oxguardDatabaseHostname, com.openexchange.guard.databaseUsername or com.openexchange.guard.databasePassword. Afterwards restart the OX Guard service and check the logfile if the OX Guard backend is able to connect to the configured REST API.<br />
<br />
= Support API =<br />
<br />
The OX Guard Support API enables administrative access to various functions for maintaining OX Guard from a client in a role as a support employee.<br />
The OX Guard support API is accessible using: /guardsupport. A client has to do a BASIC AUTH authentication in order to access the API. Username and password can be configured in the guard.properties file using the following settings:<br />
<br />
<code><br />
# Specify the username and password for accessing the Support API of Guard<br />
com.openexchange.guard.supportapiusername=<br />
com.openexchange.guard.supportapipassword=<br />
</code><br />
<br />
=== Reset password ===<br />
POST <code>/guardsupport/?action=reset_password</code><br />
<br />
Performs a password reset and sends a new random generated password to a specified email address by the user or a default address if the user did not specify an email address.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to reset the password for<br />
* <code>default</code> (optional) – The email address to send the new password to, if the user did not specify a secondary email address<br />
<br />
=== Expose key ===<br />
<br />
POST <code>/guardsupport/?action=expose_key</code><br />
<br />
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key.<br />
Automatic resetting of exposed keys to "not exposed" is scheduled once a day and resets all exposed keys which have been exposed before X hours, where X can be configured using com.openexchange.guard.exposedKeyDurationInHours in the guard.properties files.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>email</code> – The email address of the user to expose the deleted keys for<br />
* <code>cid</code> – The context id<br />
<br />
Response:<br />
An URL pointing to the downloadable exposed keys<br />
<br />
=== Delete user ===<br />
<br />
POST <code>/guardsupport/?action=delete_user</code><br />
<br />
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call.<br />
<br />
Since Guard 2.0<br />
<br />
Parameters:<br />
* <code>user_id</code> – The user's id<br />
* <code>cid</code> - The context id<br />
<br />
= Customization =<br />
<br />
Guard's templates are customizable at the user and context level. Please see [[AppSuite:GuardCustomization| Customization]] for details<br />
<br />
= Entropy =<br />
<br />
Guard requires entropy (randomness) to generate the private/public keys that are used. Depending on the server and it's environment, this may become a problem. Please see [[AppSuite:GuardEntropy | Entropy]] for a possible solution</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:ISV_Mockups_Wireframes&diff=19162
AppSuite:ISV Mockups Wireframes
2015-03-10T10:32:30Z
<p>Cutmasta: </p>
<hr />
<div><div class="title">Create Open-Xchange AppSuite Mockups / Wireframes</div><br />
<br />
<br />
__TOC__<br />
<br />
[[File:Ox-contacts.png|300px|thumb|center]]<br />
<br />
[[File:Ox-calendar.png|300px|thumb|center]]<br />
<br />
[[File:Ox-core.png|300px|thumb|center]]<br />
<br />
<br />
<br />
<br />
=== Why build mockups? ===<br />
<br />
Here are some reasons, why YOU should think about using the power of mockups:<br />
<br />
* It reproduces the experience of sketching on a whiteboard, but using a computer.<br />
* It dramatically helps to visually any kind of ideas, features of a web application. Mockups are very useful, for example in contracts, proposals, user stories or software change request forms.<br />
* Enhance the visibility of your upcoming features inside a product / customization.<br />
* Iterate easily over ideas + get feedback from potential users and customers until they are ready to get implemented via the development department.<br />
<br />
<br />
This page contains needed informations, to easily build wireframes/mockups for the Open-Xchange AppSuite application. <br />
<br />
<br />
IMPORTANT NOTE: To build/use the mockups, which get described in this article, you need to install a 3rd party software (Balsamiq) on your local PC/Laptop. Balsamiq can be used in a trial period. Once you decide to constantly use it, you must purchase a license from their [http://balsamiq.com/products/mockups/] website.<br />
<br />
=== What´s needed to build beautiful AppSuite mockups ? ===<br />
<br />
Following Steps are required, to get started to build nice mockups for AppSuite. <br />
<br />
* You need to install the desktop application called "Balsamiq Desktop App". You can download it from: http://balsamiq.com<br />
<br />
* Download the Open-Xchange Balsamiq Assets/Library/Samples from [[File:Ox-assets-balsamiq-7.6.2.zip]]<br />
<br />
* Import the downloaded AppSuite assets/library into the Balsamiq application and use the included examples:<br />
<br />
<br />
On MAC OS X / Linux / Windows<br />
<br />
# Checkout from GIT or download ZIP file.<br />
# Unzip & navigate to the created directory "assets" . Remember/Copy complete local path to this directory. Example: "/Users/<myuser>/Downloads/ox-assets-balsamiq/assets"<br />
# Open Balsamiq Application and > open menu "Balsamiq Mockups" > Click "About Balsamiq Application"<br />
# "About Dialog" opens with a link to "Open Local Store Folder". Click on that link, which opens your explorer/finder application. <br />
# Now create the required file called "BalsamiqMockups.cfg" inside that directory ("Local Store" folder) with following content. '''IMPORTANT''' You must change the '''assets''' path attribute to '''YOUR path''' structure on YOUR local system.<br />
<config><br />
<fontFace>Helvetica Neue</fontFace><br />
<rememberWindowSize>true</rememberWindowSize><br />
<useCookies>true</useCookies><br />
<'''assetsPath'''>/Users/<myuser>/Downloads/ox-assets-balsamiq/assets</'''assetsPath'''><br />
</config><br />
# Now use your explorer/finder/shell and copy all ".bmml" files from within the "visuals/assets" directory to your work/dev directory. <br />
# Close the Balsamiq application and reopen it. You now should see a new tab called "Account Assets" in the UI components library. All OX related components are prefixed with "ox-" for easy find as you type usage. <br />
# Go to your work/dev directory which contains the copied ".bmml" files. Click on one of the .bmml files. You are DONE!<br />
<br />
* Let the fun begin! Mockup as your like and save the newly created file to your work/dev directory!<br />
<br />
<br />
{{#ev:youtube|RstDlq9X-jA}}<br />
<br />
==== General basics of Balsamiq ====<br />
<br />
* Working with Symbols - http://support.balsamiq.com/customer/portal/articles/110439<br />
<br />
* How to Use an Existing File as a Symbol in Mockups - http://support.balsamiq.com/customer/portal/articles/110439<br />
<br />
* Working with Text - http://support.balsamiq.com/customer/portal/articles/110121<br />
<br />
* Tutorials - http://support.balsamiq.com/customer/portal/topics/49503-tutorials/articles<br />
<br />
==== Common pitfalls when using Balsamiq ====<br />
* Any files stored in an subdirectory of your assets folder don't show up in the 'account assets' tab within Balsamic cause currently subdirectories are ignored. <br />
* In case your assets folder only contains images the 'account assets' will not show up</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=File:Ox-assets-balsamiq-7.6.2.zip&diff=19161
File:Ox-assets-balsamiq-7.6.2.zip
2015-03-10T10:32:10Z
<p>Cutmasta: Current balsamiq assets for AppSuite 7.6.2</p>
<hr />
<div>Current balsamiq assets for AppSuite 7.6.2</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:AdminGuide_7.6.0&diff=19104
AppSuite:AdminGuide 7.6.0
2015-02-11T16:43:25Z
<p>Cutmasta: /* OX App Suite Configuration */</p>
<hr />
<div>Older versions: [[AppSuite:AdminGuide_7.4.2|7.4.2]], [[AppSuite:AdminGuide_7.4.0|7.4.0]], [[AppSuite:AdminGuide_7_2|7.2.0]], [[AppSuite:AdminGuide_7_0_1|7.0.1]]<br />
<br />
= Open-Xchange Installation and Update =<br />
<br />
== OX App Suite ==<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_6.0|Download and Installation Guide for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_7.0|Download and Installation Guide for Debian GNU/Linux 7.0 (Wheezy)]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_SLES11|Download and Installation Guide for SUSE Linux Enterprise Server 11]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL6|Download and Installation Guide for RedHat Enterprise Linux 6]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_6|Download and Installation Guide for CentOS 6]]<br />
* [[OXSE4UCS_Installation_en|Download and Installation Guide for Univention Corporate Server]]<br />
<br />
== Open-Xchange Update ==<br />
* [[AppSuite:UpdatingOXPackages|Updating Open-Xchange AppSuite v7.0.0 to v7.4]]<br />
* [[AppSuite:Upgrade_from_6.22_Debian_6.0|Update Guide v6.22 to v7.4 for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Upgrade_from_6.22_for_SLES11|Update Guide v6.22 to v7.4 for SUSE Linux Enterprise Server 11]]<br />
* [[AppSuite:Upgrade_from_6.22_for_RHEL6|Update Guide v6.22 to v7.4 for RedHat Enterprise Linux 6]]<br />
* [[AppSuite:Upgrade_from_6.22_for_CentOS6 |Update Guide v6.22 to v7.4 for CentOS 6]]<br />
* [[UpdateTasks|Update Task Management in Open-Xchange]]<br />
<br />
== Parallel Setup of OX App Suite UI and OX 6 UI ==<br />
<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_Debian_6.0|Parallel Setup Guide for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_RHEL_6_CentOS_6|Parallel Setup Guide for Red Hat Enterprise Linux 6 and CentOS 6]]<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_SLES_11|Parallel Setup Guide for SUSE Linux Enterprise Server 11]]<br />
<br />
== Additional Software ==<br />
* [[AppSuite:Text_Installation_Guide |Download & Install OX Text]]<br />
* [[AppSuite:Spreadsheet_Installation_Guide |Download & Install OX Spreadsheet]]<br />
* [[AppSuite:DocumentViewer |Download & Install Document Viewer]]<br />
* [[AppSuite:Open-Xchange_Updater|Installation of the Open-Xchange Updater]]<br />
* [[AppSuite:Connector_for_Microsoft_Outlook|Installation & Configuration of the Open-Xchange Connector for Microsoft Outlook]]<br />
* [[AppSuite:Connector_for_Business_Mobility_Installation_Guide|Installation and information of the Connector for Business Mobility]]<br />
* [[AppSuite:OX_Drive|Installation and information of OX Drive for Client]]<br />
* [[AppSuite:OX_Guard|Installation and information of OX Guard]]<br />
* [[AppSuite:OX_Mobile_Web_Interface|Installation of the Open-Xchange Mobile Web Interface]]<br />
* [[Open-Xchange_Installation_Guide_for_OX_Notifier|Installation & Configuration of the Open-Xchange Notifier]]<br />
* [[Open-Xchange_cPanel_Installation|Download & Installation of the OX Connector for cPanel]]<br />
* [[AppSuite:Connector_for_WHMCS_Installation_Guide|Download & Installation of the OX Connector for WHMCS]]<br />
* [[Parallels_Integration|Integrate Open-Xchange with Parallels]]<br />
<br />
= OX App Suite Configuration =<br />
<br />
== Advanced Configuration ==<br />
* [[AppSuite:CalDAVClients | Configuration CalDAV with Open-Xchange]]<br />
* [[AppSuite:CardDAVClients | Configuration CardDAV with Open-Xchange]]<br />
* [[AppSuite:Caldav_carddav_Bundles| Installation CardDAV/CalDAV with Open-Xchange]]<br />
* [[AppSuite:Running_a_cluster| Configuration Cluster-Setup]]<br />
* [[AppSuite:Grizzly| Configuration Connector based on Grizzly]]<br />
* [[ContactStorageLDAP| LDAP Contact Storage]]<br />
* [[Filtering_templates | Filtering publication templates according to their purpose]]<br />
<br />
== OX App Suite Configuration Parameter ==<br />
* [[AppSuite:Configuration_properties_7.6.0| Configuration properties]] - everything you ever wanted to change about the AppSuite<br />
<br />
== OX App Suite Management (CLT)==<br />
* [[AppSuite:Context management|Context management]]<br />
* [[AppSuite:User management|User management]]<br />
* [[AppSuite:Group management|Group management]]<br />
* [[AppSuite:Resource management|Resource management]]<br />
* [[AppSuite:Data management|Data management]]<br />
<br />
= Advanced Documentation =<br />
<br />
== Architecture Overview ==<br />
*[[AppSuite:Architecture_Overview|Architecture Overview]]<br />
<br />
== Importing and exporting data ==<br />
* General [[restrictions on importing data]]<br />
* Migrate a batch of users and contexts at once. Check the CSV Batch Import documentation [[Csv_import|page]].<br />
* Documentation for the [[data import format|data import format]]<br />
* [[VCard and ICal support]]<br />
* [[Using the export servlet]]<br />
* [[Using the import servlet]]<br />
* [[export ical/vcard|Example in bash to extract private contacts, tasks or appointments in ical/vcard format]]<br />
* [[CrawlerArchitecture|Architecture of the crawler bundle]]<br />
<br />
== Configuration and Tweaks ==<br />
* [[Open_Xchange_Configuration|Open-Xchange Configuration]]<br />
* [[On_The_Fly_Configuration_Update|On The Fly Configuration Update (experimental)]]<br />
* [[Session_Migration|Session migration]]<br />
* [[MailNotify_Bundle|Mail Notification (Push) with Open-Xchange]]<br />
* [[Tune_apache2_for_more_concurrent_connections|Apache2 tuning]]<br />
<br />
== Statistics ==<br />
<br />
* [[AppSuite:Logincounter|logincounter]]<br />
<br />
== Troubleshooting ==<br />
* [http://www.open-xchange.com/forum/ Open-Xchange Forum]<br />
* Check the [http://sdb.open-xchange.com/ Open-Xchange Support Database]<br />
* FAQs can be found in the [http://sdb.open-xchange.com/faq SDB FAQ section].<br />
* [[Passwords in Open-Xchange]]<br />
* [[Outlook_OXtender2_Best_Practice| Outlook Connector best practice]]<br />
* [[AppSuite:OX_Logging|Logging]] - configuring and understanding the LOGBACK logging system<br />
* [[AppSuite:Oxsysreport | Creating an OX Support Tarball]]<br />
<br />
== Integration Scenarios ==<br />
* [http://oxpedia.org/wiki/index.php?title=Category:Config Open-Xchange configuration options summary]<br />
* [[OX_Permission_Level | OX Permission Level Matrix]]<br />
* [[Load_balancing_and_clustering | Load balancing and OX clustering]]<br />
* [[Open-Xchange-RHEL-AD-Integration|Integration of Open-Xchange into MS Active Directory and Exchange ]]<br />
* [[ContextRestore_Bundle|Restoring contexts using the context restore bundle]]<br />
* [[Lawful_Interception|Lawful Interception (Telekommunikationsüberwachung)]]<br />
* [[OX_EMail_Push_Introduction|Introduction to EMail Push in Open-Xchange]]<br />
<br />
<br />
<br />
[[Category: OX7]]<br />
[[Category: AppSuite]]<br />
[[Category: Administrator]]</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:AdminGuide_7.6.1&diff=19103
AppSuite:AdminGuide 7.6.1
2015-02-11T16:42:55Z
<p>Cutmasta: /* Advanced Configuration */</p>
<hr />
<div>Older versions: [[AppSuite:AdminGuide_7.6.0|7.6.0]],[[AppSuite:AdminGuide_7.4.2|7.4.2]], [[AppSuite:AdminGuide_7.4.0|7.4.0]], [[AppSuite:AdminGuide_7_2|7.2.0]], [[AppSuite:AdminGuide_7_0_1|7.0.1]]<br />
<br />
= Open-Xchange Installation and Update =<br />
<br />
== OX App Suite ==<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_6.0|Download and Installation Guide for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_7.0|Download and Installation Guide for Debian GNU/Linux 7.0 (Wheezy)]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_SLES11|Download and Installation Guide for SUSE Linux Enterprise Server 11]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL6|Download and Installation Guide for RedHat Enterprise Linux 6]]<br />
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_6|Download and Installation Guide for CentOS 6]]<br />
* [[OXSE4UCS_Installation_en|Download and Installation Guide for Univention Corporate Server]]<br />
<br />
== Open-Xchange Update ==<br />
* [[AppSuite:UpdatingOXPackages|Updating Open-Xchange AppSuite v7.0.0 to v7.4]]<br />
* [[AppSuite:Upgrade_from_6.22_Debian_6.0|Update Guide v6.22 to v7.4 for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Upgrade_from_6.22_for_SLES11|Update Guide v6.22 to v7.4 for SUSE Linux Enterprise Server 11]]<br />
* [[AppSuite:Upgrade_from_6.22_for_RHEL6|Update Guide v6.22 to v7.4 for RedHat Enterprise Linux 6]]<br />
* [[AppSuite:Upgrade_from_6.22_for_CentOS6 |Update Guide v6.22 to v7.4 for CentOS 6]]<br />
* [[UpdateTasks|Update Task Management in Open-Xchange]]<br />
<br />
== Parallel Setup of OX App Suite UI and OX 6 UI ==<br />
<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_Debian_6.0|Parallel Setup Guide for Debian GNU/Linux 6.0 (Squeeze)]]<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_RHEL_6_CentOS_6|Parallel Setup Guide for Red Hat Enterprise Linux 6 and CentOS 6]]<br />
* [[AppSuite:Parallel_UISupport_OX6_AppSuite_SLES_11|Parallel Setup Guide for SUSE Linux Enterprise Server 11]]<br />
<br />
== Additional Software ==<br />
* [[AppSuite:Text_Installation_Guide |Download & Install OX Text]]<br />
* [[AppSuite:Spreadsheet_Installation_Guide |Download & Install OX Spreadsheet]]<br />
* [[AppSuite:DocumentViewer |Download & Install Document Viewer]]<br />
* [[AppSuite:Open-Xchange_Updater|Installation of the Open-Xchange Updater]]<br />
* [[AppSuite:Connector_for_Microsoft_Outlook|Installation & Configuration of the Open-Xchange Connector for Microsoft Outlook]]<br />
* [[AppSuite:Connector_for_Business_Mobility_Installation_Guide|Installation and information of the Connector for Business Mobility]]<br />
* [[AppSuite:OX_Drive|Installation and information of OX Drive for Client]]<br />
* [[AppSuite:OX_Guard|Installation and information of OX Guard]]<br />
* [[AppSuite:OX_Mobile_Web_Interface|Installation of the Open-Xchange Mobile Web Interface]]<br />
* [[Open-Xchange_Installation_Guide_for_OX_Notifier|Installation & Configuration of the Open-Xchange Notifier]]<br />
* [[Open-Xchange_cPanel_Installation|Download & Installation of the OX Connector for cPanel]]<br />
* [[AppSuite:Connector_for_WHMCS_Installation_Guide|Download & Installation of the OX Connector for WHMCS]]<br />
* [[Parallels_Integration|Integrate Open-Xchange with Parallels]]<br />
<br />
= OX App Suite Configuration =<br />
<br />
== Advanced Configuration ==<br />
* [[AppSuite:CalDAVClients | Configuration CalDAV with Open-Xchange]]<br />
* [[AppSuite:CardDAVClients | Configuration CardDAV with Open-Xchange]]<br />
* [[AppSuite:Caldav_carddav_Bundles| Installation CardDAV/CalDAV with Open-Xchange]]<br />
* [[AppSuite:Running_a_cluster| Configuration Cluster-Setup]]<br />
* [[AppSuite:Grizzly| Configuration Connector based on Grizzly]]<br />
* [[ContactStorageLDAP| LDAP Contact Storage]]<br />
* [[Filtering_templates | Filtering publication templates according to their purpose]]<br />
<br />
== OX App Suite Configuration Parameter ==<br />
* [[AppSuite:Configuration_properties_7.6.1| Configuration properties]] - everything you ever wanted to change about the AppSuite<br />
<br />
== OX App Suite Management (CLT)==<br />
* [[AppSuite:Context management|Context management]]<br />
* [[AppSuite:User management|User management]]<br />
* [[AppSuite:Group management|Group management]]<br />
* [[AppSuite:Resource management|Resource management]]<br />
* [[AppSuite:Data management|Data management]]<br />
<br />
= Advanced Documentation =<br />
<br />
== Architecture Overview ==<br />
*[[AppSuite:Architecture_Overview|Architecture Overview]]<br />
<br />
== Importing and exporting data ==<br />
* General [[restrictions on importing data]]<br />
* Migrate a batch of users and contexts at once. Check the CSV Batch Import documentation [[Csv_import|page]].<br />
* Documentation for the [[data import format|data import format]]<br />
* [[VCard and ICal support]]<br />
* [[Using the export servlet]]<br />
* [[Using the import servlet]]<br />
* [[export ical/vcard|Example in bash to extract private contacts, tasks or appointments in ical/vcard format]]<br />
* [[CrawlerArchitecture|Architecture of the crawler bundle]]<br />
<br />
== Configuration and Tweaks ==<br />
* [[Open_Xchange_Configuration|Open-Xchange Configuration]]<br />
* [[On_The_Fly_Configuration_Update|On The Fly Configuration Update (experimental)]]<br />
* [[Session_Migration|Session migration]]<br />
* [[MailNotify_Bundle|Mail Notification (Push) with Open-Xchange]]<br />
* [[Tune_apache2_for_more_concurrent_connections|Apache2 tuning]]<br />
<br />
== Statistics ==<br />
<br />
* [[AppSuite:Logincounter|logincounter]]<br />
<br />
== Troubleshooting ==<br />
* [http://www.open-xchange.com/forum/ Open-Xchange Forum]<br />
* Check the [http://sdb.open-xchange.com/ Open-Xchange Support Database]<br />
* FAQs can be found in the [http://sdb.open-xchange.com/faq SDB FAQ section].<br />
* [[Passwords in Open-Xchange]]<br />
* [[Outlook_OXtender2_Best_Practice| Outlook Connector best practice]]<br />
* [[AppSuite:OX_Logging|Logging]] - configuring and understanding the LOGBACK logging system<br />
* [[AppSuite:Oxsysreport | Creating an OX Support Tarball]]<br />
<br />
== Integration Scenarios ==<br />
* [http://oxpedia.org/wiki/index.php?title=Category:Config Open-Xchange configuration options summary]<br />
* [[OX_Permission_Level | OX Permission Level Matrix]]<br />
* [[Load_balancing_and_clustering | Load balancing and OX clustering]]<br />
* [[Open-Xchange-RHEL-AD-Integration|Integration of Open-Xchange into MS Active Directory and Exchange ]]<br />
* [[ContextRestore_Bundle|Restoring contexts using the context restore bundle]]<br />
* [[Lawful_Interception|Lawful Interception (Telekommunikationsüberwachung)]]<br />
* [[OX_EMail_Push_Introduction|Introduction to EMail Push in Open-Xchange]]<br />
<br />
<br />
<br />
[[Category: OX7]]<br />
[[Category: AppSuite]]<br />
[[Category: Administrator]]</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:Setup_CIFS&diff=19102
AppSuite:Setup CIFS
2015-02-11T16:42:22Z
<p>Cutmasta: Blanked the page</p>
<hr />
<div></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=HTTP_API&diff=18772
HTTP API
2014-10-20T10:33:33Z
<p>Cutmasta: /* Get root folders */</p>
<hr />
<div>== Introduction ==<br />
<br />
This document defines the Open-Xchange HTTP API which is used by the new AJAX GUI. The first chapter describes general definitions and conventions which apply to all server modules. All other chapters describe individual server modules.<br />
<br />
=== Low level protocol ===<br />
<br />
The client accesses the server through HTTP GET, POST and PUT requests. HTTP cookies are used for authentication and must therefore be processed and sent back by the client as specified by [http://tools.ietf.org/html/rfc6265 RFC 6265]. The HTTP API is accessible at URIs starting with <code>/ajax</code>. Each server module has a unique name and its own sub-namespace with that name below <code>/ajax</code>, e. g. all access to the module "tasks" is via URIs starting with <code>/ajax/tasks</code>.<br />
<br />
Text encoding is always UTF-8. Data is sent from the server to the client as <code>text/javascript</code> and interpreted by the client to obtain an ECMAScript object. The HTTP API uses only a small subset of the ECMAScript syntax. This subset is roughly described by the following BNF:<br />
<br />
Value ::= "null" | Boolean | Number | String | Array | Object<br />
Boolean ::= "true" | "false"<br />
Number ::= see NumericLiteral in ECMA 262 3rd edition<br />
String ::= \"([^"\n\\]|\\["\n\\])*\"<br />
Array ::= "[]" | "[" Value ("," Value)* "]"<br />
Object ::= "{}" | "{" Name ":" Value ("," Name ":" Value)* "}"<br />
Name ::= [A-Fa-f][0-9A-Fa-f_]*<br />
<br />
Numbers are the standard signed integer and floating point numbers. Strings can contain any character, except double quotes, newlines and backslashes, which must be escaped by a backslash. Control characters in strings (other than newline) are not supported. Whitespace is allowed between any two tokens. See [http://json.org JSON] and [http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMA 262, 3<sup>rd</sup> edition] for the formal definition.<br />
<br />
The response body consists of an object, which contains up to four fields as described in [[#ResponseBody | Response body]]. The field <code>data</code> contains the actual payload which is described in following chapters. The fields <code>timestamp</code>, <code>error</code> and <code>error_params</code> are present when data objects are returned, if an error occurred and if the error message contains conversion specifiers, respectively. Following sections describe the contents of these fields in more detail.<br />
<br />
{| id="ResponseBody" cellspacing="0" border="1"<br />
|+ align="bottom" | Response body<br />
! Name !! Type !! Value<br />
|-<br />
| data || Value || Payload of the response.<br />
|-<br />
| timestamp || Timestamp || The latest timestamp of the returned data (see [[HTTP_API#Updates|Updates]]).<br />
|-<br />
| error || String || The translated error message. Present in case of errors.<br />
|-<br />
| error_params || Array || As o 7.4.2: Empty JSON array. Before that: Parameters for the error message that would need to be replaced in the error string (in a printf-format style).<br />
|-<br />
| error_id || String || Unique error identifier to help finding this error instance in the server logs.<br />
|-<br />
| error_desc || String || The technical error message (always English) useful for debugging the problem. Might be the same as error message if there is no more information available<br />
|-<br />
| code || String || Error code consisting of an upper-case module identifier and a four-digit message number, separated by a dash; e.g. "MSG-0012"<br />
|-<br />
| error_stack || Array || If configured (see "com.openexchange.ajax.response.includeStackTraceOnError" in 'server.properties') this field provides the stack trace of associated Java exception represented as a JSON array<br />
|-<br />
| categories || String OR Array || Either a single (String) or list (Array) of upper-case category identifiers to which the error belongs. E.g.<br />
{| cellspacing="0" border="1"<br />
| "USER_INPUT" || An error resulting from wrong or missing input from front-end (e.g. mandatory field missing).<br />
|-<br />
| "CONFIGURATION" || An error related to user/system configuration which denies requested operation.<br />
|-<br />
| "PERMISSION_DENIED" || An error related to insufficient permission settings.<br />
|-<br />
| "TRY_AGAIN" || A requested operation could not be accomplished because a needed resource is temporary down or missing (e.g. imap server rejects connection because of too many established connections).<br />
|-<br />
| "SERVICE_DOWN" || A subsystem or third party service is down and therefore does not respond (e.g. database is down).<br />
|-<br />
| "CONNECTIVITY" || The underlying socket connection is corrupt, empty or closed. Only a temporary error that does not affect the whole system.<br />
|-<br />
| "ERROR" || A programming error which was caused by incorrect program code.<br />
|-<br />
| "CONFLICT" || A concurrent modification.<br />
|-<br />
| "CAPACITY" || The requested operation could not be performed cause an underlying resource is full or busy (e.g. IMAP folder exceeds quota).<br />
|-<br />
| "TRUNCATED" || The given data could not be stored into the database because an attribute contains a too long value.<br />
|-<br />
| "WARNING" || Action was at least partially successful, but a condition occurred that merited a warning<br />
|}<br />
|-<br />
| category || Number || Maintained for legacy reasons: The numeric representation of the first category:<br />
{| cellspacing="0" border="1"<br />
| 1 || An error resulting from wrong or missing input from front-end (e.g. mandatory field missing).<br />
|-<br />
| 2 || An error strictly related to user configuration which denies requested operation.<br />
|-<br />
| 3 || An error related to insufficient permission settings.<br />
|-<br />
| 4 || A requested operation could not be accomplished because a needed resource is temporary down or missing (e.g. imap server rejects connection because of too many established connections).<br />
|-<br />
| 5 || A subsystem or third party service is down and therefore does not respond (e.g. database is down).<br />
|-<br />
| 6 || The underlying socket connection is corrupt, empty or closed. Only a temporary error that does not affect the whole system.<br />
|-<br />
| 8 || A programming error which was caused by incorrect programm code.<br />
|-<br />
| 9 || A concurrent modification.<br />
|-<br />
| 11 || The requested operation could not be performed cause an underlying resource is full or busy (e.g. IMAP folder exceeds quota).<br />
|-<br />
| 12 || The given data could not be stored into the database because an attribute contains a too long value.<br />
|-<br />
| 13 || Action was at least partially successful, but a condition occurred that merited a warning<br />
|}<br />
|}<br />
<br />
Data from the client to the server can be sent in several formats. Small amounts of data are sent as <code>application/x-www-urlencoded</code> in query parameters in the request URI. For POST requests, some or all parameters may be sent in the request body instead of in the URI using any valid encoding for POST requests. Alternatively, some requests specify that data is sent as <code>text/javascript</code> in the body of a PUT request. The format of the request body for PUT requests is the same as for sending data from the server to the client, except that the payload is sent directly, without being wrapped in another object.<br />
<br />
When updating existing data, the client sends only fields that were modified. To explicitly delete a field, the field is sent with the value <code>null</code>. For fields of type <code>String</code>, the empty string <code>""</code> is equivalent to <code>null</code>.<br />
<br />
=== Error handling ===<br />
<br />
If the session of the user times out, if the client doesn't send a session ID or if the session for the specified session ID can not be found then the server returns the above described response object, that contains an error code and an error message. If the request URI or the request body is malformed or incomplete then the server returns the reponse object with an error message, too. In case of internal server errors, especially Java exceptions, or if the server is down, it returns the HTTP status code 503, Service Unavailable. Other severe errors may return other HTTP status values.<br />
<br />
Application errors, which can be caused by a user and are therefore expected during the operation of the groupware, are reported by setting the field error in the returned object, as described in [[#ResponseBody | Response body]]. Since the error messages are translated by the client, they can not be composed of multiple variable parts. Instead, the error message can contain simplified printf()-style conversion specifications, which are replaced by elements from the array in the field error_params. If error_params is not present, no replacement occurs, even if parts of the error message match the syntax of a conversion specification.<br />
<br />
A simplified conversion specification, as used for error messages, is either of the form %s or %''n''$s, where ''n'' is a 1-based decimal parameter index. The conversion specifications are replaced from left to right by elements from error_params, starting at the first element. %s is replaced by the current element and the current index is incremented. %''n''$s is replaced by the ''n''th element and the current index is set to the (''n'' + 1)th element.<br />
<br />
Some error message contain data sizes which must be expressed in Bytes or Kilobytes etc., depending on the actual value. Since the unit must be translated, this conversion is performed by the client. Unfortunately, standard printf()-style formatting does not have a specifier for this kind of translation. Therefore, the conversion specification for sizes is the same as for normal strings, and the client has to determine which parameters to translate based on the error code. The current error codes and the corresponding size parameters are listed in [[#DataSizeParameters | Data size parameters]]<br />
<br />
{| id="DataSizeParameters" cellspacing="0" border="1"<br />
|+ align="bottom" | Data size parameters<br />
! Error code !! Parameter indices<br />
|-<br />
| AJP-0006 || 1<br />
|-<br />
| AJP-0020 || 1, 2<br />
|-<br />
| CON-0101 || 2, 3<br />
|-<br />
| FLS-0003 || 1, 2, 3<br />
|-<br />
| MSG-0065 || 1, 3<br />
|-<br />
| MSG-0066 || 1<br />
|-<br />
| NON-0005 || 1, 2<br />
|-<br />
|}<br />
<br />
<br />
=== Date and time ===<br />
<br />
Dates without time are transmitted as the number of milliseconds between 00:00 UTC on that date and 1970-01-01 00:00 UTC. Leap seconds are ignored, therefore this number is always an integer multiple of 8.64e7.<br />
<br />
Because ECMAScript Date objects have no way to explicitly specify a timezone for calculations, timezone correction must be performed on the server. Dates with time are transmitted as the number of milliseconds since 1970-01-01 00:00 UTC (again, ignoring leap seconds) plus the offset between the ''user's'' timezone and UTC at the time in question. (See the Java method java.util.TimeZone.getOffset(long)). Unless optional URL parameter <code>'''timezone'''</code> is present. Then dates with time are transmitted as the number of milliseconds since 1970-01-01 00:00 UTC (again, ignoring leap seconds) plus the offset between the ''specified'' timezone and UTC at the time in question.<br />
<br />
For some date and time values, especially timestamps, monotonicity is more important than the actual value. Such values are transmitted as the number of milliseconds since 1970-01-01 00:00 UTC, ignoring leap seconds and without timezone correction. If possible, a unique strictly monotonic increasing value should be used instead, as it avoids some race conditions described below.<br />
<br />
This specification refers to these three interpretations of the type Number as separate data types. The types are described in [[#DateAndTimeTypes | Date and time types]].<br />
<br />
{| id="DateAndTimeTypes" cellspacing="0" border="1"<br />
|+ align="bottom" | Date and time types<br />
! Type !! Time !! Timezone !! Comment<br />
|-<br />
| Date || No || UTC || Date without time.<br />
|-<br />
| Time || Yes || User || Date and time.<br />
|-<br />
| Timestamp || Yes || UTC || Timestamp or unique sequence number.<br />
|-<br />
|}<br />
<br />
=== Updates ===<br />
<br />
To allow efficient synchronization of a client with changes made by other clients and to detect conflicts, the server stores a timestamp of the last modification for each object. Whenever the server transmits data objects to the client, the response object described in [[#ResponseBody | Response body]] includes the field timestamp. This field contains a timestamp value which is computed as the maximum of the timestamps of all transmitted objects.<br />
<br />
When requesting updates to a previously retrieved set of objects, the client sends the last timestamp which belongs to that set of objects. The response contains all updates with timestamps greater than the one specified by the client. The field timestamp of the response contains the new maximum timestamp value.<br />
<br />
If multiple different objects may have the same timestamp values, then a race condition exists when an update is processed between two such objects being modified. The first, already modified object will be included in the update response and its timestamp will be the maximum timestamp value sent in the timestamp field of the response. If the second object is modified later but gets the same timestamp, the client will never see the update to that object because the next update request from the client supplies the same timestamp value, but only modifications with greater timestamp values are returned.<br />
<br />
If unique sequence numbers can't be used as timestamps, then the risk of the race condition can be at least minimized by storing timestamps in the most precise format and/or limiting update results to changes with timestamp values which are measurably smaller than the current timestamp value.<br />
<br />
=== Editing ===<br />
<br />
Editing objects is performed one object at a time. There may be multiple objects being edited by the same client simulataneously, but this is achieved by repeating the steps required for editing a single object. There is no batch edit or upload command.<br />
<br />
To edit an object, a client first requests the entire object from the server. The server response contains the timestamp field described in the previous section. For in-place editing inside a view of multiple objects, where only already retrieved fields can be changed, retrieving the entire object is not necessary, and the last timestamp of the view is used as the timestamp of each object in it.<br />
<br />
When sending the modified object back to the server, only modified fields need to be included in the sent object. The request also includes the timestamp of the edited object. The timestamp is used by the server to ensure that the object was not edited by another client in the meantime. If the current timestamp of the object is greater than the timestamp supplied by the client, then a conflict is detected and the field error is set in the response. Otherwise, the object gets a new timestamp and the response to the client is empty.<br />
<br />
If the client displays the edited object in a view together with other objects, then the client will need to perform an update of that view immediately after successfully uploading an edited object.<br />
<br />
=== File uploads ===<br />
<br />
File uploads are made by sending a POST request that submits both the file and the needed fields as parts of a request of content-type “multipart/form-data” or “multipart/mixed”. The file metadata are stored in a form field “file” (much like an <input type=”file” name=”file” /> would do). In general a call that allows file uploads via POST will have a corresponding call using PUT to send object data. The JSON-encoded object-data that is send as the body of a corresponding PUT call is, when performed as a POST with file uploads, put into the request parameter “json”.<br />
<br />
Since the upload is performed directly by the browser and is not an Ajax call, the normal callback mechanism for asynchronous Javascript calls cannot be used to obtain the result. For this reason the server responds to these POST calls with a complete HTML page that performs the callback and should not be displayed to the user. The HTML response is functionally equivalent to:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<html><br />
<head><br />
<META http-equiv="Content-Type" content=\"text/html; charset=UTF-8\"><br />
<script type="text/javascript"><br />
(parent["callback_<b>action</b>"] || window.opener && window.opener["callback_<b>action</b>"])<br />
(<b>{json}</b>)<br />
</script><br />
</head><br />
</html><br />
<br />
The placeholders <code>{json}</code> is replaced by the response with the timestamp that would be expected from the corresponding PUT method. The placeholder <code>action</code> is replaced by the value of the parameter <code>action</code> of the request (except for the import bundle, which is named "import" instead of the action name for legacy purposes). The content-type of the answer is <code>text/html</code>.<br />
<br />
Non-browser clients don't need to interpret HTML or JavaScript. The JSON data can be recognized by the outermost <code>({</code> and <code>})</code>, where the inner braces are part of the JSON value. For example, the regular expression <code>\((\{.*\})\)</code> captures the entire JSON value in its first capturing group.<br />
<br />
=== Documentation conventions ===<br />
<br />
The rest of this document describes all available requests for each module. A module usually supports several different requests, which are differentiated by the used HTTP method, URI path and supplied URI parameters. The description of each method generally contains the following elements:<br />
* the HTTP method followed by the request URI, inclusing the URI parameter action, which is used to differentiate methods,<br />
* a list of URI parameters which can or must be supplied by the client,<br />
* for PUT requests, content of the request body,<br />
* "Response with timestamp:"if the timestamp field is required in the response body or simply "Response:" if not,<br />
* content of the response payload, unless it is supposed to be empty.<br />
<br />
=== Common object data ===<br />
<br />
This table contains common fields which apply for any module's data type and is referenced throughout this document whenever a module's data type is described.<br />
<br />
{| id="CommonObjectData" cellspacing="0" border="1"<br />
|+ align="bottom" | Common object data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 1 || id || String || Object ID<br />
|-<br />
| 2 || created_by || String || User ID of the user who created this object.<br />
|-<br />
| 3 || modified_by || String || User ID of the user who last modified this object.<br />
|-<br />
| 4 || creation_date || Time || Date and time of creation.<br />
|-<br />
| 5 || last_modified || Time || Date and time of the last modification.<br />
|-<br />
| 20 || folder_id || String || Object ID of the parent folder.<br />
|-<br />
| 100 || categories || String || String containing comma separated the categories. Order is preserved. Changing the order counts as modification of the object. Not present in folder objects.<br />
|-<br />
| 101 || private_flag || Boolean || Overrides folder permissions in shared private folders: When true, this object is not visible to anyone except the owner. Not present in folder objects.<br />
|-<br />
| 102 || color_label || Number || Color number used by Outlook to label the object. The assignment of colors to numbers is arbitrary and specified by the client. The numbers are integer numbers between 0 and 10 (inclusive). Not present in folder objects.<br />
|-<br />
| 104 || number_of_attachments || Number || Number of attachments <br />
|-<br />
| 105 || lastModifiedOfNewestAttachmentUTC || Time || Date and time of the newest attachment written with UTC time zone.<br />
|}<br />
<br />
== Module "login" ==<br />
<br />
The login module is used to obtain a session from the user's login credentials. To understand the details of the different login methods, see the article titled "[[Login variations]]".<br />
<br />
=== Login ===<br />
<br />
POST <code>/ajax/login?action=login</code><br />
<br />
Parameters:<br />
* <code>name</code> – The login name.<br />
* <code>password</code> – The password.<br />
* <code>authId</code> (optional) – Identifier for tracing every single login request passed between different systems in a cluster. The value should be some token that is unique for every login request. This parameter must be given as URL parameter and not inside the body of the POST request.<br />
* <code>client</code> (optional) – Identifier of the client using the HTTP/JSON interface. This is for statistic evaluations what clients are used with Open-Xchange.<br />
* <code>version</code> (optional) – Used version of the HTTP/JSON interface client.<br />
* <code>clientIP</code> (optional) – IP address of the client host for that the session is created. If this parameter is not specified the IP address of the HTTP client doing this request is used.<br />
* <code>clientUserAgent</code> (optional) – Value of the User-Agent header of the client host for that the session is created. If this parameter is not specified the User-Agent of the current HTTP client doing this request is used.<br />
<br />
Response: A JSON object containing the session ID used for all subsequent requests. Additionally a random token is contained to be used for the Easy Login method.<br />
<br />
=== Form Login (since 6.20) ===<br />
<br />
POST <code>/ajax/login?action=formlogin</code><br />
<br />
This request implements a possible login to the web frontend by only using a simple HTML form. An example for such a form can be found in the backend's documentation folder (<code>/usr/share/doc/open-xchange-core</code>) under <code>examples/login.html</code>.<br />
<br />
Parameters:<br />
* <code>login</code> – The login name.<br />
* <code>password</code> – The password.<br />
* <code>authId</code> – Identifier for tracing every single login request passed between different systems in a cluster. The value should be some token that is unique for every login request. This parameter must be given as URL parameter and not inside the body of the POST request.<br />
* <code>client</code> – Identifier of the client using the HTTP/JSON interface. This is for statistic evaluations what clients are used with Open-Xchange. If the autologin request should work the client must be the same as the client sent by the UI in the normal login request.<br />
* <code>version</code> – Used version of the HTTP/JSON interface client.<br />
* <code>autologin</code> – True or false. True tells the UI to issue a store request for the session cookie. This store request is necessary if you want the autologin request not to fail.<br />
* <code>uiWebPath</code> (optional) – Defines another path on the web server where the UI is located. If this parameter is not defined the configured default of the backend is used.<br />
* <code>clientIP</code> (optional) – IP address of the client host for that the session is created. If this parameter is not specified the IP address of the HTTP client doing this request is used.<br />
* <code>clientUserAgent</code> (optional) – Value of the User-Agent header of the client host for that the session is created. If this parameter is not specified the User-Agent of the current HTTP client doing this request is used.<br />
<br />
Response: A redirect to the web UI. The URL of the web UI is either taken from the given parameter or from the configured default of the backend.<br />
<br />
For a complete description of the FormLogin-Process please see [[FormLogin|this documentation]]<br />
<br />
=== Token Login (since 7.0.1) ===<br />
<br />
POST <code>/ajax/login?action=tokenLogin</code><br />
<br />
This request allows every possible client to create a very short living session. This session can then be transferred to any other client preferably a browser entering then the normal web interface. Then the sessions life time will be extended equally to every other session.<br />
<br />
Compared to the login mechanism using the random token, this request is more secure because two tokens are used. One of these tokens is only known to the client and one is generated by the server. Only the combination of both tokens allows to use the session. The combination of both tokens must be done by the client creating the session.<br />
<br />
Parameters:<br />
* <code>login</code> – The login information.<br />
* <code>password</code> – The password.<br />
* <code>clientToken</code> – Client side identifier for accessing the session later. The value should be some token that is unique for every login request.<br />
* <code>authId</code> – Identifier for tracing every single login request passed between different systems in a cluster. The value should be some token that is unique for every login request. This parameter must be given as URL parameter and not inside the body of the POST request.<br />
* <code>client</code> – Identifier of the client using the HTTP/JSON interface. This is for statistic evaluations what clients are used with Open-Xchange. If the autologin request should work the client should be the same as the client sent by the UI in the normal login request. For security considerations it can become necessary to define here the correct client that will use the session.<br />
* <code>version</code> – Version of the HTTP/JSON interface client. Only for statistic evaluations.<br />
* <code>autologin</code> – True or false. True tells the UI to issue a store request for the session cookie. This store request is necessary if you want the autologin request not to fail. This must be enabled on the server and a client can test with the autologin request if it is enabled or not.<br />
* <code>uiWebPath</code> (optional) – Defines another path on the web server where the UI is located. If this parameter is not defined the configured default of the backend is used.<br />
* <code>clientIP</code> (optional) – IP address of the client host for that the session is created. If this parameter is not specified the IP address of the HTTP client doing this request is used. Currently the IP address may change when using the session with both tokens. This can be disabled in future releases for security considerations.<br />
* <code>clientUserAgent</code> (optional) – Value of the User-Agent header of the client host for that the session is created. If this parameter is not specified the User-Agent of the current HTTP client doing this request is used. Currently the User-Agent may change when using the session. This can be disabled in future releases for security considerations.<br />
<br />
<br />
Response: A redirect to the web UI. The URL of the web UI is either taken from the given parameter or from the configured default of the backend. This redirect will only contain the server side token. The client side token sent in the request must be appended by the client creating the session. The final URL must have the form <code style="white-space: nowrap"><var>redirect_URL</var>&amp;clientToken=<var>token</var></code>. Both tokens are necessary to use the session and both tokens must match. Otherwise the session is terminated.<br />
<br />
=== Tokens (since 7.0.1) ===<br />
<br />
POST <code>/ajax/login?action=tokens</code><br />
<br />
This request allows clients to access a session created with the [[#Token_Login_.28since_7.0.1.29 | tokenLogin]] request. When accessing the session its life time is extended equally to every other session.<br />
<br />
Parameters:<br />
* <code>serverToken</code> – Server side identifier for accessing the session. This identifier was created by the server and is contained in the tokenLogin response.<br />
* <code>clientToken</code> – Client side identifier for accessing the session. This identifier was created by the client and passed within the POST data of the tokenLogin request.<br />
* <code>client</code> – Identifier of the client using the HTTP/JSON interface. Currently this request allows to change the client identifier for the session. This eases creating the session because the identifier of the client using the session must not be known. For security considerations it can become necessary to drop this parameter.<br />
<br />
<br />
Response: A JSON object conform to the normal [[#ResponseBody | response body]] contrary to the JSON object of the normal login request. This JSON object contains the session identifier, the login, the identifier and the locale of the user.<br />
<br />
=== Logout ===<br />
<br />
GET <code>/ajax/login?action=logout</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
=== Refresh secret cookie (since 6.18.2) ===<br />
<br />
GET <code>/ajax/login?action=refreshSecret</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
=== Refresh auto-login cookie ===<br />
<br />
GET <code>/ajax/login?action=store</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
=== Redirect ===<br />
<br />
GET <code>/ajax/login;jsessionid=1157370816112.OX1?action=redirect</code><br />
<br />
'''SECURITY WARNING!''' Utilizing this request is '''INSECURE'''! This request allows to access a session with a single one time token. This one time token may be delivered to the wrong client if the AJP protocol has an error or Apache or the load balancer make a mistake. This will cause a wrong user to be in a wrong session. '''IMMEDIATELY''' consider not to use this request anymore. You have been warned. Use instead the FormLogin that does not need to use the redirect request.<br />
<br />
Parameters:<br />
* <code>random</code> – A session random token to jump into the session. This random token is part of the login response. Only a very short configurable time after the login it is allowed to jump into the session with the random token.<br />
* <code>client</code> (optional) – The client can be defined here newly if it is not correct on the login request itself.<br />
* <code>store</code> (optional) – Tells the UI to do a store request after login to be able to use autologin request.<br />
* <code>uiWebPath</code> (optional) – The optional path on the webserver to the UI. If this parameter is not given the configured uiWebPath is used.<br />
<br />
=== Change IP ===<br />
<br />
The following request is especially for integration with systems located in the providers infrastructure. If those systems create a session with the following request the client host IP address in the session can be changed. The IP check for following requests will be done using this newly set client host IP address.<br />
<br />
POST <code>/ajax/login?action=changeip</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>clientIP</code> – New IP address of the client host for the current session.<br />
<br />
Response: A JSON object containing the string "1" as data attribute.<br />
<br />
=== Redeem Token (since 7.4.0)===<br />
<br />
POST <code>/ajax/login?action=redeemToken</code><br />
<br />
Parameters:<br />
* <code>token</code> – The token created with [[#Get_a_login_token | acquireToken]].<br />
* <code>authId</code> – Identifier for tracing every single login request passed between different systems in a cluster. The value should be some token that is unique for every login request. This parameter must be given as URL parameter and not inside the body of the POST request. <br />
* <code>client</code> – Identifier of the client using the HTTP/JSON interface. The client must identifier must be the same for each request after creating the login session. <br />
* <code>secret</code> – The value of the secret string for token logins. This is configured through the tokenlogin-secrets configuration file.<br />
<br />
Response: A JSON object containing the session ID used for all subsequent requests. Additionally a random token is contained to be used for the Easy Login method. If configured within tokenlogin-secrets configuration file even the user password will be returned.<br />
<br />
== Module "config" ==<br />
<br />
The config module is used to retrieve and set user-specific configuration. The configuration is stored in a tree. Each node of the tree has a name and a value. The values of leaf nodes are strings which store the actual configuration data. The values of inner nodes are defined recursively as objects with one field for each child node. The name and the value of each field is the name and the value of the corresponding child node, respectively.<br />
<br />
The namespace looks like the following:<br />
<br />
* <code>/ajax/config/</code><br />
** <code>gui</code> – A string containing GUI-specific settings (currently, it is a huge [[#Low_level_protocol | JSON]] object).<br />
** <code>fastgui</code> - A string containing GUI-specific settings. This is a JSON object that must be kept small for performance.<br />
** <code>context_id</code> - the unique identifier of the context (read-only, added 2008-01-28).<br />
** <code>cookielifetime</code> - the cookie life time in seconds or <code>-1</code> for session cookie (read-only, added 2010-11-16).<br />
** <code>identifier</code> – the unique identifier of the user (read-only).<br />
** <code>contact_id</code> – the unique identifier of the contact data of the user (read-only).<br />
** <code>language</code> – the configured language of the user.<br />
** <code>timezone</code> – the configured timezone of the user.<br />
** <code>availableTimeZones</code> – a JSON object containing all available time zones. The key is the time zone identifier and the value contains its name in users language. (read-only, added 2010-07-08/v6.18).<br />
** <code>calendarnotification</code> - send a mail notification for appointments (deprecated since 2008-12-11)<br />
** <code>tasknotification</code> - send a mail notification for tasks (deprecated since 2008-12-11)<br />
** <code>reloadTimes</code> - Selectable times for GUI reload<br />
** <code>serverVersion</code> - Version string of the server.<br />
** <code>currentTime</code> - User timezone specific long of the current server time.<br />
** <code>maxUploadIdleTimeout</code> - Timeout after that idle uploads are deleted.<br />
** <code>folder/</code> – the standard folder of the user<br />
*** <code>tasks</code> – the standard task folder (read-only)<br />
*** <code>calendar</code> – the standard calendar folder (read-only)<br />
*** <code>contacts</code> – the standard contacts folder (read-only)<br />
*** <code>infostore</code> – the private infostore folder (read-only, since v6.20.1)<br />
*** <code>eas</code> – whether EAS folder selection is enabled (read-only)<br />
** <code>mail/</code> – settings for the email module (deprecated 2008-04-29)<br />
*** <code>addresses</code> – all email addresses of the user including the primary address (read-only, deprecated 2008-04-29)<br />
*** <code>defaultaddress</code> – primary email address of the user (read-only, deprecated 2008-04-29)<br />
*** <code>sendaddress</code> – one email address out of the addresses list that are email sent with. (deprecated 2008-04-29)<br />
*** <code>folder/</code> – the standard email folders (read-only, deprecated 2008-04-29)<br />
**** <code>inbox</code> – identifier of the folder that gets all incoming mails (read-only, deprecated 2008-04-29)<br />
**** <code>drafts</code> – identifier of the folder with the mail drafts (read-only, deprecated 2008-04-29)<br />
**** <code>trash</code> – identifier of the folder with the deleted mails (read-only, deprecated 2008-04-29)<br />
**** <code>spam</code> – identifier of the folder with the spam mails (read-only, deprecated 2008-04-29)<br />
**** <code>sent</code> – identifier of the folder with the sent mails (read-only, deprecated 2008-04-29)<br />
*** <code>htmlinline</code> – activate inlining of HTML attachments. (deprecated 2008-04-29)<br />
*** <code>colorquote</code> – color quoted lines. (deprecated 2008-04-29)<br />
*** <code>emoticons</code> – display emoticons as graphics. (deprecated 2008-04-29)<br />
*** <code>harddelete</code> – delete emails at once. (deprecated 2008-04-29)<br />
*** <code>inlineforward</code> – forward messages as inline or attachment. (deprecated 2008-04-29)<br />
*** <code>vcard</code> – attach vcard when sending mails. (deprecated 2008-04-29)<br />
*** <code>notifyonreadack</code> – notify on read acknowledgement. (deprecated 2008-04-29)<br />
*** <code>msgpreview</code> – show a message preview. (deprecated 2008-04-29)<br />
*** <code>ignorereplytext</code> (deprecated 2008-04-29)<br />
*** <code>nocopytosent</code> – don't put a copy to the sent folder when sending mails. (deprecated 2008-04-29)<br />
*** <code>spambutton</code> - Spam Button should be displayed in GUI or not. (deprecated 2008-04-29)<br />
** <code>participants</code><br />
*** <code>autoSearch</code> - If a search for all users, groups and resources when participant selection dialog is opened. (read-only, added 2008-10-09/SP5)<br />
*** <code>maximumNumberParticipants</code> – Defines the maximum number of participants for appointments and tasks. (read-only, added 2008-10-20/SP5)<br />
*** <code>showWithoutEmail</code> - If external participants without email should be shown.<br />
*** <code>showDialog</code> – Enables participant selection dialog for appointments and tasks. (read-only, added 2008-04-30/SP4)<br />
** <code>availableModules</code> – Contains a JSON array listing all enabled modules for a user. GUI loads Plugins through this list. To get your plugin listed here, create a subtree below <code>modules/</code> without a <code>module</code> subelement or with a subelement containing <code>true</code> (read-only, added 2008-02-25)<br />
** <code>minimumSearchCharacters</code> – Minimum number of characters a search pattern must have to prevent large responses and slow queries. (read-only, added 2008-10-20/SP5)<br />
** <code>modules</code><br />
*** <code>portal</code><br />
**** <code>gui</code> GUI settings for portal module<br />
**** <code>module</code><br />
*** <code>mail</code><br />
**** <code>addresses</code> – all email addresses of the user including the primary address (read-only, added 2008-02-25)<br />
**** <code>appendmailtext</code> – (added 2008-02-25)<br />
**** <code>allowhtmlimages</code> – Alters default setting whether external images contained in HTML content are allowed or not (added 2008-05-27)<br />
**** <code>colorquoted</code> – color quoted lines (added 2008-02-25)<br />
**** <code>contactCollectFolder</code> – contact folder id to save mail addresses from sent mails (added 2008-10-16)<br />
**** <code>contactCollectEnabled</code> – switch contact collection on/off (added 2008-10-16)<br />
**** <code>contactCollectOnMailAccess</code> – enables/disables contact collection for incoming mails. Default is true. (added 2009-09-24)<br />
**** <code>contactCollectOnMailTransport</code> – enables/disables contact collection for outgoing mails. Default is true. (added 2009-09-24)<br />
**** <code>defaultaddress</code> – primary email address of the user (read-only, added 2008-02-25)<br />
**** <code>deletemail</code> – delete emails or move to trash (added 2008-02-25)<br />
**** <code>emoticons</code> – display emoticons as graphics (added 2008-02-25)<br />
**** <code>defaultFolder</code><br />
***** <code>drafts</code> – identifier of the folder with the mail drafts (read-only, added 2008-02-25)<br />
***** <code>inbox</code> – identifier of the folder that gets all incoming mails (read-only, added 2008-02-25)<br />
***** <code>sent</code> – identifier of the folder with the sent mails (read-only, added 2008-02-25)<br />
***** <code>spam</code> – identifier of the folder with the spam mails (read-only, added 2008-02-25)<br />
***** <code>trash</code> – identifier of the folder with the deleted mails (read-only, added 2008-02-25)<br />
**** <code>forwardmessage</code> – forward messages as inline or attachment (added 2008-02-25)<br />
**** <code>gui</code> GUI settings for mail module<br />
**** <code>inlineattachments</code> – activate inlining of HTML attachments (added 2008-02-25)<br />
**** <code>linewrap</code> – (added 2008-02-25)<br />
**** <code>module</code> – if mail module is enabled or not (added 2008-02-25)<br />
**** <code>phishingheaders</code> – header(s) identifying phishing headers (added 2008-05-27)<br />
**** <code>replyallcc</code> – put all recipients on reply all into CC (added 2008-12-16/SP5)<br />
**** <code>sendaddress</code> – one email address out of the addresses list that are email sent with (added 2008-02-25)<br />
**** <code>spambutton</code> – Spam Button should be displayed in GUI or not (added 2008-02-25)<br />
**** <code>vcard</code> – attach vcard when sending mails (added 2008-02-25)<br />
*** <code>calendar</code><br />
**** <code>calendar_conflict</code><br />
**** <code>calendar_freebusy</code><br />
**** <code>calendar_teamview</code><br />
**** <code>gui</code> GUI settings for the calendar module<br />
**** <code>module</code><br />
**** <code>notifyNewModifiedDeleted</code> receive mail notification for new, modified or deleted appointments (added 2008-12-11/SP5)<br />
**** <code>notifyAcceptedDeclinedAsCreator</code> receive mail notification for accepted or declined appointments created by the user (added 2008-12-11/SP5)<br />
**** <code>notifyAcceptedDeclinedAsParticipant</code> receive mail notification for accepted or declined appointments that the user participates (added 2008-12-11/SP5)<br />
**** <code>defaultStatusPrivate</code> Default status for new appointments in private folders, where the user is participant. This does not affect appointments created by this user, which always have the status "accepted". The status are described in [[#UserParticipantObject | User participant object]]. Default is 0:none (added 2009-07-20/6.12)<br />
**** <code>defaultStatusPublic</code> Default status for new appointments in public folders, where the user is participant. This does not affect appointments created by this user, which always have the status "accepted". The status are described in [[#UserParticipantObject | User participant object]]. Default is 0:none (added 2009-07-20/6.12)<br />
*** <code>contacts</code><br />
**** <code>gui</code> GUI settings for the contacts module<br />
**** <code>mailAddressAutoSearch</code> – Define if a search is triggered when the recipient selection dialog is opened or the folder is changed. (read-only, added 2008-10-20/SP5)<br />
**** <code>module</code> True if the contact module is enabled for the current user, false otherwise.<br />
**** <code>singleFolderSearch</code> – True if the current user is allowed to search for contacts only in a single folder. False if contact searches across all folders are allowed. (read-only, added 2009-02-04/SP5 U1)<br />
**** <code>characterSearch</code> – True if the side bar for searching for contacts by a start letter should be displayed. False if the side bar should be hidden. (read-only, added 2009-05-29/6.10)<br />
**** <code>allFoldersForAutoComplete</code> – true if an auto complete search may omit the folder identifier array and search for contacts in all readable folders. This is configured through the contact.properties configuration file. (read-only, added 2010-07-22/v6.18.0)<br />
*** <code>tasks</code><br />
**** <code>gui</code> GUI settings for the tasks module<br />
**** <code>module</code><br />
**** <code>delegate_tasks</code><br />
**** <code>notifyNewModifiedDeleted</code> receive mail notification for new, modified or deleted tasks (added 2008-12-11/SP5)<br />
**** <code>notifyAcceptedDeclinedAsCreator</code> receive mail notification for accepted or declined tasks created by the user (added 2008-12-11/SP5)<br />
**** <code>notifyAcceptedDeclinedAsParticipant</code> receive mail notification for accepted or declined taks that the user participates (added 2008-12-11/SP5)<br />
*** <code>infostore</code><br />
**** <code>gui</code> GUI settings for the infostore module<br />
**** <code>folder</code> – the standard infostore folders (read-only, since 7.6.0)<br />
***** <code>trash</code> – identifier of the default infostore trash folder (read-only, since 7.6.0)<br />
**** <code>module</code><br />
*** <code>interfaces</code><br />
**** <code>ical</code><br />
**** <code>vcard</code><br />
**** <code>syncml</code><br />
*** <code>folder</code><br />
**** <code>gui</code> UI settings for the folder tree<br />
**** <code>public_folders</code><br />
**** <code>read_create_shared_folders</code><br />
**** <code>tree</code> – Selected folder tree, the user wants to use. Currents trees are 0 for the known OX folder tree and 1 for the new virtual folder tree. (added 2010-04-09/6.18)<br />
*** <code>com.openexchange.extras</code><br />
**** <code>module</code> – Extras link in the configuration (read only, added 2008-04-29)<br />
*** <code>com.openexchange.user.passwordchange</code><br />
**** <code>module</code> – Will load Plug-In which allows to change the Password within the users configuration (read only, added 2008-07-09)<br />
*** <code>com.openexchange.user.personaldata</code><br />
**** <code>module</code> – Will load Plug-In which allows to edit personal contact information within the users configuration (read only, added 2008-07-09)<br />
*** <code>com.openexchange.group</code><br />
**** <code>enabled</code> – Specifies whether the user is allowed to edit groups and loads the corresponding Plug-In. (read only, added 2008-08-08)<br />
*** <code>com.openexchange.resource</code><br />
**** <code>enabled</code> – Specifies whether the user is allowed to edit resources and loads the corresponding Plug-In. (read only, added 2008-08-08)<br />
*** <code>com.openexchange.publish</code><br />
**** <code>enabled</code> – Specifies whether the user is allowed to publish items. (read only, added 2009-05-27)<br />
*** <code>com.openexchange.subscribe</code><br />
**** <code>enabled</code> – Specifies whether the user is allowed to subscribe sources. (read only, added 2009-05-27)<br />
*** <code>olox20</code><br />
**** <code>active</code> – Tells the UI if the user is allowed to use the OXtender for Microsoft Outlook 2. (read only, added 2011-03-15/6.20)<br />
**** <code>module</code> – Is set to false to prevent the UI from trying to load a plugin. (read only, added 2011-03-15/6.20)<br />
***<code>com.openexchange.oxupdater</code><br />
****<code>module</code> – Is true if the OXUpdater package is installed and started. (read only, added 2011-06-01/6.20)<br />
****<code>active</code> – Is true if the user is allowed to download the OXUpdater. Otherwise it's false. (read only, added 2011-06-01/6.20)<br />
***<code>com.openexchange.passwordchange</code><br />
**** <code>showStrength</code> – Show a widget, which displays the current passwort Strength while entering. (default: false)<br />
**** <code>minLength</code> – The minimum length of an entered password. (default: 4)<br />
**** <code>maxLength</code> – The maximum length of an entered password. 0 for unlimited. (default: 0)<br />
**** <code>regexp</code> – Defines the class of allowed special characters as Regular Expression. (default: [^a-z0-9])<br />
**** <code>special</code> – Shows an example of allowed special characters to the user. Should be a subset of "regexp" in a human readable format. (default: $, _, or %) <br />
<br />
=== Get configuration data ===<br />
<br />
GET <code>/ajax/config/path</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: Value of the node specified by path.<br />
<br />
=== Set configuration data ===<br />
<br />
PUT <code>/ajax/config/path</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: The new value of the node specified by path.<br />
<br />
== Module "folders" ==<br />
<br />
The folders module is used to access the OX folder structure.<br />
<br />
=== Special System Folders ===<br />
<br />
Folders with some kind of special.<br />
<br />
{| cellspacing="0" border="1"<br />
! ID !! Type !! Description<br />
|-<br />
| 6 || contacts || System Users<br />
|}<br />
<br />
=== Get root folders ===<br />
<br />
GET <code>/ajax/folders?action=root</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for folders are defined in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Response: An array with data for all folders at the root level of the folder structure. Each array element describes one folder and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="CommonFolderData" cellspacing="0" border="1"<br />
|+ align="bottom" | Common folder data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 1 || id || String || Object ID<br />
|-<br />
| 2 || created_by || String || User ID of the user who created this object.<br />
|-<br />
| 3 || modified_by || String || User ID of the user who last modified this object.<br />
|-<br />
| 4 || creation_date || Time || Date and time of creation.<br />
|-<br />
| 5 || last_modified || Time || Date and time of the last modification.<br />
|-<br />
| 6 || last_modified_utc || Timestamp || Timestamp of the last modification. Note that the type is Timestamp, not Time. See [[#Date and time]] for details. (added 2008-10-17, with SP5, temporary workaround)<br />
|-<br />
| 20 || folder_id || String || Object ID of the parent folder.<br />
|}<br />
<br />
{| id="DetailedFolderData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed folder data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 300 || title || String || Name of this folder.<br />
|-<br />
| 301 || module || String || Name of the module which implements this folder; e.g. "tasks", "calendar", "contacts", "infostore", or "mail"<br />
|-<br />
| 302 || type || Number || Type of folder:<br />
{| cellspacing="0" border="1"<br />
| 1 || private<br />
|-<br />
| 2 || public<br />
|-<br />
| 3 || shared<br />
|-<br />
| 5 || system folder<br />
|-<br />
| 7 || This type is no more in use (legacy type). Will be removed with a future update!<br />
|-<br />
| 16 || trash<br />
|}<br />
|-<br />
| 304 || subfolders || Boolean || true if this folder has subfolders.<br />
|-<br />
| 305 || own_rights || Number or String || Permissions which apply to the current user, as described either in [[#PermissionFlags | Permission flags]] or in RFC 2086.<br />
|-<br />
| 306 || permissions || Array || Each element is an object described in [[#PermissionObject | Permission object]].<br />
|-<br />
| 307 || summary || String || Information about contained objects.<br />
|-<br />
| 308 || standard_folder || Boolean || Indicates whether or not folder is marked as a default folder (only OX folder)<br />
|-<br />
| 309 || total || Number || The number of objects in this Folder.<br />
|-<br />
| 310 || new || Number || The number of new objects in this Folder.<br />
|-<br />
| 311 || unread || Number || The number of unread objects in this Folder.<br />
|-<br />
| 312 || deleted || Number || The number of deleted objects in this Folder.<br />
|-<br />
| 313 || capabilities || Number || Bit mask containing information about mail folder capabilites, as described in [[#Capabilities | capabilities]].<br />
|-<br />
| 314 || subscribed || Boolean || Indicates whether this folder should appear in folder tree or not.<br />
|-<br />
| 315 || subscr_subflds || Boolean || Indicates whether subfolders should appear in folder tree or not.<br />
|-<br />
| 316 || standard_folder_type || Number || Indicates the default folder type. Zero for non-default folder. See [[#DefaultTypes | Standard folder types]]<br />
|-<br />
| 317 || supported_capabilities || Array || Each element is a String identifying a supported folder capability as described in [[#SupportedCapabilities | supported capabilities]]. Only applicable for non-mail folders. Read Only, Since 7.4.0.<br />
|-<br />
| 3010 || com.openexchange.publish.publicationFlag || Boolean || Indicates whether this folder is published. Read Only, provided by the com.openexchange.publish plugin, since 6.14.<br />
|-<br />
| 3020 || com.openexchange.subscribe.subscriptionFlag || Boolean || Indicates whether this folder has subscriptions storing their content in this folder. Read Only, provided by the com.openexchange.subscribe plugin, since 6.14.<br />
|-<br />
| 3030 || com.openexchange.folderstorage.displayName || String || Provides the display of the folder's owner. Read Only, Since 6.20.<br />
|}<br />
<br />
<br />
<br />
<br />
{| id="PermissionFlags" cellspacing="0" border="1"<br />
|+ align="bottom" | Permission flags<br />
! Bits !! Value<br />
|-<br />
| 0-6 || Folder permissions:<br />
{| cellspacing="0" border="1"<br />
| 0 || No permissions.<br />
|-<br />
| 1 || See the folder.<br />
|-<br />
| 2 || Create objects in the folder. '''Note''': '''Does not apply to folders of module ''system'''''.<br />
|-<br />
| 4 || Create subfolders.<br />
|-<br />
| 64 || All permissions. This is currently the same as "Create subfolders" but in the future additional permissions may be added that will be given to the user when using this value.<br />
|}<br />
The values are scalars and not bit sets. Any other than the described values should not be used. If they are used expect an exception from the backend. Every value automatically contains the access rights covered by lower values.<br>'''NOTE''': ''Create objects in the folder'' is not covered by ''Create subfolders'' if folder's module is ''system''.<br />
|-<br />
| 7-13 || Read permissions for objects in the folder:<br />
{| cellspacing="0" border="1"<br />
| 0 || No permissions.<br />
|-<br />
| 1 || Read only own objects.<br />
|-<br />
| 2 || Read all objects.<br />
|-<br />
| 64 || All permissions. This is currently the same as "Read all objects" but in the future additional permissions may be added that will be given to the user when using this value.<br />
|}<br />
The values are scalars and not bit sets. Any other than the described values should not be used. If they are used expect an exception from the backend. Every value automatically contains the access rights covered by lower values.<br />
|-<br />
| 14-20 || Write permissions for objects in the folder:<br />
{| cellspacing="0" border="1"<br />
| 0 || No permissions.<br />
|-<br />
| 1 || Modify only own objects.<br />
|-<br />
| 2 || Modify all objects.<br />
|-<br />
| 64 || All permissions. This is currently the same as "Modify all objects" but in the future additional permissions may be added that will be given to the user when using this value.<br />
|}<br />
The values are scalars and not bit sets. Any other than the described values should not be used. If they are used expect an exception from the backend. Every value automatically contains the access rights covered by lower values.<br />
|-<br />
| 21-27 || Delete permissions for objects in the folder:<br />
{| cellspacing="0" border="1"<br />
| 0 || No permissions.<br />
|-<br />
| 1 || Delete only own objects.<br />
|-<br />
| 2 || Delete all objects.<br />
|-<br />
| 64 || All permissions. This is currently the same as "Delete all objects" but in the future additional permissions may be added that will be given to the user when using this value.<br />
|}<br />
The values are scalars and not bit sets. Any other than the described values should not be used. If they are used expect an exception from the backend. Every value automatically contains the access rights covered by lower values.<br />
|-<br />
| 28 || Admin flag:<br />
{| cellspacing="0" border="1"<br />
| 0 || No permissions.<br />
|-<br />
| 1 || Every operation modifying the folder in some way requires this permission. This are e.g. changing the folder name, modifying the permissions, deleting or moving the folder.<br />
|}<br />
|}<br />
<br />
{| id="PermissionObject" cellspacing="0" border="1"<br />
|+ align="bottom" | Permission object<br />
! Name !! Type !! Value<br />
|-<br />
| bits || Number || For non-mail folders, a number as described in [[#PermissionFlags | Permission flags]].<br />
|-<br />
| rights || String || For mail folders, the rights string as defined in RFC 2086.<br />
|-<br />
| entity || Number || User ID of the user or group to which this permission applies.<br />
|-<br />
| group || Boolean || true if entity refers to a group, false if it refers to a user.<br />
|}<br />
<br />
{| id="Capabilities" cellspacing="0" border="1"<br />
|+ align="bottom" | Capabilities<br />
! Bit !! Description<br />
|-<br />
| 0 || Mailing system supports permissions.<br />
|-<br />
| 1 || Mailing system supports ordering mails by their thread reference.<br />
|-<br />
| 2 || Mailing system supports quota restrictions.<br />
|-<br />
| 3 || Mailing system supports sorting.<br />
|-<br />
| 4 || Mailing system supports folder subscription.<br />
|}<br />
<br />
{| id="DefaultTypes" cellspacing="0" border="1"<br />
|+ align="bottom" | Standard Folder Types<br />
! Bit !! Description<br />
|-<br />
| 0 || No default folder.<br />
|-<br />
| 1 || Task.<br />
|-<br />
| 2 || Calendar.<br />
|-<br />
| 3 || Contact.<br />
|-<br />
| 7 || Inbox.<br />
|-<br />
| 8 || Infostore.<br />
|-<br />
| 9 || Drafts.<br />
|-<br />
| 10 || Sent.<br />
|-<br />
| 11 || Spam.<br />
|-<br />
| 12 || Trash.<br />
|}<br />
<br />
{| id="SupportedCapabilities" cellspacing="0" border="1"<br />
|+ align="bottom" | Supported Capabilities<br />
! Name !! Description<br />
|-<br />
| permissions || Folder storage supports permissions.<br />
|-<br />
| publication || Folder storage supports folder publication.<br />
|-<br />
| quota || Folder storage supports quota restrictions.<br />
|-<br />
| sort || Folder storage supports sorting.<br />
|-<br />
| subscription || Folder storage supports folder subscription.<br />
|}<br />
<br />
=== Get subfolders ===<br />
<br />
GET <code>/ajax/folders?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>parent</code> – Object ID of a folder, which is the parent folder of the requested folders.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for folders are defined in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
* <code>all</code> – Set to <code>1</code> to list even not subscribed folders.<br />
* <code>tree</code> – The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
* <code>errorOnDuplicateName</code> – An optional flag to enable or disable (default) check for duplicate folder names within returned folder response (since v6.20.1). If a duplicate folder name is detected, an appropriate error is returned as [[#ResponseBody | response]].<br />
<br />
Response with timestamp: An array with data for all folders, which have the folder with the requested object ID as parent. Each array element describes one folder and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get path ===<br />
<br />
GET <code>/ajax/folders?action=path</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of a folder.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for folders are defined in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Response with timestamp: An array with data for all parent nodes until root folder. Each array element describes one folder and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get updated folders ===<br />
<br />
GET <code>/ajax/folders?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>parent</code> – Object ID of a folder, which is the parent folder of the requested folders.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested folders.<br />
* <code>ignore</code> (optional) – Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for folders are defined in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Response with timestamp: An array with data for new, modified and deleted folders. New and modified folders are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted folders (should the <code>ignore</code> parameter be ever implemented) would be identified by their object IDs as plain strings, without being part of a nested array.<br />
<br />
=== Get a folder ===<br />
<br />
GET <code>/ajax/folders?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested folder.<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Response with timestamp: An object containing all data of the requested folder. The fields of the object are listed in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]]. The field id is not present. Since OX access controls are folder-based, the folder object also defines the permissions for the objects it contains. The permissions for a given user or group are defined by the object described in [[#PermissionObject | Permission object]]. The format of the actual permissions depends on the type of the folder. The permissions of mail folders are transmitted as a rights string as defined in section 3 of RFC 2086. Permissions of all other folders are transmitted as a single nonnegative integer number. The permissions for any given action on the folder or on contained objects is defined by a group of bits in the binary representation of this number. Each group of bits is interpreted as a separate number. Zero always means "no permissions". Any other values add new permissions and always include the permissions of all lower values. The individual values are described in [[#PermissionFlags | Permission flags]].<br />
<br />
=== Update a folder ===<br />
<br />
PUT <code>/ajax/folders?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated folder.<br />
* <code>timestamp</code> – Timestamp of the updated folder. If the folder was modified after the specified timestamp, then the update must fail.<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Request body: Folder object as described in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]]. Only modified fields are present.<br />
<br />
=== Create a folder ===<br />
<br />
PUT <code>/ajax/folders?action=new</code><br />
<br />
Parameters:<br />
* <code>folder_id</code> – The parent folder of the newly created folder<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Request body: Folder object as described in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]]. The field id should not be present.<br />
<br />
Provided that permission is granted to create a folder, its module is bound to the limitation, that the new folder's module must be equal to parent folder's module except that:<br />
* Parent folder is one of the system folders <code>private</code>, <code>public</code>, or <code>shared</code>. Below these folders task, calendar, and contact modules are permitted.<br />
* Parent folder's module is one of task, calendar, or contact. Below this kind of folders task, calendar, and contact modules are permitted.<br />
<br />
Response: Object ID of the newly created folder.<br />
<br />
=== Delete folders ===<br />
<br />
PUT <code>/ajax/folders?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted folders.<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered. <br />
* <code>hardDelete</code> - Optional, defaults to \"false\". If set to \"true\", the folders are deleted permanently. Otherwise, and if the underlying storage supports a trash folder and the folders are not yet located below the trash folder, they are moved to the trash folder.<br />
<br />
Request body: An array with object IDs of the folders that shall be deleted.<br />
<br />
Response: An array with object IDs of folders that were '''NOT''' deleted. There may be a lot of different causes for a not deleted folder: A folder has been modified in the mean time, the user does not have the permission to delete it or those permissions have just been removed, the folder does not exist, etc.<br />
<br />
=== Clearing a folder's content ===<br />
PUT <code>/ajax/folders?action=clear</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>tree</code> – (Preliminary) The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>allowed_modules</code> – (Preliminary) An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.<br />
<br />
Request body: A JSON array containing the folder ID(s) whose content should be cleared. '''NOTE:''' Although the requests offers to clear multiple folders at once it is recommended to clear only one folder per request since if any exception occurs<br />
(e.g. missing permissions) the complete request is going to be aborted.<br />
<br />
Response: A JSON array containing the IDs of folders that could not be cleared due to a concurrent modification. Meaning you receive an empty JSON array if everything worked well.<br />
<br />
=== Get all visible folder of a certain module (since v6.18.2) ===<br />
PUT <code>/ajax/folders?action=allVisible</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>tree</code> – The identifier of the folder tree. If missing '0' (primary folder tree) is assumed.<br />
* <code>content_type</code> – The desired content type (either numbers or strings; e.g. "tasks", "calendar", "contacts", "mail")<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for folders are defined in [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
<br />
Request body: None<br />
<br />
Response with timestamp: A JSON object containing three fields: "private", "public, and "shared". Each field is a JSON array with data for all folders. Each folder is itself described by an array.<br />
<br />
== Module "tasks" ==<br />
<br />
The tasks module is used to access task information.<br />
<br />
=== Get all tasks ===<br />
<br />
GET <code>/ajax/tasks?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for tasks are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Response with timestamp: An array with task data. Each array element describes one task and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="DetailedTaskAndAppointmentData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed task and appointment data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 200 || title || String || Short description.<br />
|-<br />
| 201 || start_date || Date or Time || Inclusive start of the event as Date for tasks and whole day appointments and Time for normal appointments. For sequencies, this date must be part of the sequence, i. e. sequencies always start at this date. (deprecated for tasks since v7.6.1, replaced by start_time and full_time)<br />
|-<br />
| 202 || end_date || Date or Time || Exclusive end of the event as Date for tasks and whole day appointments and as Time for normal appointments. (deprecated for tasks since v7.6.1, replaced by end_time and full_time)<br />
|-<br />
| 203 || note || String || Long description.<br />
|-<br />
| 204 || alarm || Number or Time || Specifies when to notify the participants as the number of minutes before the start of the appointment (-1 for "no alarm"). For tasks, the Time value specifies the absolute time when the user should be notified.<br />
|-<br />
| 209 || recurrence_type || Number || Specifies the type of the recurrence for a task sequence:<br />
{| cellspacing="0" border="1"<br />
| 0 || none (single event)<br />
|-<br />
| 1 || daily<br />
|-<br />
| 2 || weekly<br />
|-<br />
| 3 || monthly<br />
|-<br />
| 4 || yearly<br />
|}<br />
|-<br />
| 212 || days || Number || Specifies which days of the week are part of a sequence. The value is a bitfield with bit 0 indicating sunday, bit 1 indicating monday and so on. May be present if recurrence_type > 1. If allowed but not present, the value defaults to 127 (all 7 days).<br />
|-<br />
| 213 || day_in_month || Number || Specifies which day of a month is part of the sequence. Counting starts with 1. If the field "days" is also present, only days selected by that field are counted. If the number is bigger than the number of available days, the last available day is selected. Present if and only if recurrence_type > 2.<br />
|-<br />
| 214 || month || Number || Month of the year in yearly sequencies. 0 represents January, 1 represents February and so on. Present if and only if recurrence_type = 4.<br />
|-<br />
| 215 || interval || Number || Specifies an integer multiplier to the interval specified by recurrence_type. Present if and only if recurrence_type > 0. Must be 1 if recurrence_type = 4.<br />
|-<br />
| 216 || until || Date || Inclusive end date of a sequence. May be present only if recurrence_type > 0. The sequence has no end date if recurrence_type > 0 and this field is not present. Note: since this is a Date, the entire day after the midnight specified by the value is included.<br />
|-<br />
| 217 || notification || Boolean || If true, all participants are notified of any changes to this object. This flag is valid for the current change only, i. e. it is not stored in the database and is never sent by the server to the client.<br />
|-<br />
| 220 || participants || Array || Each element identifies a participant, user, group or booked resource as described in [[#Participant | participant table]].<br />
|-<br />
| 221 || users || Array || Each element represents a participant as described in [[#UserParticipantObject | User participant object]]. User groups are resolved and are represented by their members. Any user can occur only once.<br />
|-<br />
| 222 || occurrences || Number || Specifies how often a recurrence should appear. May be present only if recurrence_type > 0.<br />
|-<br />
| 223 || uid || String || Can only be written when the object is created. Internal and external globally unique identifier of the appointment or task. Is used to recognize appointments within iCal files. If this attribute is not written it contains an automatic generated UUID.<br />
|-<br />
| 224 || organizer || String || Contains the email address of the appointment organizer which is not necessarily an internal user. Not implemented for tasks.<br />
|-<br />
| 225 || sequence || Number || iCal sequence number. Not implemented for tasks. Must be incremented on update. Will be incremented by the server, if not set.<br />
|-<br />
| 226 || confirmations || Array || Each element represents a confirming participant as described in [[#ConfirmingParticipant | confirming participant]]. This can be internal and external user. Not implemented for tasks.<br />
|-<br />
| 227 || organizerId || Number || Contains the userIId of the appointment organizer if it is an internal user. Not implemented for tasks. (Introduced with 6.20.1)<br />
|-<br />
| 228 || principal || String || Contains the email address of the appointment principal which is not necessarily an internal user. Not implemented for tasks. (Introduced with 6.20.1)<br />
|-<br />
| 229 || principalId || Number || Contains the userIId of the appointment principal if it is an internal user. Not implemented for tasks. (Introduced with 6.20.1)<br />
|-<br />
| 401 || full_time || Boolean || True if the event is a whole day appointment or task, false otherwise.<br />
|}<br />
<br />
{| id="Participant" cellspacing="0" border="1"<br />
|+ align="bottom" | Participant identifier<br />
! Name !! Type !! Value<br />
|-<br />
| id || Number || User ID<br />
|-<br />
| type || Number || Type of participant:<br />
{|<br />
| 1 || user<br />
|-<br />
| 2 || user group<br />
|-<br />
| 3 || resource<br />
|-<br />
| 4 || resource group<br />
|-<br />
| 5 || external user<br />
|}<br />
|-<br />
| mail || String || mail address of an external participant<br />
|}<br />
<br />
{| id="UserParticipantObject" cellspacing="0" border="1"<br />
|+ align="bottom" | User participant object<br />
! Name !! Type !! Value<br />
|-<br />
| id || Number || User ID. Confirming for other users only works for appointments and not for tasks.<br />
|-<br />
| display_name || String || Displayable name of the participant.<br />
|-<br />
| confirmation || Number ||<br />
{| cellspacing="0" border="1"<br />
| 0 || none<br />
|-<br />
| 1 || accepted<br />
|-<br />
| 2 || declined<br />
|-<br />
| 3 || tentative<br />
|}<br />
|-<br />
| confirmmessage || String || Confirm Message of the participant<br />
|}<br />
<br />
{| id="ConfirmingParticipant" cellspacing="0" border="1"<br />
|+ align="bottom" | Confirming participant<br />
! Name !! Type !! Value<br />
|-<br />
| type || Number || Type of participant:<br />
{|<br />
| 1 || user<br />
|-<br />
| 5 || external user<br />
|}<br />
|-<br />
| mail || String || email address of external participant<br />
|-<br />
| display_name || String || display name of external participant<br />
|-<br />
| status || Number ||<br />
{|<br />
| 0 || none<br />
|-<br />
| 1 || accepted<br />
|-<br />
| 2 || declined<br />
|-<br />
| 3 || tentative<br />
|}<br />
|-<br />
| message || String || Confirm Message of the participant<br />
|}<br />
<br />
{| id="DetailedTaskData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed task data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 300 || status || Number || Status of the task:<br />
{| cellspacing="0" border="1"<br />
| 1 || not started<br />
|-<br />
| 2 || in progress<br />
|-<br />
| 3 || done<br />
|-<br />
| 4 || waiting<br />
|-<br />
| 5 || deferred<br />
|}<br />
|-<br />
| 301 || percent_completed || Number || How much of the task is completed. An integer number between 0 and 100.<br />
|-<br />
| 302 || actual_costs|| Number || A monetary attribute to store actual costs of a task. Allowed values must be in the range -9999999999.99 and 9999999999.99.<br />
|-<br />
| 303 || actual_duration<br />
|-<br />
| 304 || after_complete || Date || Deprecated. Only present in AJAX interface. Value will not be stored on OX server.<br />
|-<br />
| 305 || billing_information<br />
|-<br />
| 307 || target_costs|| Number || A monetary attribute to store target costs of a task. Allowed values must be in the range -9999999999.99 and 9999999999.99.<br />
|-<br />
| 308 || target_duration<br />
|-<br />
| 309 || priority || Number || 1 = LOW, 2 = MEDIUM, 3 = HIGH<br />
|-<br />
| 312 || currency<br />
|-<br />
| 313 || trip_meter<br />
|-<br />
| 314 || companies<br />
|-<br />
| 315 || date_completed<br />
|-<br />
| 201 || start_time || Date or Time || Inclusive start as Date for whole day tasks and Time for normal tasks. <br />
|-<br />
| 202 || end_time || Date or Time || Exclusive end as Date for whole day tasks and as Time for normal tasks.<br />
|}<br />
<br />
=== Get a list of tasks ===<br />
<br />
PUT <code>/ajax/tasks?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for tasks are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]].<br />
<br />
Request body: An array of with object IDs of requested tasks.<br />
<br />
Response with timestamp: An array with task data. Each array element describes one task and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get updated tasks ===<br />
<br />
GET <code>/ajax/tasks?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for tasks are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested tasks.<br />
* <code>ignore</code> – Which kinds of updates should be ignored. Omit this parameter or set it to "deleted" to not have deleted tasks identifier in the response. Set this parameter to "false" and the response contains deleted tasks identifier.<br />
<br />
Response with timestamp: An array with new, modified and deleted tasks. New and modified tasks are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted tasks would be identified by their object IDs as plain strings, without being part of a nested array.<br />
<br />
=== Get a task ===<br />
<br />
GET <code>/ajax/tasks?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested task.<br />
* <code>folder</code> – Object ID of the task's folder.<br />
<br />
Response with timestamp: An object containing all data of the requested task. The fields of the object are listed in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]]. The field id is not included.<br />
<br />
=== Update a task ===<br />
<br />
PUT <code>/ajax/tasks?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Folder Identifier through that the task is accessed. This is necessary for checking the permissions.<br />
* <code>id</code> – Object ID of the updated task.<br />
* <code>timestamp</code> – Timestamp of the updated task. If the task was modified after the specified timestamp, then the update must fail.<br />
<br />
Request body: Task object as described in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]]. Only modified fields are present.<br />
<br />
=== Create a task ===<br />
<br />
PUT <code>/ajax/tasks?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Task object as described in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]]. The field id is not present.<br />
<br />
Response: A json objekt with attribute <code>id</code> of the newly created task.<br />
<br />
=== Delete task ===<br />
<br />
PUT <code>/ajax/tasks?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted tasks.<br />
<br />
Request body: An object in the field “id” and “folder”.<br />
<br />
Response: An array with object IDs of tasks which were modified after the specified timestamp and were therefore not deleted.<br />
<br />
=== Delete tasks (since v6.22) ===<br />
<br />
PUT <code>/ajax/tasks?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted tasks.<br />
<br />
Request body: An array of objects with the fields “id” and “folder”.<br />
<br />
Response: An array with object IDs of tasks which were modified after the specified timestamp and were therefore not deleted.<br />
<br />
=== Confirm task ===<br />
<br />
PUT <code>/ajax/tasks?action=confirm</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the to confirm task.<br />
* <code>folder</code> – ID of the folder through that the task is accessed.<br />
* <code>timestamp</code> – Timestamp of the last update of the to confirm task.<br />
<br />
Request body: An object with the fields "confirmation" and "confirmmessage" as described in [[#UserParticipantObject | User participant object]].<br />
<br />
Response: Nothing, except the standard response object with empty data, the timestamp of the confirmed and thereby updated task, and maybe errors.<br />
<br />
=== Search for tasks ===<br />
<br />
PUT <code>/ajax/tasks?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified , then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Request Body: A JSON object with attributes described in [[#SearchTasks | Search tasks]]<br />
<br />
{| id="SearchTasks" cellspacing="0" border="1"<br />
|+ align="bottom" | Search tasks<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find tasks. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves.<br />
|-<br />
| folder || Number || (optional) Defines the folder to search for tasks in. If this is omitted in all task folders will be searched.<br />
|-<br />
| start || Date or Time || (optional) Inclusive start date for a time range the tasks should end in. If start is omitted end is ignored.<br />
|-<br />
| end || Date or Time || (optional) Exclusive end date for a time range the tasks should end in. If this parameter is omitted the time range has an open end.<br />
|}<br />
<br />
Response with timestamp: An array with matching tasks. Tasks are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
== Module "contacts" ==<br />
<br />
The contacts module is used to access contact information.<br />
<br />
=== Get all contacts ===<br />
<br />
GET <code>/ajax/contacts?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried (optional from 6.22.2 on: If not set, the contents of all visible folders are used instead).<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for contacts are defined in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>collation</code> (preliminary, since 6.20) – allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="DetailedContactData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed contact data<br />
! ID !! Displayed name !! Name !! Type !! Value<br />
|-<br />
| 223 || || uid || String || Can only be written when the object is created. Internal and external globally unique identifier of the contact. Is used to recognize contacts within vCard files. If this attribute is not written it contains an automatic generated UUID.<br />
|-<br />
| 500 || Display name || display_name || String<br />
|-<br />
| 501 || Given name || first_name || String || First name.<br />
|-<br />
| 502 || Sur name || last_name || String || Last name.<br />
|-<br />
| 503 || Middle name || second_name || String<br />
|-<br />
| 504 || Suffix || suffix || String<br />
|-<br />
| 505 || Title || title || String<br />
|-<br />
| 506 || Street home || street_home || String<br />
|-<br />
| 507 || Postal code home || postal_code_home || String<br />
|-<br />
| 508 || City home || city_home || String<br />
|-<br />
| 509 || State home || state_home || String<br />
|-<br />
| 510 || Country home || country_home || String<br />
|-<br />
| 511 || Birthday || birthday || Date<br />
|-<br />
| 512 || Martial status || marital_status || String<br />
|-<br />
| 513 || Number of children || number_of_children || String<br />
|-<br />
| 514 || Profession || profession || String<br />
|-<br />
| 515 || Nickname || nickname || String<br />
|-<br />
| 516 || Spouse name || spouse_name || String<br />
|-<br />
| 517 || Anniversay || anniversary || Date<br />
|-<br />
| 518 || Note || note || String<br />
|-<br />
| 519 || Department || department || String<br />
|-<br />
| 520 || Position || position || String<br />
|-<br />
| 521 || Employee type || employee_type || String<br />
|-<br />
| 522 || Room number || room_number || String<br />
|-<br />
| 523 || Street business || street_business || String<br />
|-<br />
| 524 || || internal_userid || Number<br />
|-<br />
| 525 || Postal code business || postal_code_business || String<br />
|-<br />
| 526 || City business || city_business || String<br />
|-<br />
| 527 || State business || state_business || String<br />
|-<br />
| 528 || Country business || country_business || String<br />
|-<br />
| 529 || Number of employee || number_of_employees || String<br />
|-<br />
| 530 || Sales volume || sales_volume || String<br />
|-<br />
| 531 || Tax id || tax_id || String<br />
|-<br />
| 532 || Commercial register || commercial_register || String<br />
|-<br />
| 533 || Branches || branches || String<br />
|-<br />
| 534 || Business category || business_category || String<br />
|-<br />
| 535 || Info || info || String<br />
|-<br />
| 536 || Manager's name || manager_name || String<br />
|-<br />
| 537 || Assistant's name || assistant_name || String<br />
|-<br />
| 538 || Street other || street_other || String<br />
|-<br />
| 539 || City other || city_other || String<br />
|-<br />
| 540 || Postal code other || postal_code_other || String<br />
|-<br />
| 541 || Country other || country_other || String<br />
|-<br />
| 542 || Telephone business 1 || telephone_business1 || String<br />
|-<br />
| 543 || Telephone business 2 || telephone_business2 || String<br />
|-<br />
| 544 || FAX business || fax_business || String<br />
|-<br />
| 545 || Telephone callback || telephone_callback || String<br />
|-<br />
| 546 || Telephone car || telephone_car || String<br />
|-<br />
| 547 || Telephone company || telephone_company || String<br />
|-<br />
| 548 || Telephone home 1 || telephone_home1 || String<br />
|-<br />
| 549 || Telephone home 2 || telephone_home2 || String<br />
|-<br />
| 550 || FAX home || fax_home || String<br />
|-<br />
| 551 || Cellular telephone 1 || cellular_telephone1 || String<br />
|-<br />
| 552 || Cellular telephone 2 || cellular_telephone2 || String<br />
|-<br />
| 553 || Telephone other || telephone_other || String<br />
|-<br />
| 554 || FAX other || fax_other || String<br />
|-<br />
| 555 || Email 1 || email1 || String<br />
|-<br />
| 556 || Email 2 || email2 || String<br />
|-<br />
| 557 || Email 3 || email3 || String<br />
|-<br />
| 558 || URL || url || String<br />
|-<br />
| 559 || Telephone ISDN || telephone_isdn || String<br />
|-<br />
| 560 || Telephone pager || telephone_pager || String<br />
|-<br />
| 561 || Telephone primary || telephone_primary || String<br />
|-<br />
| 562 || Telephone radio || telephone_radio || String<br />
|-<br />
| 563 || Telephone telex || telephone_telex || String<br />
|-<br />
| 564 || Telephone TTY/TDD || telephone_ttytdd || String<br />
|-<br />
| 565 || Instantmessenger 1 || instant_messenger1 || String<br />
|-<br />
| 566 || Instantmessenger 2 || instant_messenger2 || String<br />
|-<br />
| 567 || Telephone IP || telephone_ip || String<br />
|-<br />
| 568 || Telephone assostant || telephone_assistant || String<br />
|-<br />
| 569 || Company || company || String<br />
|-<br />
| 570 || || image1 || String<br />
|-<br />
| 571 || Dynamic Field 1 || userfield01 || String<br />
|-<br />
| 572 || Dynamic Field 2 || userfield02 || String<br />
|-<br />
| 573 || Dynamic Field 3 || userfield03 || String<br />
|-<br />
| 574 || Dynamic Field 4 || userfield04 || String<br />
|-<br />
| 575 || Dynamic Field 5 || userfield05 || String<br />
|-<br />
| 576 || Dynamic Field 6 || userfield06 || String<br />
|-<br />
| 577 || Dynamic Field 7 || userfield07 || String<br />
|-<br />
| 578 || Dynamic Field 8 || userfield08 || String<br />
|-<br />
| 579 || Dynamic Field 9 || userfield09 || String<br />
|-<br />
| 580 || Dynamic Field 10 || userfield10 || String<br />
|-<br />
| 581 || Dynamic Field 11 || userfield11 || String<br />
|-<br />
| 582 || Dynamic Field 12 || userfield12 || String<br />
|-<br />
| 583 || Dynamic Field 13 || userfield13 || String<br />
|-<br />
| 584 || Dynamic Field 14 || userfield14 || String<br />
|-<br />
| 585 || Dynamic Field 15 || userfield15 || String<br />
|-<br />
| 586 || Dynamic Field 16 || userfield16 || String<br />
|-<br />
| 587 || Dynamic Field 17 || userfield17 || String<br />
|-<br />
| 588 || Dynamic Field 18 || userfield18 || String<br />
|-<br />
| 589 || Dynamic Field 19 || userfield19 || String<br />
|-<br />
| 590 || Dynamic Field 20 || userfield20 || String || Contains a UUID if one was assigned (after 6.18.2)<br />
|-<br />
| 592 || || distribution_list || Array || If this contact is a distribution list, then this field is an array of objects. Each object describes a member of the list as defined in [[#DistributionListMember | Distribution list member]].<br />
|-<br />
| 594 || Number of distributionlists || number_of_distribution_list || Number<br />
|-<br />
| 596 || || number_of_images || Number<br />
|-<br />
| 597 || || image_last_modified || Timestamp<br />
|-<br />
| 598 || State other || state_other || String<br />
|-<br />
| 599 || || file_as || String<br />
|-<br />
| 601 || || image1_content_type || String<br />
|-<br />
| 602 || || mark_as_distributionlist || Boolean<br />
|-<br />
| 605 || Default address || default_address || Number<br />
|-<br />
| 606 || || image1_url || String<br />
|-<br />
| 608 || || useCount || Number || In case of sorting purposes the column 609 is also available, which places global address book contacts at the beginning of the result. If 609 is used, the order direction (ASC, DESC) is ignored.<br />
|-<br />
| 610 || || yomiFirstName || String || Kana based representation for the First Name. Commonly used in japanese environments for searchin/sorting issues. (since 6.20)<br />
|-<br />
| 611 || || yomiLastName || String || Kana based representation for the Last Name. Commonly used in japanese environments for searchin/sorting issues. (since 6.20)<br />
|-<br />
| 612 || || yomiCompany || String || Kana based representation for the Company. Commonly used in japanese environments for searchin/sorting issues. (since 6.20)<br />
|-<br />
| 613 || || addressHome || String || Support for Outlook 'home' address field. (since 6.20.1)<br />
|-<br />
| 614 || || addressBusiness || String || Support for Outlook 'business' address field. (since 6.20.1)<br />
|-<br />
| 615 || || addressOther || String || Support for Outlook 'other' address field. (since 6.20.1)<br />
|}<br />
<br />
<br />
{| id="DistributionListMember" cellspacing="0" border="1"<br />
|+ align="bottom" | Distribution list member<br />
! Name !! Type !! Value<br />
|-<br />
| id || String || Object ID of the member's contact if the member is an existing contact.<br />
|-<br />
| folder_id || String || Parent folder ID of the member's contact if the member is an existing contact (preliminary, from 6.22 on).<br />
|-<br />
| display_name || String || Display name<br />
|-<br />
| mail || String || Email address (mandatory before 6.22, afterwards optional if you are referring to an internal contact)<br />
|-<br />
| mail_field || Number || Which email field of an existing contact (if any) is used for the mail field.<br />
{| cellspacing="0" border="1"<br />
| 0 || independent contact<br />
|-<br />
| 1 || default email field (email1)<br />
|-<br />
| 2 || second email field (email2)<br />
|-<br />
| 3 || third email field (email3)<br />
|}<br />
|}<br />
<br />
=== Get a list of contacts ===<br />
<br />
PUT <code>/ajax/contacts?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for contacts are defined in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]].<br />
<br />
Request body: An array with objects. Each object contains fields “id” and “folder” of requested contacts.<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get a list of users ===<br />
<br />
PUT <code>/ajax/contacts?action=listuser</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for contacts are defined in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]].<br />
<br />
Request body: An array with id<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
Available with SP4<br />
<br />
=== Get updated contacts ===<br />
<br />
GET <code>/ajax/contacts?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for contacts are defined in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested contacts.<br />
* <code>ignore</code> (mandatory - should be set to "deleted") (deprecated) – Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.<br />
<br />
Response with timestamp: An array with new, modified and deleted contacts. New and modified contacts are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted contacts (should the <code>ignore</code> parameter be ever implemented) would be identified by their object IDs as plain strings, without being part of a nested array.<br />
<br />
=== Get a contact ===<br />
<br />
GET <code>/ajax/contacts?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested contact.<br />
* <code>folder</code> – Object ID of the contact's folder.<br />
<br />
Response with timestamp: An object containing all data of the requested contact. The fields of the object are listed in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]]. The field id is not included.<br />
<br />
=== Get contact by user ID ===<br />
<br />
GET <code>/ajax/contacts?action=getuser</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – User ID (not Object ID) of the requested user.<br />
<br />
Response with timestamp: An object containing all data of the requested contact. The fields of the object are listed in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]]. <br />
<br />
Available with SP4 package.<br />
<br />
=== Update a contact ===<br />
<br />
PUT <code>/ajax/contacts?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Folder identifier through that the contact is accessed. This is necessary for checking the permissions.<br />
* <code>id</code> – Object ID of the updated contact.<br />
* <code>timestamp</code> – Timestamp of the updated contact. If the contact was modified after the specified timestamp, then the update must fail.<br />
<br />
Request body: Contact object as described in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]]. Only modified fields are present.<br />
<br />
To remove some contact image send the image attribute set to <code>null</code>.<br />
<br />
To change or add some contact image the PUT command must be replaced with a POST command and all data must be provided within a <code>multipart/form-data</code> body. The normal request body must be placed into a form field named <code>json</code> while the image file must be placed in a file field named <code>file</code>. The response is then an HTML page as described in section [[#File_uploads | File uploads]].<br />
<br />
=== Create a contact ===<br />
<br />
PUT <code>/ajax/contacts?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Contact object as described in [[#CommonObjectData | Common object data]] and [[#DetailedContactData | Detailed contact data]]. The field id is not included.<br />
<br />
Response: A json objekt with attribute <code>id</code> of the newly created contact.<br />
<br />
To add some contact image the PUT command must be replaced with a POST command and all data must be provided within a <code>multipart/form-data</code> body. The normal request body must be placed into a form field named <code>json</code> while the image file must be placed in a file field named <code>file</code>. The response is then an HTML page as described in section [[#File uploads | File uploads]].<br />
<br />
=== Delete a contact ===<br />
<br />
PUT <code>/ajax/contacts?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted contacts.<br />
<br />
Request body: An object with the fields “id” and “folder”.<br />
<br />
=== Delete contacts (since v6.22)===<br />
<br />
PUT <code>/ajax/contacts?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted contacts.<br />
<br />
Request body: An array of objects with the fields “id” and “folder”.<br />
<br />
=== Search contacts ===<br />
<br />
PUT <code>/ajax/contacts?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified. In case of use of column 609 (use count depending order for collected contacts with global address book) the parameter "order" ist NOT necessary and will be ignored.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>collation</code> (preliminary, since 6.20) – allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
<br />
Request body: An Object as described in [[#SearchContacts | Search contacts]].<br />
<br />
{| id="SearchContacts" cellspacing="0" border="1"<br />
|+ align="bottom" | Search contacts<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find contacts. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves. Matching is performed against any substring of the field <code>display_name</code>.<br />
|-<br />
| startletter || String || Search contacts with the given startletter. If this field is present, the pattern is matched against the contact field which is specified by the property contact_first_letter_field on the server (default: last name). Otherwise, the pattern is matched against the display name.<br />
|-<br />
| folder || Array of Number || If a list of folder identifiers or at least a single folder identifier is given, only in that folders will be searched for contacts. This paramenter is optional but searching in all contact folders that are viewable and where objects can be read in is more expensive on that database than searching in a dedicated number of them. The possibility to provide here an array of folder identifier has been added with 6.10.<br />
|}<br />
<br />
Alternative request body: An Object as described in [[#SearchContactsAlternative | Search contacts alternative]].<br />
<br />
{| id="SearchContactsAlternative" cellspacing="0" border="1"<br />
|+ align="bottom" | Search contacts alternative<br />
! Name !! Type !! Value<br />
|-<br />
| last_name || String || Searches contacts where the last name match with the given last name.<br />
|-<br />
| first_name || String || Searches contacts where the first name match with the given first name.<br />
|-<br />
| display_name || String || Searches contacts where the display name match with the given display name.<br />
|-<br />
| email1 || String || Searches contacts where the email1 address match with the given search pattern. (requires version >= 6.12)<br />
|-<br />
| email2 || String || Searches contacts where the email2 address match with the given search pattern. (requires version >= 6.12)<br />
|-<br />
| email3 || String || Searches contacts where the email3 address match with the given search pattern. (requires version >= 6.12)<br />
|-<br />
| company || String || Searches contacts where the company match with the given search pattern. (requires version >= 6.12)<br />
|-<br />
| categories || String || Searches contacts where the categories match with the given search pattern. <br />
|-<br />
| orSearch || Boolean || If set to true, a contact is returned if any specified pattern matches at the start of the corresponding field. Otherwise, a contact is returned if all specified patterns match any substring of the corresponding field.<br />
|-<br />
| emailAutoComplete || Boolean || If set to true, results are guaranteed to contain at least one email adress and the search is performed as if orSearch were set to true. The actual value of orSearch is ignored.<br />
|-<br />
| exactMatch || Boolean || If set to true, contacts are returned where the specified patterns match the corresponding fields exactly. Otherwise, a 'startsWith' or 'substring' comparison is used based on the 'orSearch' parameter. (requires version > 6.22.1)<br />
|}<br />
<br />
Response: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Search contacts by filter (since 6.20) ===<br />
<br />
PUT <code>/ajax/contacts?action=advancedSearch</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified. <br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>collation</code> (preliminary, since 6.20) – allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
<br />
Request body: An Object as described in [[#Module_.22search.22_.28alternative_suggestion.2C_still_preliminary.29 | Search Filter]]<br />
<br />
Response: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Search contacts by anniversary (Since 6.22.1, Preliminary) ===<br />
<br />
Find contacts whose anniversary falls into a timerange.<br />
<br />
GET <code>/ajax/contacts?action=anniversaries</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>start</code> – The lower (inclusive) limit of the requested time-range.<br />
* <code>end</code> – The upper (exclusive) limit of the requested time-range.<br />
* <code>columns</code> – The requested fields.<br />
* <code>folder</code> (optional) – Object ID of the parent folder that is searched. If not set, all visible folders are used.<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If not specified, the results are sorted ascending by their anniversary in the supplied timerange. If this parameter is specified, then the parameter order must be also specified. <br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>collation</code> (optional) – Allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Search contacts by birthday (Since 6.22.1, Preliminary) ===<br />
<br />
Find contacts whose birthday falls into a timerange.<br />
<br />
GET <code>/ajax/contacts?action=birthdays</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>start</code> – The lower (inclusive) limit of the requested time-range.<br />
* <code>end</code> – The upper (exclusive) limit of the requested time-range.<br />
* <code>columns</code> – The requested fields.<br />
* <code>folder</code> (optional) – Object ID of the parent folder that is searched. If not set, all visible folders are used.<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If not specified, the results are sorted ascending by their birthday in the supplied timerange. If this parameter is specified, then the parameter order must be also specified. <br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>collation</code> (optional) – Allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Auto-complete contacts (Since 7.6.1, Preliminary) ===<br />
<br />
Find contacts based on a prefix, usually used to auto-complete e-mail recipients while the user is typing.<br />
<br />
GET <code>/ajax/contacts?action=autocomplete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>query</code> – The query to search for.<br />
* <code>folder</code> (optional) – Object ID of the parent folder that is searched. If not set, all visible folders are used.<br />
* <code>email</code> (optional) – Whether to only include contacts with at least one e-mail address. Defaults to "true".<br />
* <code>columns</code> – The requested fields.<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is <br />
* <code>collation</code> (optional) – Allows you to specify a collation to sort the contacts by. As of 6.20, only supports "gbk" and "gb2312", not needed for other languages. Parameter <code>sort</code> should be set for this to work.<br />
* <code>left_hand_limit</code> (optional) – A positive integer number to specify the "left-hand" limit of the range to return.<br />
* <code>right_hand_limit</code> (optional) – A positive integer number to specify the "right-hand" limit of the range to return.<br />
<br />
Response with timestamp: An array with contact data. Each array element describes one contact and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
== Module "calendar" ==<br />
<br />
The calendar module is used to access calendar data.<br />
<br />
=== Get all appointments ===<br />
<br />
GET <code>/ajax/calendar?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> (optional) – Object ID of the folder, whose contents are queried. If not specified, defaults to all calendar folders.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]].<br />
* <code>start</code> – Lower inclusive limit of the queried range as a Date. Only appointments which start on or after this date are returned.<br />
* <code>end</code> – Upper exclusive limit of the queried range as a Date. Only appointments which end before this date are returned.<br />
* <code>recurrence_master</code> – Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.<br />
* <code>showPrivate</code> (optional) – only works in shared folders: When enabled, shows private appointments of the folder owner. Such appointments are anonymized by stripping away all information except start date, end date and recurrence information (since 6.18)<br />
<br />
Response with timestamp: An array with appointment data. Each array element describes one appointment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Appointment sequencies are broken up into individual appointments and each occurrence of a sequence in the requested range is returned separately. The appointments are sorted in ascending order by the field start_date.<br />
<br />
{| id="DetailedAppointmentData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed appointment data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 206 || recurrence_id || Number || Object ID of the entire appointment sequence. Present on series and change exception appointments. Equals to object identifier on series appointment and is different to object identifier on change exceptions.<br />
|-<br />
| 207 || recurrence_position || Number || 1-based position of an individual appointment in a sequence. Present if and only if recurrence_type > 0.<br />
|-<br />
| 208 || recurrence_date_position || Date || Date of an individual appointment in a sequence. Present if and only if recurrence_type > 0.<br />
|-<br />
| 210 || change_exceptions || Array || An array of Dates, representing all change exceptions of a sequence.<br />
|-<br />
| 211 || delete_exceptions || Array || An array of Dates, representing all delete exceptions of a sequence.<br />
|-<br />
| 400 || location || String || Location<br />
|-<br />
| 402 || shown_as || Number || Describes, how this appointment appears in availability queries:<br />
{| cellspacing="0" border="1"<br />
| 1 || reserved<br />
|-<br />
| 2 || temporary<br />
|-<br />
| 3 || absent<br />
|-<br />
| 4 || free<br />
|}<br />
|-<br />
| 408 || timezone || String || Timezone<br />
|-<br />
| 410 || recurrence_start || Date || Start of a sequence without time<br />
|-<br />
| || ignore_conflicts || Boolean || Ignore soft conflicts for the new or modified appointment. This flag is valid for the current change only, i. e. it is not stored in the database and is never sent by the server to the client. <br />
|}<br />
<br />
=== Get appointment information ===<br />
<br />
GET <code>/ajax/calendar?action=has</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>start</code> – Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.<br />
* <code>end</code> – Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.<br />
<br />
Response is an array of booleans. Array length is the number of days. Each entry in the array corresponds with one day in the range that was queried, explaining whether there is an appointment on this day or not.<br />
<br />
=== Get a list of appointments ===<br />
<br />
PUT <code>/ajax/calendar?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]].<br />
* <code>recurrence_master</code> – Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.<br />
<br />
Request body: An array with full object IDs (folder, id and optionally either recurrence_position or recurrence_date_position) of requested appointments.<br />
<br />
Response with timestamp: An array with appointment data. Each array element describes one appointment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="FullIdentifierForAnAppointment" cellspacing="0" border="1"<br />
|+ align="bottom" | Full identifier for an appointment<br />
! Name !! Type !! Value<br />
|-<br />
| id || String || Object ID<br />
|-<br />
| pos || Number || Value of the field recurrence_position, if present in the appointment.<br />
|}<br />
<br />
=== Get updated appointments ===<br />
<br />
GET <code>/ajax/calendar?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]].<br />
* <code>timestamp</code> – Timestamp of the last update of the requested appointments.<br />
* <code>start</code> (optional) – Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.<br />
* <code>end</code> (optional) – Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.<br />
* <code>ignore</code> (mandatory - should be set to "deleted") (deprecated) – Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.<br />
* <code>recurrence_master</code> – Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.<br />
* <code>showPrivate</code> (optional) – only works in shared folders: When enabled, shows private appointments of the folder owner. Such appointments are anonymized by stripping away all information except start date, end date and recurrence information (since 6.18)<br />
<br />
Response with timestamp: An array with new, modified and deleted appointments. New and modified appointments are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted appointments (should the <code>ignore</code> parameter be ever implemented) would be identified by objects described in [[#FullIdentifierForAnAppointment | Full identifier for an appointment]] instead of arrays. Appointment sequencies are broken up into individual appointments and each modified occurrence of a sequence in the requested range is returned separately. The appointments are sorted in ascending order by the field start_date.<br />
<br />
=== Get an appointment ===<br />
<br />
GET <code>/ajax/calendar?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested appointment.<br />
* <code>folder</code> – Folder ID of the requested appointment.<br />
* <code>recurrence_position</code> (optional) – Recurrence Position requested appointment.<br />
<br />
Response with timestamp: An object containing all data of the requested appointment. The fields of the object are listed in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]]. The field id is not included.<br />
<br />
=== Update an appointment ===<br />
<br />
PUT <code>/ajax/calendar?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated appointment.<br />
* <code>folder</code> - Object ID of the appointment's folder.<br />
* <code>timestamp</code> – Timestamp of the updated appointment. If the appointment was modified after the specified timestamp, then the update must fail.<br />
<br />
Request body: Appointment object as described in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]]. The field recurrence_id is always present if it is present in the original appointment. The field recurrence_position is present if it is present in the original appointment and only this single appointment should be modified. The field id is not present because it is already included as a parameter. Other fields are present only if modified.<br />
<br />
=== Create an appointment ===<br />
PUT <code>/ajax/calendar?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Appointment object as described in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[#DetailedAppointmentData | Detailed appointment data]]. The field id is not present.<br />
<br />
Response: If the appointment was created successfully, an object with the attribute <code>id</code> of the newly created appointment. If the appointment could not be created due to conflicts, the response body is an object with the field <code>conflicts</code>, which is an array of appointment objects which caused the conflict. Each appointment object which represents a resource conflict contains an additional field <code>hard_conflict</code> with the Boolean value true. If the user does not have read access to a conflicting appointment, only the fields <code>id</code>, <code>start_date</code>, <code>end_date</code>, <code>shown_as</code> and <code>participants</code> are present and the field <code>participants</code> contains only the participants which caused the conflict.<br />
<br />
=== Delete an appointment ===<br />
<br />
PUT <code>/ajax/calendar?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted appointments.<br />
<br />
Request body: The appointment object to delete. The fields for the object are described in [[#FullIdentifierForAnAppointment | Full identifier for an appointment]]. <br />
<br />
Response: An array of objects identifying the appointments which were modified after the specified timestamp and were therefore not deleted. The fields of each object are described in [[#FullIdentifierForAnAppointment | Full identifier for an appointment]].<br />
<br />
=== Delete appointments (since v6.22) ===<br />
<br />
PUT <code>/ajax/calendar?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted appointments.<br />
<br />
Request body: An array of appointment objects to delete. The fields for the object are described in [[#FullIdentifierForAnAppointment | Full identifier for an appointment]]. <br />
<br />
Response: An array of objects identifying the appointments which were modified after the specified timestamp and were therefore not deleted. The fields of each object are described in [[#FullIdentifierForAnAppointment | Full identifier for an appointment]].<br />
<br />
=== Confirm appointment ===<br />
<br />
PUT <code>/ajax/calendar?action=confirm</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the appointment to confirm.<br />
* <code>occurrence</code> – The numeric identifier of the occurrence to which the confirmation applies (in case "id" denotes a series appointment). Available with v7.6.0<br />
* <code>folder</code> – ID of the folder through which the appointment is accessed.<br />
* <code>timestamp</code> – Timestamp of the last update of the to confirmed appointment.<br />
<br />
Request body: An object with the fields "confirmation", "confirmmessage" and "id" (optional) as described in [[#UserParticipantObject | User participant object]].<br />
<br />
Response: Nothing, except the standard response object with empty data, the timestamp of the confirmed and thereby updated task, and maybe errors.<br />
<br />
=== Free & Busy ===<br />
<br />
GET <code>/ajax/calendar?action=freebusy</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> - Internal user id. Must be obtained from the contact module.<br />
* <code>type</code> - Constant for user or resource (1 for users, 3 for resources)<br />
* <code>start</code> – Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.<br />
* <code>end</code> – Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.<br />
<br />
Response: An array of objects identifying the appointments which lie between start and end as described.<br><br />
This objects consist of:<br />
{| id="FreeAndBusyAppointment" cellspacing="0" border="1"<br />
! Name !! Type !! Value<br />
|-<br />
| shown_as || Number || Describes, how this appointment appears in availability queries:<br />
{| cellspacing="0" border="1"<br />
| 1 || reserved<br />
|-<br />
| 2 || temporary<br />
|-<br />
| 3 || absent<br />
|-<br />
| 4 || free<br />
|}<br />
|-<br />
| start_date || Date or Time || see [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]]<br />
|- <br />
| end_date || Date or Time || see [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]]<br />
|-<br />
| id || String || Object ID<br />
|-<br />
| folder_id || String || Folder ID. Only set, if the user has the right to see the object. (added 2009-08-18/6.12) <br />
|-<br />
| full_time || Boolean || True if the appointment is a whole day appointment, not present otherwise.<br />
|}<br />
<br />
=== Search appointments ===<br />
<br />
PUT <code>/ajax/calendar?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields<br />
<br />
Request body: An Object as described in [[#SearchAppointments | Search appointments]].<br />
<br />
{| id="SearchAppointments" cellspacing="0" border="1"<br />
|+ align="bottom" | Search appointments<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find appointments. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves.<br />
|-<br />
| startletter || String || Search appointments with the given starting letter.<br />
|}<br />
<br />
Request body: An Object as described in [[#SearchAppointments | Search appointments]].<br />
<br />
Response: An array with appointment data. Each array element describes one appointment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get new appointments ===<br />
<br />
GET <code>/ajax/calendar?action=newappointments</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields<br />
* <code>start</code> – Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.<br />
* <code>end</code> – Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified and holds a column number, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>limit</code> – limits the number of returned object to the given value.<br />
<br />
Response: An array with appointment data. Each array element describes one appointment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Resolve UID ===<br />
<br />
GET <code>/ajax/calendar?action=resolveuid</code><br />
<br />
Parameters<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>uid</code> – The UID to be resolved.<br />
<br />
Response: An object object with the field "id" containing the ox-object id, if existing, an error message otherwise.<br />
<br />
=== Get all Change Exceptions (Since v7.2.0) ===<br />
<br />
GET <code>/ajax/calendar?action=getChangeExceptions</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object id of the appointment series.<br />
* <code>folder</code> – Folder ID of the requested appointments. <br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier.<br />
<br />
Response with timestamp: An array with appointment data. Each array element describes one appointment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
== Module "mail" ==<br />
<br />
The mail module is used to access mail data.<br />
<br />
When mails are stored on an IMAP server, some functionality is not available due to restrictions of the IMAP protocol. Such functionality is marked with "not IMAP".<br />
<br />
=== Get mail count ===<br />
<br />
GET <code>/ajax/mail?action=count</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder whose mail count is queried<br />
<br />
Response (not IMAP: with timestamp): An integer value representing folder's mail count<br />
<br />
=== Get all mails ===<br />
<br />
GET <code>/ajax/mail?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#DetailedMailData | Detailed mail data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response or the string “thread” to return thread-sorted messages. If this parameter is specified and holds a column number, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>left_hand_limit</code> - A positive integer number to specify the "right-hand" limit of the range to return<br />
* <code>right_hand_limit</code> - A positive integer number to specify the "left-hand" limit of the range to return<br />
* <code>limit</code> - A positive integer number to specify how many items shall be returned according to given sorting; overrides <code>left_hand_limit</code>/<code>right_hand_limit</code> parameters and is equal to <code>left_hand_limit=0</code> and <code>right_hand_limit=&lt;limit&gt;</code><br />
<br />
Response (not IMAP: with timestamp): An array with mail data. Each array element describes one mail and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="DetailedMailData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed mail data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 102 || color_label || Number || Color number used by Outlook to label the object. The assignment of colors to numbers is arbitrary and specified by the client. The numbers are integer numbers between 0 and 10 (inclusive).<br />
|-<br />
| 600 || id || String || Object ID<br />
|-<br />
| 601 || folder_id || String || Object ID of the parent folder<br />
|-<br />
| 602 || attachment || Boolean || Specifies whether this mail has attachments.<br />
|-<br />
| 603 || from || Array || Each element is a two-element array specifying one sender. The first element of each address is the personal name, the second element is the email address. Missing address parts are represented by <code>null</code> values.<br />
|-<br />
| 604 || to || Array || Each element is a two-element array (see the from field) specifying one receiver.<br />
|-<br />
| 605 || cc || Array || Each element is a two-element array (see the from field) specifying one carbon-copy receiver.<br />
|-<br />
| 606 || bcc || Array || Each element is a two-element array (see the from field) specifying one blind carbon-copy receiver.<br />
|-<br />
| 607 || subject || String || Subject line.<br />
|-<br />
| 608 || size || Number || Size of the mail in bytes.<br />
|-<br />
| 609 || sent_date || Time || Date and time as specified in the mail by the sending client.<br />
|-<br />
| 610 || received_date || Time || Date and time as measured by the receiving server.<br />
|-<br />
| 611 || flags || Number || Various system flags. A sum of zero or more of following values:<br />
{| cellspacing="0" border="1"<br />
| 1 || answered<br />
|-<br />
| 2 || deleted<br />
|-<br />
| 4 || draft<br />
|-<br />
| 8 || flagged<br />
|-<br />
| 16 || recent<br />
|-<br />
| 32 || seen<br />
|-<br />
| 64 || user<br />
|-<br />
| 256 || forwarded<br />
|}<br />
See javax.mail.Flags.Flag for details.<br />
|-<br />
| 612 || level || Number || Zero-based nesting level in a thread.<br />
|-<br />
| 613 || disp_notification_to || String || Content of message's header “Disposition-Notification-To”<br />
|-<br />
| 614 || priority || Number || Value of message's “X-Priority” header:<br />
{| cellspacing="0" border="1"<br />
| 0 || No priority<br />
|-<br />
| 5 || Very Low<br />
|-<br />
| 4 || Low<br />
|-<br />
| 3 || Normal<br />
|-<br />
| 2 || High<br />
|-<br />
| 1 || Very High<br />
|}<br />
|-<br />
| 615 || msg_ref || String || Message reference on reply/forward.<br />
|-<br />
| 651 || flag_seen || String || Special field to sort mails by seen status<br />
|-<br />
| 652 || account_name || String || Message's account name.<br />
|-<br />
| 653 || account_id || int || Message's account identifier. Since v6.20.2<br />
|-<br />
| || user || Array || An array with user-defined flags as strings.<br />
|-<br />
| || headers || Object || An object with a field for every non-standard header. The header name is the field name. The header value is the value of the field as string.<br />
|-<br />
| || attachments || Array || Each element is an attachment as described in [[#Attachment | Attachment]]. The first element is the mail text. If the mail has multiple representations (multipart-alternative), then the alternatives are placed after the mail text and have the field disp set to alternative.<br />
|-<br />
| || nested_msgs || Array || Each element is a mail object as described in this table, except for fields id, folder_id and attachment.<br />
|-<br />
| || truncated || boolean || true/false if the mail content was trimmed. Since v7.6.1<br />
|-<br />
| || source || String || RFC822 source of the mail. Only present for <tt>action=get&attach_src=true</tt><br />
|}<br />
<br />
{| id="Attachment" cellspacing="0" border="1"<br />
|+ align="bottom" | Attachment<br />
! Name !! Type !! Value<br />
|-<br />
| id || String || Object ID (unique only inside the same message)<br />
|-<br />
| content_type || String || MIME type<br />
|-<br />
| content || String || Content as text. Present only if easily convertible to text.<br />
|-<br />
| filename || String || Displayed filename (mutually exclusive with content).<br />
|-<br />
| size || Number || Size of the attachment in bytes.<br />
|-<br />
| disp || String || Attachment's disposition: null, inline, attachment or alternative.<br />
|}<br />
<br />
=== Get all mail conversations (since v7.x) ===<br />
<br />
GET <code>/ajax/mail?action=threadedAll</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#DetailedMailData | Detailed mail data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response or the string “thread” to return thread-sorted messages. If this parameter is specified and holds a column number, then the parameter order must be also specified. <b>Note</b>: Applies only to root-level messages.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified. <b>Note</b>: Applies only to root-level messages.<br />
* <code>includeSent</code> - A boolean value to signal that conversations also include messages taken from special "sent" aka "sent items" folder<br />
* <code>left_hand_limit</code> - A positive integer number to specify the "right-hand" limit of the range to return. <b>Note</b>: Applies only to root-level messages.<br />
* <code>right_hand_limit</code> - A positive integer number to specify the "left-hand" limit of the range to return. <b>Note</b>: Applies only to root-level messages.<br />
* <code>limit</code> - A positive integer number to specify how many items shall be returned according to given sorting; overrides <code>left_hand_limit</code>/<code>right_hand_limit</code> parameters and is equal to <code>left_hand_limit=0</code> and <code>right_hand_limit=&lt;limit&gt;</code>. <b>Note</b>: Applies only to root-level messages.<br />
<br />
Response (not IMAP: with timestamp): An JSON array consisting of JSON objects, each representing a conversation's root message along with its message thread. The root message's JSON object is filled according to specified columns and is enhanced by special <code>"thread"</code> JSON field representing the full message thread (including the root message itself). The <code>"thread"</code> JSON field is a JSON array of JSON objects; each representing a message in the conversation sorted by time-line, also filled with specified columns. E.g.<br />
<br />
<pre><br />
{<br />
"flags":32,<br />
"color_label":0,<br />
"unreadCount":0,<br />
"id":"263852",<br />
"folder_id":"default0/INBOX",<br />
"thread":[<br />
{<br />
"id":"263852",<br />
"folder_id":"default0/INBOX",<br />
"flags":32,<br />
"color_label":0<br />
},<br />
{<br />
"id":"263853",<br />
"folder_id":"default0/INBOX",<br />
"flags":32,<br />
"color_label":0<br />
},<br />
{<br />
"id":"26323",<br />
"folder_id":"default0/Sent",<br />
"flags":32,<br />
"color_label":0<br />
},<br />
{<br />
"id":"263854",<br />
"folder_id":"default0/INBOX",<br />
"flags":32,<br />
"color_label":0<br />
}<br />
]<br />
}<br />
</pre><br />
<br />
=== Search mails ===<br />
<br />
PUT <code>/ajax/mail?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for appointments are defined in [[#DetailedMailData | Detailed mail data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response or the string “thread” to return thread-sorted messages. If this parameter is specified and holds a column number, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Request Body: A JSON array of JSON objects each containing the search field and its search pattern: e.g.:<br />
<code>[{"col": 612, "pattern": "Joe"}, {"col": 614, "pattern": "Tuesday"}]</code> Supported values for <code>col</code> are 603 to 607 (from, to, cc, bcc and subject) and -1 for full text search.<br />
<br />
Response (not IMAP: with timestamp): An array with mail data. Each array element describes one mail and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get a list of mails ===<br />
<br />
PUT <code>/ajax/mail?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for mails are defined in [[#DetailedMailData | Detailed mail data]].<br />
* <code>headers</code> - (preliminary) A comma-separated list of header names. Each name requests denoted header from each mail<br />
<br />
Request body: An array with one object for each requested mail. Each object contains the fields <code>folder</code> and <code>id</code>.<br />
<br />
Response (not IMAP: with timestamp): An array with mail data. Each array element describes one mail and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter followed by requested headers.<br />
<br />
=== Copy mails ===<br />
<br />
PUT <code>/ajax/mail?action=copy</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested mail.<br />
* <code>folder</code> – Object ID of the source folder.<br />
<br />
Request Body: A JSON object containing the id of the destination folder inside the "folder_id" field: e.g.:<br />
<code>{"folder_id": 1376}</code><br />
<br />
Response: A JSON array containing the ID of the copied mail<br />
<br />
=== Move mails ===<br />
<br />
PUT <code>/ajax/mail?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested mail.<br />
* <code>folder</code> – Object ID of the source folder.<br />
<br />
Request Body: A JSON object containing the id of the destination folder inside the "folder_id" field: e.g.:<br />
<code>{"folder_id": 1376}</code><br />
<br />
<br />
Response: A JSON array containing the ID of the moved mail<br />
<br />
=== Update mails ===<br />
<br />
PUT <code>/ajax/mail?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested mail.<br />
* <code>message_id</code> – (Preliminary) The value of "Message-Id" header of the requested mail. This parameter is a substitute for "id" parameter.<br />
* <code>folder</code> – Object ID of the folder.<br />
<br />
'''Note''': If neither parameter "<code>id</code>" nor parameter "<code>message_id</code>" is specified, all folder's messages are updated accordingly. Available with v6.20.<br />
<br />
Request Body: A JSON object which carries the new values that ought to be applied to mail as described in [[#UpdateMail | Update mail]] or [[#UpdateMailExtended | Update mail extended]] (available with SP6 v6.10).<br />
<br />
Response: A JSON object containing the Object ID of the updated mail and its folder.<br />
<br />
{| id="UpdateMail" cellspacing="0" border="1"<br />
|+ align="bottom" | Update mail<br />
! Name !! Type !! Value<br />
|-<br />
| color_label || Number || The color number between 0 and 10.<br />
|-<br />
| flags || Number || A set of flags to add or remove. Note: Flags for "recent" (8) and "user" (64) are ignored.<br />
|-<br />
| value || Boolean || <code>true</code> to add the flags specified by <code>flags</code> (logical OR), <code>false</code> to remove them (logical AND with the inverted value).<br />
|}<br />
<br />
<br />
<br />
{| id="UpdateMailExtended" cellspacing="0" border="1"<br />
|+ align="bottom" | Update mail extended (available with SP6 v6.10)<br />
! Name !! Type !! Value<br />
|-<br />
| set_flags || Number || A set of flags to add. Note: Flags for "recent" (8) and "user" (64) are ignored.<br />
|-<br />
| clear_flags || Number || A set of flags to remove. Note: Flags for "recent" (8) and "user" (64) are ignored.<br />
|}<br />
<br />
<br />
=== Mark all mails as seen (available with v7.6.0) ===<br />
<br />
PUT <code>/ajax/mail?action=all_seen</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder.<br />
<br />
Request Body: n.a.<br />
<br />
Response: <code>true</code><br />
<br />
=== Not IMAP: Get updated mails ===<br />
<br />
GET <code>/ajax/mail?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: Just an empty JSON array is going to be returned since this action cannot be applied to IMAP.<br />
<br />
=== Get a mail ===<br />
<br />
GET <code>/ajax/mail?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested mail.<br />
* <code>message_id</code> – (Preliminary) The value of "Message-Id" header of the requested mail. This parameter is a substitute for "id" parameter.<br />
* <code>folder</code> – Object ID of the mail's folder.<br />
* <code>edit</code> (optional) – 1 indicates that this request should fill the message compose dialog to edit a message and thus display-specific date is going to be withheld.<br />
* <code>hdr</code> (optional) – 1 to let the response contain only the (formatted) message headers as plain text<br />
* <code>src</code> (optional) – 1 to let the response contain the complete message source as plain text<br />
* <code>save</code> (optional) – 1 to write the complete message source to output stream. '''NOTE:''' This parameter will only be used if parameter <code>src</code> is set to 1.<br />
* <code>view</code> (optional - available with SP4)<br />
** "raw" returns the content as it is, meaning no preparation are performed and thus no guarantee for safe contents is given (available with SP6 v6.10).<br />
** "text" forces the server to deliver a text-only version of the requested mail's body, even if content is HTML.<br />
** "textNoHtmlAttach" is the same as "text", but does not deliver the HTML part as attachment in case of multipart/alternative content.<br />
** "html" to allow a possible HTML mail body being transferred as it is (but white-list filter applied).<br />
** "noimg" to allow a possible HTML content being transferred but without original image src attributes which references external images: Can be used to prevent loading external linked images (spam privacy protection).<br />
** '''NOTE:''' if set, the corresponding gui config setting will be ignored.<br />
* <code>unseen</code> (optional) – "1" or "true" to leave an unseen mail as unseen although its content is requested<br />
* <code>max_size</code> (optional - available since v7.6.1) A positive integer number (greater than 10000) to specify how many characters of the message content will be returned. If the number is smaller than 10000 the value will be ignored and 10000 used.<br />
* <code>attach_src</code> (optional - available since v7.6.1) 1 to let the JSON mail representation being extended by <code>"source"</code> field containing the mail raw RFC822 source data<br />
<br />
Response (not IMAP: with timestamp): An JSON object containing all data of the requested mail. The fields of the object are listed in [[#DetailedMailData | Detailed mail data]]. The fields id and attachment are not included. '''NOTE:''' Of course response is not a JSON object if either parameter <code>hdr</code> or parameter <code>src</code> are set to "1". Then the response contains plain text. Moreover if optional parameter <code>save</code> is set to "1" the complete message source is going to be directly written to output stream to open browser's save dialog.<br />
<br />
=== Get multiple mails as a ZIP file ===<br />
<br />
GET <code>/ajax/mail?action=zip_messages</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – The folder identifier.<br />
* <code>id</code> – A comma-separated list of Object IDs of the requested mails<br />
<br />
Response body: The raw byte data of the ZIP file.<br />
<br />
=== Get a mail attachment ===<br />
<br />
GET <code>/ajax/mail?action=attachment</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – The folder identifier.<br />
* <code>id</code> – Object ID of the mail which contains the attachment.<br />
* <code>attachment</code> – ID of the requested attachment '''OR'''<br />
* <code>cid</code> – Value of header 'Content-ID' of the requested attachment<br />
* <code>save</code> – 1 overwrites the defined mimetype for this attachment to force the download dialog, otherwise 0.<br />
* <code>filter</code> (optional) – 1 to apply HTML white-list filter rules if and only if requested attachment is of MIME type <code>text/htm*</code> '''AND''' parameter <code>save</code> is set to 0.<br />
<br />
Response body: The raw byte data of the document. The response type for the HTTP Request is set accordingly to the defined mimetype for this attachment, except the parameter save is set to 1.<br />
<br />
=== Get multiple mail attachments as a ZIP file ===<br />
<br />
GET <code>/ajax/mail?action=zip_attachments</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – The folder identifier.<br />
* <code>id</code> – Object ID of the mail which contains the attachments.<br />
* <code>attachment</code> – A comma-separated list of IDs of the requested attachments<br />
<br />
Response body: The raw byte data of the ZIP file.<br />
<br />
=== Send a mail ===<br />
<br />
POST <code>/ajax/mail?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request Body: This method uses the encoding multipart/form-data or multipart/mixed.<br />
* The form filed <code>json_0</code> contains the rudimentary mail as JSON object as described in [[#DetailedMailData | Detailed mail data]] with just its message body (as html content) defined in nested JSON array "attachments" and its header data (from, to, subject, etc.). The field "content_type" defines whether the mail ought to be sent as plain text ("text/plain"), as html ("text/html") or as multipart/alternative ("ALTERNATIVE"). Sending a mail requires some special fields inside JSON mail object. The field "infostore_ids" defines a JSON array of infostore document ID(s) that ought to be appended to this mail as attachments. The field "msgref" indicates the ID of the referenced original mail. Moreover the field "sendtype" indicates the type of the message:<br />
** 0 - A normal new mail (optional)<br />
** 1 - A reply mail. The field "msgref" must be present<br />
** 2 - A forward mail. The field "msgref" must be present<br />
** 3 - A draft edit operation. The field "msgref" must be present in order to delete previous draft message since e.g. IMAP does not support changing/replacing a message but requires a delete-and-insert sequence<br />
** 4 - Transport of a draft mail. The field "msgref" must be present<br />
** 6 - This type signals that user intends to send out a saved draft message and expects the draft message (referenced by "msgref" field) being deleted after successful transport<br />
Example of a normal new mail which appends user's VCard and requests a read receipt from receiver:<br />
<br />
<code>Content-Disposition: form-data; name="json_0"....{"from":"\u0022Muster, Karl\u0022 <karl.muster@somewhere.com>","to":"someone@somewhere.com","cc":"","bcc":"",<br />
"subject":"Mail Subject","priority":"3","disp_notification_to":true,"vcard":1,<br />
"attachments":[{"content_type":"ALTERNATIVE","content":"Simple Mail Text!&lt;br&gt;&lt;br&gt;\u000a\u000a"}]}</code><br />
* The request accepts file fields in upload form that denote referenced files that are going to be appended as attachments<br />
* For "text/plain" mail bodies, the JSON boolean field "raw" may be specified inside the body's JSON representation to signal that the text content shall be kept as-is; meaning to keep all formatting intact<br />
<br />
==== Attach data sources ====<br />
Moreover the JSON representation may contain data sources which should be appended as file attachments to the mail. Then the mail contains the <code>"datasources"</code> key which is expected to be a JSON array of data source descriptions.<br />
<br />
A data source description follows the [[#Module_.22conversion.22_.28preliminary.29 | conversion specification]].<br />
<br />
For example to attach a file through an URL the field looks like this (available with v6.18.2):<br />
<br />
<pre><br />
{<br />
"from": "someone@somewhere.com,<br />
...<br />
"datasources"<br />
[<br />
{<br />
"identifier": "com.openexchange.url.mail.attachment",<br />
"args":<br />
{<br />
"url": <url-string>,<br />
"timeout": <optional-timeout-millis-int, default is 2500msec>,<br />
"contentType": <optional-content-type-string>,<br />
"charset": <optional-charset-string>,<br />
"size": <optional-size-int>,<br />
"disposition": <optional-disposition-string>,<br />
"fileName": <optional-file-name-string>,<br />
}<br />
}<br />
]<br />
}<br />
</pre><br />
<br />
Response: Object ID of the newly created mail.<br />
<br />
=== Send/Save mail as MIME data block (RFC822) (added in SP5) ===<br />
<br />
PUT <code>/ajax/mail?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> - A session ID previously obtained from the login module.<br />
* <code>folder</code> (optional) - In case the mail should not be sent out, but saved in a specific folder, the "folder" parameter can be used. If the mail should be sent out to the recipient, the "folder" parameter must not be included and the mail is stored in the folder "Sent Items". Example "folder=default.INBOX/Testfolder"<br />
* <code>flags</code> (optional) - In case the mail should be stored with status "read" (e.g. mail has been read already in the client inbox), the parameter "flags" has to be included. If no "folder" parameter is specified, this parameter must not be included. For infos about mail flags see [[#DetailedMailData | Detailed mail data]] spec.<br />
<br />
Request Body: The MIME Data Block<br />
<br />
Response: Object ID of the newly created/moved mail.<br />
<br />
=== Import of mails as MIME data block (RFC822) (added with 6.18) ===<br />
<br />
This request can be used to store a single or a lot of mails in the OX mail storage backend. This action should be used instead of <code>action=new</code> because it is faster and tolerant to 8bit encoded emails.<br />
<br />
<code>POST /ajax/mail?action=import</code><br />
<br />
Parameters:<br />
* <code>session</code> - A session ID previously obtained from the login module.<br />
* <code>folder</code> - For the import this parameter is required to specify the folder into that the emails should be imported. Example "folder=default.INBOX/Testfolder"<br />
* <code>flags</code> (optional) - In case the mail should be stored with status "read" (e.g. mail has been read already in the client inbox), the parameter "flags" has to be included. For infos about mail flags see [[#DetailedMailData | Detailed mail data]] spec.<br />
*<code>force</code> (optional) - If this parameter is set to true, the server skips checking the valid From-address<br />
<br />
Request Body: A multipart/form-data with a single or multiple file parts each having a different name and containing the RFC822 encoded email as binary data like in a file upload.<br />
<br />
Response: A JSON object containing the folder identifier and the object identifier of the imported mail or a JSON array of those JSON objects if multiple mails are imported.<br />
<br />
=== Reply/Forward a mail ===<br />
<br />
GET <code>/ajax/mail?action=reply</code><br><br />
GET <code>/ajax/mail?action=replyall</code><br><br />
GET <code>/ajax/mail?action=forward</code><br><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested Message.<br />
* <code>folder</code> - Object ID of the folder, whose contents are queried.<br />
* <code>view</code> (optional - available with SP6) - "text" forces the server to deliver a text-only version of the requested mail's body, even if content is HTML. "html" to allow a possible HTML mail body being transferred as it is (but white-list filter applied).'''NOTE:''' if set, the corresponding gui config setting will be ignored.<br />
* <code>setFrom</code> (optional - available since v7.6.0) A flag ("true"/"false") that signals if "From" header shall be pre-selected according to a suitable recipient address that matches one of user's E-Mail address aliases; only supported for <code>/ajax/mail?action=replyall</code> and <code>/ajax/mail?action=reply</code><br />
* <code>max_size</code> (optional - available since v7.6.1) A positive integer number (greater than 10000) to specify how many characters of the message content will be returned. If the number is smaller than 10000 the value will be ignored and 10000 used.<br />
<br />
Response (not IMAP: with timestamp): An object containing all data of the requested mail. The fields of the object are listed in [[#DetailedMailData | Detailed mail data]]. The fields id and attachment are not included.<br />
<br />
=== Delete mails ===<br />
<br />
PUT <code>/ajax/mail?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* Not IMAP: <code>timestamp</code> – Timestamp of the last update of the deleted mails.<br />
<br />
Request body: An array of objects providing folder IDs and object IDs of the deleted mails.<br />
<code><br><br />
[<br><br />
&nbsp;{&nbsp;&quot;folder&quot;:&quot;default0/INBOX&quot;,&nbsp;&quot;id&quot;:&quot;123&quot;&nbsp;}<br><br />
&nbsp;...<br><br />
&nbsp;{&nbsp;&quot;folder&quot;:&quot;default0/MyFolder&quot;,&nbsp;&quot;id&quot;:&quot;134&quot;&nbsp;}<br><br />
]<br><br />
</code><br />
<br />
Not IMAP: Response: An array with object IDs of mails which were modified after the specified timestamp and were therefore not deleted.<br />
<br />
=== Clear mail folder(s) ===<br />
<br />
PUT <code>/ajax/mail?action=clear</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* Not IMAP: <code>timestamp</code> – Timestamp of the last update of the deleted mails.<br />
<br />
Request body: An array with IDs of the mail folders to clear<br />
<br />
Response: An array with IDs of mail folder that could not be cleared; meaning the response body is an empty JSON array if everything went well.<br />
<br />
== Module "groups" ==<br />
<br />
The group module allows to query available groups. It is mainly used by the dialog for the selection of participants.<br />
<br />
=== Get a group ===<br />
<br />
GET <code>/ajax/group?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The group id.<br />
<br />
Response: A group object as described in [[#GroupData | Group data]].<br />
<br />
=== List groups ===<br />
<br />
PUT <code>/ajax/group?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An array with group identifiers.<br />
<br />
Response: An array of group objects as described in [[#GroupData | Group data]].<br />
<br />
=== Search for groups ===<br />
<br />
PUT <code>/ajax/group?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An object with search parameters as described in [[#GroupSearch | Group search]].<br />
<br />
{| id="GroupSearch" cellspacing="0" border="1"<br />
|+ align="bottom" | Group search<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find groups. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves.<br />
|}<br />
<br />
Response with timestamp: An array of group objects as described in [[#GroupData | Group data]].<br />
<br />
{| id="GroupData" cellspacing="0" border="1"<br />
|+ align="bottom" | Group data<br />
! Name !! Type !! Value<br />
|-<br />
| id || Number || ID<br />
|-<br />
| display_name || String || Display name<br />
|-<br />
| name || String || Name with character restrictions<br />
|-<br />
| members || Array || The array contains identifier of users that are member of the group.<br />
|}<br />
<br />
=== Create a group ===<br />
<br />
introduced 2008-06-12<br />
<br />
PUT <code>/ajax/group?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Group object as described in [[#GroupData | Group data]]. The field id is not present.<br />
<br />
Response: A json objekt with attribute <code>id</code> of the newly created group.<br />
<br />
=== Delete a group ===<br />
<br />
introduced 2008-06-12<br />
<br />
PUT <code>/ajax/group?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the group to delete.<br />
<br />
Request body: An object with the field “id” containing the unique identifier of the group.<br />
<br />
Response: An empty json array if the group was deleted successfully.<br />
<br />
=== Change a group ===<br />
<br />
introduced 2008-06-12<br />
<br />
PUT <code>/ajax/group?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the group to update.<br />
* <code>timestamp</code> – Time stamp of the group to update. If the group was modified after the specified time stamp, then the update must fail. <br />
<br />
Request body: Group object as described in [[#GroupData | Group data]]. Only modified fields are present and the field id is omitted.<br />
<br />
=== Get updates (since v6.18.1) ===<br />
<br />
introduced 2010-09-13<br />
<br />
GET <code>/ajax/group?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested groups.<br />
<br />
Response with timestamp: An array with new, modified and deleted groups. New, modified and deleted groups are represented by JSON objects as described in [[#GroupData | Group data]].<br />
<br />
== Module "resource" ==<br />
<br />
The resource module allows to query available resources. It is mainly used by the dialog for the selection of participants.<br />
<br />
=== Get all resources ===<br />
<br />
GET <code>/ajax/resource?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: An array of resource identifier.<br />
<br />
=== List resources ===<br />
<br />
PUT <code>/ajax/resource?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
<br />
Request body: An array with resources ids.<br />
<br />
Response: An array of resource objects as described in [[#ResourceResponse | Resource response]].<br />
<br />
=== Get a resource ===<br />
<br />
GET <code>/ajax/resource?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The resource id.<br />
<br />
Response: An array of resource objects as described in [[#ResourceResponse | Resource response]].<br />
<br />
=== Search for resources ===<br />
<br />
PUT <code>/ajax/resource?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An object with search parameters as described in [[#ParticipantSearch | Participant search]].<br />
<br />
{| id="ParticipantSearch" cellspacing="0" border="1"<br />
|+ align="bottom" | Participant search<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find resources. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves.<br />
|}<br />
<br />
Response: An array of resource objects as described in [[#ResourceResponse | Resource response]].<br />
<br />
{| id="ResourceResponse" cellspacing="0" border="1"<br />
|+ align="bottom" | Resource Response<br />
! Name !! Type !! Value<br />
|-<br />
| id || Number || ID<br />
|-<br />
| display_name || String || Display name<br />
|-<br />
| name || String || internal name<br />
|-<br />
| mailaddress || String || email address<br />
|-<br />
| availability || Boolean || can be false to mark the resource currently unavailable<br />
|-<br />
| description || String || description of the resource<br />
|-<br />
| last_modified || Time || Date and time of the last modification.<br />
|-<br />
| last_modified_utc || Timestamp || Date and time of the last modification.<br />
|}<br />
<br />
=== Create a resource ===<br />
<br />
PUT <code>/ajax/resource?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Resource object as described in [[#ResourceResponse | Resource response]]. The field id is not present.<br />
<br />
Response: An object with attribute <code>id</code> of the newly created resource.<br />
<br />
=== Delete a resource ===<br />
<br />
PUT <code>/ajax/resource?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the resource to delete.<br />
<br />
Request body: An object with the field “id” containing the unique identifier of the resource.<br />
<br />
Response: An empty json array if the resource was deleted successfully.<br />
<br />
=== Delete resources (since v6.22) ===<br />
<br />
PUT <code>/ajax/resource?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the resource to delete.<br />
<br />
Request body: An array of objects with the field “id” containing the unique identifier of the resource.<br />
<br />
Response: An empty json array if the resources were deleted successfully.<br />
<br />
=== Change a resource ===<br />
<br />
PUT <code>/ajax/resource?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the resource to update.<br />
* <code>timestamp</code> – Time stamp of the resource to update. If the resource was modified after the specified time stamp, then the update must fail. <br />
<br />
Request body: Resource object as described in [[#ResourceResponse | Resource response]]. Only modified fields are present and the field id is omitted.<br />
<br />
=== Get updates (since v6.18.1) ===<br />
<br />
introduced 2010-09-13<br />
<br />
GET <code>/ajax/resource?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested resources.<br />
<br />
Response with timestamp: An array with new, modified and deleted resources. New, modified and deleted resources are represented by JSON objects as described in [[#ResourceResponse | Resource response]].<br />
<br />
== Module "infostore" or "Filestore" or "Files" or "Drive" ==<br />
This module has been renamed quite often. Whatever its name, it combines the knowledge database, bookmarks and document storage.<br />
<br />
=== Get all infoitems ===<br />
<br />
GET <code>/ajax/infostore?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for infoitems are defined in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Response with timestamp: An array with infoitem data. Each array element describes one infoitem and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="DetailedInfoitemData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed infoitem data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 700 || title || String || Title<br />
|-<br />
| 701 || url || String || Link/URL<br />
|-<br />
| 702 || filename || String || Displayed filename of the document.<br />
|-<br />
| 703 || file_mimetype || String || MIME type of the document. The client converts known types to more readable names before displaying them.<br />
|-<br />
| 704 || file_size || Number || Size of the document in bytes.<br />
|-<br />
| 705 || version || Number || Version number of the document. New documents start at 1. Every update increments the version by 1.<br />
|-<br />
| 706 || description || String || Description<br />
|-<br />
| 707 || locked_until || Time || The time until which this item will presumably be locked. Only set if the docment is currently locked, 0 otherwise.<br />
|-<br />
| 708 || file_md5sum || String || MD5Sum of the document. Not yet implemented, so this is currently always empty.<br />
|-<br />
| 709 || version_comment || String || A version comment is used to file a changelog for the file.<br />
|-<br />
| 710 || current_version || Boolean || “true” if this version is the current version “false” otherwise. . Note: This is not writeable<br />
|-<br />
| 711 || number_of_versions || Number || The number of all versions of the infoitem. Note: This is not writeable.<br />
|}<br />
<br />
=== Get a list of infoitems ===<br />
<br />
PUT <code>/ajax/infostore?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for infoitems are defined in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]].<br />
<br />
Request body: An array with object IDs of requested infoitems.<br />
<br />
Response with timestamp: An array with infoitem data. Each array element describes one infoitem and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get updated infoitems ===<br />
<br />
GET <code>/ajax/infostore?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for infoitems are defined in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested infoitems.<br />
* <code>ignore</code> (optional) – Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.<br />
<br />
Response with timestamp: An array with new, modified and deleted infoitems. New and modified infoitems are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted infoitems (should the <code>ignore</code> parameter be ever implemented) would be identified by their object IDs as plain strings, without being part of a nested array.<br />
<br />
=== Get an infoitem ===<br />
<br />
GET <code>/ajax/infostore?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested infoitem.<br />
* <code>version</code> (optional) – If present the infoitem data describes the given version. Otherwise the current version is returned <br />
<br />
Response with timestamp: An object containing all data of the requested infoitem. The fields of the object are listed in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. The field id is not included.<br />
<br />
=== Search infoitems ===<br />
<br />
PUT <code>/ajax/infostore?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields as per tables [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>start</code> (optional) – The start index (inclusive) in the ordered search, that is requested.<br />
* <code>end</code> (optional) – The last index (inclusive) from the ordered search, that is requested.<br />
<br />
Request body: An Object as described in [[#SearchContacts | Search contacts]].<br />
<br />
=== Get an infoitem document ===<br />
<br />
GET <code>/ajax/infostore/[filename]?action=document</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested infoitem.<br />
* <code>folder</code> – Object ID of the infoitem's folder.<br />
* <code>version</code> (optional) – If present the infoitem data describes the given version. Otherwise the current version is returned <br />
* <code>content_type</code>(optional) – If present the response declares the given content_type in the Content-Type header.<br />
<br />
Response body: The raw byte data of the document. The response type for the HTTP Request is set accordingly to the defined mimetype for this infoitem or the content_type given.<br />
<br />
Note: The Filename may be added to the customary infostore path to suggest a filename to a Save-As dialog.<br />
<br />
=== Get a ZIP archive containing the infoitems of a denoted folder (available with v7.6.1) ===<br />
<br />
GET <code>/ajax/infostore/[filename]?action=document</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the infoitem's folder.<br />
* <code>recursive</code> – <code>true</code> to also include subfolders and their infoitems respectively; otherwise <code>false</code> to only consider the infoitems of specified folder<br />
<br />
Response body: The raw byte data of the ZIP archive. The response type for the HTTP Request is set to <code>application/zip</code>.<br />
<br />
=== Get all versions ===<br />
<br />
GET <code>/ajax/infostore?action=versions</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the infoitem whose versions are requested.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for infoitems are defined in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Response with timestamp: An array with infoitem data. Each array element describes one infoitem and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. The timestamp is the timestamp relating to the requested infostore item.<br />
<br />
=== Get multiple documents as a ZIP archive (available with v7.4.0) ===<br />
<br />
GET <code>/ajax/infostore?action=zipdocuments</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>body</code> – A URL-encoded JSON array; see below for details<br />
<br />
Parameter <code>body</code>: A JSON array of JSON object tuples specifying the documents' versions to include in the requested ZIP archive; e.g<br><br />
<pre><br />
[{"id":"61820","folder":"70303"},{"id":"61821","folder":"70303", "version": "1"}]<br />
</pre><br />
The field <code>"version"</code> is optional; if missing it refers to latest/current version.<br><br />
So, a valid parameter would look like:<br />
<pre><br />
...&body=%5B%7B%22id%22%3A%2261820%22%2C%22folder%22%3A%2270303%22%7D%2C%7B%22id%22%3A%2261821%22%2C%22folder%22%3A%2270303%22%2C%22version%22%3A%221%22%7D%5D<br />
</pre><br />
<br />
Response: The download offer for the requested ZIP archive containing specified document versions<br />
<br />
=== Update an infoitem via PUT ===<br />
<br />
PUT <code>/ajax/infostore?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated infoitem.<br />
* <code>timestamp</code> – Timestamp of the updated infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.<br />
<br />
Request body: Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. Only modified fields are present.<br />
<br />
=== Update an infoitem via POST ===<br />
<br />
POST <code>/ajax/infostore?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated infoitem.<br />
* <code>timestamp</code> – Timestamp of the updated infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.<br />
* <code>json</code> - Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. Only modified fields are present.<br />
* <code>file</code> – File Metadata as per <input type=”file” /><br />
<br />
Request Body: Body of content-type “multipart/form-data” or “multipart/mixed” containing the above mentioned fields and file-data.<br />
<br />
Response: The response is sent as a HTML document (see introduction).<br />
<br />
=== Create an infoitem via PUT ===<br />
<br />
PUT <code>/ajax/infostore?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. The field id is not included.<br />
<br />
Response: Object ID of the newly created infoitem.<br />
<br />
=== Create an infoitem via POST ===<br />
<br />
POST <code>/ajax/infostore?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>json</code> - Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. The field id is not included.<br />
* <code>file</code> – File metadata as per <input type=”file” /><br />
<br />
Request Body: Body of content-type “multipart/form-data” or “multipart/mixed” containing the above mentioned fields and file-data.<br />
<br />
Response: Object ID of the newly created infoitem. The response is sent as a HTML document (see introduction).<br />
<br />
=== Save an attachment in the infostore ===<br />
<br />
PUT <code>/ajax/infostore?action=saveAs</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>attached</code> – The Object ID of the Object with the attachment<br />
* <code>folder</code> – The Folder ID of the Object with the attachment<br />
* <code>module</code> – The Module type of the Object with the attachment.<br />
* <code>Attachment</code> – The id of the attachement to save.<br />
<br />
Request body: Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. The field id is not included. The fields in this infoitem object override values from the attachment. The folder_id must be given.<br />
<br />
Response: Object ID of the newly created infoitem.<br />
<br />
=== Delete infoitems ===<br />
<br />
PUT <code>/ajax/infostore?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>timestamp</code> – Timestamp of the last update of the deleted infoitems.<br />
* <code>hardDelete</code> - Optional, defaults to \"false\". If set to \"true\", the file is deleted permanently. Otherwise, and if the underlying storage supports a trash folder and the file is not yet located below the trash folder, it is moved to the trash folder.<br />
<br />
Request body: An array with objects to delete. The fields for the object are described in [[#FullIdentifierForAnInfostoreDocument|Full identifier for an infostore document]].<br />
<br />
Response: An array with [[]]. <br />
<br />
{| id="FullIdentifierForAnInfostoreDocument" cellspacing="0" border="1"<br />
|+ align="bottom" | Full identifier for an infostore document<br />
! Name !! Type !! Value<br />
|-<br />
| id || Number || Object ID<br />
|-<br />
| folder || Number || Folder ID<br />
|}<br />
<br />
=== Delete versions of infostore documents ===<br />
<br />
PUT <code>/ajax/infostore?action=detach</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the base Object<br />
* <code>folder</code> – The Folder of the Object<br />
* <code>timestamp</code> - Timestamp of the infostore object<br />
<br />
Request body: A List of arrays with the version numbers of the infoitems to detach.<br />
<br />
Response: An array with version numbers that were not deleted.<br />
<br />
Note: When the current version of a document is deleted the new current version will be the newest version.<br />
<br />
=== Delete all versions of infostore documents ===<br />
<br />
PUT <code>/ajax/infostore?action=revert</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the base Object<br />
* <code>folder</code> – The Folder of the Object<br />
* <code>timestamp</code> - Timestamp of the infostore object<br />
<br />
Removes all versions of the infostore document leaving only the base object.<br />
<br />
=== Copy an infostore document via PUT ===<br />
<br />
PUT <code>/ajax/infostore?action=copy</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the base Object<br />
* <code>folder</code> – The Folder of the Object<br />
* <code>timestamp</code> - Timestamp of the infostore object<br />
<br />
Request body: Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. Only modified fields are present.<br />
<br />
Response: The id of the newly created object<br />
<br />
Note: Only the fields (and the file) of the current document will be copied. Those fields present in the request are modified accordingly.<br />
<br />
=== Copy an infostore document via POST ===<br />
<br />
POST <code>/ajax/infostore?action=copy</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated infoitem.<br />
* <code>timestamp</code> – Timestamp of the updated infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.<br />
* <code>json</code> - Infoitem object as described in [[#CommonObjectData | Common object data]] and [[#DetailedInfoitemData | Detailed infoitem data]]. Only modified fields are present.<br />
* <code>file</code> – File Metadata as per <input type=”file” /><br />
<br />
Request Body: Body of content-type “multipart/form-data” or “multipart/mixed” containing the above mentioned fields and file-data.<br />
<br />
Response: The response is sent as a HTML document (see introduction).<br />
<br />
Note: Only the fields (and the file) of the current document will be copied. Those fields present in the request are modified accordingly.<br />
<br />
=== Lock an infoitem ===<br />
<br />
GET <code>/ajax/infostore?action=lock</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the infoitem that should be locked.<br />
* <code>diff</code> (optional) – If present the value is added to the current time on the server (both in ms). The document will be locked until that time. If this parameter is not present, the document will be locked for a duration as configured on the server.<br />
<br />
Response with timestamp: Can only include errors.<br />
<br />
=== Unlock an infoitem ===<br />
<br />
GET <code>/ajax/infostore?action=unlock</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the infoitem that should be unlocked.<br />
<br />
Response with timestamp: Can only contain errors.<br />
<br />
<br />
== Module "Attachments" ==<br />
<br />
The Attachment Module allows file attachments to arbitrary objects. An Attachment always belongs to an object (called 'attached') in a certain folder of a certain module. <br />
<br />
=== Get All Attachments for an Object ===<br />
<br />
GET <code>/ajax/attachment?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>attached</code> – The Object ID of the Object<br />
* <code>folder</code> – The Folder ID of the Object<br />
* <code>module</code> – The Module type of the Object<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for attachment's are defined in [[#CommonObjectData | Common object data]] (with only id, created_by and creation_date available) and [[#AttachmentObject | Attachment object]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Response: An array with attachment data. Each array element describes one attachment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get a list of attachments ===<br />
<br />
PUT <code>/ajax/attachment?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for attachments are defined in [[#CommonObjectData | Common object data]] (with only id, created_by and creation_date available) and [[#AttachmentObject | Attachment object]].<br />
* <code>attached</code> – The Object ID of the Object<br />
* <code>folder</code> – The Folder ID of the Object<br />
* <code>module</code> – The Module type of the Object<br />
<br />
Request body: An array of with object IDs of requested tasks.<br />
<br />
Response with timestamp: An array with attachment data. Each array element describes one attachment and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Create an Attachment ===<br />
<br />
POST <code>/ajax/attachment?action=attach</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>json_[index]</code> – The JSON representation of an attachment object as described in [[#CommonObjectData | Common object data]] (with only id, created_by and creation_date available) and [[#AttachmentObject | Attachment object]].<br />
* <code>file_[index]</code> – The file metadata as per <input type=file /> upload.<br />
<br />
Note: The JSON Object and file fields describe the corresponding attachment. For ex.: json_0 contains metadata for file_0, json_1 for file_1 and so on. Indexes start with 0.<br />
<br />
Request body: multipart/form-data or multipart/mixed containing the file data of the attached file and the above fields.<br />
<br />
Response: HTML page with javascript callback as per introduction. Contains a JSON-Array of ids of the newly created attachments. The order of the ids corresponds to the indexes in the request.<br />
<br />
{| id="AttachmentObject" cellspacing="0" border="1"<br />
|+ align="bottom" | Attachment Object<br />
! ID !! Name !! Type !! Description<br />
|-<br />
| 800 || folder || Number || The ID of the first Folder in which the attached object resides.<br />
|-<br />
| 801 || attached || Number || The object id of the object this attachement is attached to.<br />
|-<br />
| 802 || module || Number || The Module of this Object Possible Values:<br />
{| cellspacing="0" border="1"<br />
| 1 || Appointment<br />
|-<br />
| 4 || Task<br />
|-<br />
| 7 || Contact<br />
|-<br />
| 137 || Infostore<br />
|}<br />
|-<br />
| 803 || filename || String || The filename of the attached file.<br />
|-<br />
| 804 || file_size || Number || The file size (in bytes) of the attached file.<br />
|-<br />
| 805 || file_mimetype || String || The MIME-Type of the attached file<br />
|-<br />
| 806 || rft_flag || Boolean || If the attachment is a RTF Attachment of Outlook. (Outlook descriptions can be stored as RTF Documents).<br />
|}<br />
<br />
=== Delete Attachment ===<br />
<br />
PUT <code>/ajax/attachment?action=detach</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>attached</code> – The ID of the base Object<br />
* <code>module</code> – The type of the Object<br />
* <code>folder</code> – The Folder of the Object<br />
<br />
Request body: An array with the ids of the attachments to delete.<br />
<br />
=== Get updated attachments ===<br />
<br />
GET <code>/ajax/attachment?action=updates</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>attached</code> – Object ID of the object to which the attachments are attached.<br />
* <code>module</code> – Module ID (as per [[#AttachmentObject | Attachment object]]) of the attached object.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for attachments are defined in [[#CommonObjectData | Common object data]] (with only id, created_by and creation_date available) and [[#AttachmentObject | Attachment object]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
* <code>timestamp</code> – Timestamp of the last update of the requested infoitems.<br />
ignore (optional) – Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.<br />
<br />
Response with timestamp: An array with new and deleted attachments for the specified object. New attachments are represented by arrays. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter. Deleted attachments (should the <code>ignore</code> parameter be ever implemented) would be identified by their object IDs as plain numbers, without being part of a nested array.<br />
<br />
=== Get an attachment ===<br />
<br />
GET <code>/ajax/attahment?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>attached</code> – Object ID of the object to which the attachments are attached.<br />
* <code>module</code> – Module ID (as per [[#AttachmentObject | Attachment object]]) of the attached object.<br />
* <code>id</code> – Object ID of the requested attachment.<br />
<br />
Response with timestamp: An object containing all data of the requested attachment. The fields of the object are listed in [[#CommonObjectData | Common object data]] (with only id, created_by and creation_date available) and [[#AttachmentObject | Attachment object]]. <br />
<br />
=== Get an attachments filedata ===<br />
<br />
GET <code>/ajax/attachment/[filename]?action=document</code><br />
<br />
Parameters:<br />
<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – Object ID of the folder, whose contents are queried.<br />
* <code>attached</code> – Object ID of the object to which the attachments are attached.<br />
* <code>module</code> – Module ID (as per [[#AttachmentObject | Attachment object]]) of the attached object.<br />
* <code>id</code> – Object ID of the requested attachment.<br />
* <code>content_type</code> (optional) – If set the responses Content-Type header is set to this value, not the attachements file mime type.<br />
<br />
Response body: The raw byte data of the document. The response type for the HTTP Request is set accordingly to the defined mimetype for this infoitem.<br />
Note: The Filename may be added to the customary infostore path to suggest a filename to a Save-As dialog.<br />
<br />
== Module "reminder" ==<br />
<br />
The reminder module provides the ability to fetch all active reminders for a user between two dates.<br />
<br />
=== Get reminder range ===<br />
<br />
GET <code>/ajax/reminder?action=range</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>end</code> – The End date of the reminder range<br />
<br />
Response: An Array with all reminders which are scheduled until the specified time. Each reminder is described in [[#ReminderResponse | Reminder response]].<br />
<br />
{| id="ReminderResponse" cellspacing="0" border="1"<br />
|+ align="bottom" | Reminder response<br />
! Field !! Type !! Description<br />
|-<br />
| id || Number || The ID of the reminder.<br />
|-<br />
| target_id || Number || The target_id where this reminder is attached to<br />
|-<br />
| alarm || Time || The time of the alarm<br />
|-<br />
| module || Number || The module of the reminder<br />
|-<br />
| servertime || Time || The time on the server<br />
|-<br />
| user_id || Number || The ID of the user.<br />
|-<br />
| last_modified || Time || The last modification timestamp of the reminder<br />
|-<br />
| recurrence_position || Number || The recurrence position for series appointments or 0 if no series<br />
|-<br />
| folder || Number || The ID of the folder through that the object can be read<br />
|-<br />
|}<br />
<br />
=== Delete a Reminder===<br />
<br />
PUT <code>/ajax/reminder?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An object with the field “id”.<br />
<br />
Response body: An JSON array with the id that was not deleted.<br />
<br />
=== Delete Reminders (since v6.22)===<br />
<br />
PUT <code>/ajax/reminder?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An array of objects with the field “id”.<br />
<br />
Response body: An JSON array with the ids that were not deleted.<br />
<br />
=== Remind again (since v6.18.1) ===<br />
<br />
PUT <code>/ajax/reminder?action=remindAgain</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the reminder whose date shall be changed.<br />
<br />
Request body: The JSON representation of the reminder; mainly containing the field “alarm” which provides the new reminder date.<br><br />
E.g. <code>{ "alarm": 1283418027381 }</code><br />
<br />
Response body: The JSON representation of the updated reminder.<br />
<br />
== Module "multiple" ==<br />
<br />
The multiple module allows to bundle multiple requests to most other modules in a single request. Not supported are:<br />
* modules login and multiple,<br />
* POST requests with a multipart encoding (uploads),<br />
* GET requests which do not use an object as described in [[#ResponseBody | Response body]] as response body (downloads).<br />
<br />
=== Multiple requests ===<br />
<br />
PUT <code>/ajax/multiple</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>continue</code> – Specifies whether processing of requests should stop when an error occurs, or whether all request should be processed regardless of errors.<br />
<br />
Request body: An array with request objects. Each request object contains all URI parameters of the "normal" request as fields. The module name of the "normal" request is included in the field module. The parameter session is not included. If the "normal" request has a request body, the object which is represented by that request body is includes as the value of the field data.<br />
<br />
Response: An array with reply objects as described in [[#ResponseBody | Response body]]. The order of reply objects corresponds to the order of requests in the request body. Unlike with all other modules, this response is itself not part of a response object as described in [[#ResponseBody | Response body]].<br />
<br />
== Module "quota" ==<br />
<br />
The filestore module allows accesssing information about the use and quota of the filestore.<br />
<br />
=== Get quota information (Since 7.6.1, Preliminary) ===<br />
<br />
GET <code>/ajax/quota?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>module</code> (optional) – The module identifier to get quota information for, required if <code>account</code> is set.<br />
* <code>account</code> (optional) – The account identifier within the module to get quota information for.<br />
<br />
Response: A JSON object containing the requested quota information. If no <code>module</code> was specified, all defined [[#ModuleQuota | module quotas]] are set in the JSON object, each one mapped to it's module identifier. If the quota from a <code>module</code> was requested, a JSON array containing all [[#AccountQuota | account quotas]] of this module are returned. If both a <code>module</code> and <code>account</code> were requested, a JSON object representing this specific [[#AccountQuota | account auota]] is returned. <br />
<br />
Note: In case there is no quota limitation defined for a module or account, no corresponding JSON object is included in the response. <br />
<br />
<br />
{| id="ModuleQuota" cellspacing="0" border="1"<br />
|+ align="bottom" | Module Quota<br />
! Field !! Type !! Description<br />
|-<br />
| display_name || String || The display name of the module<br />
|-<br />
| accounts|| Array || Each element identifies an account quota within the module, as described in [[#AccountQuota | Account Quota]]<br />
|-<br />
|}<br />
<br />
<br />
{| id="AccountQuota" cellspacing="0" border="1"<br />
|+ align="bottom" | Account Quota<br />
! Field !! Type !! Description<br />
|-<br />
| account_id || String || Identifier of the account<br />
|-<br />
| account_name || String || Name of the account<br />
|-<br />
| countquota || Number || The account's quota limit for the number of items, or not set if not defined<br />
|-<br />
| countuse || Number || The account's actual usage for the number of items, or not set if no count quota defined<br />
|-<br />
| quota || Number || The account's quota limit for the storage in bytes, or not set if not defined<br />
|-<br />
| use || Number || The account's actual usage for the storage in bytes, or not set if no storage quota defined<br />
|-<br />
|}<br />
<br />
<br />
=== Get the filestore usage data ===<br />
<br />
GET <code>/ajax/quota?action=filestore</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: A JSON Object containing the fields “use” and “quota”. “use” represents the uploaded files sizes sum and the field “quota” represents the maximum.<br />
<br />
=== Get the mail usage data ===<br />
<br />
GET <code>/ajax/quota?action=mail</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: A JSON Object containing the fields “use” and “quota”. “use” represents the use mail quota and the field “quota” represents the maximum. -1 represents an unlimited quota.<br />
<br />
== Module "import"==<br />
The module import allows to import specific module data (like Contacts, Tasks or Appointments) in several formats (iCal, vCard, CSV) into a folder. Please note: The callback for all actions of this bundle is callback_import, not callback_$actionname for legacy purposes.<br />
<br />
=== Import CSV ===<br />
POST <code>/ajax/import?action=CSV</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder into which data should be imported. This must be a Contact folder.<br />
<br />
Request body: A "multipart/form-data" encoded .CSV file. The field name for the file is "file". The column titles of the table are those used within the OX, see column ''Displayed Name'' in [[#DetailedContactData]].<br />
<br />
Response: An array of JSON-Objects, one for each entry in the list, containing: The Object ID of the entry, the Object ID of the folder the data was written into, a timestamp of the modification (in case of error, of modification attempt) and an error in case the data could not be entered.<br />
<br />
=== Import Outlook CSV ===<br />
POST <code>/ajax/import?action=OUTLOOK_CSV</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder into which data should be imported. This must be a Contact folder.<br />
<br />
Request body: An .CSV file with Windows' default encoding Windows-1252. The column titles of the table may be those used by the English, French or German version of Outlook.<br />
<br />
Response: An array of JSON-Objects, one for each entry in the list, containing: The Object ID of the entry, the Object ID of the folder the data was written into, a timestamp of the modification (in case of error, of modification attempt) and an error in case the data could not be entered.<br />
<br />
=== Import iCAL ===<br />
POST <code>/ajax/import?action=ICAL</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder into which data should be imported. This may be an Appointment or a Task folder. May even be a list containing both.<br />
* <code>suppressNotification</code> – This optional parameter can be used to disable the notifications for new appointments that are imported through the given iCal file. This help keeping the Inbox clean if a lot of appointments need to be imported. The value of this parameter does not matter because only for the existence of the parameter is checked.<br />
* <code>ignoreUIDs</code> – Optional. When set to "true", UIDs are partially ignored during import of tasks and appointments from iCal. Internally, each UID is replaced statically by a random one to preserve possibly existing relations between recurring appointments in the same iCal file, but at the same time to avoid collisions with already existing tasks and appointments.<br />
<br />
Request body: An iCalendar file.<br />
<br />
Response: An array of JSON-Objects, one for each entry in the list, containing: The Object ID of the entry, the Object ID of the folder the data was written into, a timestamp of the modification (in case of error, of modification attempt) and an error in case the data could not be entered, and warnings (under the key "warnings") containing an Array of objects with the warning data, containing all customary error fields.<br />
<br />
=== Import vCard ===<br />
POST <code>/ajax/import?action=VCARD</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder into which data should be imported. This must be a Contact folder.<br />
<br />
Request body: An vCard file, maybe of the formats: vCard 2.1, vCard 3.0 or vCalendar 1.0<br />
<br />
Response: An array of JSON-Objects, one for each entry in the list, containing: The Object ID of the entry, the Object ID of the folder the data was written into, a timestamp of the modification (in case of error, of modification attempt) and an error in case the data could not be entered.<br />
<br />
== Module "export" ==<br />
The module export allows to export specific module data (like Contacts, Tasks or Appointments) from a folder in several formats (iCal, vCard, CSV).<br />
<br />
=== Exporting CSV ===<br />
GET <code>/ajax/export?action=CSV</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder whose contents are to be exported. This must be a Contact folder.<br />
* <code>columns</code> – (optional) Columns to be imported from the given file, given as an array of column numbers. See [[#DetailedContactData | Detailed contact data]] for numbers.<br />
* <code>export_dlists</code> – (optional) toggles whether distribution lists are exported, too. Default is false. Option exists since 7.4.1.<br />
Response: An InputStream containing the file of the MIME type <code>text/csv</code>.<br />
<br />
=== Exporting iCAL ===<br />
GET <code>/ajax/export?action=ICAL</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder whose contents are to be exported. This must be a Calendar folder.<br />
<br />
Response: An InputStream containing the file, of the MIME type <code>text/calendar</code>.<br />
<br />
=== Exporting vCard ===<br />
GET <code>/ajax/export?action=VCARD</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>folder</code> – ObjectID of the folder whose contents are to be exported. This must be a Contact folder.<br />
<br />
Response: An InputStream containing the file, of the MIME type <code>text/x-vcard</code>.<br />
<br />
== Module "sync" ==<br />
The module sync delivers several core API extensions to support common operations used in a mobile synchronization environment.<br />
<br />
=== Clearing a folder's content ===<br />
PUT <code>/ajax/sync?action=refresh_server</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: A JSON array containing the folder ID(s) whose content should be cleared. '''NOTE:''' Although the requests offers to clear multiple folders at once it is recommended to clear only one folder per request since if any exception occurs<br />
(e.g. missing permissions) the complete request is going to be aborted.<br />
<br />
Response: A JSON array containing the IDs of folders that could not be cleared due to a concurrent modification. Meaning you receive an empty JSON array if everything worked well.<br />
<br />
== Module "token" (since 7.4.0) ==<br />
The module token delivers several core API extensions to support token based logins.<br />
<br />
=== Get a login token ===<br />
GET <code>/ajax/token?action=acquireToken</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response:<br />
A JSON object with the timestamp of the creation date and a token which can be used to create a new session.<br />
<br />
== Module "mailfilter" ==<br />
The module mailfilter describes how to add, update or delete mail filter rules or to check which actions are supported by the underlying system.<br />
<br />
A detailed description can be found here [[ HTTP_API_MailFilter | Mail Filter HTTP API]]<br />
<br />
== Module "ajax file upload" ==<br />
This module offers to store files in server's dedicated download directory for a configureable amount of time. The files are then accessible for further operations like inline images in (html) mails<br />
<br />
=== Uploading a file ===<br />
POST <code>/ajax/file?action=new</code> <br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>module</code> – The module for which the file is uploaded to determine proper upload quota constraints (e.g. "mail", "infostore", etc.).<br />
* <code>type</code> – The file type filter to define which file types are allowed during upload. Currently supported filters are: <code>file=all, text=text/*, media=image OR audio OR video, image=image/*, audio=audio/*, video=video/*, application=application/*</code><br />
<br />
Request body: A common POST request body of MIME type "multipart/*" which holds the file(s) to upload<br />
<br />
Response: A JSON array containing the IDs of the uploaded files. The files are accessible through the returned IDs for future use.<br />
<br />
=== Updating a file's last access timestamp (keep alive) ===<br />
By updating the last access timestamp it's prevented from being deleted from both session and disk storage.<br />
<br />
GET <code>/ajax/file?action=keepalive</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the uploaded file whose timestamp should be updated<br />
<br />
Response: The string "null" in response's data element<br />
<br />
=== Requesting a formerly uploaded file ===<br />
GET <code>/ajax/file?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the uploaded file<br />
<br />
Response: The content of the requested file is directly written into output stream<br />
<br />
== Module "image" ==<br />
This module allows to download images from Open-Xchange server without providing a session ID in request's URL parameters.<br />
<br />
=== Requesting an image ===<br />
Open-Xchange Server supports multiple image sources that are identified through request's path identifier<br />
<br />
* Inline images from mails<br />
** Request path needs to be <code>"/mail/picture"</code><br><br><br />
* Contact profile image<br />
** Request path needs to be <code>"/contact/picture"</code><br><br><br />
* User profile image<br />
** Request path needs to be <code>"/user/picture"</code><br><br><br />
* MP3 cover image<br />
** Request path needs to be <code>"/file/mp3cover"</code><br><br><br />
* Fetch a previously uploaded image using <code>"/ajax/file"</code> interface<br />
** Request path needs to be <code>"/mfile/picture"</code><br><br><br />
<br />
Each image source requires an individual set of required parameters<br />
<br />
==== Inline images from mails ====<br />
GET <code>/mail/picture</code> <br />
<br />
Parameters:<br />
* <code>accountId</code> – The mail account identifier<br />
* <code>folder</code> – The identifier of the folder in which the mail resides<br />
* <code>id</code> – The mail identifier<br />
* <code>uid</code> – The identifier of the image inside the referenced mail<br />
<br />
Response: The content of the requested image is directly written into output stream<br />
<br />
<br />
==== Contact profile images ====<br />
GET <code>/contact/picture</code> <br />
<br />
Parameters:<br />
* <code>folder</code> – The identifier of the folder in which the contact resides<br />
* <code>id</code> – The contact identifier<br />
<br />
Response: The content of the requested image is directly written into output stream<br />
<br />
<br />
==== User profile images ====<br />
GET <code>/user/picture</code> <br />
<br />
Parameters:<br />
* <code>id</code> – The user identifier<br />
<br />
Response: The content of the requested image is directly written into output stream<br />
<br />
<br />
==== MP3 cover image ====<br />
GET <code>/file/mp3cover</code> <br />
<br />
Parameters:<br />
* <code>id</code> – The identifier of the uploaded image<br />
<br />
Response: The content of the requested image is directly written into output stream<br />
<br />
== Module "conversion" (preliminary) ==<br />
<br />
A generic module to request data from a data source and to process obtained/submitted data with a data handler. Thus data is converted from a data source by a data handler.<br />
<br />
=== Converting data ===<br />
PUT <code>/ajax/conversion?action=convert</code><br><br />
or<br><br />
POST <code>/ajax/conversion?action=convert</code> <br />
<br />
Parameters: &lt;no parameters required&gt;<br />
<br />
Request body: A [[#ConversionRequest | conversion request]] JSON object containing nested JSON objects for [[#DataSource | data source]] and [[#DataHandler | data handler]]<br />
<br />
<br />
{| id="ConversionRequest" cellspacing="0" border="1"<br />
|+ align="bottom" | Conversion request object<br />
! Field !! Type !! Description<br />
|-<br />
| datasource || JSON object || The data source object.<br />
|-<br />
| datahandler || JSON object || The data handler object.<br />
|-<br />
|}<br />
<br />
<br />
{| id="DataSource" cellspacing="0" border="1"<br />
|+ align="bottom" | Data source object<br />
! Field !! Type !! Description<br />
|-<br />
| identifier || String || The identifier of the data source.<br />
|-<br />
| args || JSON array or JSON object || The '''optional''' name-value-pairs as a single JSON object or a JSON object for each kept inside a JSON array for data source<br />
|-<br />
|}<br />
<br />
<br />
{| id="DataHandler" cellspacing="0" border="1"<br />
|+ align="bottom" | Data handler object<br />
! Field !! Type !! Description<br />
|-<br />
| identifier || String || The identifier of the data handler.<br />
|-<br />
| args || JSON array or JSON object || The '''optional''' name-value-pairs as a single JSON object or a JSON object for each kept inside a JSON array for data handler<br />
|-<br />
|}<br />
<br />
Response: The result of converted data ready as an appropriate JSON response<br />
<br />
==== Saving an ICal email attachment ====<br />
<br />
If an ICal file is attached to an email, its content can be saved as appointments and tasks into given calendar and task folder.<br />
If the fields "com.openexchange.groupware.calendar.confirmstatus" and "com.openexchange.groupware.calendar.confirmmessage" are set, the data handler inserts the appointment with the given status for the user, if the appointment does not exist. If it is already existing, the handler just updates the participant status.<br />
<br />
Data source's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.mail.ical&quot;<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.fullname&quot;:&quot;&lt;folder-fullname&gt;&quot;},<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.mailid&quot;:&quot;&lt;mail-id&gt;&quot;},<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.sequenceid&quot;:&quot;&lt;attachment-sequence-id&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Data handler's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.ical&quot;<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.groupware.calendar.folder&quot;:&quot;&lt;calendar-folder-id&gt;&quot;},<br><br />
&nbsp;&nbsp;<br />
{&quot;com.openexchange.groupware.task.folder&quot;:&quot;&lt;task-folder-id&gt;&quot;},<br><br />
&nbsp;&nbsp;<br />
{&quot;com.openexchange.groupware.calendar.confirmstatus&quot;:&quot;&lt;status&gt;&quot;},<br><br />
&nbsp;&nbsp;<br />
{&quot;com.openexchange.groupware.calendar.confirmmessage&quot;:&quot;&lt;message&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Response: A JSON array of JSON objects each providing folder and object ID of added appointment/task; e.g. <code>[{&quot;folder_id&quot;:2567, &quot;id&quot;:7689}, ...]</code><br />
<br />
==== Converting an ICal email attachment into JSON objects ====<br />
<br />
If an ICal file is attached to an email, its content can converted to JSON appointments and tasks.<br />
<br />
Data source's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.mail.ical&quot;<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.fullname&quot;:&quot;&lt;folder-fullname&gt;&quot;}<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.mailid&quot;:&quot;&lt;mail-id&gt;&quot;}<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.sequenceid&quot;:&quot;&lt;attachment-sequence-id&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Data handler's JSON object.<br><br />
'''Note''' that all arguments are optional: Default is user time zone and zero recurrence position<br><br />
"com.openexchange.groupware.calendar.searchobject" triggers a search for the uid, and replaces the object_id and folder_id with the data of the corresponding ox-object id, if existing. The returned objects are still the ical objects and NOT the ox-objects.<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.ical.json&quot;<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.groupware.calendar.timezone&quot;:&quot;&lt;timezone-id&gt;&quot;}<br><br />
&nbsp;&nbsp;<br />
{&quot;com.openexchange.groupware.calendar.recurrencePosition&quot;:&quot;&lt;recurrence-position&gt;&quot;}<br><br />
&nbsp;&nbsp;<br />
{&quot;com.openexchange.groupware.calendar.searchobject&quot;:&quot;&lt;true|false&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Response: A JSON array of JSON objects for each appointment/task as described in [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]] and [[##DetailedTaskData | Detailed task data]]/[[##DetailedAppointmentData | Detailed appointment data]]<br />
<br />
==== Saving a VCard email attachment ====<br />
<br />
If a VCard file is attached to an email, its content can be saved as contacts into given contact folder.<br />
<br />
Data source's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.mail.vcard&quot;,<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.fullname&quot;:&quot;&lt;folder-fullname&gt;&quot;},<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.mailid&quot;:&quot;&lt;mail-id&gt;&quot;},<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.mail.conversion.sequenceid&quot;:&quot;&lt;attachment-sequence-id&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Data handler's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.contact&quot;,<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;com.openexchange.groupware.contact.folder&quot;:&quot;&lt;contact-folder-id&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Response: A JSON array of JSON objects each providing folder and object ID of added contact; e.g. <code>[{&quot;folder_id&quot;:2567, &quot;id&quot;:7689}, ...]</code><br />
<br />
==== Contact(s) attached to a new email as a VCard file ====<br />
<br />
Obtain VCard data from specified contact object(s).<br />
<br />
Data source's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.contact&quot;<br><br />
&nbsp;&quot;args&quot;:<br><br />
&nbsp;&nbsp;[<br><br />
&nbsp;&nbsp;&nbsp;{&quot;folder&quot;:&quot;&lt;folder-id1&gt;&quot;,&quot;id&quot;:&quot;&lt;id1&gt;&quot;}<br><br />
&nbsp;&nbsp;&nbsp;...<br><br />
&nbsp;&nbsp;&nbsp;{&quot;folder&quot;:&quot;&lt;folder-idn&gt;&quot;,&quot;id&quot;:&quot;&lt;idn&gt;&quot;}<br><br />
&nbsp;&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
Get a new email's JSON object with specified VCard data source attached.<br />
<br />
Data handler's JSON object<br><br />
<code><br />
{<br><br />
&nbsp;&quot;identifier&quot;:&quot;com.openexchange.mail.vcard&quot;<br><br />
&nbsp;&quot;args&quot;:[]<br><br />
}<br><br />
</code><br />
<br />
Response: A [[#DetailedMailData | mail]] JSON object.<br />
<br />
== Module "search" (preliminary) ==<br />
<br />
The search module is an enhancement to each search request as an optional JSON object via PUT method to filter elements; e.g.<br />
<br />
<code><br />
PUT /ajax/contacts?action=all&...<br />
<br />
{"filter":{search-term-object}}<br />
</code><br />
<br />
This section describes the syntax of the optional JSON object representing the search term.<br><br />
In general the structure of a search term is in prefix notation; meaning the operator is written before its operands:<br />
<br />
<code>{"operation":"equals","operands":[...]}</code><br />
<br />
Moreover there are two different types of a search terms:<br />
* A single search term<br />
* A composite search term<br />
<br />
A single search term reflects an operation which cannot hold nested search terms as operands; e.g. "equals". In opposite to this a composite search term holds one or more nested search terms as operands; e.g. "not" or the logical junctors "and"/"or".<br />
<br />
By now the following operations are supported:<br />
* composite operations<br />
** "and" - The AND junctor<br />
** "or" - The OR junctor<br />
** "not" - Negation<br />
* single operations<br />
** "equals" - Equals comparison<br />
** "lt" - Less-than comparison<br />
** "gt" - Greater-than comparison<br />
<br />
Furthermore following operand types are supported for single search terms:<br />
* Column - Providing a name referring to a field/column<br />
* Constant - A constant<br />
<br />
Example of an EQUALS search term:<br><br />
<code><br />
{"operation":"equals","operands":[{"type":"column","value":"first_name"},"Jane"]}<br />
</code><br />
<br />
Example of an OR search term:<br><br />
<code><br />
{"operation":"or","operands":<br><br />
&nbsp;[<br><br />
&nbsp;&nbsp;{"operation":"equals","operands":[{"type":"column","value":"first_name"},"Jane"]},<br><br />
&nbsp;&nbsp;{"operation":"gt","operands":[{"type":"column","value":"birthday"},"1975-05-01"]}<br><br />
&nbsp;]<br><br />
}<br><br />
</code><br />
<br />
<br />
Refer to object data tables introduced by different modules to know which field names are supported; e.g. for tasks it is [[#CommonObjectData | Common object data]], [[#DetailedTaskAndAppointmentData | Detailed task and appointment data]], and [[#DetailedTaskData | Detailed task data]].<br />
<br />
== Module "search" (alternative suggestion, still preliminary) ==<br />
<br />
The search module is an enhancement to each search request as an optional JSON object via PUT method to filter elements; e.g.<br />
<br />
<code><br />
PUT /ajax/contacts?action=all&...<br />
<br />
{"filter":<i>[search term]</i>}<br />
</code><br />
<br />
This section describes the syntax of the optional JSON object representing the search term.<br />
In general the structure of a search term is in prefix notation; meaning the operator is written before its operands:<br />
<br />
<code>[">", 5, 2]</code><br />
<br />
The available operators are:<br />
* Comparison operators ">", "<", "=", "<=", ">=", "<>"<br />
* logic operators "not", "and", "or"<br />
<br />
Comparison operators have exactly two operands. Each operand can be either a field name or a constant. A field name is an object with the member "field" specifying the field name, e.g. <code>{ field: "first_name" }</code>. The available field names depend on the searched module. Primitive JSON types are interpreted as constants. Arrays are not valid operands for comparison operators.<br />
<br />
The logic operator "not" has exactly one operand, the other logic operators can have any number of operands. Each operand must be an array representing a nested search expression.<br />
<br />
== Module "mail account" (available with v6.12) ==<br />
<br />
The mail account module is used to manage multiple mail accounts held by a user.<br />
<br />
=== Get All mail accounts ===<br />
<br />
GET <code>/ajax/account?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for mail account's are defined in [[#MailAccountData | mail account data]].<br />
<br />
Response: An array with attachment data. Each array element describes one mail account and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get a mail account ===<br />
<br />
GET <code>/ajax/account?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The ID of the account to return.<br />
<br />
Response: A JSON object representing the desired mail account. See [[#MailAccountData | mail account data]].<br />
<br />
{| id="MailAccountData" cellspacing="0" border="1"<br />
|+ align="bottom" | Mail account data<br />
! ID !! Name !! Type !! Value<br />
|-<br />
| 1001 || id || Number || Account ID<br />
|-<br />
| 1002 || login || String || The login.<br />
|-<br />
| 1003 || password || String || The (optional) password.<br />
|-<br />
| 1004 || mail_url || String || The mail server URL; e.g. "imap://imap.somewhere.com:143". '''URL is preferred over single fields''' (like mail_server, mail_port, etc.)<br />
|-<br />
| 1005 || transport_url || String || The transport server URL; e.g. "smtp://smtp.somewhere.com:25". '''URL is preferred over single fields''' (like transport_server, transport_port, etc.)<br />
|-<br />
| 1006 || name || String || Account's display name.<br />
|-<br />
| 1007 || primary_address || String || User's primary address in account; e.g. "someone@somewhere.com"<br />
|-<br />
| 1008 || spam_handler || String || The name of the spam handler used by account.<br />
|-<br />
| 1009 || trash || String || The name of the default trash folder.<br />
|-<br />
| 1010 || sent || String || The name of the default sent folder.<br />
|-<br />
| 1011 || drafts || String || The name of the default drafts folder.<br />
|-<br />
| 1012 || spam || String || The name of the default spam folder.<br />
|-<br />
| 1013 || confirmed_spam || String || The name of the default confirmed-spam folder.<br />
|-<br />
| 1014 || confirmed_ham || String || The name of the default confirmed-ham folder.<br />
|-<br />
| 1015 || mail_server || String || The mail server's hostname or IP address.<br />
|-<br />
| 1016 || mail_port || Number || The mail server's port.<br />
|-<br />
| 1017 || mail_protocol || String || The mail server's protocol. '''Always use basic protocol name.''' E.g. use "imap" instead of "imaps"<br />
|-<br />
| 1018 || mail_secure || Boolean || Whether to establish a secure connection to mail server (SSL, TLS).<br />
|-<br />
| 1019 || transport_server || String || The transport server's hostname or IP address.<br />
|-<br />
| 1020 || transport_port || Number || The transport server's port.<br />
|-<br />
| 1021 || transport_protocol || String || The transport server's protocol. '''Always use basic protocol name.''' E.g. use "smtp" instead of "smtps"<br />
|-<br />
| 1022 || transport_secure || Boolean || Whether to establish a secure connection to transport server (SSL, TLS).<br />
|-<br />
| 1023 || transport_login || String || The transport login. '''Please see "transport_auth" for the handling of this field.'''<br />
|-<br />
| 1024 || transport_password || String || The transport password. '''Please see "transport_auth" for the handling of this field.'''<br />
|-<br />
| 1025 || unified_inbox_enabled || Boolean || If enabled for Unified INBOX<br />
|-<br />
| 1026 || trash_fullname || String || Path to default trash folder. Preferred over "trash"<br />
|-<br />
| 1027 || sent_fullname || String || Path to default sent folder. Preferred over "sent"<br />
|-<br />
| 1028 || drafts_fullname || String || Path to default drafts folder. Preferred over "drafts"<br />
|-<br />
| 1029 || spam_fullname || String || Path to default spam folder. Preferred over "spam"<br />
|-<br />
| 1030 || confirmed_spam_fullname || String || Path to default confirmed-spam folder. Preferred over "confirmed_spam"<br />
|-<br />
| 1031 || confirmed_ham_fullname || String || Path to default confirmed-ham folder. Preferred over "confirmed_ham"<br />
|-<br />
| 1032 || pop3_refresh_rate || Number || The interval in minutes the POP3 account is refreshed<br />
|-<br />
| 1033 || pop3_expunge_on_quit || Boolean || Whether POP3 messages shall be deleted on actual POP3 account after retrieval or not<br />
|-<br />
| 1034 || pop3_delete_write_through || Boolean || If option "pop3_expunge_on_quit" is disabled, this property defines whether a delete in local INBOX also deletes affected message in actual POP3 account<br />
|-<br />
| 1035 || pop3_storage || String || The name of POP3 storage provider, default is "mailaccount"<br />
|-<br />
| 1036 || pop3_path || String || Path to POP3's virtual root folder in storage, default is name of the POP3 account beside default folders<br />
|-<br />
| 1037 || personal || String || The customizable personal part of email address<br />
|-<br />
| 1038 || reply_to || String || The customizable reply-to email address<br />
|-<br />
| 1039 || addresses || String || The comma-separated list of available E-Mail addresses including aliases. !! Only available for primary mail account !!<br />
|-<br />
| 1040 || meta || JSON data || Stores arbitrary JSON data as specified by client associated with the mail account<br />
|-<br />
| 1041 || archive || String || The name of the archive folder. Currently not functional!<br />
|-<br />
| 1042 || archive_fullname || String || The full name of the archive folder. Currently not functional!<br />
|-<br />
| 1043 || transport_auth || String || '''Available since v7.6.1''' Specifies the source for mail transport (SMTP) credentials. Possible values: "mail", "custom", and "none".<br>- "mail" signals to use the same credentials as given in associated mail store (IMAP, POP3).<br>- "custom" signals that individual credentials are supposed to be used (fields "transport_login" and "transport_password" are considered).<br>- "none" means the mail transport does not support any authentication mechanism (rare case!)<br />
|}<br />
<br />
=== Create a new mail account ===<br />
<br />
PUT <code>/ajax/account?action=new</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request: A JSON object describing the new account to create. See [[#MailAccountData | mail account data]].<br />
<br />
Response: A JSON object representing the inserted mail account. See [[#MailAccountData | mail account data]].<br />
<br />
=== Update a mail account ===<br />
<br />
PUT <code>/ajax/account?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request: A JSON object identifiying (field ID is present) and describing the account to update. See [[#MailAccountData | mail account data]].<br />
<br />
Response: A JSON object representing the updated mail account. See [[#MailAccountData | mail account data]].<br />
<br />
=== Delete a mail account ===<br />
<br />
PUT <code>/ajax/account?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Request body: An array with the ID of the mail account to delete.<br />
<br />
=== Validate a mail account (which shall be created) ===<br />
<br />
PUT <code>/ajax/account?action=validate</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>tree</code> - An optional boolean parameter which indicates whether on successful validation the folder tree shall be returned (NULL on failure) or if set to "false" or missing only a boolean is returned which indicates validation result<br />
<br />
Request: A JSON object describing the new account to validate. See [[#MailAccountData | mail account data]].<br />
<br />
Response: Dependent on optional "tree" parameter a JSON folder object or a boolean value indicating the validation result<br />
<br />
The JSON folder object corresponding to [[#CommonFolderData | Common folder data]] and [[#DetailedFolderData | Detailed folder data]].<br />
Additionally a field "subfolder_array" is added which contains possible subfolders. This field is missing if a folder contains no subfolders.<br />
<br />
[[Category: OX6]]<br />
<br />
== Module Auto Configuration (since 6.22) ==<br />
<br />
=== Get Auto Configuration ===<br />
<br />
GET <code>/ajax/autoconfig?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>email</code> – Email Adress for which a mail configuration will be discovered.<br />
* <code>password</code> – Corresponding password for the mail account (optional)<br />
<br />
Response: A JSON Object containing the best available settings for an appropriate mail Server for the given email address. The fields are described in [[#MailAccountData | mail account data]]. The Data may be incomplete or even empty.<br />
<br />
== Module "user" (available with v6.14) ==<br />
<br />
The user module is used to access user information.<br />
<br />
=== Get all users ===<br />
<br />
GET <code>/ajax/user?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for users are defined in [[#CommonObjectData | Common object data]], [[#DetailedContactData | Detailed contact data]] and [[#DetailedUserData | Detailed user data]].<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Response with timestamp: An array with user data. Each array element describes one user and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
{| id="DetailedUserData" cellspacing="0" border="1"<br />
|+ align="bottom" | Detailed user data<br />
! ID !! Displayed name !! Name !! Type !! Value<br />
|-<br />
| 610 || Aliases || aliases || Array || The user's aliases<br />
|-<br />
| 611 || Time zone || timezone || String || The time zone ID.<br />
|-<br />
| 612 || Locale || locale || String || The name of user's entire locale, with the language, country and variant separated by underbars. E.g. "en", "de_DE"<br />
|-<br />
| 613 || Groups || groups || Array || The IDs of user's groups<br />
|-<br />
| 614 || Contact ID || contact_id || Number || The contact ID of the user<br />
|-<br />
| 615 || Login info || login_info || String || The user's login information<br />
|}<br />
<br />
=== Get a list of users ===<br />
<br />
PUT <code>/ajax/user?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – A comma-separated list of columns to return. Each column is specified by a numeric column identifier. Column identifiers for users are defined in [[#CommonObjectData | Common object data]], [[#DetailedContactData | Detailed contact data]] and [[#DetailedUserData | Detailed user data]].<br />
<br />
Request body: An array of numbers. Each number is the ID of requested user. Since v6.18.1, a <code>null</code> value in the array is interpreted as the currently logged in user.<br />
<br />
Response with timestamp: An array with user data. Each array element describes one user and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get a user ===<br />
<br />
GET <code>/ajax/user?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the requested user. Since v6.18.1, this parameter is optional: the default is the currently logged in user.<br />
<br />
Response with timestamp: An object containing all data of the requested user. The fields of the object are listed in [[#CommonObjectData | Common object data]], [[#DetailedContactData | Detailed contact data]] and [[#DetailedUserData | Detailed user data]].<br />
<br />
=== Update a user ===<br />
<br />
PUT <code>/ajax/user?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – Object ID of the updated user.<br />
* <code>timestamp</code> – Timestamp of the updated user. If the user was modified after the specified timestamp, then the update must fail.<br />
<br />
Request body: User object as described in [[#CommonObjectData | Common object data]], [[#DetailedContactData | Detailed contact data]] and [[#DetailedUserData | Detailed user data]]. Only modified fields are present.<br />
<br />
'''Note''': "timezone" and "locale" are the only fields from [[#DetailedUserData | Detailed user data]] which are allowed to be updated.<br />
<br />
Response with timestamp: An empty object.<br />
<br />
=== Search users ===<br />
<br />
PUT <code>/ajax/user?action=search</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>columns</code> – The requested fields<br />
* <code>sort</code> (optional) – The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified. In case of use of column 609 (use count depending order for collected users with global address book) the parameter "order" ist NOT necessary and will be ignored.<br />
* <code>order</code> (optional) – "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.<br />
<br />
Request body: An Object as described in [[#SearchUsers | Search users]].<br />
<br />
{| id="SearchUsers" cellspacing="0" border="1"<br />
|+ align="bottom" | Search users<br />
! Name !! Type !! Value<br />
|-<br />
| pattern || String || Search pattern to find users. In the pattern, the character "*" matches zero or more characters and the character "?" matches exactly one character. All other characters match only themselves.<br />
|-<br />
| startletter || String || Search users with the given startletter. If this field is present, the pattern is matched against the user field which is specified by the property contact_first_letter_field on the server (default: last name). Otherwise, the pattern is matched against the display name.<br />
|}<br />
<br />
Alternative request body: An Object as described in [[#SearchUsersAlternative | Search users alternative]].<br />
<br />
{| id="SearchUsersAlternative" cellspacing="0" border="1"<br />
|+ align="bottom" | Search users alternative<br />
! Name !! Type !! Value<br />
|-<br />
| last_name || String || Searches users where the last name match with the given last name.<br />
|-<br />
| first_name || String || Searches users where the first name match with the given first name.<br />
|-<br />
| display_name || String || Searches users where the display name match with the given display name.<br />
|-<br />
| orSearch || Boolean || If set to true, the fields are connected through an OR search habit.<br />
|-<br />
| emailAutoComplete || Boolean || If set to true, results are guaranteed to contain at least one email adress and the search is performed by connecting the relevant fields through an OR search habit.<br />
|}<br />
<br />
Response: An array with user data. Each array element describes one user and is itself an array. The elements of each array contain the information specified by the corresponding identifiers in the columns parameter.<br />
<br />
=== Get user attribute (available with v6.20) ===<br />
<br />
GET <code>/ajax/user?action=getAttribute</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – ID of the user. <br />
* <code>name</code> – The attribute name. <br />
<br />
Response without timestamp: A JSON object providing name and value of the requested attribute<br />
<pre><br />
{ "name":"somename", "value":"somevalue"}<br />
</pre><br />
<br />
=== Set user attribute (available with v6.20) ===<br />
<br />
PUT <code>/ajax/user?action=setAttribute</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – ID of the user. <br />
* <code>setIfAbsent</code> - Set to "true" to put the value only if the specified name is not already associated with a value, otherwise "false" to put value in any case<br />
<br />
Request body: A JSON object providing name and value of the attribute. If the <code>"value"</code> field id missing or NULL, the attribute is removed.<br />
<pre><br />
{ "name":"somename", "value":"somevalue"}<br />
</pre><br />
<br />
Response: The boolean value "true" if PUT was successful; otherwise "false"<br />
<br />
== Module "OAuth" (available with v6.20) ==<br />
<br />
The OAuth module is used to manage multiple OAuth accounts for certian online services for a user. The OAuth mechanism allows the Open-Xchange application to act as behalf of this user using previously obtained access tokens granted by user.<br />
<br />
The OAuth interface is divided into two parts: Account access and service's meta data access.<br />
<br />
=== OAuth account access ===<br />
<br />
The OAuth service account access description.<br />
<br />
<br />
==== Get all OAuth accounts ====<br />
<br />
GET <code>/ajax/oauth/accounts?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – The <b>optional</b> service meta data identifier. If missing all accounts of all services are returned; otherwise all accounts of specified service are returned<br />
<br />
Response: An array with account data. Each array element is a JSON object describing an OAuth account as specified in [[#OAuthAccountData | OAuth account data]].<br />
<br />
==== Get an OAuth account ====<br />
<br />
GET <code>/ajax/oauth/accounts?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The account identifier.<br />
<br />
Response: A JSON object describing an OAuth account as specified in [[#OAuthAccountData | OAuth account data]].<br />
<br />
{| id="OAuthAccountData" cellspacing="0" border="1"<br />
|+ align="bottom" | OAuth account<br />
! Field !! Type !! Description<br />
|-<br />
| id || Number || The numeric identifier of the OAuth account.<br />
|-<br />
| displayName || String || The account display name<br />
|-<br />
| serviceId || String || The identifier of the associated service meta data; e.g. <code>"com.openexchange.oauth.twitter"</code><br />
|-<br />
| token || String || The token<br />
|-<br />
| secret || String || The token secret<br />
|-<br />
|}<br />
<br />
==== Delete an OAuth account ====<br />
<br />
PUT <code>/ajax/oauth/accounts?action=delete</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The account identifier.<br />
<br />
Response: The boolean value "true" if successful<br />
<br />
==== Update an OAuth account ====<br />
<br />
PUT <code>/ajax/oauth/accounts?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The account identifier. May also be provided in request body's JSON OAuth account representation by <code>"id"</code> field.<br />
<br />
Request body: A JSON object providing the OAuth account fields to update. See [[#OauthAccountData | OAuth account data]]. Currently the only values which make sende being updated are <code>"displayName"</code> and the <code>"token"</code>-<code>"secret"</code>-pair.<br />
<br />
Response: The boolean value "true" if successful<br />
<br />
==== Initialize creation of an OAuth account ====<br />
<br />
GET <code>/ajax/oauth/accounts?action=init</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – The service meta data identifier; e.g. <code>"com.openexchange.oauth.twitter"</code><br />
<br />
Response: An JSON representation of the resulting interaction providing needed information to complete account creation. See [[#OauthInteractionData | OAuth interaction data]].<br />
<br />
{| id="OauthInteractionData" cellspacing="0" border="1"<br />
|+ align="bottom" | OAuth interaction<br />
! Field !! Type !! Description<br />
|-<br />
| authUrl || String || The numeric identifier of the OAuth account.<br />
|-<br />
| type || String || The interaction type name; <code>"outOfBand"</code> or <code>"callback"</code><br />
|-<br />
| token || String || The token<br />
|-<br />
| uuid || String || The UUID for this OAuth interaction<br />
|-<br />
|}<br />
<br />
==== Create an OAuth account ====<br />
<br />
Note: This action is typically called by provided call-back URL and is ony intended for manual invocation if "outOfBand" interaction is returned by preceeding <code>/ajax/oauth/account?action=init</code> step.<br />
<br />
PUT <code>/ajax/oauth/accounts?action=create</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module<br />
* <code>oauth_token</code> – The request token from preceeding OAuth interaction<br />
* <code>uuid</code> – The UUID of the preceeding OAuth interaction<br />
* <code>oauth_verfifier</code> – The verifier string which confirms that user granted access<br />
* <code>displayName</code> – The display name for the new account<br />
<br />
Response: A JSON object describing the newly created OAuth account as specified in [[#OAuthAccountData | OAuth account data]].<br />
<br />
=== OAuth service meta data access ===<br />
<br />
The OAuth service meta data access description.<br />
<br />
<br />
==== Get all OAuth services' meta data ====<br />
<br />
GET <code>/ajax/oauth/services?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: An array with service data. Each array element is a JSON object describing an OAuth service's meta data as specified in [[#OAuthServiceMetaData | OAuth service meta data]].<br />
<br />
==== Get an OAuth service's meta data ====<br />
<br />
GET <code>/ajax/oauth/services?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The service's identifier.<br />
<br />
Response: A JSON object describing an OAuth service's meta data as specified in [[#OAuthServiceMetaData | OAuth service meta data]].<br />
<br />
{| id="OAuthServiceMetaData" cellspacing="0" border="1"<br />
|+ align="bottom" | OAuth service meta data<br />
! Field !! Type !! Description<br />
|-<br />
| id || Number || The numeric identifier of the OAuth account.<br />
|-<br />
| displayName || String || The account display name<br />
|-<br />
|}<br />
<br />
== Module "JSlob" (available with v6.22) ==<br />
<br />
The JSlob module is used to store&retrieve arbitrary JSON-structured configuration for a single user.<br />
<br />
<br />
=== Get all JSLobs ===<br />
<br />
GET <code>/ajax/jslob?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – Optional identifier for the JSlob service. Default is <code>com.openexchange.jslob.config</code><br />
<br />
<br />
Response: An array with JSON configurations. Each array element is a JSON object representing a certain configuration consisting if a "id" and "jslob" field. See [[#JSlobData | JSlob data ]]<br />
<br />
{| id="JSlobData" cellspacing="0" border="1"<br />
|+ align="bottom" | JSlob data<br />
! Field !! Type !! Description<br />
|-<br />
| id || String or Number || The identifier of the JSlob.<br />
|-<br />
| jslob || JSON object || The JSON configuration.<br />
|-<br />
|}<br />
<br />
=== List denoted JSLobs ===<br />
<br />
PUT <code>/ajax/jslob?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – Optional identifier for the JSlob service. Default is <code>com.openexchange.jslob.config</code><br />
<br />
<br />
Request body: A JSON array of JSlob identifiers; e.g. <code>[ "1", "2", … ]</code><br />
<br />
Response: An array with JSON configurations. Each array element is a JSON object representing a certain configuration consisting if a "id" and "jslob" field. See [[#JSlobData | JSlob data ]]<br />
<br />
=== Delete a JSlob ===<br />
<br />
PUT <code>/ajax/jslob?action=set</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – Optional identifier for the JSlob service. Default is <code>com.openexchange.jslob.config</code><br />
* <code>id</code> – The JSlob identifier.<br />
<br />
<br />
Request body: An empty request body<br />
<br />
Response: Nothing<br />
<br />
=== Store a JSlob ===<br />
<br />
PUT <code>/ajax/jslob?action=set</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – Optional identifier for the JSlob service. Default is <code>com.openexchange.jslob.config</code><br />
* <code>id</code> – The identifier for the new JSlob to create<br />
<br />
<br />
Request body: A JSON object containing the "path" and "value" of the JSON configuration to store. If "path" is missing the current configuration<br />
is merged with given JSON object.<br />
<br />
Response: Nothing<br />
<br />
=== Update a single value inside a JSlob ===<br />
<br />
PUT <code>/ajax/jslob?action=update</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>serviceId</code> – Optional identifier for the JSlob service. Default is <code>com.openexchange.jslob.config</code><br />
* <code>id</code> – The identifier for the new JSlob to create<br />
<br />
<br />
Request body: The new value to store inside specified JSlob<br />
<br />
Response: A JSlob representation according to [[#JSlobData | JSlob data ]]<br />
<br />
=== REST-like access to JSlob module ===<br />
<br />
to be done...<br />
<br />
<br />
== Module "freebusy" (available with v6.22.1) ==<br />
<br />
Provides access to free/busy information.<br />
<br />
<br />
=== Get free/busy information ===<br />
<br />
GET <code>/ajax/freebusy?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>participant</code> – The participant to get the free/busy data for. May be either an internal user-, group- or resource-ID, or an e-mail address for external participants.<br />
* <code>from</code> – The lower (inclusive) limit of the requested time-range.<br />
* <code>until</code> – The upper (exclusive) limit of the requested time-range.<br />
* <code>merged</code> (optional) – True or False. Whether to pre-process the free/busy data on the server or not. This includes sorting as well as merging overlapping free/busy intervals.<br />
<br />
Response: An array of free/busy intervals as described in [[#FreeBusyInterval | Free/Busy interval]]<br />
<br />
{| id="FreeBusyInterval" cellspacing="0" border="1"<br />
|+ align="bottom" | Free/Busy interval<br />
! Name !! Type !! Value<br />
|-<br />
| start_date || Time || Start time of the interval.<br />
|-<br />
| end_date || Time || End time of the interval.<br />
|-<br />
| shown_as || Number || The busy status of this interval, one of:<br />
{| cellspacing="0" border="1"<br />
| 1 || unknown<br />
|-<br />
| 1 || reserved<br />
|-<br />
| 2 || temporary<br />
|-<br />
| 3 || absent<br />
|-<br />
| 4 || free<br />
|}<br />
|-<br />
| id || String || Object ID of the corresponding appointment if available.<br />
|-<br />
| folder_id || String || Folder ID of the corresponding appointment if available.<br />
|-<br />
| title || String || Title of the corresponding appointment if available.<br />
|-<br />
| location || String || Location of the corresponding appointment if available.<br />
|-<br />
| full_time || Boolean || True if the corresponding appointment is a whole day appointment, not present otherwise.<br />
|}<br />
<br />
<br />
=== Get a list of free/busy information ===<br />
<br />
PUT <code>/ajax/freebusy?action=list</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>from</code> – The lower (inclusive) limit of the requested time-range.<br />
* <code>until</code> – The upper (exclusive) limit of the requested time-range.<br />
* <code>merged</code> (optional) – True or False. Whether to pre-process the free/busy data on the server or not. This includes sorting as well as merging overlapping free/busy intervals.<br />
<br />
Request body: An array of participants to get the free/busy data for. Each participant may be either an internal user-, group- or resource-ID, or an e-mail address for external participants.<br />
<br />
Response: The free/busy data for all requested participants inside a JSON object with the participants as keys. Besides a combined data element for a requested group, all group members are resolved and listed seperately in the result. If the 'merged' view was requested, an additional data element named 'merged' representing a combined view for all requested participants is added to the results implicitly.<br />
<br />
<br />
== Messaging Services ==<br />
<br />
Messaging Services represent a messaging backend. The messaging services add a new folder module "messaging". <br />
<br />
A *Messaging Service* Object has the following structure:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Messaging Service<br />
! Field !! Type !! Description<br />
|-<br />
| id || String || Identifies a messagingService. Usually a String in reverse domain name notation. Example: "com.openexchange.messaging.twitter"<br />
|-<br />
| displayName || String || Human readable display name of the service. Example: "Twitter" <br />
|-<br />
| formDescription || Array || A description for dynamic form fields. Same as in PubSub <br />
|-<br />
| messagingActions || Array || An array of Strings a dynamic set of actions that are possible with messages of this service. Described in detail later on. <br />
|-<br />
|}<br />
<br />
The available JSON calls are:<br />
<br />
GET /ajax/messaging/service?action=all<br />
<br />
* session - A session ID previously obtained from the login module. <br />
<br />
Response: A standard response object containing an array of messaging service objects. <br />
<br />
<br />
GET /ajax/messaging/service?action=get<br />
<br />
* session - A session ID previously obtained from the login module. <br />
* id - The ID of the messaging service to load<br />
<br />
Response: A standard response object containing a messaging service object.<br />
<br />
== Messaging Accounts ==<br />
<br />
A messaging account represents the concrete configuration of an account of a given messaging service.<br />
A *messaging account* has the following structure:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Messaging Account<br />
! Field !! Type !! Description<br />
|-<br />
| id || Number || Identifies a given messaging account. This is not writeable and is generated by the server <br />
|-<br />
| messagingService || String || The messaging service id of the messaging service this account belongs to <br />
|-<br />
| displayName || String || User chosen String to identify a given account. Will also be translated into the folder name of the folder representing the accounts content <br />
|-<br />
| configuration || Object || Configuration data according to the formDescription of the relevant messagingService <br />
|-<br />
|}<br />
<br />
The available JSON calls are:<br />
<br />
PUT /ajax/messaging/account?action=new<br />
<br />
* session - A session ID previously obtained from the login module.<br />
<br />
Request body: A JSON Object describing the account to be created.<br />
Response: A response object containing the new account id as its data.<br />
<br />
<br />
PUT /ajax/messaging/account?action=update<br />
<br />
* session - A session ID previously obtained from the login module.<br />
<br />
Request body: A JSON Object describing the update to the account. Note that the "id" and "messagingService" must always be set.<br />
Response: A response object containing the number 1 as its data on success.<br />
<br />
GET /ajax/messaging/account?action=get<br />
<br />
* session - A session ID previously obtained from the login module.<br />
* messagingService - The messaging service id that the account belongs to<br />
* id - An account ID to load<br />
<br />
Response: A response object containing the JSON Object representing the loaded account as its data.<br />
<br />
GET /ajax/messaging/account?action=delete<br />
<br />
* session - A session ID previously obtained from the login module.<br />
* messagingService - The messaging service id that the account belongs to<br />
* id - An account ID to delete<br />
<br />
Response: A response object containing 1 as its data on success.<br />
<br />
GET /ajax/messaging/account?action=all<br />
<br />
* session - A session ID previously obtained from the login module<br />
* messagingService - (optional) list only those accounts that belong to the given messagingService.<br />
<br />
Response: A response object containing a JSON array of account objects in its data section.<br />
<br />
<br />
== Messaging Messages ==<br />
<br />
A Messaging Message represents a single message. It consists of some metadata, headers and a content. The content attribute varies by the content-type header. <br />
If the content type is text/* it is a string, if it is a multipart/* it is an array of objects, each representing a part of the multipart. If it is anything else<br />
it is considered binary and is a Base64 encoded string (ToDo : This is not smart enough yet. I suppose we'll have to include encoding options for binaries much like in our EAVJSONProposal).<br />
<br />
The folder id of a message follows a predefined format:<br />
<br />
<pre><br />
[messagingService]://[accountId]/[path]<br />
</pre><br />
<br />
for an imaginary example consider: "com.openexchange.messaging.twitter://535/defaultTimeline/directMessages"<br />
<br />
The structure of a Messaging Message is as follows:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Messaging Message<br />
! Field !! Type !! Description<br />
|-<br />
|id ||String || The id of this message. Only unique in the given folder. <br />
|-<br />
|folder ||String || The folder id. <br />
|-<br />
|threadLevel ||Number || The nesting level of this message according to the conversation it's belonged to. May not be set. <br />
|-<br />
|flags ||Number || Bitmask showing the state of this message. The same as in the module "mail". <br />
|-<br />
|receivedDate ||Time || The time this message was received. <br />
|-<br />
|colorLabel ||Number || An arbitrary number marking this message in a certain color. The same as the colorLabel common to all groupware objects (see HTTP API)<br />
|-<br />
|user ||Array || An array of strings. Represents user flags. <br />
|-<br />
|size ||Number || The binary size of this message in bytes. <br />
|-<br />
|picture || String || A string depicting the URL to a picture for this message <br />
|-<br />
|url || String || A string that contains a link to the messages origin. Currently used in RSS messages.<br />
|-<br />
|headers ||JSONObject || A JSON Object of header data. Usually the value is either a String or an Array (if the headers has more than one value). Certain headers are rendered as more complex structures, see the section "Complex Headers". <br />
|-<br />
|content ||String or Array || See introductory note for Messaging Messages. <br />
|-<br />
|}<br />
<br />
The structure of a Multipart Part (an element of the content array in a multipart/* message) is a s follows:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Multipart Element<br />
! Field !! Type !! Description<br />
|-<br />
|sectionId || String || The sectionId of this part.<br />
|-<br />
|headers || JSONObject || Same as above. <br />
|-<br />
|content || String or Array || Same as above. <br />
|-<br />
|}<br />
<br />
Some *Complex Headers* have a structure differing from simple key/value(s) pairs. These are:<br />
<br />
=== Content-Type ===<br />
<br />
The Content-Type header is represented as a JSON Object with the following structure:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Content Type Header<br />
! Field !! Type !! Description<br />
|-<br />
| type || String || The type string (eg. text/plain). This governs the rendering of the content of a message. <br />
|-<br />
| params || Object || An Object with the keys "charset", containing the charset of this message and "name" pointing to the filename this part or message should have. <br />
|-<br />
|}<br />
<br />
When setting the content-type header in a messaging messages generated on the client the header may also be sent in it's short form. The short form is the type followed by a semi-colon separated list of key=value pairs<br />
of the params. For example: "text/plain;charset=utf-8;name=something.txt".<br />
<br />
=== Address Headers ===<br />
<br />
Address headers ( From, To,Cc,Bcc,Reply-To,Resent-Reply-To,Disposition-Notification-To,Resent-To,Sender,Resent-Sender,Resent-To,Resent-Cc,Resent-Bcc ) are formatted as an array of objects, or in case of "From" as a single object, with the attributes *address* and *personal*:<br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Address Headers<br />
! Field !! Type !! Description<br />
|-<br />
| address || String || The technical part of the address<br />
|-<br />
| personal || String || A displayable description of the addressee. May be unset.<br />
|-<br />
|}<br />
<br />
When setting an address header the header may also be sent by clients in the short form <code>"personal &lt;address&gt;"</code>, for example <code>"Clark Kent &lt;clark.kent@dailyplanet.com&gt;"</code>. <br />
<br />
=== List renderings of Messaging Messages ===<br />
<br />
Actions returning lists of messages usually return only a selection of attributes of a message driven by a "columns" parameter. The columns that are addressable point either to attributes of the top-level message or its headers. <br />
<br />
{| id="MessagingService" cellspacing="0" border="1"<br />
|+ align="bottom" | Header Equivalence<br />
! Column !! Refers To<br />
|-<br />
| *column* | *refers to* <br />
|-<br />
| id || The id attribute <br />
|-<br />
| folderId || The folder attribute <br />
|-<br />
| contentType || The "Content-Type" header <br />
|-<br />
| from || The "From" header <br />
|-<br />
| to || The "To" header <br />
|-<br />
| cc || The "Cc" header <br />
|-<br />
| bcc || The "Bcc" header <br />
|-<br />
| subject || The "Subject" header <br />
|-<br />
| size || The size attribute <br />
|-<br />
| sentDate || The "Date" header <br />
|-<br />
| receivedDate || The receivedDate attribute <br />
|-<br />
| flags || The flags attribute <br />
|-<br />
| threadLevel || The threadLevel attribute <br />
|-<br />
| dispositionNotificationTo || The "Disposition-Notification-To" header. <br />
|-<br />
| priority || The "X-Priority" header <br />
|-<br />
| colorLabel || The colorLabel attribute <br />
|-<br />
| url || The url attribute <br />
|-<br />
| body || The content attribute <br />
|-<br />
| headers || The headers attribute <br />
|-<br />
|}<br />
<br />
=== JSON calls ===<br />
<br />
GET /ajax/messaging/message?action=get<br />
<br />
* session - A session ID previously obtained from the login module<br />
* id - The ID of the message to load<br />
* peek - (optional) if set to "true" the read/unread state of the message will not change. Defaults to false.<br />
* folder - The folder id<br />
<br />
Response: An Object representing the loaded message.<br />
<br />
PUT /ajax/messaging/message?action=send<br />
<br />
* session - A session ID previously obtained from the login module<br />
* recipients - (optional) If set the message is sent to the given list of recipients, otherwise this defaults to the "To" header of the message.<br />
<br />
Request Body: The Request Body should contain the JSON Object representing the message to be sent.<br />
Response: "1" as the data of a regular response on success.<br />
<br />
GET or PUT /ajax/messaging/message?action=perform<br />
<br />
* session - A session ID previously obtained from the login module<br />
* action - The messaging action to invoke<br />
* id - The id of the message the action should be invoked on. Only used on actions of type "storage".<br />
* folder - The folder id.<br />
<br />
Request Body: On actions of type "message" the body should contain the JSON representation of the message the action should be applied to.<br />
Response: Either 1 if no further user interaction is needed or a messaging message that, after having the user modify it has to be supplied back to the follower action of this action.<br />
<br />
Thus, to invoke a messaging action of type "storage" the folder and id are needed. Messaging actions of type "message" need a folder and message in the body. <br />
Messaging actions of type "none" need a messaging message and account. <br />
<br />
==== List style requests ====<br />
<br />
GET /ajax/messaging/message?action=all<br />
<br />
* session - A session ID previously obtained from the login module<br />
* columns - A comma-separated list of column names.<br />
* sort - (optional) A column to sort by.<br />
* order - (optional) The order direction. "asc" for ascending or "desc" for descending. Defaults to "asc"<br />
* folder - The folder id.<br />
<br />
Response: An array of arrays with the sub arrays containing the values of the fields asked for by the the columns parameter.<br />
<br />
<br />
PUT /ajax/messaging/messages?action=list<br />
<br />
* session - A session ID previously obtained from the login module<br />
* columns - A comma-separated list of column names.<br />
<br />
Request Body: An array of arrays with the folder and id as elements each identifying a message. <br />
<br />
Response: An array of arrays with the sub arrays containing the values of the fields asked for by the columns parameter.<br />
<br />
== Snippet module (available with v7.0.0/v6.22.0) ==<br />
<br />
=== Gets a certain snippet by identifier ===<br />
<br />
GET /ajax/snippet?action=get<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier<br />
<br />
Response:<br />
The snippet's JSON representation; e.g.<br />
<br />
{<br />
"id": "1",<br />
"type": "signature",<br />
"props": {"x-custom": "any value"},<br />
"module": "mail",<br />
"displayname": "My signature",<br />
"misc": {"foo": "bar"},<br />
"createdby": 17,<br />
"content": "-- \\nMy name and position here",<br />
"accountid": 0,<br />
"shared": false,<br />
"files":<br />
[<br />
{<br />
"mimetype": "image/png; name=pic.png",<br />
"filename": "pic.png",<br />
"id": "46f49f8a-40d5-4f29-8bc9-728f3420864c",<br />
"size": 6074<br />
}<br />
]<br />
}<br />
<br />
=== Gets all snippets associated with the current user and context ===<br />
<br />
GET /ajax/snippet?action=all<br />
<br />
* session - The session identifier<br />
* type - Optional CSV of types to filter by; e.g. "signature"<br />
<br />
Response:<br />
A JSON array of snippets' JSON representations<br />
<br />
<br />
<br />
=== Gets certain snippets by identifiers ===<br />
<br />
GET /ajax/snippet?action=list<br />
<br />
* session - The session identifier<br />
<br />
Request body:<br />
A JSON array of snippet identifiers<br />
<br />
Response:<br />
A JSON array of snippets' JSON representations<br />
<br />
<br />
<br />
=== Gets a certain snippet's attachment by identifier ===<br />
<br />
GET /ajax/snippet?action=getattachment<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier<br />
* attachmentid - The attachment identifier<br />
<br />
Response:<br />
The attachment's raw data<br />
<br />
<br />
<br />
=== Creates a new snippet ===<br />
<br />
PUT /ajax/snippet?action=new<br />
<br />
* session - The session identifier<br />
<br />
Request body:<br />
A JSON representation of the snippet.<br />
Excluding its attachments (see attach/detach actions)<br />
<br />
Response:<br />
The created snippet's identifier<br />
<br />
<br />
<br />
=== Updates a certain snippet by identifier ===<br />
<br />
PUT /ajax/snippet?action=update<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier<br />
<br />
Request body:<br />
A JSON representation of the snippet providing the fields that should be changed.<br />
Excluding its attachments (see attach/detach actions)<br />
<br />
Response:<br />
The updated snippet's JSON representation<br />
<br />
<br />
<br />
=== Deletes a certain snippet by identifier ===<br />
<br />
PUT /ajax/snippet?action=delete<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier (otherwise provide one or more identifiers through request body's JSON array)<br />
<br />
Request body:<br />
A JSON array of identifiers denoting the snippets to delete<br />
<br />
Response:<br />
An empty/dummy result (don't care)<br />
<br />
<br />
<br />
=== Attaches one or more files to an existing snippet ===<br />
<br />
POST /ajax/snippet?action=attach<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier<br />
<br />
Request body:<br />
Multipart form data providing the upload files to attach to the snippet.<br />
<br />
Response:<br />
The updated snippet's identifier<br />
<br />
<br />
<br />
=== Detaches open or more files from an existing snippet ===<br />
<br />
PUT /ajax/snippet?action=detach<br />
<br />
* session - The session identifier<br />
* id - The snippet identifier<br />
<br />
Request body:<br />
A JSON array providing the identifiers of the attachments to remove from snippet<br />
<br />
Response:<br />
The updated snippet's identifier<br />
<br />
== Picture Halo (since 7.4.1) ==<br />
<br />
GET /appsuite/api/halo/contact/picture<br />
* session - (optional) falls back to the public session cookie<br />
* internal_userid - (optional) The internal user id of a user whose picture you want to load<br />
* userid - (optional) an alias for internal_userid<br />
* user_id - (optional) an alias for internal_userid<br />
* id - (optional) a contact id<br />
* email - (optional) an email to search for. Will pick global address book matches before regular matches. After that picks the most recently changed contact<br />
* email1 - (optional) an alias for email<br />
* email2 - (optional) another email address to use to find matches<br />
* email3 - (optional) and yet another email address to use to find matches<br />
<br />
''At least one of the optional search parameters should be set. All parameters are connected by OR during the search. More specific parameters like user_id or id are prioritized in case of multiple matches.''<br />
<br />
Response:<br />
The picture with proper eTag and caching headers set, or an HTTP Status 404 response, if no picture could be found.<br />
<br />
<br />
== Module "capabilities" (available with v7.4.2) ==<br />
<br />
Provides access to capabilities, i.e. modules or features that are available on the backend and the user has access to.<br />
<br />
=== Get a capability ===<br />
<br />
GET <code>/ajax/capabilities?action=get</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>id</code> – The identifier of the capability<br />
<br />
Response: The requested capability as described in [[#Capability| Capability]], if available, otherwise an empty result<br />
<br />
{| id="Capability" cellspacing="0" border="1"<br />
|+ align="bottom" | Capability<br />
! Name !! Type !! Value<br />
|-<br />
| id || String || The identifier of the capability<br />
|-<br />
| attributes || Object || A JSON object holding optional properties of the capability <br />
|}<br />
<br />
=== Get all capabilities ===<br />
<br />
GET <code>/ajax/capabilities?action=all</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
<br />
Response: An array of capability objects as described in [[#Capability| Capability]].<br />
<br />
<br />
== Module "jump" (available with v7.6.0) ==<br />
<br />
The jump module is used to pass an acquired identity token for an authenticated user from one system to another for a single sign-on.<br />
<br />
=== Acquire an identity token ===<br />
<br />
GET <code>/ajax/jump?action=identityToken</code><br />
<br />
Parameters:<br />
* <code>session</code> – A session ID previously obtained from the login module.<br />
* <code>system</code> – The identifier for the external service/system<br />
<br />
Response: The acquired identity token wrapped by a simple JSON object as described in [[#Jump| Jump]]<br />
<br />
{| id="Jump" cellspacing="0" border="1"<br />
|+ align="bottom" | Jump<br />
! Name !! Type !! Value<br />
|-<br />
| token || String || The identifier of the token<br />
|}<br />
<br />
== Module "find" (preliminary, available with v7.6.1) ==<br />
The Find API consists of calls for performing searches within the modules mail, contacts, calendar, tasks and drive. It was designed to provide an iterative approach where the search criteria can be refined step-wise until the desired items are found. The starting point is always an "autocomplete" request, that suggests possible search filters based on a users input. Those filters are grouped into categories, called "facets". A facet may provide one or more "values" with every value being a possible filter. A client is meant to remember every value that was selected by a user and include it within the following "autocomplete" and "query" requests, while "query" performs the actual search and returns the found items.<br />
<br />
Every request is bound to a module that must be specified via the URL-Parameter "module". Possible modules are<br />
* mail<br />
* contacts<br />
* calendar<br />
* tasks<br />
* drive<br />
<br />
=== General assumptions ===<br />
Some of the objects returned by the server contain former user input. A client must never interpret strings as HTML but always as plain text to be not vulnerable for CSS attacks!<br />
<br />
=== Calls ===<br />
The find API provides two dedicated calls under the servlet path <code>find</code>:<br />
* action=autocomplete<br />
* action=query<br />
<br />
=== Facets ===<br />
The style of a facet is responsible for how the according object is structured, how it is handled on the server-side and how the client has to handle it.<br />
We distinguish three styles of facets:<br />
* simple<br />
* default<br />
* exclusive<br />
<br />
Every facet value contains an embedded "filter" object. The filter must not be changed by the client, it has to be seen as a black-box. Instead the filters<br />
of selected facet values have to be copied and sent to the server with the subsequent requests.<br />
<br />
==== Simple Facets ====<br />
A simple facet is a special facet that has exactly one value. The facets<br />
type and its value are strictly coupled, in a way that a display name for both,<br />
facet and value would be redundant. A simple facet generally denotes a logical field like<br />
'phone number'. Internally this logical field can map to several internal fields<br />
(e.g. 'phone_private', 'phone_mobile', 'phone_business'). In clients the facet as<br />
a whole can be displayed as a single item. Example: "Search for 'term' in field 'phone<br />
number'".<br />
<br />
<br />
{| id="Facet Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Facet Structure<br />
! Field !! Type !! Description<br />
|-<br />
| style || "simple" || Denotes that this is a facet of style simple<br />
|-<br />
| id || <string> || The id of this facet. Unique within an autocomplete response. Can be used to distinguish and filter certain facets.<br />
|-<br />
| name || <string> || A displayable (and localized) name for this facet. If absent, an "item" attribute is present.<br />
|-<br />
| item (optional) || <object> || A more complex object to display this facet. Attributes are "name", "detail" (optional) and "image_url" (optional).<br />
|-<br />
| filter || <object> || The filter to refine the search.<br />
|-<br />
| flags || <array> || An array of flags, represented as strings.<br />
|}<br />
<br />
Example:<br />
<pre><br />
{<br />
"id":"global",<br />
"style":"simple",<br />
"name":"test",<br />
"filter":{},<br />
"flags":[]<br />
}<br />
</pre><br />
<br />
==== Default Facets ====<br />
A default facet contains multiple values and may be present<br />
multiple times in search requests to filter results by a combination of different<br />
values (e.g. "mails with 'foo' and 'bar' in subject").<br />
<br />
Facet values may be one- or two-dimensional. A one-dimensional value can be displayed as is and contains an according filter object.<br />
A two-dimensional value contains an array "options" with every option defining different semantics of how the value is used to filter the search results.<br />
<br />
{| id="Default Facet Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Facet Structure<br />
! Field !! Type !! Description<br />
|-<br />
| style || "default" || Denotes that this is a facet of style default<br />
|-<br />
| id || <string> || The id of this facet. Unique within an autocomplete response. Can be used to distinguish and filter certain facets.<br />
|-<br />
| name || <string> || A displayable (and localized) name for this facet. If absent, an "item" attribute is present.<br />
|-<br />
| item (optional) || <object> || A more complex object to display this facet. Attributes are "name", "detail" (optional) and "image_url" (optional).<br />
|-<br />
| values || <array> || An array of facet values.<br />
|-<br />
| flags || <array> || An array of flags, represented as strings.<br />
|}<br />
<br />
{| id="Default Facet Value Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Value Structure<br />
! Field !! Type !! Description<br />
|-<br />
| id || <string> || The values id. Unique within one facet.<br />
|-<br />
| name || <string> || A displayable (and localized) name for this value. May be superseded with an "item" attribute. Absent if the value contains options.<br />
|-<br />
| item (optional) || <object> || A more complex object to display this value. Attributes are "name", "detail" (optional) and "image_url" (optional). Absent if the value contains options.<br />
|-<br />
| filter || <object> || The filter to refine the search. Absent if the value contains options.<br />
|-<br />
| options (optional) || <array> || An array of options.<br />
|}<br />
<br />
{| id="Default Facet Option Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Option Structure<br />
! Field !! Type !! Description<br />
|-<br />
| id || <string> || The options id. Unique within a set of options.<br />
|-<br />
| name || <string> || The displayable (and localized) name for this option.<br />
|-<br />
| filter || <object> || The filter to refine the search.<br />
|-<br />
|}<br />
<br />
Example:<br />
<pre><br />
{<br />
"id":"contacts",<br />
"style":"default",<br />
"name":"People",<br />
"values":[<br />
{<br />
"id":"contact/424242669/525793",<br />
"item":{<br />
"name":"Test Usere2123",<br />
"detail":"testuse1212r@example.com"<br />
},<br />
"options":[<br />
{<br />
"id":"from",<br />
"name":"From",<br />
"filter":{}<br />
},<br />
{<br />
"id":"to",<br />
"name":"To",<br />
"filter":{}<br />
},<br />
{<br />
"id":"all",<br />
"name":"From/To",<br />
"filter":{}<br />
}<br />
]<br />
}<br />
],<br />
"flags":[]<br />
}<br />
</pre><br />
<br />
==== Exclusive Facets ====<br />
An exclusive facet is a facet where the contained values are<br />
mutually exclusive. That means that the facet must only be present once<br />
in an autocomplete or query request.<br />
<br />
Facet values may be one- or two-dimensional. A one-dimensional value can be displayed as is and contains an according filter object.<br />
A two-dimensional value contains an array "options" with every option defining different semantics of how the value is used to filter the search results. <br />
<br />
{| id="Exclusive Facet Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Facet Structure<br />
! Field !! Type !! Description<br />
|-<br />
| style || "exclusive" || Denotes that this is a facet of style exclusive<br />
|-<br />
| id || <string> || The id of this facet. Unique within an autocomplete response. Can be used to distinguish and filter certain facets.<br />
|-<br />
| name || <string> || A displayable (and localized) name for this facet. If absent, an "item" attribute is present.<br />
|-<br />
| item (optional) || <object> || A more complex object to display this facet. Attributes are "name", "detail" (optional) and "image_url" (optional).<br />
|-<br />
| options || <array> || An array of facet values.<br />
|-<br />
| flags || <array> || An array of flags, represented as strings.<br />
|}<br />
<br />
{| id="Exclusive Facet Value Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Value Structure<br />
! Field !! Type !! Description<br />
|-<br />
| id || <string> || The values id. Unique within one facet.<br />
|-<br />
| name || <string> || A displayable (and localized) name for this value. May be superseded with an "item" attribute. Absent if the value contains options.<br />
|-<br />
| item (optional) || <object> || A more complex object to display this value. Attributes are "name", "detail" (optional) and "image_url" (optional). Absent if the value contains options.<br />
|-<br />
| filter || <object> || The filter to refine the search. Absent if the value contains options.<br />
|-<br />
| options (optional) || <array> || An array of options.<br />
|}<br />
<br />
{| id="Exclusive Facet Option Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Option Structure<br />
! Field !! Type !! Description<br />
|-<br />
| id || <string> || The options id. Unique within a set of options.<br />
|-<br />
| name || <string> || The displayable (and localized) name for this option.<br />
|-<br />
| filter || <object> || The filter to refine the search.<br />
|-<br />
|}<br />
<br />
Example:<br />
<pre><br />
{<br />
"id":"time",<br />
"style":"exclusive",<br />
"name":"Time",<br />
"options":[<br />
{<br />
"id":"last_week",<br />
"name":"last week",<br />
"filter":{}<br />
},<br />
{<br />
"id":"last_month",<br />
"name":"last month",<br />
"filter":{}<br />
},<br />
{<br />
"id":"last_year",<br />
"name":"last year",<br />
"filter":{}<br />
}<br />
],<br />
"flags":[]<br />
}<br />
</pre><br />
<br />
<br />
==== Active Facets ====<br />
Every value that has been selected by a user must be remembered and provided with every subsequent request. The representation of a facet within a request body differs from the one within an autocomplete response. We call those "active facets". Their representation is independent from their style.<br />
<br />
{| id="Active Facet Structure" cellspacing="0" border="1"<br />
|+ align="bottom" | Active Facet Structure<br />
! Field !! Type !! Description<br />
|-<br />
| facet || <string> || The id of the according facet.<br />
|-<br />
| value || <string> || The id of the according value. Must always be copied from the value object, not from a possibly according option (in the two-dimensional case).<br />
|-<br />
| filter || <object> || The filter object, copied from the value or option.<br />
|}<br />
<br />
<br />
=== Configuration ===<br />
According to the users configuration, some restrictions may apply that have to be heeded by clients. Those restrictions can be retrieved via the "config" or the "jslob" modules. The following restrictions may apply:<br />
<br />
* A user might have limited access to modules and therefore the Find API may only serve requests for a subset of all possible modules. The configuration object may contain an object with key "modules". Its value is an array containing all module identifiers that the user is allowed to use.<br />
<br />
* Some facets can be mandatory, i.e. they must be pre-defined by the client and provided with every request. Whether a facet is mandatory or not is decided on a per-module basis. The configuration object may contain an object with key "mandatory". Every facet that may be mandatory is specified via its id in that object (e.g. mandatory.folder). The value of such a key is either an array containing all module identifiers, where the facet is mandatory or null, if it is not manadatory in any module.<br />
<br />
* Due to performance reasons the service provider can enforce a minimium number of characters that have to be provided before an autocomplete request may be issued. That property is called "minimumQueryLength" and its value is an integer that specifies the minimum number of characters. If a client does not heed this property, the server will respond with an error if the provided user input is too short.<br />
<br />
==== Config Example ====<br />
<pre><br />
GET http://localhost/appsuite/api/config/search?session={{session}}<br />
Response:<br />
{<br />
"data": {<br />
"mandatory": {<br />
"folder": [<br />
"mail"<br />
]<br />
},<br />
"modules": [<br />
"mail",<br />
"contacts",<br />
"calendar",<br />
"tasks",<br />
"drive"<br />
]<br />
}<br />
}<br />
<br />
GET http://localhost/appsuite/api/config/minimumSearchCharacters?session={{session}}<br />
Response:<br />
{<br />
"data": 0<br />
}<br />
</pre><br />
<br />
==== JSLob Example ====<br />
<pre><br />
GET http://localhost/appsuite/api/jslob?action=get&id=io.ox/core&session={{session}}<br />
Response:<br />
{<br />
"data": {<br />
"id": "io.ox/core",<br />
"tree": {<br />
"search": {<br />
"modules": [<br />
"mail",<br />
"contacts",<br />
"calendar",<br />
"tasks",<br />
"drive"<br />
],<br />
"mandatory": {<br />
"folder": [<br />
"mail"<br />
]<br />
},<br />
"minimumQueryLength": 0<br />
}<br />
}<br />
}<br />
}<br />
</pre><br />
<br />
=== autocomplete ===<br />
Mandatory URL parameters:<br />
* action=autocomplete<br />
* module=<module-name><br />
* session=<session-id><br />
<br />
Optional URL parameters:<br />
* limit=<int> - The maximum number of values returned per facet<br />
<br />
Request body: A JSON object containing the users input (specified as "prefix"), already selected facets and possible options.<br />
<br />
<br />
==== Example ====<br />
<pre><br />
PUT http://localhost/appsuite/api/find?action=autocomplete&module=mail&limit=3&session={{session}}<br />
{<br />
"prefix":"test", <br />
"facets":[<br />
{<br />
"facet":"folder",<br />
"value":"default0/INBOX"<br />
}<br />
],<br />
"options":{<br />
"timezone":"UTC",<br />
"admin":false<br />
}<br />
}<br />
<br />
Response:<br />
{<br />
"data":{<br />
"facets":[<br />
{<br />
"id":"global",<br />
"style":"simple",<br />
"name":"test",<br />
"filter":{},<br />
"flags":[]<br />
}, <br />
{<br />
"id":"contacts",<br />
"style":"default",<br />
"name":"People",<br />
"values":[<br />
{<br />
"id":"contact/424242669/525793",<br />
"item":{<br />
"name":"Test Usere2123",<br />
"detail":"testuse1212r@example.com"<br />
},<br />
"options":[<br />
{<br />
"id":"from",<br />
"name":"From",<br />
"filter":{}<br />
},<br />
{<br />
"id":"to",<br />
"name":"To",<br />
"filter":{}<br />
},<br />
{<br />
"id":"all",<br />
"name":"From/To",<br />
"filter":{}<br />
}<br />
]<br />
}<br />
],<br />
"flags":[]<br />
},<br />
{<br />
"id":"time",<br />
"style":"exclusive",<br />
"name":"Time",<br />
"options":[<br />
{<br />
"id":"last_week",<br />
"name":"last week",<br />
"filter":{}<br />
},<br />
{<br />
"id":"last_month",<br />
"name":"last month",<br />
"filter":{}<br />
},<br />
{<br />
"id":"last_year",<br />
"name":"last year",<br />
"filter":{}<br />
}<br />
],<br />
"flags":[]<br />
}<br />
]<br />
}<br />
}<br />
</pre><br />
<br />
=== query ===<br />
Mandatory URL parameters:<br />
* action=query<br />
* module=<module-name><br />
* session=<session-id><br />
<br />
Optional URL parameters:<br />
* columns=<column-ids> - A comma-separated list of the module-specific columns that shall be contained in the response items.<br />
<br />
Request body: A JSON object containing the selected facets and possible options. For pagination the keys "start" and "size" can be set.<br />
<br />
==== Example ====<br />
<pre><br />
PUT http://localhost/appsuite/api/find?action=query&module=mail&columns=102,600,601,602,603,604,605,607,608,610,611,614,652&session={{session}}<br />
{<br />
"facets":[<br />
{<br />
"facet":"folder",<br />
"value":"default0/INBOX",<br />
"filter":null<br />
},<br />
{<br />
"facet":"subject",<br />
"value":1409579708116,<br />
"filter":{<br />
"fields":[<br />
"subject"<br />
],<br />
"queries":[<br />
"lorem"<br />
]<br />
}<br />
}<br />
],<br />
"options":{<br />
"timezone":"UTC",<br />
"admin":false<br />
},<br />
"start":0,<br />
"size":101<br />
}<br />
<br />
Response:<br />
{<br />
"data":{<br />
"num_found":-1,<br />
"start":0,<br />
"size":1,<br />
"results":[<br />
{<br />
"color_label":0,<br />
"id":"110458",<br />
"folder_id":"default0/INBOX",<br />
"attachment":false,<br />
"from":[<br />
[<br />
"John Doe",<br />
"john.doe@example.com"<br />
]<br />
],<br />
"to":[<br />
[<br />
"Jane Doe",<br />
"jane.doe@example.com"<br />
]<br />
],<br />
"cc":[<br />
<br />
],<br />
"subject":"Lorem Ipsum",<br />
"size":7501,<br />
"received_date":1408531387000,<br />
"flags":32,<br />
"priority":3,<br />
"account_name":"E-Mail",<br />
"account_id":0<br />
}<br />
]<br />
}<br />
}<br />
</pre><br />
<br />
=== Available Options ===<br />
Every request body may contain an "options" object to finetune some specific behavior. Currently possible options are:<br />
* timezone: <tz-name> - The timezone to use if any dates are returned.<br />
* admin: <boolean> - true to include the context admin if it matches any search criteria. If the context admin shall always be ignored (i.e. not returned), false has to be set.<br />
<br />
=== Possible Flags ===<br />
Every facet may carry one or more flags that describe further aspects of that facet. Currently possible flags are:<br />
* conflicts - Specified in the form of "conflicts:<other-id>". A facet carrying this flag must not be combined with a facet of type <other-id>.</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18676
ChangePasswordExternal
2014-10-01T13:05:35Z
<p>Cutmasta: /* Configuration Options */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP. <br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password <br />
<br />
[[File:Passwordchange_installation_dialog_view_appsuite.png]]<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
<br />
To configure the actual script, which gets executed after the user uses the AppSuite password change dialog, you have to edit the following properties file:<br />
<br />
/opt/open-xchange/etc/change_pwd_script.properties<br />
<br />
And for example add the path to an existing script: <br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl <br />
<br />
INFO: If you implement a custom script, you have to implement pre-defined exit codes for your script, which then get translated to user friendly error messages. The list of pre-defined exit codes are documented within the above mentioned properies file. <br />
<br />
IMPORTANT: AppSuite does not ship with any readymade password change scripts. For examples, please see below. <br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18675
ChangePasswordExternal
2014-10-01T13:03:47Z
<p>Cutmasta: </p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP. <br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password <br />
<br />
[[File:Passwordchange_installation_dialog_view_appsuite.png]]<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
<br />
To configure the actual script, which gets executed after the user uses the AppSuite password change dialog, you have to edit the following properties file:<br />
<br />
/opt/open-xchange/etc/change_pwd_script.properties<br />
<br />
And for example add the path to an existing script: <br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
IMPORTANT: AppSuite does not ship with any readymade password change scripts. For examples, please see below. <br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=File:Passwordchange_installation_dialog_view_appsuite.png&diff=18674
File:Passwordchange installation dialog view appsuite.png
2014-10-01T13:02:48Z
<p>Cutmasta: </p>
<hr />
<div></div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18673
ChangePasswordExternal
2014-10-01T12:59:50Z
<p>Cutmasta: /* Configuration Options */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
<br />
To configure the actual script, which gets executed after the user uses the AppSuite password change dialog, you have to edit the following properties file:<br />
<br />
/opt/open-xchange/etc/change_pwd_script.properties<br />
<br />
And for example add the path to an existing script: <br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
IMPORTANT: AppSuite does not ship with any readymade password change scripts. For examples, please see below. <br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18672
ChangePasswordExternal
2014-10-01T12:59:30Z
<p>Cutmasta: /* Configuration Options */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
<br />
To configure the actual script, which gets executed after the user uses the AppSuite password change dialog, you have to edit the following properties file:<br />
<br />
/opt/open-xchange/etc/change_pwd_script.properties<br />
<br />
And for example add the path to an existing script: <br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
IMPORTANT: AppSuite does not ship with any readymade password change scripts. For examples, please see below. <br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18671
ChangePasswordExternal
2014-10-01T12:57:34Z
<p>Cutmasta: /* Example */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18670
ChangePasswordExternal
2014-10-01T12:57:04Z
<p>Cutmasta: /* Enable the password change dialog within the AppSuite Frontend */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password<br />
<br />
== Configuration Options == <br />
<br />
As you see in the screenshot, there are different password options like the min. length etc. Those options can be configured within the following properties file. After you have modified this file, you must restart the open-xchange process. <br />
<br />
/opt/open-xchange/etc/passwordchange.properties<br />
<br />
== Example ==<br />
<br />
In <tt>/opt/open-xchange/etc/change_pwd_script.properties</tt> add this line:<br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18669
ChangePasswordExternal
2014-10-01T12:53:40Z
<p>Cutmasta: /* Enable the password change dialog within the AppSuite Frontend */</p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
You can also use all other AppSuite provisioning interfaces like JAVA RMI or SOAP. Please review the corresponding documentation for each interface for details. <br />
<br />
Screenshot of the password change dialog within AppSuite -> Settings -> Basic Settings -> Password<br />
<br />
== Example ==<br />
<br />
In <tt>/opt/open-xchange/etc/change_pwd_script.properties</tt> add this line:<br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=ChangePasswordExternal&diff=18668
ChangePasswordExternal
2014-10-01T12:46:29Z
<p>Cutmasta: </p>
<hr />
<div>== Introduction ==<br />
<br />
The package <tt>open-xchange-passwordchange-script</tt> allows you to run a command to change a password in an external subsystem like e.g. LDAP.<br />
<br />
== Installation ==<br />
<br />
{{InstallPlugin|pluginname=open-xchange-passwordchange-script|sopath=stable}}<br />
<br />
== Enable the password change dialog within the AppSuite Frontend ==<br />
<br />
After the installation of the package, you must explicitly enable the password change dialog for each AppSuite user. The simplest option to do this, is executing the following command:<br />
<br />
/opt/open-xchange/sbin/changeuser -c <_context_id_> -u <_user_name_> --access-edit-password on<br />
<br />
<br />
== Example ==<br />
<br />
In <tt>/opt/open-xchange/etc/change_pwd_script.properties</tt> add this line:<br />
<br />
com.openexchange.passwordchange.script.shellscript=/bin/pwchange.pl<br />
<br />
=== Example Script 1 ===<br />
<br />
This example script calls <tt>saslpasswd</tt> to change the password in the sasldb:<br />
<br />
#! /usr/bin/perl -w -T<br />
#<br />
# perlsec(1) for security related perl programming<br />
#<br />
use Getopt::Long;<br />
use strict;<br />
<br />
my $user;<br />
my $pw;<br />
my $result;<br />
my $cid;<br />
my $oldpassword;<br />
my $userid;<br />
<br />
open(LOG, '>>/var/log/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
# secure env<br />
$ENV{'PATH'} = "";<br />
$ENV{'ENV'} = "";<br />
<br />
$result = GetOptions ("username=s" => \$user,<br />
"cid" => \$cid,<br />
"userid" => \$userid,<br />
"oldpassword" => \$oldpassword,<br />
"newpassword=s" => \$pw);<br />
<br />
$user || &log_error("missing parameter username");<br />
print LOG "changing password for user $user\n";<br />
$pw || &log_error("missing parameter newpassword");<br />
<br />
my $usersav = $user;<br />
<br />
# add a taint check<br />
if ($user =~ /^([-\@\w.]+)$/) {<br />
$user = $1; # $data now untainted<br />
} else {<br />
&log_error("Bad data in '$user'");<br />
}<br />
<br />
die "Can't fork: $!" unless defined(my $pid = open(KID, "|-"));<br />
if ($pid) { # parent<br />
print KID $pw;<br />
close KID;<br />
} else {<br />
exec '/usr/bin/sudo', '/usr/sbin/saslpasswd2', '-p', "$user"<br />
or &log_error("can't exec myprog: $!");<br />
}<br />
close(LOG);<br />
<br />
=== Example Script 2 ===<br />
<br />
The following script uses ldappasswd to change the password in an LDAP server.<br />
<br />
#!/bin/bash<br />
ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 \<br />
-s ${10} "uid=$4,ou=people,dc=example,dc=com"<br />
<br />
=== Example Script 3 ===<br />
<br />
The following script uses open-xchange-passwordchange-script data to change the password within LDAP<br />
<br />
#!/usr/bin/perl -w <br />
# Begin LDAP Stuff<br />
use Net::LDAP;<br />
use Net::LDAP::Extension::SetPassword;<br />
my $cid = $ARGV[1];<br />
my $userid = $ARGV[5];<br />
my $oldpw = $ARGV[7];<br />
my $hostname= 'localhost';<br />
my $rootdn= 'cn=Administrator,dc=example,dc=com';<br />
my $userbind= 'ou=People,dc=example,dc=com';<br />
my $adminpasswd='system';<br />
my $name= $ARGV[3];<br />
my $newpasswd= $ARGV[9];<br />
my $ldap = Net::LDAP->new("$hostname")<br />
or die "Host not found: $!";<br />
<br />
open(LOG, '>>/var/log/open-xchange/pw.log'); <br />
<br />
sub log_error {<br />
my $errorstring=$_[0];<br />
print LOG "Error: $errorstring\n";<br />
die "$errorstring";<br />
}<br />
<br />
$name || &log_error("missing parameter username");<br />
print LOG "changing password for $ARGV[2]: $name with $ARGV[0]: $cid and $ARGV[4]: $userid\n";<br />
$newpasswd || &log_error("missing parameter newpassword");<br />
<br />
$ldap->bind( "$rootdn", password => "$adminpasswd" );<br />
<br />
my $mesg = $ldap->set_password(<br />
newpasswd => "$newpasswd",<br />
user => "uid=$name,$userbind"<br />
);<br />
<br />
die "error: ", $mesg->code(), ": ", $mesg->error() if ( $mesg->code() );<br />
close(LOG);</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=Template:InstallPlugin&diff=18667
Template:InstallPlugin
2014-10-01T12:40:18Z
<p>Cutmasta: /* Installation on OX {{#if:{{{version|}}}|{{{version}}}|v6.20.x}} */</p>
<hr />
<div>== Installation on OX {{#if:{{{version|}}}|{{{version}}}| AppSuite}}==<br />
<br />
=== Debian GNU/Linux 6.0 ===<br />
<br />
Add the following entry to <tt>/etc/apt/sources.list.d/open-xchange.list</tt> if not already present:<br />
<br />
deb http://{{#if:{{{ldbaccount|}}}|{{{ldbaccount}}}@|}}software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/DebianSqueeze/ /{{#if:{{{ldbaccount|}}}||<br />
<code><br />
# if you have a valid maintenance subscription, please uncomment the <br />
# following and add the ldb account data to the url so that the most recent<br />
# packages get installed<br />
# deb http://LDBACCOUNT:LDBPASSWORD@software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/updates/DebianSqueeze/ /<br />
</code><br />
}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install {{{pluginname}}}<br />
<br />
=== Debian GNU/Linux 7.0 ===<br />
<br />
Add the following entry to <tt>/etc/apt/sources.list.d/open-xchange.list</tt> if not already present:<br />
<br />
deb http://{{#if:{{{ldbaccount|}}}|{{{ldbaccount}}}@|}}software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/DebianWheezy/ /{{#if:{{{ldbaccount|}}}||<br />
<code><br />
# if you have a valid maintenance subscription, please uncomment the <br />
# following and add the ldb account data to the url so that the most recent<br />
# packages get installed<br />
# deb http://LDBACCOUNT:LDBPASSWORD@software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/updates/DebianWheezy/ /<br />
</code><br />
}}<br />
<br />
and run<br />
<br />
$ apt-get update<br />
$ apt-get install {{{pluginname}}}<br />
<br />
=== SUSE Linux Enterprise Server 11 ===<br />
<br />
Add the package repository using <tt>zypper</tt> if not already present:<br />
<br />
$ zypper ar http://{{#if:{{{ldbaccount|}}}|{{{ldbaccount}}}@|}}software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/SLES11 {{#if:{{{reponame|}}}|{{{reponame}}}|ox}}<br />
{{#if:{{{ldbaccount|}}}||<br />
If you have a valid maintenance subscription, please run the following command and add the ldb account data to the url so that<br />
the most recent packages get installed:<br />
$ zypper ar http://LDBACCOUNT:LDBPASSWORD@software.open-xchange.com/{{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}/{{{sopath}}}/updates/SLES11 ox-updates<br />
}}<br />
<br />
and run<br />
<br />
$ zypper ref<br />
$ zypper in {{{pluginname}}}<br />
<br />
{{InstallPluginRHEL|ldbaccount={{#if:{{{ldbaccount|}}}|{{{ldbaccount}}}|}}|rheltitle=RedHat Enterprise Linux 6|rhelname=RHEL6|pluginname={{{pluginname}}}|sopath={{{sopath}}}|reponame={{#if:{{{reponame|}}}|{{{reponame}}}|ox}}|toplevel={{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}}}<br />
<br />
{{InstallPluginRHEL|ldbaccount={{#if:{{{ldbaccount|}}}|{{{ldbaccount}}}|}}|rheltitle=CentOS 6|rhelname=RHEL6|pluginname={{{pluginname}}}|sopath={{{sopath}}}|reponame={{#if:{{{reponame|}}}|{{{reponame}}}|ox}}|toplevel={{#if:{{{toplevel|}}}|{{{toplevel}}}|OX6}}}}</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:GettingStarted_7.6.0&diff=18244
AppSuite:GettingStarted 7.6.0
2014-08-04T13:32:06Z
<p>Cutmasta: /* Testing an App */</p>
<hr />
<div><div class="title">Getting Started</div><br />
<br />
<div style="float:right; padding: 10px;">[[File:OX_AppSuite_UI_Development_Workflow.png]]</div><br />
<br />
__TOC__<br />
<br />
Hello and welcome to the world of OX App Suite development. This document is designed to get you started with developing your first app for OX App Suite as quickly and simply as possible. However, along the way we will also tempt you to learn more by linking to some more in-depth documentation about the various topics we cover. <br />
<br />
<div style="clear: both"></div><br />
<br />
== Installing the Development Tools ==<br />
<br />
First, you need to install some tools which are necessary for UI development.<br />
<br />
TL;DR version:<br />
<br />
$ npm install -g grunt-cli bower yo generator-ox-ui-module<br />
<br />
Or if needed, there is a complete article about setting up an environment for [[AppSuite:GettingStartedWithGrunt#Node | grunt]].<br />
<br />
== Create a Workspace ==<br />
<br />
All your app development can take place inside one working directory. The examples will assume you have created a directory named <tt>myapp</tt> inside your home directory:<br />
<br />
$ mkdir ~/myapp<br />
$ cd ~/myapp<br />
<br />
It doesn't need to be in your home directory, and the actual name should reflect the name of your app. The main point is that all commands will be executed in this directory and all paths will be relative to this directory from now on.<br />
<br />
Now, you can generate a grunt configuration using:<br />
<br />
$ yo ox-ui-module<br />
<br />
The source code of your app will reside in the subfolder named <tt>apps</tt>. To avoid name collisions please pick a unique subfolder inside that. The easiest and recommended way is to use a domain name that you own. Typically, the domain elements are reversed, like in Java. <tt>example.com</tt> becomes <tt>com.example</tt>:<br />
<br />
$ mkdir -p apps/com.example<br />
<br />
== Writing an App ==<br />
<br />
As an example, let's create the smallest possible app and test it. It requires only two files: <tt>apps/com.example/register.js</tt> for the source code of the app:<br />
<br />
<pre class="language-javascript"><br />
define('com.example/register', function () {<br />
'use strict';<br />
alert('Hello, World!');<br />
});<br />
</pre><br />
<br />
and <tt>apps/com.example/manifest.json</tt> for the [[AppSuite:UI_manifests_explained | manifest]] which tells the UI that your app exists and what to do with it:<br />
<br />
<pre class="language-javascript">{ "namespace": "core" }</pre><br />
<br />
== Building an App ==<br />
<br />
The source code of your app can't be used by OX App Suite as it. It first has to be processed by the [[AppSuite:UI_build_system | build system]]. This step will check the source code for syntax errors, compress it, and depending on the structure of your code, many other things. The processed code is then written to a directory named <tt>build</tt> by default. Start the build with this command:<br />
<br />
$ grunt<br />
<br />
If your editor supports it, you can configure it to call the build system after every file save. Take care to call it from the top directory of your app's workspace, not from the directory of the saved file.<br />
<br />
== Testing an App ==<br />
<br />
The freshly built code can now be tested. Instead of uploading your code to an OX App Suite server, you can use the [[AppSuite:Appserver|appserver]] proxy to inject your code into the UI code of any existing OX App Suite installation. For example, to start <tt>appserver</tt> using [https://www.ox.io/ www.ox.io] as the server, you will need a local configuration pointing to that server. You can register for a free user account on [https://www.ox.io/ www.ox.io]. <br />
<br />
You can generate it with this command:<br />
<br />
$ grunt show-config:local --output grunt/local.conf.json<br />
<br />
To use the remote www.ox.io AppSuite server, open up the file <tt>grunt/local.conf.json</tt> in your editor and add <tt><nowiki>"https://www.ox.io/appsuite/"</nowiki></tt> to the <tt>server</tt> setting of the appserver section. Also make sure that the <tt>protocol</tt> setting is set to <tt>https</tt>. Else you will get https redirect errors in your browser. <br />
<br />
INFO: If you are using a locally installed AppSuite server (in a VM or similar in your local network), just modify the server + protocol accordingly.<br />
<br />
Then start the development server:<br />
<br />
$ grunt dev<br />
<br />
This command will serve your app from the local directory <tt>build</tt>, and get everything else from the URL specified in the <tt>server</tt> setting.<br />
<br />
Once appserver is running, you can access OX App Suite by opening your browser using this address:<br />
<br />
https://localhost:8337/appsuite<br />
<br />
After logging in, the app should be loaded and display the <tt>alert</tt> message.<br />
<br />
=== Development cycle ===<br />
<br />
Once you are sure that your setup works, you can extend the example and write the actual code for your app. The <tt>dev</tt> task will detect any changes and rebuild your app and even reload all browsers connected to<br />
<tt>https://localhost:8337/appsuite</tt>.<br />
<br />
While developing always keep in mind, that there is an [[AppSuite:Debugging_the_UI | article about debugging the user interface]] which helps you avoid and fix typical errors.<br />
<br />
== Packaging ==<br />
<br />
Together with our ox-ui-module generator (from version 0.8.0), we provide you with generators for packaging information.<br />
<br />
=== Generating a source tarball ===<br />
<br />
There is a grunt tasks to create source packages. You can use it to create a tar.gz file containing all sources needed to build the project. This source package should contain all dependencies that are installed during <tt>bower install</tt> and <tt>npm install</tt> (basically containing your <tt>bower_components</tt> and <tt>node_modules</tt> directories). To generate this file, run:<br />
<br />
$ grunt dist:source --include-dependencies<br />
<br />
This file (can be found in the <tt>dist/</tt> directory) together with the distribution specific packaging information will be needed to build the package.<br />
<br />
=== RPM packages ===<br />
<br />
In order to generate a spec file for your project, run:<br />
<br />
$ yo ox-ui-module:rpm-pkg<br />
<br />
Will generate a spec file, with some default values read from your <tt>package.json</tt> file. So you might want to make this file as complete as possible. However, yeoman will ask you about the information missing.<br />
<br />
''Please remember, that the generated spec file is only a scaffold for a real one. It will work for very simple cases, but as soon as your package gets more complicated, you will have to adjust it to your needs.''<br />
<br />
Once you have the spec file in your project, you can use<br />
<br />
$ grunt rpm-build --include-dependencies # or rpm-build if you are on shared-grunt-config-0.6.0<br />
<br />
=== DEB packages ===<br />
<br />
Creating packages for the Debian distribution works similar to rpm packages. Just run:<br />
<br />
$ yo ox-ui-module:deb-pkg<br />
<br />
This will generate a debian directory containing all needed files. Some default values will be read from your <tt>package.json</tt> file. So you might want to make this file as complete as possible. However, yeoman will ask you about the information missing.<br />
<br />
''Please remember, that the generated spec file is only a scaffold for a real one. It will work for very simple cases, but as soon as your package gets more complicated, you will have to adjust it to your needs.''<br />
<br />
Once you have a debian/ directory for your project, you can go on.<br />
To enable some grunt tasks to help you, you need to install (with npm install) <tt>grunt-contrib-compress</tt> and <tt>grunt-exec</tt>. Now you can run:<br />
<br />
$ grunt dpkg-buildpackage --include-dependencies<br />
<br />
== i18n ==<br />
<br />
To use the proven way to translate your AppSuite application, you should now check out the [[AppSuite:I18n | documentation]] about all [[AppSuite:I18n | i18n]] tasks. Please browse to the [[AppSuite:I18n | i18n]] page.<br />
<br />
== Further Reading ==<br />
* Congratulations you have just built your first app for OX App Suite, but please keep in mind that there are [[AppSuite:Developing for the UI#What_can_i_build.3F | quite a few options]] for developing for OX App Suite.<br />
* In case you want to upgrade your existing app for OX App Suite, read [[Appsuite:Upgrade_app_using_yo | the upgrade guide]].<br />
* More information on the build system can be found on github:<br />
** [https://github.com/Open-Xchange-Frontend/shared-grunt-config See all available grunt tasks]<br />
** [https://github.com/Open-Xchange-Frontend/generator-ox-ui-module Documentation of all generator tasks]<br />
* If you're stuck somewhere, the article about [[AppSuite:Debugging_the_UI | debugging the UI]] might help you.<br />
* You can read this to get a better overview of [[AppSuite:Developing for the UI | developing the user inferface]].</div>
Cutmasta
https://oxpedia.org/wiki/index.php?title=AppSuite:GettingStarted_7.6.0&diff=18243
AppSuite:GettingStarted 7.6.0
2014-08-04T13:31:47Z
<p>Cutmasta: /* Testing an App */</p>
<hr />
<div><div class="title">Getting Started</div><br />
<br />
<div style="float:right; padding: 10px;">[[File:OX_AppSuite_UI_Development_Workflow.png]]</div><br />
<br />
__TOC__<br />
<br />
Hello and welcome to the world of OX App Suite development. This document is designed to get you started with developing your first app for OX App Suite as quickly and simply as possible. However, along the way we will also tempt you to learn more by linking to some more in-depth documentation about the various topics we cover. <br />
<br />
<div style="clear: both"></div><br />
<br />
== Installing the Development Tools ==<br />
<br />
First, you need to install some tools which are necessary for UI development.<br />
<br />
TL;DR version:<br />
<br />
$ npm install -g grunt-cli bower yo generator-ox-ui-module<br />
<br />
Or if needed, there is a complete article about setting up an environment for [[AppSuite:GettingStartedWithGrunt#Node | grunt]].<br />
<br />
== Create a Workspace ==<br />
<br />
All your app development can take place inside one working directory. The examples will assume you have created a directory named <tt>myapp</tt> inside your home directory:<br />
<br />
$ mkdir ~/myapp<br />
$ cd ~/myapp<br />
<br />
It doesn't need to be in your home directory, and the actual name should reflect the name of your app. The main point is that all commands will be executed in this directory and all paths will be relative to this directory from now on.<br />
<br />
Now, you can generate a grunt configuration using:<br />
<br />
$ yo ox-ui-module<br />
<br />
The source code of your app will reside in the subfolder named <tt>apps</tt>. To avoid name collisions please pick a unique subfolder inside that. The easiest and recommended way is to use a domain name that you own. Typically, the domain elements are reversed, like in Java. <tt>example.com</tt> becomes <tt>com.example</tt>:<br />
<br />
$ mkdir -p apps/com.example<br />
<br />
== Writing an App ==<br />
<br />
As an example, let's create the smallest possible app and test it. It requires only two files: <tt>apps/com.example/register.js</tt> for the source code of the app:<br />
<br />
<pre class="language-javascript"><br />
define('com.example/register', function () {<br />
'use strict';<br />
alert('Hello, World!');<br />
});<br />
</pre><br />
<br />
and <tt>apps/com.example/manifest.json</tt> for the [[AppSuite:UI_manifests_explained | manifest]] which tells the UI that your app exists and what to do with it:<br />
<br />
<pre class="language-javascript">{ "namespace": "core" }</pre><br />
<br />
== Building an App ==<br />
<br />
The source code of your app can't be used by OX App Suite as it. It first has to be processed by the [[AppSuite:UI_build_system | build system]]. This step will check the source code for syntax errors, compress it, and depending on the structure of your code, many other things. The processed code is then written to a directory named <tt>build</tt> by default. Start the build with this command:<br />
<br />
$ grunt<br />
<br />
If your editor supports it, you can configure it to call the build system after every file save. Take care to call it from the top directory of your app's workspace, not from the directory of the saved file.<br />
<br />
== Testing an App ==<br />
<br />
The freshly built code can now be tested. Instead of uploading your code to an OX App Suite server, you can use the [[AppSuite:Appserver|appserver]] proxy to inject your code into the UI code of any existing OX App Suite installation. For example, to start <tt>appserver</tt> using [https://www.ox.io/ www.ox.io] as the server, you will need a local configuration pointing to that server. You can register for a free user account on [https://www.ox.io/ www.ox.io]. <br />
<br />
You can generate it with this command:<br />
<br />
$ grunt show-config:local --output grunt/local.conf.json<br />
<br />
To use the remote www.ox.io AppSuite server, open up the file <tt>grunt/local.conf.json</tt> in your editor and add <tt><nowiki>"https://www.ox.io/appsuite/"</nowiki></tt> to the <tt>server</tt> setting of the appserver section. Also make sure that the <tt>protocol</tt> setting is set to <tt>https</tt>. Else you will get https redirect errors in your browser. If you are using a locally installed AppSuite server (in a VM or similar in your local network), just modify the server + protocol accordingly.<br />
<br />
Then start the development server:<br />
<br />
$ grunt dev<br />
<br />
This command will serve your app from the local directory <tt>build</tt>, and get everything else from the URL specified in the <tt>server</tt> setting.<br />
<br />
Once appserver is running, you can access OX App Suite by opening your browser using this address:<br />
<br />
https://localhost:8337/appsuite<br />
<br />
After logging in, the app should be loaded and display the <tt>alert</tt> message.<br />
<br />
=== Development cycle ===<br />
<br />
Once you are sure that your setup works, you can extend the example and write the actual code for your app. The <tt>dev</tt> task will detect any changes and rebuild your app and even reload all browsers connected to<br />
<tt>https://localhost:8337/appsuite</tt>.<br />
<br />
While developing always keep in mind, that there is an [[AppSuite:Debugging_the_UI | article about debugging the user interface]] which helps you avoid and fix typical errors.<br />
<br />
== Packaging ==<br />
<br />
Together with our ox-ui-module generator (from version 0.8.0), we provide you with generators for packaging information.<br />
<br />
=== Generating a source tarball ===<br />
<br />
There is a grunt tasks to create source packages. You can use it to create a tar.gz file containing all sources needed to build the project. This source package should contain all dependencies that are installed during <tt>bower install</tt> and <tt>npm install</tt> (basically containing your <tt>bower_components</tt> and <tt>node_modules</tt> directories). To generate this file, run:<br />
<br />
$ grunt dist:source --include-dependencies<br />
<br />
This file (can be found in the <tt>dist/</tt> directory) together with the distribution specific packaging information will be needed to build the package.<br />
<br />
=== RPM packages ===<br />
<br />
In order to generate a spec file for your project, run:<br />
<br />
$ yo ox-ui-module:rpm-pkg<br />
<br />
Will generate a spec file, with some default values read from your <tt>package.json</tt> file. So you might want to make this file as complete as possible. However, yeoman will ask you about the information missing.<br />
<br />
''Please remember, that the generated spec file is only a scaffold for a real one. It will work for very simple cases, but as soon as your package gets more complicated, you will have to adjust it to your needs.''<br />
<br />
Once you have the spec file in your project, you can use<br />
<br />
$ grunt rpm-build --include-dependencies # or rpm-build if you are on shared-grunt-config-0.6.0<br />
<br />
=== DEB packages ===<br />
<br />
Creating packages for the Debian distribution works similar to rpm packages. Just run:<br />
<br />
$ yo ox-ui-module:deb-pkg<br />
<br />
This will generate a debian directory containing all needed files. Some default values will be read from your <tt>package.json</tt> file. So you might want to make this file as complete as possible. However, yeoman will ask you about the information missing.<br />
<br />
''Please remember, that the generated spec file is only a scaffold for a real one. It will work for very simple cases, but as soon as your package gets more complicated, you will have to adjust it to your needs.''<br />
<br />
Once you have a debian/ directory for your project, you can go on.<br />
To enable some grunt tasks to help you, you need to install (with npm install) <tt>grunt-contrib-compress</tt> and <tt>grunt-exec</tt>. Now you can run:<br />
<br />
$ grunt dpkg-buildpackage --include-dependencies<br />
<br />
== i18n ==<br />
<br />
To use the proven way to translate your AppSuite application, you should now check out the [[AppSuite:I18n | documentation]] about all [[AppSuite:I18n | i18n]] tasks. Please browse to the [[AppSuite:I18n | i18n]] page.<br />
<br />
== Further Reading ==<br />
* Congratulations you have just built your first app for OX App Suite, but please keep in mind that there are [[AppSuite:Developing for the UI#What_can_i_build.3F | quite a few options]] for developing for OX App Suite.<br />
* In case you want to upgrade your existing app for OX App Suite, read [[Appsuite:Upgrade_app_using_yo | the upgrade guide]].<br />
* More information on the build system can be found on github:<br />
** [https://github.com/Open-Xchange-Frontend/shared-grunt-config See all available grunt tasks]<br />
** [https://github.com/Open-Xchange-Frontend/generator-ox-ui-module Documentation of all generator tasks]<br />
* If you're stuck somewhere, the article about [[AppSuite:Debugging_the_UI | debugging the UI]] might help you.<br />
* You can read this to get a better overview of [[AppSuite:Developing for the UI | developing the user inferface]].</div>
Cutmasta