<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.open-xchange.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Greg.hill</id>
	<title>Open-Xchange - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.open-xchange.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Greg.hill"/>
	<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Special:Contributions/Greg.hill"/>
	<updated>2026-06-30T20:29:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=28145</id>
		<title>AppSuite:GuardCustomization</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=28145"/>
		<updated>2023-05-11T13:38:10Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ox Guard Customization =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Guard uses several templates for emails and the Guest reader.  These templates are fully customizable, and can be customized at the global level, but also at the context/user level.  Changing images, colors, and layout is easy.  Changing the wording is also possible, though the translation tables will then need to be updated.&lt;br /&gt;
&lt;br /&gt;
== Template ID ==&lt;br /&gt;
Guard uses a template ID for choosing the templates to use.  The template ID can be chosen for a user or context using the configuration cascade.&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.templateID=x&lt;br /&gt;
&lt;br /&gt;
For any template below, a customized template can be created with the name x-templatename where x is the integer value of the template ID for the user.  For example, if you wanted a custom password template based on the template &amp;quot;passwordtempl.html&amp;quot; for a context of users, you could create a template &amp;quot;2-passwordtempl.html&amp;quot; and assign the value com.openexchange.guard.templateID=2 to the context.  Then, Guard will use any templates that start with &amp;quot;2-&amp;quot; for the context.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
If no template ID is specified, or if a file specified by the template ID is not found, then the default template is used.  The default is the templates with no number prefix, i.e. &amp;quot;passwordtempl.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
=== Emails ===&lt;br /&gt;
* guesttempl.html - Email template used when sending to a guest user (not an OX account)&lt;br /&gt;
* passwordtempl.html - Template used to send a new password to a guest user. As of 2.8, only used if newGuestsRequirePassword=true is configured&lt;br /&gt;
* oxpasswordtempl.html - Email template used when sending a new password to an OX user. No longer used after 2.6&lt;br /&gt;
* resettempl.html - Template used when sending a password reset&lt;br /&gt;
* guestresettempl.html - Template used when resetting guest account and password recovery is disabled&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader (not used as of 2.10) ===&lt;br /&gt;
* reader.html - The main guest reader template.  THIS IS NOT CUSTOMIZABLE WITH TEMPLATE ID.  GLOBAL CHANGES ONLY.  We recommend not changing this file and using the header, footer, and style sheets for branding.&lt;br /&gt;
* header.html - Top header bar of the Guest reader&lt;br /&gt;
* footer.html - Footer of the Guest reader&lt;br /&gt;
* style.css - Style sheet for the Guest reader&lt;br /&gt;
&lt;br /&gt;
== Email Template GetText ==&lt;br /&gt;
In the HTML templates, wording is surrounded by a call to gettext, which will get the translation for the user.  It is used in a HTML call &amp;lt;$gettext(&amp;quot;text here&amp;quot;)&amp;gt;&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;$gettext(&amp;quot;You have received this email because $from has sent you a secure email message with OX Guard. You will receive a link to the secure message in a separate email.&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
Some email templates have space for variables depending on their function.  The variable name will begin with $ such as the above example $from.&lt;br /&gt;
&lt;br /&gt;
* $from - the sender name&lt;br /&gt;
* $productName - defined product name (such as &amp;quot;Guard&amp;quot;)&lt;br /&gt;
* $plainText - used in first guest email.  Plaintext greeting defined by sender&lt;br /&gt;
* $url - used in guest emails.  The url to link to the share&lt;br /&gt;
* $password - used in password reset email&lt;br /&gt;
&lt;br /&gt;
As of 4.0&lt;br /&gt;
* $year - current year&lt;br /&gt;
* $time - current time, adjusted to the users defined locale&lt;br /&gt;
* $dateTime- current date and time&lt;br /&gt;
&lt;br /&gt;
== Guest Reader Translations (Reader is not used as of 2.10) ==&lt;br /&gt;
The Guest reader webpage uses i18next for translations.  If changing the header and footer such that you need translation, use a call such as &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;h2 data-i18n=&amp;quot;PIN Required:&amp;quot;&amp;gt;PIN Required:&amp;lt;/h2&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;data-i18n&amp;quot; property results in the inner HTML wording being replaced with the translation (if available for the specified language)&lt;br /&gt;
&lt;br /&gt;
=====Guest Translations as of Version 2.4.2-rev8=====&lt;br /&gt;
Custom Guest reader translations can be managed by creating a file custom-Lang.json located in the /var/www/html/reader/l10n (on Debian 8)&lt;br /&gt;
This custom file should contain only the translations you want to replace in the default translation-Lang.json files.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to change the French translation of&lt;br /&gt;
&amp;quot;Welcome&amp;quot; from &amp;quot;Bienvenue&amp;quot; to &amp;quot;Bonjour&amp;quot;, you would create a file custom-FR_fr.json with the contents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;Welcome&amp;quot; : &amp;quot;Bonjour&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reader will load the file translations-FR_fr.json first, then it will load custom and overwrite any values found.&lt;br /&gt;
&lt;br /&gt;
= Guard Product Name Customization (2.4 or 2.2.1-8+) =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The Guard product name can be configured by general setting for smaller deployments, by configuration cascade, or by URL&lt;br /&gt;
&lt;br /&gt;
== Product name by configuration ==&lt;br /&gt;
&lt;br /&gt;
The configuration&lt;br /&gt;
 com.openexchange.guard.productName&lt;br /&gt;
can be defined in the guard-core.properties (2.4) or in the guard.properties file (2.2.1-8).  This product name will be passed to the UI.&lt;br /&gt;
&lt;br /&gt;
This value can also be configured at the configuration cascade level&lt;br /&gt;
&lt;br /&gt;
== Product name by URL ==&lt;br /&gt;
&lt;br /&gt;
By editing the file yml located in /opt/open-xchange/etc/as-config.yml the property&lt;br /&gt;
 guard.productName&lt;br /&gt;
can be defined based on the browser URL/IP used to address the OX backend.  This product name will the be passed to the UI to be displayed by the user.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=28004</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=28004"/>
		<updated>2023-02-13T13:27:54Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* S3-Storage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
As of Guard 2.10.7, Guard now supports two types of email encryption, PGP and S/Mime.  Prior versions only support PGP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables PGP Guard. If not set, no Guard PGP functions will be loaded in the UI. Needed if users should be able to do ANY Guard PGP functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send PGP encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.smime = true&amp;lt;/source&amp;gt; (as of Guard 2.10.7)&lt;br /&gt;
Enables S/MIME for the user.  This can be used with or without any of the above PGP capabilities.  Will enable sending and receiving of S/MIME encrypted/signed emails.&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their PGP private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
As of 7.10.6, the appsuite middleware should be used for Guard S3 storage.  Set up a bucket for Guard to use and configure in the middleware.  Then tell Guard which S3 storage to use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
com.openexchange.filestore.s3.guardstore.endpoint: &amp;quot;http://somewhere&amp;quot;&lt;br /&gt;
com.openexchange.filestore.s3.guardstore.bucketName: &amp;quot;guardstore&amp;quot;&lt;br /&gt;
com.openexchange.filestore.s3.guardstore.accessKey: AccessKey&lt;br /&gt;
com.openexchange.filestore.s3.guardstore.secretKey: SecretKey&lt;br /&gt;
com.openexchange.guard.storage.file.fileStorageType: &amp;quot;s3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
com.openexchange.guard.storage.s3.s3FileStore: &amp;quot;guardstore&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Deprecated''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== S/Mime (as of 2.10.7) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.smime.checkCRL&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables or disables checking certificate revocation lists when verifying certificates&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.smime.caGroupId&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies a certificate authority group number to which the user belongs. All users withing that group will trust certificate authorities configured for that group.&lt;br /&gt;
&lt;br /&gt;
=== Autocrypt (as of 2.10.2) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptEnabled&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables AutoCrypt functionality for Guard.  If incoming emails have an AutoCrypt header, the key will be imported.  Outgoing emails contain the users public key in an autocrypt header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptMutual&amp;lt;/source&amp;gt;&lt;br /&gt;
On outgoing AutoCrypt headers, specifies desired AutoCrypt mode&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation for PGP keys ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any&lt;br /&gt;
activity.  If the guest has not logged into the Guest account in the configured time, the&lt;br /&gt;
emails are removed and the Guest account is closed.&lt;br /&gt;
0 implies indefinite (no cleaning done).  Default 365 days&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=27959</id>
		<title>AppSuite:GuardCustomization</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=27959"/>
		<updated>2023-01-25T15:09:58Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Guest Reader */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ox Guard Customization =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Guard uses several templates for emails and the Guest reader.  These templates are fully customizable, and can be customized at the global level, but also at the context/user level.  Changing images, colors, and layout is easy.  Changing the wording is also possible, though the translation tables will then need to be updated.&lt;br /&gt;
&lt;br /&gt;
== Template ID ==&lt;br /&gt;
Guard uses a template ID for choosing the templates to use.  The template ID can be chosen for a user or context using the configuration cascade.&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.templateID=x&lt;br /&gt;
&lt;br /&gt;
For any template below, a customized template can be created with the name x-templatename where x is the integer value of the template ID for the user.  For example, if you wanted a custom password template based on the template &amp;quot;passwordtempl.html&amp;quot; for a context of users, you could create a template &amp;quot;2-passwordtempl.html&amp;quot; and assign the value com.openexchange.guard.templateID=2 to the context.  Then, Guard will use any templates that start with &amp;quot;2-&amp;quot; for the context.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
If no template ID is specified, or if a file specified by the template ID is not found, then the default template is used.  The default is the templates with no number prefix, i.e. &amp;quot;passwordtempl.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
=== Emails ===&lt;br /&gt;
* guesttempl.html - Email template used when sending to a guest user (not an OX account)&lt;br /&gt;
* passwordtempl.html - Template used to send a new password to a guest user. As of 2.8, only used if newGuestsRequirePassword=true is configured&lt;br /&gt;
* oxpasswordtempl.html - Email template used when sending a new password to an OX user. No longer used after 2.6&lt;br /&gt;
* resettempl.html - Template used when sending a password reset&lt;br /&gt;
* guestresettempl.html - Template used when resetting guest account and password recovery is disabled&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader (not used as of 2.10) ===&lt;br /&gt;
* reader.html - The main guest reader template.  THIS IS NOT CUSTOMIZABLE WITH TEMPLATE ID.  GLOBAL CHANGES ONLY.  We recommend not changing this file and using the header, footer, and style sheets for branding.&lt;br /&gt;
* header.html - Top header bar of the Guest reader&lt;br /&gt;
* footer.html - Footer of the Guest reader&lt;br /&gt;
* style.css - Style sheet for the Guest reader&lt;br /&gt;
&lt;br /&gt;
== Email Template GetText ==&lt;br /&gt;
In the HTML templates, wording is surrounded by a call to gettext, which will get the translation for the user.  It is used in a HTML call &amp;lt;$gettext(&amp;quot;text here&amp;quot;)&amp;gt;&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;$gettext(&amp;quot;You have received this email because $from has sent you a secure email message with OX Guard. You will receive a link to the secure message in a separate email.&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
Some email templates have space for variables depending on their function.  The variable name will begin with $ such as the above example $from.&lt;br /&gt;
&lt;br /&gt;
== Guest Reader Translations ==&lt;br /&gt;
The Guest reader webpage uses i18next for translations.  If changing the header and footer such that you need translation, use a call such as &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;h2 data-i18n=&amp;quot;PIN Required:&amp;quot;&amp;gt;PIN Required:&amp;lt;/h2&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;data-i18n&amp;quot; property results in the inner HTML wording being replaced with the translation (if available for the specified language)&lt;br /&gt;
&lt;br /&gt;
=====Guest Translations as of Version 2.4.2-rev8=====&lt;br /&gt;
Custom Guest reader translations can be managed by creating a file custom-Lang.json located in the /var/www/html/reader/l10n (on Debian 8)&lt;br /&gt;
This custom file should contain only the translations you want to replace in the default translation-Lang.json files.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to change the French translation of&lt;br /&gt;
&amp;quot;Welcome&amp;quot; from &amp;quot;Bienvenue&amp;quot; to &amp;quot;Bonjour&amp;quot;, you would create a file custom-FR_fr.json with the contents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;Welcome&amp;quot; : &amp;quot;Bonjour&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reader will load the file translations-FR_fr.json first, then it will load custom and overwrite any values found.&lt;br /&gt;
&lt;br /&gt;
= Guard Product Name Customization (2.4 or 2.2.1-8+) =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The Guard product name can be configured by general setting for smaller deployments, by configuration cascade, or by URL&lt;br /&gt;
&lt;br /&gt;
== Product name by configuration ==&lt;br /&gt;
&lt;br /&gt;
The configuration&lt;br /&gt;
 com.openexchange.guard.productName&lt;br /&gt;
can be defined in the guard-core.properties (2.4) or in the guard.properties file (2.2.1-8).  This product name will be passed to the UI.&lt;br /&gt;
&lt;br /&gt;
This value can also be configured at the configuration cascade level&lt;br /&gt;
&lt;br /&gt;
== Product name by URL ==&lt;br /&gt;
&lt;br /&gt;
By editing the file yml located in /opt/open-xchange/etc/as-config.yml the property&lt;br /&gt;
 guard.productName&lt;br /&gt;
can be defined based on the browser URL/IP used to address the OX backend.  This product name will the be passed to the UI to be displayed by the user.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=27956</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=27956"/>
		<updated>2023-01-25T15:06:37Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* External */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.10) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0 | Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
* [[Appsuite:OX_Guard_2_8 | Installation and information of OX Guard 2.4 - 2.8]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.6 or 2.8, please see&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_2_10|Upgrading to 2.10]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
OX Guard uses standard PGP encryption for the encryption of email and files. S/Mime is also supported since version 2.10.7. 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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. The version of Guard installed is dependent on the Appsuite version installed.  Please refer to the version matrix below.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 8)&lt;br /&gt;
* An Open-Xchange App Suite installation (see version Matrix)&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.10.5&lt;br /&gt;
|2.10.5&lt;br /&gt;
|-&lt;br /&gt;
|7.10.6&lt;br /&gt;
|2.10.6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customization ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customization] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianStretch /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 10.0 (Buster) *Version 2.10.3+ only* ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianBuster /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBuster /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 11.0 (Bullseye) *Version 2.10.6+ only* ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianBullseye /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBullseye /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === RedHat Enterprise Linux 6 or CentOS 6 (valid until v2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/2.10.3/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/7.10.3/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === SUSE Linux Enterprise Server 12 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.10.3/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.10.3/backend/SLE_12 ox-backend&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.10.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianStretch /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 10.0 (Buster) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianBuster /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianBuster /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 11.0 (Bullseye) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianBullseye /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianBullseye /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Redhat Enterprise Linux 6 or CentOS 6 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.10.3/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.10.3/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === SUSE Linux Enterprise Server 12 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.10.3/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.10.3/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10 Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
Debian GNU/Linux 9.0 and 10.0&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/sites-enabled/000-default.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redhat Enterprise Linux 6/7 or CentOS 6/7&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/ox.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section into VirtualHost definition:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/guard&amp;gt;&lt;br /&gt;
     Options -Indexes&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Debian GNU/Linux 9.0 and 10.0&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf-enabled/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redhat Enterprise Linux 6/7 or CentOS 6/7&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
        Order deny,allow&lt;br /&gt;
        Allow from all&lt;br /&gt;
 &lt;br /&gt;
        BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
        ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
        SetEnv proxy-sendchunked&lt;br /&gt;
 &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
 ProxyPass /pks balancer://oxguard/pgp&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;ProxyPass /appsuite/api&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalancerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open-Xchange Middleware Configuration ===&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend where the guard-backend-plugin was installed. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX Guard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
Not required, but it is a good idea to test the Guard setup before enabling for any users. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides three capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
'''PGP'''&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Docs: &amp;lt;code&amp;gt;com.openexchange.capability.guard-docs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''S/Mime'''&lt;br /&gt;
&lt;br /&gt;
* S/Mime: &amp;lt;code&amp;gt;com.openexchange.capability.smime&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; Guard enabled a basic read functionality for Guard PGP 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''', '''Guard Drive''' and '''Guard Docs''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of Drive files and &amp;amp;quot;Guard Docs&amp;amp;quot; allows direct integration of Guard into Documents.&lt;br /&gt;
&lt;br /&gt;
'''S/Mime''' enables S/Mime functionality for users (as of 2.10.7).  May be used alone or with the above Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Each of those 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:&lt;br /&gt;
&lt;br /&gt;
==== Guard PGP Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX backend.&lt;br /&gt;
&lt;br /&gt;
=== S/Mime (as of 2.10.7) ===&lt;br /&gt;
&lt;br /&gt;
See [[AppSuite:OX_Guard_Smime | OX Guard S/Mime]] for more details on S/Mime&lt;br /&gt;
&lt;br /&gt;
=== External Guest recipients ===&lt;br /&gt;
Starting in Guard 2.10.0, when an encrypted email is sent to a user that does not have Guard, a guest account is created for them in appsuite.  The recipient uses the Guest account to read the encrypted email.  These guest users MUST have guard capabilities.  To do this, guard capability must be added to guest accounts.&lt;br /&gt;
&amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
com.openexchange.share.staticGuestCapabilities=guard&amp;lt;/source&amp;gt;&lt;br /&gt;
In a distributed system, the Guest accounts should not be considered transient.  Guard servers must be able to verify the guest account exists in the session storage services.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.transientSessions=false&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Guest Storage ===&lt;br /&gt;
When an encrypted email is sent to an external Guest, a copy of the fully encrypted email is stored on the server.  This is used to create an inbox of encrypted emails for the guest.  By entering in a password, the emails can be decrypted and displayed.&lt;br /&gt;
&lt;br /&gt;
How these files are stored depend on which package, open-xchange-guard-file-storage or open-xchange-guard-s3-storage, was installed.&lt;br /&gt;
&lt;br /&gt;
The file retention policy is configured in the guard-core.properties file.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
Starting with Guard 2.0, Guard will use public PGP Key servers if configured to find PGP Public keys.  &lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.  These can be &amp;quot;trusted&amp;quot; or &amp;quot;untrusted&amp;quot; servers.  Trusted servers might be internal servers containing known, trusted keys.  Untrusted servers may be public servers that are not necessarily to be trusted (users will have keys marked as trusted or untrusted).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.trustedPGPDirectory = hkp://localservice.somewhere:113711&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.untrustedPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP key servers by default append the path /pks when the record is obtained from an SRV record. The proxy (also included in Apache config above) routes anything under /pks to the OX Guard PGP server.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Guard keys are also discoverable using the webkey service as specified here: https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02&lt;br /&gt;
This is enabled if you include the &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&amp;lt;/source&amp;gt;&lt;br /&gt;
in the proxy_http.conf as above.&lt;br /&gt;
Please note that the well-known request is targeted at the domain part of the mail address. Therefore clients will request for a mail address name@example.com the URI https://example.com/.well-known/openpgpkey/hu/...&lt;br /&gt;
&lt;br /&gt;
That means that there is the very likely need that some sort of proxying or rewriting from the webserver providing the domain needs to happen. For example for proxying using Apache 2.4 it would roughly look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
SSLProxyEngine on&lt;br /&gt;
&amp;lt;LocationMatch /.well-known/openpgpkey/&amp;gt;&lt;br /&gt;
    ProxyPass https://ox.example.com/.well-known/openpgpkey/&lt;br /&gt;
&amp;lt;/LocationMatch&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
      Order Deny,Allow&lt;br /&gt;
      Deny from all&lt;br /&gt;
      # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
      # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
      # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
      # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
      # Allow from 192.168.0.1&lt;br /&gt;
      # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
      # Allow from 192.168.0.&lt;br /&gt;
 &amp;lt;/Location&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
=== Mail Filter Integration (2.10.4+) ===&lt;br /&gt;
&lt;br /&gt;
To add additional mail filter tests (verify PGP signature, or encrypt incoming), please see&lt;br /&gt;
[[AppSuite:OX_Guard_MailFilter | MailFilter Integration]]&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
 # Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
 com.openexchange.guard.supportApiUsername=&lt;br /&gt;
 com.openexchange.guard.supportApiPassword=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=27953</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=27953"/>
		<updated>2023-01-25T14:59:53Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.10) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0 | Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
* [[Appsuite:OX_Guard_2_8 | Installation and information of OX Guard 2.4 - 2.8]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.6 or 2.8, please see&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_2_10|Upgrading to 2.10]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
OX Guard uses standard PGP encryption for the encryption of email and files. S/Mime is also supported since version 2.10.7. 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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. The version of Guard installed is dependent on the Appsuite version installed.  Please refer to the version matrix below.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 8)&lt;br /&gt;
* An Open-Xchange App Suite installation (see version Matrix)&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.10.5&lt;br /&gt;
|2.10.5&lt;br /&gt;
|-&lt;br /&gt;
|7.10.6&lt;br /&gt;
|2.10.6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customization ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customization] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianStretch /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 10.0 (Buster) *Version 2.10.3+ only* ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianBuster /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBuster /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 11.0 (Bullseye) *Version 2.10.6+ only* ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianBullseye /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBullseye /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === RedHat Enterprise Linux 6 or CentOS 6 (valid until v2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/2.10.3/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/7.10.3/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === SUSE Linux Enterprise Server 12 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.10.3/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.10.3/backend/SLE_12 ox-backend&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.10.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianStretch /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 10.0 (Buster) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianBuster /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianBuster /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 11.0 (Bullseye) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianBullseye /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianBullseye /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Redhat Enterprise Linux 6 or CentOS 6 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.10.3/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.10.3/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === SUSE Linux Enterprise Server 12 (valid until 2.10.3) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.10.3/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.10.3/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10 Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
Debian GNU/Linux 9.0 and 10.0&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/sites-enabled/000-default.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redhat Enterprise Linux 6/7 or CentOS 6/7&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/ox.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following section into VirtualHost definition:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/guard&amp;gt;&lt;br /&gt;
     Options -Indexes&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Debian GNU/Linux 9.0 and 10.0&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf-enabled/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redhat Enterprise Linux 6/7 or CentOS 6/7&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
        Order deny,allow&lt;br /&gt;
        Allow from all&lt;br /&gt;
 &lt;br /&gt;
        BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
        ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
        SetEnv proxy-sendchunked&lt;br /&gt;
 &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
 ProxyPass /pks balancer://oxguard/pgp&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;ProxyPass /appsuite/api&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalancerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open-Xchange Middleware Configuration ===&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend where the guard-backend-plugin was installed. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX Guard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
Not required, but it is a good idea to test the Guard setup before enabling for any users. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides three capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
'''PGP'''&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Docs: &amp;lt;code&amp;gt;com.openexchange.capability.guard-docs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''S/Mime'''&lt;br /&gt;
&lt;br /&gt;
* S/Mime: &amp;lt;code&amp;gt;com.openexchange.capability.smime&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; Guard enabled a basic read functionality for Guard PGP 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''', '''Guard Drive''' and '''Guard Docs''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of Drive files and &amp;amp;quot;Guard Docs&amp;amp;quot; allows direct integration of Guard into Documents.&lt;br /&gt;
&lt;br /&gt;
'''S/Mime''' enables S/Mime functionality for users (as of 2.10.7).  May be used alone or with the above Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Each of those 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:&lt;br /&gt;
&lt;br /&gt;
==== Guard PGP Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX backend.&lt;br /&gt;
&lt;br /&gt;
=== S/Mime (as of 2.10.7) ===&lt;br /&gt;
&lt;br /&gt;
See [[AppSuite:OX_Guard_Smime | OX Guard S/Mime]] for more details on S/Mime&lt;br /&gt;
&lt;br /&gt;
=== External Guest recipients ===&lt;br /&gt;
Starting in Guard 2.10.0, when an encrypted email is sent to a user that does not have Guard, a guest account is created for them in appsuite.  The recipient uses the Guest account to read the encrypted email.  These guest users MUST have guard capabilities.  To do this, guard capability must be added to guest accounts.&lt;br /&gt;
&amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
com.openexchange.share.staticGuestCapabilities=guard&amp;lt;/source&amp;gt;&lt;br /&gt;
In a distributed system, the Guest accounts should not be considered transient.  Guard servers must be able to verify the guest account exists in the session storage services.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.transientSessions=false&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Guest Storage ===&lt;br /&gt;
When an encrypted email is sent to an external Guest, a copy of the fully encrypted email is stored on the server.  This is used to create an inbox of encrypted emails for the guest.  By entering in a password, the emails can be decrypted and displayed.&lt;br /&gt;
&lt;br /&gt;
How these files are stored depend on which package, open-xchange-guard-file-storage or open-xchange-guard-s3-storage, was installed.&lt;br /&gt;
&lt;br /&gt;
The file retention policy is configured in the guard-core.properties file.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you would like this Guard installation discoverable as HKP service by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.example.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append the path /pks when the record is obtained from an SRV record. The proxy (also included in Apache config above) routes anything under /pks to the OX Guard PGP server.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Guard keys are also discoverable using the webkey service as specified here: https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02&lt;br /&gt;
This is enabled if you include the &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&amp;lt;/source&amp;gt;&lt;br /&gt;
in the proxy_http.conf as above.&lt;br /&gt;
Please note that the well-known request is targeted at the domain part of the mail address. Therefore clients will request for a mail address name@example.com the URI https://example.com/.well-known/openpgpkey/hu/...&lt;br /&gt;
&lt;br /&gt;
That means that there is the very likely need that some sort of proxying or rewriting from the webserver providing the domain needs to happen. For example for proxying using Apache 2.4 it would roughly look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
SSLProxyEngine on&lt;br /&gt;
&amp;lt;LocationMatch /.well-known/openpgpkey/&amp;gt;&lt;br /&gt;
    ProxyPass https://ox.example.com/.well-known/openpgpkey/&lt;br /&gt;
&amp;lt;/LocationMatch&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
      Order Deny,Allow&lt;br /&gt;
      Deny from all&lt;br /&gt;
      # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
      # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
      # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
      # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
      # Allow from 192.168.0.1&lt;br /&gt;
      # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
      # Allow from 192.168.0.&lt;br /&gt;
 &amp;lt;/Location&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
=== Mail Filter Integration (2.10.4+) ===&lt;br /&gt;
&lt;br /&gt;
To add additional mail filter tests (verify PGP signature, or encrypt incoming), please see&lt;br /&gt;
[[AppSuite:OX_Guard_MailFilter | MailFilter Integration]]&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
 # Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
 com.openexchange.guard.supportApiUsername=&lt;br /&gt;
 com.openexchange.guard.supportApiPassword=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Smime&amp;diff=27950</id>
		<title>AppSuite:OX Guard Smime</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Smime&amp;diff=27950"/>
		<updated>2023-01-25T14:47:48Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Created page with &amp;quot; = Overview =  As of Guard version 2.10.7, users can now be configured to use S/Mime for secure email communications.  Prior versions supported PGP only. The user can have onl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
As of Guard version 2.10.7, users can now be configured to use S/Mime for secure email communications.  Prior versions supported PGP only. The user can have only S/Mime as an option, or can be configured to have the option of PGP or S/Mime.&lt;br /&gt;
&lt;br /&gt;
Configuring the users options is done through capabilities.  Capability of com.openexchange.capability.smime enables or disables the S/Mime functionality.  This can be enabled alone, or in conjunction with the other Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
There are no additional installation steps required for S/Mime support.  Guard installation and setup must be completed as normal (initialization of database and files as per the normal setup).&lt;br /&gt;
&lt;br /&gt;
To enable S/Mime, set com.openexchange.capability.smime=true for the user.  This can be configured system wide, context wide, or user wide as normal.&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
== Supported encryption types ==&lt;br /&gt;
&lt;br /&gt;
The most significant configuration is deciding if the user should have only one option for encryption or if the user should have the choice between PGP and S/Mime.  S/Mime requires all users to have uploaded keys created from a certificate authority.  As a result, the number of people that can receive encrypted emails is much more limited.  PGP, however, can create keys on the fly.  Hence PGP can support Guest accounts which allows many more people to receive encrypted emails.&lt;br /&gt;
&lt;br /&gt;
A user with only one choice of encryption will have a very straight-forward experience.  Having a choice of PGP and S/Mime would add potential confusion for users if they don't understand the difference.  In addition, there may be different encryption passwords for the different types of encryption.&lt;br /&gt;
&lt;br /&gt;
Due to this potential confusion when both types enabled, a setting in the user settings has been added to enable S/Mime.  If the user does not check this, then he/she will be treated like they have a PGP only setup.&lt;br /&gt;
&lt;br /&gt;
If the user has both capabilities (smime and guard-mail), and have enabled smime in their settings, they will have to actively choose which encryption to use.  Password prompts will specify the type of encryption being used.&lt;br /&gt;
&lt;br /&gt;
== Certificate Authorities ==&lt;br /&gt;
&lt;br /&gt;
By default, Guard will trust the certificate authorities in the default JAVA keystore.  A different keystore can be specified in the startup script if a new, more restricted list is created.&lt;br /&gt;
&lt;br /&gt;
Additional certificate authorities can be added to Guard.  This is useful if a company uses their own certificate authority, or a third party authority that is not trusted by the default keystore is used.&lt;br /&gt;
&lt;br /&gt;
Imported certificate authorities may not necessarily be trusted system wide.  One company may want their own certificate authority, but another company will likely not want to trust those certificates by default.&lt;br /&gt;
&lt;br /&gt;
com.openexchange.smime.caGroupId&lt;br /&gt;
&lt;br /&gt;
specifies a group number that the user should belong to.  When a certificate authority certificate is imported using the smime clt, a group ID is specified.  Users with this group ID configured will trust the imported certificate authority.&lt;br /&gt;
&lt;br /&gt;
/opt/open-xchange/sbin/smime -A admin -P password -a /path/to/pemFile -g grpId&lt;br /&gt;
&lt;br /&gt;
== Other configurations ==&lt;br /&gt;
&lt;br /&gt;
com.openexchange.smime.checkCRL&lt;br /&gt;
&lt;br /&gt;
Enabled checking certificate revocation lists when verifying certificates.  This can significantly slow down Guard response time, as there is an HTTP request sent for the revocation list to each certificate authority.  This request is cached for the length of time the response is valid, but can add several seconds to signature verifications and email encryption.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=27947</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=27947"/>
		<updated>2023-01-25T14:37:17Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
As of Guard 2.10.7, Guard now supports two types of email encryption, PGP and S/Mime.  Prior versions only support PGP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables PGP Guard. If not set, no Guard PGP functions will be loaded in the UI. Needed if users should be able to do ANY Guard PGP functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send PGP encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.smime = true&amp;lt;/source&amp;gt; (as of Guard 2.10.7)&lt;br /&gt;
Enables S/MIME for the user.  This can be used with or without any of the above PGP capabilities.  Will enable sending and receiving of S/MIME encrypted/signed emails.&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their PGP private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== S/Mime (as of 2.10.7) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.smime.checkCRL&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables or disables checking certificate revocation lists when verifying certificates&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.smime.caGroupId&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies a certificate authority group number to which the user belongs. All users withing that group will trust certificate authorities configured for that group.&lt;br /&gt;
&lt;br /&gt;
=== Autocrypt (as of 2.10.2) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptEnabled&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables AutoCrypt functionality for Guard.  If incoming emails have an AutoCrypt header, the key will be imported.  Outgoing emails contain the users public key in an autocrypt header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptMutual&amp;lt;/source&amp;gt;&lt;br /&gt;
On outgoing AutoCrypt headers, specifies desired AutoCrypt mode&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation for PGP keys ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any&lt;br /&gt;
activity.  If the guest has not logged into the Guest account in the configured time, the&lt;br /&gt;
emails are removed and the Guest account is closed.&lt;br /&gt;
0 implies indefinite (no cleaning done).  Default 365 days&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_MailFilter&amp;diff=25357</id>
		<title>AppSuite:OX Guard MailFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_MailFilter&amp;diff=25357"/>
		<updated>2020-05-13T12:40:39Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Add guard-backend-mailfilter package info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard MailFilter Integration =&lt;br /&gt;
&lt;br /&gt;
It is possible to add the Sieve test “PGP Signature” as well as the action “encrypt incoming” to the mailfilter functionality of Appsuite.  This utilizes the sieve  Extprograms plugin to call Guard through an api to either verify signatures or return the email encrypted.&lt;br /&gt;
&lt;br /&gt;
== Overview: ==&lt;br /&gt;
&lt;br /&gt;
The user creates either the filter test “PGP Signature” or action “Encrypt email”.  This creates a sieve rule that calls and external script with the users ID and Context.  Only pre-configured scripts can be called, there isn’t any ability for someone to create their own external scripts to be called.&lt;br /&gt;
&lt;br /&gt;
Incoming emails then go through the Sieve filter, which then calls the external script with the users ID and Context as parameters.&lt;br /&gt;
&lt;br /&gt;
The external script calls a Guard server through an api call.  Response is returned to the script.  Either marked as signed, or the encrypted content of the email is returned.&lt;br /&gt;
&lt;br /&gt;
== Setup: ==&lt;br /&gt;
&lt;br /&gt;
Dovecot sieve extension ExtPrograms must be enabled.  This adds three different capabilities to sieve vnd.dovecot.pipe, vnd.dovecot.filter, and vnd.dovecot.exectue (pipe is not required for these scripts), but they are disabled by default.  “Filter” and “execute” must be enabled for users, and then the directories containing the scripts must be configured.&lt;br /&gt;
&lt;br /&gt;
Example configuration:&lt;br /&gt;
&lt;br /&gt;
=== 90-sieve.conf ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;plugin {  &lt;br /&gt;
    sieve = file:~/sieve;active=~/.dovecot.sieve  &lt;br /&gt;
    sieve_default = /var/lib/dovecot/sieve/default.sieve  &lt;br /&gt;
    sieve_plugins = sieve_extprograms  &lt;br /&gt;
    sieve_extensions = +vnd.dovecot.filter +vnd.dovecot.execute  &lt;br /&gt;
    # The directory contains the scripts that are available for the filter and execute  &lt;br /&gt;
    # commands.  &lt;br /&gt;
     sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter  &lt;br /&gt;
     sieve_execute_bin_dir = /usr/lib/dovecot/sieve-execute  &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, the sieve protocol must be enabled and managesieve must be already working.&lt;br /&gt;
&lt;br /&gt;
=== Scripts: ===&lt;br /&gt;
&lt;br /&gt;
There are currently two scripts, one to test the email signatures, another to encrypt the email.  Add/create scripts in the following location (assuming the above configuration).  Replace the username/password rest:secret with the rest username and password configured with Guard.&lt;br /&gt;
&lt;br /&gt;
/usr/lib/dovecot/sieve-filter/guard.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash  &lt;br /&gt;
GUARD=&amp;amp;quot;${GUARD_SERVER:-localhost:8009}&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
## Send the stdin to guard using curl, store result&lt;br /&gt;
&lt;br /&gt;
encrypted=$(curl -s -X POST -F file=@- &amp;amp;quot;http://${GUARD}/oxguard/pgpmail?action=encrypt_mime&amp;amp;amp;user=${1}&amp;amp;amp;context=${2}&amp;amp;amp;respondWithJSON=true&amp;amp;quot; --user rest:secret )&lt;br /&gt;
&lt;br /&gt;
## Check for errors and basic sanity check&lt;br /&gt;
&lt;br /&gt;
if [[ $encrypted == \{\&amp;amp;quot;error* ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  logger &amp;amp;quot;Guard sieve encrypter error: $encrypted&amp;amp;quot;  &lt;br /&gt;
  ## Error, exit  &lt;br /&gt;
  exit 1  &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
## Return the encrypted text. Preserve /r&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;amp;quot;$encrypted&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
/usr/lib/dovecot/sieve-execute/guard-sig.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash  &lt;br /&gt;
GUARD=&amp;amp;quot;${GUARD_SERVER:-localhost:8009}&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
## Send the stdin to guard using curl, store result&lt;br /&gt;
&lt;br /&gt;
verified=$(curl -s -X POST -F file=@- &amp;amp;quot;http://${GUARD}/oxguard/pgpmail?action=verify&amp;amp;amp;user=${1}&amp;amp;amp;context=${2}&amp;amp;amp;simple=true&amp;amp;amp;respondWithJSON=true&amp;amp;quot; --user rest:secret )  &lt;br /&gt;
logger $verified  &lt;br /&gt;
&lt;br /&gt;
## Check if returns true&lt;br /&gt;
&lt;br /&gt;
if [[ $verified == &amp;amp;quot;{\&amp;amp;quot;data\&amp;amp;quot;:true}&amp;amp;quot; ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  exit 0  &lt;br /&gt;
fi  &lt;br /&gt;
if [[ $verified == \{\&amp;amp;quot;error* ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  logger &amp;amp;quot;Guard sieve signature error: $verified&amp;amp;quot;  &lt;br /&gt;
fi  &lt;br /&gt;
exit 1&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is no requirement that these scripts are in different directories.  Dovecot requires that scripts are not world writable.  In addition, as these scripts contain the rest username/password, recommend changing the owner to vmail and restricting permissions to 700&lt;br /&gt;
&lt;br /&gt;
== Middleware Packages ==&lt;br /&gt;
&lt;br /&gt;
On the middleware nodes the &amp;lt;code&amp;gt;open-xchange-guard-backend-mailfilter&amp;lt;/code&amp;gt; package needs to be installed.  This should be on the same nodes as the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package is installed.&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  apt-get install open-xchange-guard-backend-mailfilter&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  yum install open-xchange-guard-backend-mailfilter&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  zipper in open-xchange-guard-backend-mailfilter&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration: ==&lt;br /&gt;
&lt;br /&gt;
The guard mailfilter functionality must be enabled on the middleware.  Recommend adding the configuration to guard-api.properties on the middleware servers:&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard.sieveEnabled=true&lt;br /&gt;
&lt;br /&gt;
The script names may be configured differently, but default to the following:&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard.guardEncryptScript=guard.sh&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard..guardSignatureScript=guard-sig.sh&lt;br /&gt;
&lt;br /&gt;
== MailFilter User Interface: ==&lt;br /&gt;
&lt;br /&gt;
Assuming the user has guard-mail and mailfilter capabilities, they will now be able to add the configured test and actions for Guard.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=25322</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=25322"/>
		<updated>2020-05-08T16:43:07Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Add mailfilter integration documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.10) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0 | Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
* [[Appsuite:OX_Guard_2_8 | Installation and information of OX Guard 2.4 - 2.8]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.6 or 2.8, please see&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_2_10|Upgrading to 2.10]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. The version of Guard installed is dependent on the Appsuite version installed.  Please refer to the version matrix below.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 8)&lt;br /&gt;
* An Open-Xchange App Suite installation (see version Matrix)&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.0&lt;br /&gt;
|2.10.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.1&lt;br /&gt;
|2.10.1&lt;br /&gt;
|-&lt;br /&gt;
|7.10.2&lt;br /&gt;
|2.10.2&lt;br /&gt;
|-&lt;br /&gt;
|7.10.3&lt;br /&gt;
|2.10.3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
Support of Debian Jessie is deprecated. Read More: https://forum.open-xchange.com/showthread.php?11205&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianStretch /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 10.0 (Buster) *Version 2.10.3+ only* ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianBuster /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianBuster /&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The package &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.10.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
Support of Debian Jessie is deprecated. Read More: https://forum.open-xchange.com/showthread.php?11205&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 9.0 (Stretch) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianStretch /&amp;gt;&lt;br /&gt;
 deb &amp;lt;https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianStretch /&amp;lt;/source&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10 Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Debian GNU/Linux 9.0 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf-enabled/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
        Order deny,allow&lt;br /&gt;
        Allow from all&lt;br /&gt;
 &lt;br /&gt;
        BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
        ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
        SetEnv proxy-sendchunked&lt;br /&gt;
 &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
 ProxyPass /pks balancer://oxguard/pgp&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;ProxyPass /appsuite/api&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalancerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open-Xchange Middleware Configuration ===&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend where the guard-backend-plugin was installed. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX Guard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
Not required, but it is a good idea to test the Guard setup before enabling for any users. The test function will verify that Guard has a good connection to the OX backend, and that it can resolve email addresses to users.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX backend.&lt;br /&gt;
&lt;br /&gt;
=== External Guest recipients: ===&lt;br /&gt;
Starting in Guard 2.10.0, when an encrypted email is sent to a user that does not have Guard, a guest account is created for them in appsuite.  The recipient uses the Guest account to read the encrypted email.  These guest users MUST have guard capabilities.  To do this, guard capability must be added to guest accounts.&lt;br /&gt;
&amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
com.openexchange.share.staticGuestCapabilities=guard&amp;lt;/source&amp;gt;&lt;br /&gt;
In a distributed system, the Guest accounts should not be considered transient.  Guard servers must be able to verify the guest account exists in the session storage services.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.share.transientSessions=false&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Guest Storage ===&lt;br /&gt;
When an encrypted email is sent to an external Guest, a copy of the fully encrypted email is stored on the server.  This is used to create an inbox of encrypted emails for the guest.  By entering in a password, the emails can be decrypted and displayed.&lt;br /&gt;
&lt;br /&gt;
How these files are stored depend on which package, open-xchange-guard-file-storage or open-xchange-guard-s3-storage, was installed.&lt;br /&gt;
&lt;br /&gt;
The file retention policy is configured in the guard-core.properties file.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.example.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
Guard keys are also discoverable using the webkey service as specified here: https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02&lt;br /&gt;
This is enabled if you include the &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&amp;lt;/source&amp;gt;&lt;br /&gt;
in the proxy_http.conf as above.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
      Order Deny,Allow&lt;br /&gt;
      Deny from all&lt;br /&gt;
      # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
      # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
      # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
      # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
      # Allow from 192.168.0.1&lt;br /&gt;
      # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
      # Allow from 192.168.0.&lt;br /&gt;
 &amp;lt;/Location&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
=== Mail Filter Integration (2.10.4+) ===&lt;br /&gt;
&lt;br /&gt;
To add additional mail filter tests (verify PGP signature, or encrypt incoming), please see&lt;br /&gt;
[[AppSuite:OX_Guard_MailFilter | MailFilter Integration]]&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
 # Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
 com.openexchange.guard.supportApiUsername=&lt;br /&gt;
 com.openexchange.guard.supportApiPassword=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_MailFilter&amp;diff=25321</id>
		<title>AppSuite:OX Guard MailFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_MailFilter&amp;diff=25321"/>
		<updated>2020-05-08T16:35:45Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: OX Guard MailFilter Integration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard MailFilter Integration =&lt;br /&gt;
&lt;br /&gt;
It is possible to add the Sieve test “PGP Signature” as well as the action “encrypt incoming” to the mailfilter functionality of Appsuite.  This utilizes the sieve  Extprograms plugin to call Guard through an api to either verify signatures or return the email encrypted.&lt;br /&gt;
&lt;br /&gt;
== Overview: ==&lt;br /&gt;
&lt;br /&gt;
The user creates either the filter test “PGP Signature” or action “Encrypt email”.  This creates a sieve rule that calls and external script with the users ID and Context.  Only pre-configured scripts can be called, there isn’t any ability for someone to create their own external scripts to be called.&lt;br /&gt;
&lt;br /&gt;
Incoming emails then go through the Sieve filter, which then calls the external script with the users ID and Context as parameters.&lt;br /&gt;
&lt;br /&gt;
The external script calls a Guard server through an api call.  Response is returned to the script.  Either marked as signed, or the encrypted content of the email is returned.&lt;br /&gt;
&lt;br /&gt;
== Setup: ==&lt;br /&gt;
&lt;br /&gt;
Dovecot sieve extension ExtPrograms must be enabled.  This adds three different capabilities to sieve vnd.dovecot.pipe, vnd.dovecot.filter, and vnd.dovecot.exectue (pipe is not required for these scripts), but they are disabled by default.  “Filter” and “execute” must be enabled for users, and then the directories containing the scripts must be configured.&lt;br /&gt;
&lt;br /&gt;
Example configuration:&lt;br /&gt;
&lt;br /&gt;
=== 90-sieve.conf ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;plugin {  &lt;br /&gt;
    sieve = file:~/sieve;active=~/.dovecot.sieve  &lt;br /&gt;
    sieve_default = /var/lib/dovecot/sieve/default.sieve  &lt;br /&gt;
    sieve_plugins = sieve_extprograms  &lt;br /&gt;
    sieve_extensions = +vnd.dovecot.filter +vnd.dovecot.execute  &lt;br /&gt;
    # The directory contains the scripts that are available for the filter and execute  &lt;br /&gt;
    # commands.  &lt;br /&gt;
     sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter  &lt;br /&gt;
     sieve_execute_bin_dir = /usr/lib/dovecot/sieve-execute  &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, the sieve protocol must be enabled and managesieve must be already working.&lt;br /&gt;
&lt;br /&gt;
=== Scripts: ===&lt;br /&gt;
&lt;br /&gt;
There are currently two scripts, one to test the email signatures, another to encrypt the email.  Add/create scripts in the following location (assuming the above configuration).  Replace the username/password rest:secret with the rest username and password configured with Guard.&lt;br /&gt;
&lt;br /&gt;
/usr/lib/dovecot/sieve-filter/guard.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash  &lt;br /&gt;
GUARD=&amp;amp;quot;${GUARD_SERVER:-localhost:8009}&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
## Send the stdin to guard using curl, store result&lt;br /&gt;
&lt;br /&gt;
encrypted=$(curl -s -X POST -F file=@- &amp;amp;quot;http://${GUARD}/oxguard/pgpmail?action=encrypt_mime&amp;amp;amp;user=${1}&amp;amp;amp;context=${2}&amp;amp;amp;respondWithJSON=true&amp;amp;quot; --user rest:secret )&lt;br /&gt;
&lt;br /&gt;
## Check for errors and basic sanity check&lt;br /&gt;
&lt;br /&gt;
if [[ $encrypted == \{\&amp;amp;quot;error* ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  logger &amp;amp;quot;Guard sieve encrypter error: $encrypted&amp;amp;quot;  &lt;br /&gt;
  ## Error, exit  &lt;br /&gt;
  exit 1  &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
## Return the encrypted text. Preserve /r&lt;br /&gt;
&lt;br /&gt;
echo -e &amp;amp;quot;$encrypted&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
/usr/lib/dovecot/sieve-execute/guard-sig.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash  &lt;br /&gt;
GUARD=&amp;amp;quot;${GUARD_SERVER:-localhost:8009}&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
## Send the stdin to guard using curl, store result&lt;br /&gt;
&lt;br /&gt;
verified=$(curl -s -X POST -F file=@- &amp;amp;quot;http://${GUARD}/oxguard/pgpmail?action=verify&amp;amp;amp;user=${1}&amp;amp;amp;context=${2}&amp;amp;amp;simple=true&amp;amp;amp;respondWithJSON=true&amp;amp;quot; --user rest:secret )  &lt;br /&gt;
logger $verified  &lt;br /&gt;
&lt;br /&gt;
## Check if returns true&lt;br /&gt;
&lt;br /&gt;
if [[ $verified == &amp;amp;quot;{\&amp;amp;quot;data\&amp;amp;quot;:true}&amp;amp;quot; ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  exit 0  &lt;br /&gt;
fi  &lt;br /&gt;
if [[ $verified == \{\&amp;amp;quot;error* ]] ;  &lt;br /&gt;
then  &lt;br /&gt;
  logger &amp;amp;quot;Guard sieve signature error: $verified&amp;amp;quot;  &lt;br /&gt;
fi  &lt;br /&gt;
exit 1&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is no requirement that these scripts are in different directories.  Dovecot requires that scripts are not world writable.  In addition, as these scripts contain the rest username/password, recommend changing the owner to vmail and restricting permissions to 700&lt;br /&gt;
&lt;br /&gt;
== Configuration: ==&lt;br /&gt;
&lt;br /&gt;
The guard mailfilter functionality must be enabled on the middleware.  Recommend adding the configuration to guard-api.properties on the middleware servers:&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard.sieveEnabled=true&lt;br /&gt;
&lt;br /&gt;
The script names may be configured differently, but default to the following:&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard.guardEncryptScript=guard.sh&lt;br /&gt;
&lt;br /&gt;
com.openexchange.mail.filter.guard..guardSignatureScript=guard-sig.sh&lt;br /&gt;
&lt;br /&gt;
== MailFilter User Interface: ==&lt;br /&gt;
&lt;br /&gt;
Assuming the user has guard-mail and mailfilter capabilities, they will now be able to add the configured test and actions for Guard.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24910</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24910"/>
		<updated>2019-09-27T18:25:17Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Optional Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteonrevoke = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-noextra = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Autocrypt (as of 2.10.2) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptEnabled&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables AutoCrypt functionality for Guard.  If incoming emails have an AutoCrypt header, the key will be imported.  Outgoing emails contain the users public key in an autocrypt header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptMutual&amp;lt;/source&amp;gt;&lt;br /&gt;
On outgoing AutoCrypt headers, specifies desired AutoCrypt mode&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any&lt;br /&gt;
activity.  If the guest has not logged into the Guest account in the configured time, the&lt;br /&gt;
emails are removed and the Guest account is closed.&lt;br /&gt;
0 implies indefinite (no cleaning done).  Default 365 days&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24758</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24758"/>
		<updated>2019-07-08T17:13:57Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Version Matrix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4 - 2.8) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.0&lt;br /&gt;
|2.10.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.1&lt;br /&gt;
|2.10.1&lt;br /&gt;
|-&lt;br /&gt;
|7.10.2&lt;br /&gt;
|2.10.2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Documents: &amp;lt;code&amp;gt;com.openexchange.capability.guard-docs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''', '''Guard Drive''', and '''Guard Documents''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files. &amp;amp;quot;Guard Documents&amp;amp;quot; enable encryption capabilitiy to office documents.&lt;br /&gt;
&lt;br /&gt;
Each of the 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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Guard Documents: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-docs=true&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24757</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24757"/>
		<updated>2019-07-08T17:11:52Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Enabling Guard for Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4 - 2.8) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.0&lt;br /&gt;
|2.10.0&lt;br /&gt;
|-&lt;br /&gt;
|7.10.1&lt;br /&gt;
|2.10.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Documents: &amp;lt;code&amp;gt;com.openexchange.capability.guard-docs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''', '''Guard Drive''', and '''Guard Documents''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files. &amp;amp;quot;Guard Documents&amp;amp;quot; enable encryption capabilitiy to office documents.&lt;br /&gt;
&lt;br /&gt;
Each of the 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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Guard Documents: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-docs=true&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardConfiguration&amp;diff=24756</id>
		<title>AppSuite:GuardConfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardConfiguration&amp;diff=24756"/>
		<updated>2019-07-08T15:50:40Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Recovery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Cascade Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Main Options ==&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard=true'''&lt;br /&gt;
&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails.  This level will allow users without &amp;quot;guard-mail&amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails.  Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-mail=true'''&lt;br /&gt;
&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-drive=true'''&lt;br /&gt;
&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
== Optional Cascade Options ==&lt;br /&gt;
&lt;br /&gt;
=== Capabilities ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-pin'''&lt;br /&gt;
&lt;br /&gt;
Enables optional PIN function when sending emails to non-ox users.  Will provide an additional 4 digit pin that should be sent to the recipient.  Extra protection during the time that the temporary password was assigned and sent.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-nodeleterecovery'''&lt;br /&gt;
&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-norecovery'''&lt;br /&gt;
&lt;br /&gt;
(Guard 2.0) Password recovery is disabled.  No way to recover a lost or forgotten password.  Increases security, but a lost password means lost data.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-nodeleteprivate'''&lt;br /&gt;
&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key.  They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.secureReply'''&lt;br /&gt;
&lt;br /&gt;
(Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted.  Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-nodeleteonrevoke''' (Depreciated as of Guard 2.0)&lt;br /&gt;
&lt;br /&gt;
Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.capability.guard-noextra''' (Depreciated as of Guard 2.0)&lt;br /&gt;
&lt;br /&gt;
Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
=== Configuration Variables ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.fromEmail= name&amp;lt;email&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Email address to use as the From address when sending automated emails (First password, password reset)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.externalReaderURL'''&lt;br /&gt;
&lt;br /&gt;
When sending an email to a guest, this URL is used for the link to the Guest reader&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.externalOxUI'''&lt;br /&gt;
&lt;br /&gt;
PGP MIME emails are sent with a help file attached.  This is the URL to the main appsuite UI that is included in the help file &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.templateID'''&lt;br /&gt;
&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails.  See [[AppSuite:GuardCustomization|Customization]] for details&lt;br /&gt;
&lt;br /&gt;
== Configuration file (guard.properties) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.configdbHostname=localhost'''&lt;br /&gt;
&lt;br /&gt;
The address of the mysql database that contains the OX Backend configdb. This is used during initial setup and database sharding&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.oxguardDatabaseHostname=localhost'''&lt;br /&gt;
&lt;br /&gt;
The address of the mysql database for OxGuard data. May be the same as the OX mysql database&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.oxguardDatabaseRead'''&lt;br /&gt;
&lt;br /&gt;
Optional read-only IP/name for the Guard database.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.oxguardShardDatabase'''&lt;br /&gt;
&lt;br /&gt;
IP/Name for the location of the next Guest database shard.  Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.databaseUsername=username'''&lt;br /&gt;
&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.databasePassword=password'''&lt;br /&gt;
&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.restApiHostname=localhost'''&lt;br /&gt;
&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.OXBackendPort = 8009'''&lt;br /&gt;
&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.restApiUsername=open-xchange''' &lt;br /&gt;
'''com.openexchange.guard.restApiPassword=secret'''&lt;br /&gt;
&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.externalEmailURL=example.com'''&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
If the support API is to be used, a username and password should be configured&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.supportapiusername=xxxxx'''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.supportapipassword=yyyyy'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion).  If support &amp;quot;exposes&amp;quot; the key, the user can then retrieve it using link generated.  For security reasons, this link is only valid for a short period of time.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.exposedKeyDurationInHours=168'''&lt;br /&gt;
&lt;br /&gt;
=== File Store ===&lt;br /&gt;
&lt;br /&gt;
When non-ox users get an email with a link to read the message, an external url is required so they can visit the non-ox reader page. This should be the public domain that would prefix /appsuite/api/guard/reader&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.type=file'''&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of non-ox encrypted emails. This can be an attached file store, or Amazon S3 compatible object store. Values are “file” or “s3”&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.file.uploadDirectory=/var/spool/open-xchange/guard/uploads'''&lt;br /&gt;
&lt;br /&gt;
Location of local filestore if type was “file”&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.s3.endpoint='''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.s3.bucketName='''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.s3.region='''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.s3.accessKey='''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.storage.s3.secretKey='''&lt;br /&gt;
&lt;br /&gt;
S3 configuration options if filestore selected was S3&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.cacheDays=30'''&lt;br /&gt;
&lt;br /&gt;
How many days emails are kept in file store before being deleted. Measured from time of sending, reset when someone reads the email&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.cronHour=2'''&lt;br /&gt;
&lt;br /&gt;
Time that the filestore is checked for old items&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.aesKeyLength=256'''  (Depreciated)&lt;br /&gt;
&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have java unlimeted key strength pack installed&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.rsaKeyLength=2048'''&lt;br /&gt;
&lt;br /&gt;
RSA key length.  Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.keyValidDays=3650'''&lt;br /&gt;
&lt;br /&gt;
Length of time for PGP key validity.  Set to 0 if no expiration date&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.publicPGPDirectory'''&lt;br /&gt;
&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.publicKeyWhitelist'''&lt;br /&gt;
&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers.  When the public PGP key server is queried, it will normally only find Guard keys that have already been created.  If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.keyValidDays'''&lt;br /&gt;
&lt;br /&gt;
PGP keys created will only be valid for this number of days.  Default is 10 years&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.guestSMTPServer=smtp.example.com'''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.guestSMTPPort=25'''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.guestSMTPUsername='''&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.guestSMTPPassword='''&lt;br /&gt;
&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server&lt;br /&gt;
&lt;br /&gt;
=== Remote ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.pgpCacheDays=7&lt;br /&gt;
&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache.  Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
Optional&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.usestarttls = true'''&lt;br /&gt;
&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Bad attempts ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.badMinuteLock= 10'''&lt;br /&gt;
&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Default 10&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.badPasswordCount= 5'''&lt;br /&gt;
&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Default 5&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.badIpCount: 10'''&lt;br /&gt;
&lt;br /&gt;
Defines how many times an outside computer can request a public key that doesn't exist before being locked out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.rsacache=true'''&lt;br /&gt;
&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.rsacachecount=100'''&lt;br /&gt;
&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.keycachecheckinterval= 30'''&lt;br /&gt;
&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.rsacertainty=256'''&lt;br /&gt;
&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.newpasslength=8'''&lt;br /&gt;
&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.minpasswordlength=6'''&lt;br /&gt;
&lt;br /&gt;
Minimum password length&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.oxbackendpath=/ajax/'''&lt;br /&gt;
&lt;br /&gt;
URL used to communicated directly with the OX backend&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.oxbackendidletime=60'''&lt;br /&gt;
&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.configdbname=configdb'''&lt;br /&gt;
&lt;br /&gt;
Name of the configdb database&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.supportApiUsername'''&lt;br /&gt;
&lt;br /&gt;
Username for the support API&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.supportApiPassword'''&lt;br /&gt;
&lt;br /&gt;
Password for the support API&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.shardsize=1000'''&lt;br /&gt;
&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.externalreaderpath=/appsuite/api/oxguard/reader/reader.html'''&lt;br /&gt;
&lt;br /&gt;
Full path after domain name for the external reader (if changed from default)&lt;br /&gt;
&lt;br /&gt;
==Optional Configuration Settings==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.backend_ssl=true'''&lt;br /&gt;
&lt;br /&gt;
Communication between Guard and the OX backend is set to HTTP by default. All items to be encrypted are already encrypted at this point, but other information (sender name, filename, etc) could appear in plaintext here. If SSL is desired, sest to true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
Communication between the frontend load balancer (APACHE or otherwise) to Guard is by default HTTP (if protected network). To have Guard listen on an SSL socket, the following needs to be set&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.useSSL= true'''&lt;br /&gt;
&lt;br /&gt;
Enables jetty listener for ssl&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.SSLPort= 8443'''&lt;br /&gt;
&lt;br /&gt;
Jetty will listen on defined port for ssl connections&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.SSLKeyStore= xxxx'''&lt;br /&gt;
&lt;br /&gt;
Location of the keystore with ssl keys&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.SSLKeyName= xxxx'''&lt;br /&gt;
&lt;br /&gt;
Name/alieas of the key to use&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.SSLKeyPass= xxxx'''&lt;br /&gt;
&lt;br /&gt;
Password for the ssl key&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.noRecovery= true'''&lt;br /&gt;
&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data&lt;br /&gt;
&lt;br /&gt;
Users will be able to change their passwords if they remember their current/old password.  But they won't be able to create a new password in the event it is forgotten.&lt;br /&gt;
&lt;br /&gt;
Users without recovery would have to create new keys, with a new password, to continue to use Guard.  These keys would apply to future encrypted items, not the old ones.&lt;br /&gt;
&lt;br /&gt;
Guests that forget their passwords will need to have their account reset from the command line tool (this will create new keys for them, and send them a new password)&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
&lt;br /&gt;
'''com.openexchange.guard.defaultlanguage=en_US'''&lt;br /&gt;
&lt;br /&gt;
Default language if a language is requested but not available&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24569</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24569"/>
		<updated>2019-03-21T17:01:52Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* PGP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title%20=%20AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteonrevoke = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-noextra = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Autocrypt (as of 2.10.2) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptEnabled&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables AutoCrypt functionality for Guard.  If incoming emails have an AutoCrypt header, the key will be imported.  Outgoing emails contain the users public key in an autocrypt header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.autoCryptMutual&amp;lt;/source&amp;gt;&lt;br /&gt;
On outgoing AutoCrypt headers, specifies desired AutoCrypt mode&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any&lt;br /&gt;
activity.  If the guest has not logged into the Guest account in the configured time, the&lt;br /&gt;
emails are removed and the Guest account is closed.&lt;br /&gt;
0 implies indefinite (no cleaning done).  Default 365 days&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24568</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24568"/>
		<updated>2019-03-21T16:54:37Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Guest Accounts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title%20=%20AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteonrevoke = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-noextra = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any&lt;br /&gt;
activity.  If the guest has not logged into the Guest account in the configured time, the&lt;br /&gt;
emails are removed and the Guest account is closed.&lt;br /&gt;
0 implies indefinite (no cleaning done).  Default 365 days&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24567</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=24567"/>
		<updated>2019-03-21T16:49:45Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* PGP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title%20=%20AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteonrevoke = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-noextra = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.useStartTLS = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24560</id>
		<title>AppSuite:OX Guard Upgrade 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24560"/>
		<updated>2019-03-14T12:30:31Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Guest Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard to 2.10 from 2.6/2.8 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.10.0''' the experience for external recipients has changed significantly.  Pre 2.10, there was a guest reader HTML package that allowed recipients to decrypt and reply to PGP emails.  This has now changed.  External recipients now have an Appsuite Guest account created, similar to a file share, with an pseudo inbox that lists all of the encrypted emails sent to them.  The recipient will still be able to reply to emails sent to them, but will not be able to create new emails.&lt;br /&gt;
&lt;br /&gt;
Bringing external users into Appsuite presents additional upsell opportunity as well as advertising options.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.10.0.&lt;br /&gt;
&lt;br /&gt;
=== Guest Users ===&lt;br /&gt;
&lt;br /&gt;
All Guest users must have guard capability in order to read encrypted emails.  To do this, the following configuration file &amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt; needs to be modified.&lt;br /&gt;
&lt;br /&gt;
Assuming the guestCapabilityMode is set to static, please add guard to the staticGuestCapabilities&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
 com.openexchange.share.staticGuestCapabilities=guard&lt;br /&gt;
&lt;br /&gt;
Also, make sure that the guest sessions are not treated as transient&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.share.transientSessions=false&lt;br /&gt;
&lt;br /&gt;
=== WebKey Service ===&lt;br /&gt;
&lt;br /&gt;
Optional WebKey server was added in 2.10.  This allows external users to look up the public PGP keys of Guard users as described [https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02 here].  To enable this ability, an additional ProxyPass needs to be added to the proxy_http.conf file&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
=== Reader Package ===&lt;br /&gt;
&lt;br /&gt;
The package com.openexchange.guard.reader is no longer required, but recommended for those upgrading from an earlier version.&lt;br /&gt;
The package no longer contains a full guest reader, rather it redirects old Guard guest share links to the new appsuite guest.  This package will be required for as long as old guest emails should remain functional.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Changes ===&lt;br /&gt;
&lt;br /&gt;
==== Guest Configuration ====&lt;br /&gt;
&lt;br /&gt;
Encrypted emails sent to external recipients was previously cached for a period of time, defaulting to 90 days.  After this time, the reader would not function unless the user uploaded the attachment sent with their emails.&lt;br /&gt;
&lt;br /&gt;
This has changed in 2.10.  Now, a Guest user has a virtual inbox, listing the encrypted emails sent to them.  A new configuration setting has been added&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&lt;br /&gt;
&lt;br /&gt;
This configuration cleans up a Guest account after the configured number of days if the user has not logged in.  All emails for the guest account will be purged, and the Guest accounts removed from appsuite.  A setting of 0 disables the cleaning completely.&lt;br /&gt;
&lt;br /&gt;
==== Trust Levels ====&lt;br /&gt;
&lt;br /&gt;
Some PGP Public keys can be trusted more than others.  Guard now displays if the key is trusted or not by changing the color of the key next to a recipients email address, and provides details if the user hovers over the key.  The trust level can be configured in the guard-core.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.keySources.trustThreshold=4&lt;br /&gt;
 # The trust level for keys created by OX Guard&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuard=5&lt;br /&gt;
 # The trust level for keys uploaded by a user&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserUploaded=4&lt;br /&gt;
 # The trust level for keys uploaded by a user and shared among users in the same context&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserShared=3&lt;br /&gt;
 # The trust level for keys fetched from public HKP servers&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPPublicServer=1&lt;br /&gt;
 # The trust level for keys fetched from HKP servers marked as trusted&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPTrustedServer=5&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVServer=4&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via DNSSEC protected SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVDNSSECServer=4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Guest PIN ====&lt;br /&gt;
&lt;br /&gt;
The option of adding an additional 4 digit pin to new Guest emails was completely re-written in 2.10.  The prior config-cascade value of com.openexchange.capability.guard-pin is now used to specify at the user/context level if the PIN should be offered.&lt;br /&gt;
 &lt;br /&gt;
A new configuration '''com.openexchange.guard.pinEnabled''' was added to guard-core.properties file.  This enabled the actual service.  Please be sure to set to true if you want a PIN checked for new Guests.&lt;br /&gt;
&lt;br /&gt;
Both of these need to be set to true for the PIN service to function properly&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24534</id>
		<title>AppSuite:Multifactor</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24534"/>
		<updated>2019-02-06T15:19:24Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Login Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Multifactor Authentication (since 7.10.2) =&lt;br /&gt;
&lt;br /&gt;
Appsuite version 7.10.2 provides methods for users to require secondary, additional methods of authentication before creating a valid Appsuite session.  These methods may include SMS messages, Time based authenticator methods, U2F compatible devices/keyfobs, and other custom methods.&lt;br /&gt;
&lt;br /&gt;
== Enabling Multifactor ==&lt;br /&gt;
&lt;br /&gt;
No additional packages are required for the core of multifactor authentication, although for some methods (such as SMS), additional packages will be required.  &lt;br /&gt;
&lt;br /&gt;
With SMS, for example, you must also install a provider, such as open-xchange-sms-sipgate.&lt;br /&gt;
&lt;br /&gt;
Then, multifactor must be enabled as a capability.  This can be done in the multifactor.properties file, or as a cascade value&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.capability.multifactor=true&lt;br /&gt;
&lt;br /&gt;
== Enabling SMS ==&lt;br /&gt;
&lt;br /&gt;
First, the SMS provider must be installed and configured.  Most will require a configured username and password, or AUTH_TOKEN.  Install the needed package and configure.&lt;br /&gt;
&lt;br /&gt;
At that point, you should enable SMS in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.sms.available=true&lt;br /&gt;
&lt;br /&gt;
The following properties are also available&lt;br /&gt;
&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLength   (default is 8 characters)&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLifetime (Number of minutes until challenge expires)&lt;br /&gt;
* com.openexchange.multifactor.maxTokenAmount (Maximum number of challenges before locked out)&lt;br /&gt;
&lt;br /&gt;
== Enabling TOTP ==&lt;br /&gt;
&lt;br /&gt;
TOTP is Time-based One Time Password.  This works with several apps available in mobile stores, such as Google Authenticator.&lt;br /&gt;
&lt;br /&gt;
To enable, just set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.totp.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling Backup String ==&lt;br /&gt;
&lt;br /&gt;
This is a method to allow a user to log into their account if they lose their primary multifactor authentication device (say losing their phone or U2F token).  It is a long string that they can copy, download, or print to use to unlock the account in the event of loss&lt;br /&gt;
&lt;br /&gt;
To enable, set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.backupString.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling U2F ==&lt;br /&gt;
&lt;br /&gt;
U2F is supported in Google Chrome, as well as Firefox (though requires user changing advanced settings).  &lt;br /&gt;
&lt;br /&gt;
In multifactor.properties, enable U2F&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.available=true&lt;br /&gt;
&lt;br /&gt;
Then, the domain that the user will be using must be specified.  This will be used with the requests to the U2F device, and must mach the website.  This configuration is config-cascade aware&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.appId=https://yourdomain&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Login Page ==&lt;br /&gt;
&lt;br /&gt;
By default, the UI will change from the login page, draw the customized toolbar, then display a prompt for the multifactor authentication.&lt;br /&gt;
&lt;br /&gt;
If you would prefer to have your login screen, or a different second factor screen used as the background, then you can configure in the as-config.yml&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 default:&lt;br /&gt;
     host: all&lt;br /&gt;
     signinTheme: default&lt;br /&gt;
     multifactorBackground: pages/secondFactor&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24532</id>
		<title>AppSuite:Multifactor</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24532"/>
		<updated>2019-02-05T20:08:03Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Multifactor Authentication (since 7.10.2) =&lt;br /&gt;
&lt;br /&gt;
Appsuite version 7.10.2 provides methods for users to require secondary, additional methods of authentication before creating a valid Appsuite session.  These methods may include SMS messages, Time based authenticator methods, U2F compatible devices/keyfobs, and other custom methods.&lt;br /&gt;
&lt;br /&gt;
== Enabling Multifactor ==&lt;br /&gt;
&lt;br /&gt;
No additional packages are required for the core of multifactor authentication, although for some methods (such as SMS), additional packages will be required.  &lt;br /&gt;
&lt;br /&gt;
With SMS, for example, you must also install a provider, such as open-xchange-sms-sipgate.&lt;br /&gt;
&lt;br /&gt;
Then, multifactor must be enabled as a capability.  This can be done in the multifactor.properties file, or as a cascade value&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.capability.multifactor=true&lt;br /&gt;
&lt;br /&gt;
== Enabling SMS ==&lt;br /&gt;
&lt;br /&gt;
First, the SMS provider must be installed and configured.  Most will require a configured username and password, or AUTH_TOKEN.  Install the needed package and configure.&lt;br /&gt;
&lt;br /&gt;
At that point, you should enable SMS in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.sms.available=true&lt;br /&gt;
&lt;br /&gt;
The following properties are also available&lt;br /&gt;
&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLength   (default is 8 characters)&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLifetime (Number of minutes until challenge expires)&lt;br /&gt;
* com.openexchange.multifactor.maxTokenAmount (Maximum number of challenges before locked out)&lt;br /&gt;
&lt;br /&gt;
== Enabling TOTP ==&lt;br /&gt;
&lt;br /&gt;
TOTP is Time-based One Time Password.  This works with several apps available in mobile stores, such as Google Authenticator.&lt;br /&gt;
&lt;br /&gt;
To enable, just set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.totp.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling Backup String ==&lt;br /&gt;
&lt;br /&gt;
This is a method to allow a user to log into their account if they lose their primary multifactor authentication device (say losing their phone or U2F token).  It is a long string that they can copy, download, or print to use to unlock the account in the event of loss&lt;br /&gt;
&lt;br /&gt;
To enable, set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.backupString.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling U2F ==&lt;br /&gt;
&lt;br /&gt;
U2F is supported in Google Chrome, as well as Firefox (though requires user changing advanced settings).  &lt;br /&gt;
&lt;br /&gt;
In multifactor.properties, enable U2F&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.available=true&lt;br /&gt;
&lt;br /&gt;
Then, the domain that the user will be using must be specified.  This will be used with the requests to the U2F device, and must mach the website.  This configuration is config-cascade aware&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.appId=https://yourdomain&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Login Page ==&lt;br /&gt;
&lt;br /&gt;
By default, the UI will change from the login page, draw the customized toolbar, then display a prompt for the multifactor authentication.&lt;br /&gt;
&lt;br /&gt;
If you would prefer to have your login screen, or a different second factor screen used as the background, then you can configure in the config.yml&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 default:&lt;br /&gt;
     host: all&lt;br /&gt;
     signinTheme: default&lt;br /&gt;
     multifactorBackdround: pages/secondFactor&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24531</id>
		<title>AppSuite:Multifactor</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Multifactor&amp;diff=24531"/>
		<updated>2019-02-05T20:06:45Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Created page with &amp;quot; = Multifactor Authentication (since 7.10.2) =  Appsuite version 7.10.2 provides methods for users to require secondary, additional methods of authentication before creating a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Multifactor Authentication (since 7.10.2) =&lt;br /&gt;
&lt;br /&gt;
Appsuite version 7.10.2 provides methods for users to require secondary, additional methods of authentication before creating a valid Appsuite session.  These methods may include SMS messages, Time based authenticator methods, U2F compatible devices/keyfobs, and other custom methods.&lt;br /&gt;
&lt;br /&gt;
== Enabling Multifactor ==&lt;br /&gt;
&lt;br /&gt;
No additional packages are required for the core of multifactor authentication, although for some methods (such as SMS), additional packages will be required.  &lt;br /&gt;
&lt;br /&gt;
With SMS, for example, you must also install a provider, such as open-xchange-sms-sipgate&lt;br /&gt;
&lt;br /&gt;
Then, multifactor must be enabled as a capability.  This can be done in the multifactor.properties file, or as a cascade value&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.capability.multifactor=true&lt;br /&gt;
&lt;br /&gt;
== Enabling SMS ==&lt;br /&gt;
&lt;br /&gt;
First, the SMS provider must be installed and configured.  Most will require a configured username and password, or AUTH_TOKEN.  Install the needed package and configure&lt;br /&gt;
&lt;br /&gt;
At that point, you should enable SMS in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.sms.available=true&lt;br /&gt;
&lt;br /&gt;
The following properties are also available&lt;br /&gt;
&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLength   (default is 8 characters)&lt;br /&gt;
* com.openexchange.multifactor.sms.tokenLifetime (Number of minutes until challenge expires)&lt;br /&gt;
* com.openexchange.multifactor.maxTokenAmount (Maximum number of challenges before locked out)&lt;br /&gt;
&lt;br /&gt;
== Enabling TOTP ==&lt;br /&gt;
&lt;br /&gt;
TOTP is Time-based One Time Password.  This works with several apps available in mobile stores, such as Google Authenticator.&lt;br /&gt;
&lt;br /&gt;
To enable, just set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.totp.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling Backup String ==&lt;br /&gt;
&lt;br /&gt;
This is a method to allow a user to log into their account if they lose their primary multifactor authentication device (say losing their phone or U2F token).  It is a long string that they can copy, download, or print to use to unlock the account in the event of loss&lt;br /&gt;
&lt;br /&gt;
To enable, set in the multifactor.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.backupString.available=true&lt;br /&gt;
&lt;br /&gt;
== Enabling U2F ==&lt;br /&gt;
&lt;br /&gt;
U2F is supported in Google Chrome, as well as Firefox (though requires user changing advanced settings).  &lt;br /&gt;
&lt;br /&gt;
In multifactor.properties, enable U2F&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.available=true&lt;br /&gt;
&lt;br /&gt;
Then, the domain that the user will be using must be specified.  This will be used with the requests to the U2F device, and must mach the website.  This configuration is config-cascade aware&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.multifactor.U2F.appId=https://yourdomain&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Login Page ==&lt;br /&gt;
&lt;br /&gt;
By default, the UI will change from the login page, draw the customized toolbar, then display a prompt for the multifactor authentication.&lt;br /&gt;
&lt;br /&gt;
If you would prefer to have your login screen, or a different second factor screen used as the background, then you can configure in the config.yml&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 default:&lt;br /&gt;
     host: all&lt;br /&gt;
     signinTheme: default&lt;br /&gt;
     multifactorBackdround: pages/secondFactor&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24304</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24304"/>
		<updated>2018-10-05T14:27:10Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Redhat Enterprise Linux 7 or CentOS 7 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4 - 2.8) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (Apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Main_Page_Quickinstall&amp;diff=24109</id>
		<title>AppSuite:Main Page Quickinstall</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:Main_Page_Quickinstall&amp;diff=24109"/>
		<updated>2018-07-03T16:38:34Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* OX Guard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX App Suite =&lt;br /&gt;
&lt;br /&gt;
== Quick Installation Guide ==&lt;br /&gt;
&lt;br /&gt;
To download and install the software, please use the following Installation Guides:&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_8.0|Download and Installation Guide for Debian GNU/Linux 8.0 (Jessie)]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_9.0|Download and Installation Guide for Debian GNU/Linux 9.0 (Stretch)]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_SLES12|Download and Installation Guide for SUSE Linux Enterprise Server 12]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL6|Download and Installation Guide for RedHat Enterprise Linux 6]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL7|Download and Installation Guide for RedHat Enterprise Linux 7]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_6|Download and Installation Guide for CentOS 6]]&lt;br /&gt;
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_7|Download and Installation Guide for CentOS 7]]&lt;br /&gt;
* [[OXSE4UCS_Installation_en|Download and Installation Guide for Univention Corporate Server]]&lt;br /&gt;
* [[AppSuite:Demoinstallation|Download and Installation Guide for Open-Xchange SE / App Suite for UCS VMware© Demo]]&lt;br /&gt;
&lt;br /&gt;
== Installing the latest Updates for OX App Suite ==&lt;br /&gt;
&lt;br /&gt;
To get the latest features and bugfixes for OX App Suite, you need to have a valid license. The following article explains how that can be done:&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:UpdatingOXPackages|Updating OX App Suite packages]]&lt;br /&gt;
* [[UpdateTasks|Update Task Management in Open-Xchange]]&lt;br /&gt;
&lt;br /&gt;
== OX App Suite deployment tutorials ==&lt;br /&gt;
&lt;br /&gt;
A complete guide of necessary tasks with a hardware and setup recommendation for different Open-Xchange Hosting environments:&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:OX_Tutorial_10K|OX App Suite deployment tutorial for up to 10.000 Users]]&lt;br /&gt;
* [[AppSuite:OX_Tutorial_100K|OX App Suite deployment tutorial for up to 100.000 Users]]&lt;br /&gt;
* [[AppSuite:OX_Tutorial_1M|OX App Suite deployment tutorial for up to 1.000.000 Users]]&lt;br /&gt;
&lt;br /&gt;
== Reporting Tool (Mandatory for Maintenance) ==&lt;br /&gt;
&lt;br /&gt;
To receive maintenance in the future, the installation of the Open-Xchange Reporting Tool is mandatory. It documents the current state of your system installation. Furthermore, the tool runs a validity check for your current maintenance. Based on the reported detail information Open-Xchange will then be able to improve its own support and maintenance offerings for you. This article explains how that can be done:&lt;br /&gt;
&lt;br /&gt;
* [https://documentation.open-xchange.com/7.10.0/middleware/components/report_client.html OX App Suite Reporting Client]&lt;br /&gt;
&lt;br /&gt;
= Open-Xchange Additional Software =&lt;br /&gt;
&lt;br /&gt;
== OX Documents ==&lt;br /&gt;
&lt;br /&gt;
OX Documents are browser based, cloud ready, text, spreadsheet and presentation products that can work with Microsoft Office and OpenOffice documents in a lossless way. And you can also collaborate with other people to edit shared documents on various devices.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Documents_Installation_Guide|OX Documents Download &amp;amp; Installation]]&lt;br /&gt;
&lt;br /&gt;
== OX Guard ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:OX_Guard_2_10|Installation and information of OX Guard]]&lt;br /&gt;
* [[Appsuite:OX_Guard_Configuration_2_10|Configuration Options for OX Guard]]&lt;br /&gt;
&lt;br /&gt;
== OX Drive ==&lt;br /&gt;
&lt;br /&gt;
The OX Drive client lets you store and share your photos, files, documents and videos, anytime, anywhere. Access any file you save to OX Drive from all your computers, iPhone, iPad or from within OX App Suite itself.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:OX_Drive|Installation and information of OX Drive]]&lt;br /&gt;
&lt;br /&gt;
== OX Mail App v2 ==&lt;br /&gt;
&lt;br /&gt;
The OX Mail v2 is a companion app for OX App Suite, and brings the power of OX App Suite web-based email to your customers' mobile devices. The OX Mail v2 is a native app designed specifically for Android and iOS smartphones and tablets. &lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:OX_Mail_v2_0|Installation and information of OX Mail App v2]]&lt;br /&gt;
&lt;br /&gt;
== OX Sync ==&lt;br /&gt;
&lt;br /&gt;
=== Connector for Business Mobility (ActiveSync) ===&lt;br /&gt;
&lt;br /&gt;
Connector for Business Mobility enables you to securely manage emails, contacts, calendar and tasks on a mobile device. It is based on Microsoft Exchange Active Sync (EAS) standard (valid Open-Xchange license required).&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Connector_for_Business_Mobility_Installation_Guide|Installation and information of the Connector for Business Mobility]]&lt;br /&gt;
&lt;br /&gt;
=== Open-Xchange Contact Synchronization with CardDAV ===&lt;br /&gt;
&lt;br /&gt;
The Mac OS X and iOS integration makes Open-Xchange contacts available to end users through their native applications.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:CardDAVClients | Configuration CardDAV with Open-Xchange]]&lt;br /&gt;
* [[AppSuite:Caldav_carddav_Bundles| Installation CardDAV with Open-Xchange]]&lt;br /&gt;
&lt;br /&gt;
=== Open-Xchange Calendar synchronization with CalDAV === &lt;br /&gt;
&lt;br /&gt;
The Mac OS X, iOS and Thunderbird Lightning integration makes Open-Xchange appointments available to end users through their native applications.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:CalDAVClients | Configuration CalDAV with Open-Xchange]]&lt;br /&gt;
* [[AppSuite:Caldav_carddav_Bundles| Installation CalDAV with Open-Xchange]]&lt;br /&gt;
&lt;br /&gt;
=== OX Sync App ===&lt;br /&gt;
&lt;br /&gt;
OX Sync App is a native mobile phone app built specifically for smartphone users of Android, that also have a valid OX App Suite account. The app is designed to let users sync their OX App Suite Appointments, Tasks and Contacts environment directly from a native mobile phone client. &lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:OX_Sync_App|Installation and information of the OX Sync App]]&lt;br /&gt;
&lt;br /&gt;
== eM Client for OX App Suite ==&lt;br /&gt;
&lt;br /&gt;
Open-Xchange’s eM Client for OX App Suite is a full-featured email client with a modern and easy-to-use interface for Windows users. In addition to user-friendly email functionality, this application offers several integrated features: a calendar, tasks and contacts. Additionally, eM Client for OX App Suite can be used offline with full OX App Suite synchronization.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:EM_Client_for_OX_App_Suite|Download &amp;amp; Installation of eM Client for OX App Suite]]&lt;br /&gt;
&lt;br /&gt;
== OX APS package for Odins Service Automation System and Plesk Panel ==&lt;br /&gt;
&lt;br /&gt;
Odins Service Automation (OSA) is an operations support system (OSS) for service providers, who want to differentiate their offerings in order to reduce customer churn and attract new customers. Additional, the APS package adds a high performance, best in class email service to Odins Plesk Panel customers.&lt;br /&gt;
&lt;br /&gt;
* [[Parallels_Integration|Integrate Open-Xchange with Odin]]&lt;br /&gt;
&lt;br /&gt;
== OX APS 2.0 package for Odin Service Automation ==&lt;br /&gt;
&lt;br /&gt;
Service Automation provides a single, centralized management console for managing offer and delivery of cloud services, and supports multiple tiers of service resellers with customizable white-labeled customer facing websites to initiate ordering and provisioning.&lt;br /&gt;
&lt;br /&gt;
Service Automation provides access to all of the resources inside a service provider’s data center associated with cloud service offerings. The APS package adds a high performance, best in class email service to Odin's customers.&lt;br /&gt;
&lt;br /&gt;
Attention: This APS 2.0 package is only for the Open-Xchange own OX as a Service platform or similar respective compatible deployments or copies of this platform.&lt;br /&gt;
&lt;br /&gt;
* [[PA_APSv2_IntegrationGuide|OX APS 2.0 package for Odin Service Automation]]&lt;br /&gt;
&lt;br /&gt;
== Dovecot Anti-Abuse Shield ==&lt;br /&gt;
&lt;br /&gt;
Dovecot Anti-Abuse Shield is included along with Dovecot Pro, but works with both Dovecot Pro and OX App Suite as a component to protect against login/authentication abuse. Anti-Abuse Shield runs on a cluster of servers, and integrates with both OX App Suite and Dovecot to detect abuse, brute force attacks and also to enforce common authentication/authorization policies across the platform.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Dovecot_Antiabuse_Shield|Dovecot Anti-Abuse Shield]]&lt;br /&gt;
&lt;br /&gt;
= Open-Xchange Additional Tools and Configurations =&lt;br /&gt;
&lt;br /&gt;
== Automated Deployment with Chef ==&lt;br /&gt;
&lt;br /&gt;
For an automated deployment of our software have a look at our&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Deployment_with_Chef_Showcase|Community Showcase Deployment with Chef]]&lt;br /&gt;
* [[AppSuite:Deployment_with_Chef_for_Raspbian|Installation the Open-Xchange App Suite to a Raspberry Pi]]&lt;br /&gt;
&lt;br /&gt;
== Open-Xchange Document Viewer ==&lt;br /&gt;
The OX Document Viewer will choose the best preview format depending on the users device on the OX App Suite Web Interface (valid Open-Xchange license required).&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:DocumentViewer |Download &amp;amp; Install Document Viewer]]&lt;br /&gt;
&lt;br /&gt;
== Open-Xchange Presenter ==&lt;br /&gt;
&lt;br /&gt;
OX Presenter allows for local and remote presentations of presentation documents (valid Open-Xchange license required).&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Presenter_Installation_Guide|Download &amp;amp; Installation of OX Presenter]]&lt;br /&gt;
&lt;br /&gt;
== Open-Xchange Updater  ==&lt;br /&gt;
&lt;br /&gt;
The Open-Xchange Updater is a software tool by Open-Xchange that installs the latest version of Open-Xchange client software on computers running Windows (valid Open-Xchange license required).&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Open-Xchange_Updater|Installation of the Open-Xchange Updater]]&lt;br /&gt;
&lt;br /&gt;
== Cluster-Setup ==&lt;br /&gt;
Multiple Open-Xchange servers can form a cluster with inter-OX-communication over a network. &lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Running_a_cluster| Configuration Cluster-Setup]]&lt;br /&gt;
&lt;br /&gt;
== HTTP based Connector via Grizzly ==&lt;br /&gt;
OX App Suite offers a second HTTP based connector for the communication between the HTTP server and the backend. This new connector is based on Oracle's Project Grizzly - a NIO and Web framework.&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Grizzly| Configuration Connector based on Grizzly]]&lt;br /&gt;
&lt;br /&gt;
== LDAP Contact Storage ==&lt;br /&gt;
Open-Xchange provides a new LDAP Contact Storage Integration Bundle. The new solution is available together with the current LDAP bundle. &lt;br /&gt;
&lt;br /&gt;
* [[ContactStorageLDAP| LDAP Contact Storage]]&lt;br /&gt;
&lt;br /&gt;
= Installation Information =&lt;br /&gt;
&lt;br /&gt;
== Information ==&lt;br /&gt;
&lt;br /&gt;
* [[AppSuite:Backend_API_changes_extensions|OX App Suite - API Changes &amp;amp; Extensions]]&lt;br /&gt;
&lt;br /&gt;
== Installation Requirements ==&lt;br /&gt;
&lt;br /&gt;
* The [[AppSuite:OX_System_Requirements|Open-Xchange software requirements page]] provides an overview about the supported components at the OX User Front-End, Connector for Microsoft Outlook, Connector for Business Mobility and OX Notifier. This overview makes no claim to be complete.&lt;br /&gt;
* [[AppSuite:Importing_OX_Buildkey|Importing the Open-Xchange public buildkey]]&lt;br /&gt;
&lt;br /&gt;
[[Category: OX7]]&lt;br /&gt;
[[Category: AppSuite]]&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24039</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24039"/>
		<updated>2018-06-14T11:20:39Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* OX Guard (Version 2.4 - 2.8) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4 - 2.8) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (Apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24038</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=24038"/>
		<updated>2018-06-14T11:19:49Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Undo revision 24036 by Khgras (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (Apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24020</id>
		<title>AppSuite:OX Guard Upgrade 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24020"/>
		<updated>2018-06-08T14:34:38Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Guest PIN */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard to 2.10 from 2.6/2.8 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.10.0''' the experience for external recipients has changed significantly.  Pre 2.10, there was a guest reader HTML package that allowed recipients to decrypt and reply to PGP emails.  This has now changed.  External recipients now have an Appsuite Guest account created, similar to a file share, with an pseudo inbox that lists all of the encrypted emails sent to them.  The recipient will still be able to reply to emails sent to them, but will not be able to create new emails.&lt;br /&gt;
&lt;br /&gt;
Bringing external users into Appsuite presents additional upsell opportunity as well as advertising options.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.10.0.&lt;br /&gt;
&lt;br /&gt;
=== Guest Users ===&lt;br /&gt;
&lt;br /&gt;
All Guest users must have guard capability in order to read encrypted emails.  To do this, the following configuration file &amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt; needs to be modified.&lt;br /&gt;
&lt;br /&gt;
Assuming the guestCapabilityMode is set to static, please add guard to the staticGuestCapabilities&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
 com.openexchange.share.staticGuestCapabilities=guard&lt;br /&gt;
&lt;br /&gt;
=== WebKey Service ===&lt;br /&gt;
&lt;br /&gt;
Optional WebKey server was added in 2.10.  This allows external users to look up the public PGP keys of Guard users as described [https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02 here].  To enable this ability, an additional ProxyPass needs to be added to the proxy_http.conf file&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
=== Reader Package ===&lt;br /&gt;
&lt;br /&gt;
The package com.openexchange.guard.reader is no longer required, but recommended for those upgrading from an earlier version.&lt;br /&gt;
The package no longer contains a full guest reader, rather it redirects old Guard guest share links to the new appsuite guest.  This package will be required for as long as old guest emails should remain functional.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Changes ===&lt;br /&gt;
&lt;br /&gt;
==== Guest Configuration ====&lt;br /&gt;
&lt;br /&gt;
Encrypted emails sent to external recipients was previously cached for a period of time, defaulting to 90 days.  After this time, the reader would not function unless the user uploaded the attachment sent with their emails.&lt;br /&gt;
&lt;br /&gt;
This has changed in 2.10.  Now, a Guest user has a virtual inbox, listing the encrypted emails sent to them.  A new configuration setting has been added&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&lt;br /&gt;
&lt;br /&gt;
This configuration cleans up a Guest account after the configured number of days if the user has not logged in.  All emails for the guest account will be purged, and the Guest accounts removed from appsuite.  A setting of 0 disables the cleaning completely.&lt;br /&gt;
&lt;br /&gt;
==== Trust Levels ====&lt;br /&gt;
&lt;br /&gt;
Some PGP Public keys can be trusted more than others.  Guard now displays if the key is trusted or not by changing the color of the key next to a recipients email address, and provides details if the user hovers over the key.  The trust level can be configured in the guard-core.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.keySources.trustThreshold=4&lt;br /&gt;
 # The trust level for keys created by OX Guard&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuard=5&lt;br /&gt;
 # The trust level for keys uploaded by a user&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserUploaded=4&lt;br /&gt;
 # The trust level for keys uploaded by a user and shared among users in the same context&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserShared=3&lt;br /&gt;
 # The trust level for keys fetched from public HKP servers&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPPublicServer=1&lt;br /&gt;
 # The trust level for keys fetched from HKP servers marked as trusted&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPTrustedServer=5&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVServer=4&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via DNSSEC protected SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVDNSSECServer=4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Guest PIN ====&lt;br /&gt;
&lt;br /&gt;
The option of adding an additional 4 digit pin to new Guest emails was completely re-written in 2.10.  The prior config-cascade value of com.openexchange.capability.guard-pin is now used to specify at the user/context level if the PIN should be offered.&lt;br /&gt;
 &lt;br /&gt;
A new configuration '''com.openexchange.guard.pinEnabled''' was added to guard-core.properties file.  This enabled the actual service.  Please be sure to set to true if you want a PIN checked for new Guests.&lt;br /&gt;
&lt;br /&gt;
Both of these need to be set to true for the PIN service to function properly&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24019</id>
		<title>AppSuite:OX Guard Upgrade 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=24019"/>
		<updated>2018-06-08T14:24:26Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Configuration Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard to 2.10 from 2.6/2.8 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.10.0''' the experience for external recipients has changed significantly.  Pre 2.10, there was a guest reader HTML package that allowed recipients to decrypt and reply to PGP emails.  This has now changed.  External recipients now have an Appsuite Guest account created, similar to a file share, with an pseudo inbox that lists all of the encrypted emails sent to them.  The recipient will still be able to reply to emails sent to them, but will not be able to create new emails.&lt;br /&gt;
&lt;br /&gt;
Bringing external users into Appsuite presents additional upsell opportunity as well as advertising options.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.10.0.&lt;br /&gt;
&lt;br /&gt;
=== Guest Users ===&lt;br /&gt;
&lt;br /&gt;
All Guest users must have guard capability in order to read encrypted emails.  To do this, the following configuration file &amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt; needs to be modified.&lt;br /&gt;
&lt;br /&gt;
Assuming the guestCapabilityMode is set to static, please add guard to the staticGuestCapabilities&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
 com.openexchange.share.staticGuestCapabilities=guard&lt;br /&gt;
&lt;br /&gt;
=== WebKey Service ===&lt;br /&gt;
&lt;br /&gt;
Optional WebKey server was added in 2.10.  This allows external users to look up the public PGP keys of Guard users as described [https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02 here].  To enable this ability, an additional ProxyPass needs to be added to the proxy_http.conf file&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
=== Reader Package ===&lt;br /&gt;
&lt;br /&gt;
The package com.openexchange.guard.reader is no longer required, but recommended for those upgrading from an earlier version.&lt;br /&gt;
The package no longer contains a full guest reader, rather it redirects old Guard guest share links to the new appsuite guest.  This package will be required for as long as old guest emails should remain functional.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Changes ===&lt;br /&gt;
&lt;br /&gt;
==== Guest Configuration ====&lt;br /&gt;
&lt;br /&gt;
Encrypted emails sent to external recipients was previously cached for a period of time, defaulting to 90 days.  After this time, the reader would not function unless the user uploaded the attachment sent with their emails.&lt;br /&gt;
&lt;br /&gt;
This has changed in 2.10.  Now, a Guest user has a virtual inbox, listing the encrypted emails sent to them.  A new configuration setting has been added&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&lt;br /&gt;
&lt;br /&gt;
This configuration cleans up a Guest account after the configured number of days if the user has not logged in.  All emails for the guest account will be purged, and the Guest accounts removed from appsuite.  A setting of 0 disables the cleaning completely.&lt;br /&gt;
&lt;br /&gt;
==== Trust Levels ====&lt;br /&gt;
&lt;br /&gt;
Some PGP Public keys can be trusted more than others.  Guard now displays if the key is trusted or not by changing the color of the key next to a recipients email address, and provides details if the user hovers over the key.  The trust level can be configured in the guard-core.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.keySources.trustThreshold=4&lt;br /&gt;
 # The trust level for keys created by OX Guard&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuard=5&lt;br /&gt;
 # The trust level for keys uploaded by a user&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserUploaded=4&lt;br /&gt;
 # The trust level for keys uploaded by a user and shared among users in the same context&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserShared=3&lt;br /&gt;
 # The trust level for keys fetched from public HKP servers&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPPublicServer=1&lt;br /&gt;
 # The trust level for keys fetched from HKP servers marked as trusted&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPTrustedServer=5&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVServer=4&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via DNSSEC protected SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVDNSSECServer=4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Guest PIN ====&lt;br /&gt;
&lt;br /&gt;
The option of adding an additional 4 digit pin to new Guest emails was completely re-written in 2.10.  The prior config-cascade value of com.openexchange.capability.guard-pin has been depreciated.  &lt;br /&gt;
A new configuration '''com.openexchange.guard.pinEnabled''' was added to guard-core.properties file.  Please use this configuration instead&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_System_Requirements&amp;diff=23881</id>
		<title>AppSuite:OX System Requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_System_Requirements&amp;diff=23881"/>
		<updated>2018-03-19T13:29:39Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* OX Guard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX App Suite Requirements - Open-Xchange supported components overview =&lt;br /&gt;
&lt;br /&gt;
The following table provides an overview about the supported components at the OX User Front-End, Connector for Microsoft Outlook and Connector for Business Mobility. This overview makes no claim to be complete.&lt;br /&gt;
&lt;br /&gt;
Open-Xchange Server 6 overview tables about the supported components at the OX User Front-End, Connector for Microsoft Outlook and Connector for Business Mobility are available at [[OX_System_Requirements|OX 6 Requirements - Open-Xchange supported components overview]]&lt;br /&gt;
&lt;br /&gt;
Information about Maintenance expiries of components, versions and browser support, can be found in the [[AppSuite:Versioning_and_Numbering#Maintenance_expires|Maintenance Expires Table]]&lt;br /&gt;
&lt;br /&gt;
== Installation-, Hardware-, Software-Requirements ==&lt;br /&gt;
&lt;br /&gt;
Please note: Installation and administration of the OX App Suite requires basic knowledge of E-Mail systems under Linux, Apache and MySQL as well as experience in the command line administration of Linux systems.&lt;br /&gt;
&lt;br /&gt;
'''OX App Suite:''' &lt;br /&gt;
* Memory 8 GB - 12 GB &amp;lt;br&amp;gt; '''Please Note: If you want to install OX in a VM memory needs to be allocated exclusively to that installation (and not shared with other VM's). This also applies to the database and other related systems or components.'''&lt;br /&gt;
* Disk 500 MB plus User Data&lt;br /&gt;
* Supported Platform Architecture: 64 bit Operation Systems (x84_64)&lt;br /&gt;
* Supported IMAP Server: Dovecot (Recommended), Cyrus and Courier (To some extent, may mot support all features)&lt;br /&gt;
&lt;br /&gt;
== Desktop Browser (Minimum display resolution: 1024 x 768)==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Browser'''&lt;br /&gt;
  |'''OX App Suite User Front-End'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Microsoft Internet Explorer 10/11&lt;br /&gt;
  |v7.6.3&lt;br /&gt;
|-&lt;br /&gt;
  |Microsoft Internet Explorer 11/Edge&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |Mozilla Firefox (latest &amp;amp; previous version)&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |Google Chrome (latest &amp;amp; previous version)&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |Apple Safari (10.01 &amp;amp; 10.03; Mac OS X only)&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Mobile Device Support==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Mobile Device'''&lt;br /&gt;
  |'''Supported Browser'''&lt;br /&gt;
  |'''OX App Suite User Front-End'''&lt;br /&gt;
  |'''Minimum Speed Requirements'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |iPhone on iOS 9 / iOS 10 / iOS 11&lt;br /&gt;
  |Safari&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
  |3G connections (512/256kBit/s, 350ms latency)&lt;br /&gt;
 |-&lt;br /&gt;
  |Smartphone on Android 4.1 or later&lt;br /&gt;
  |Chrome (latest &amp;amp; previous version)&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
  |3G connections (512/256kBit/s, 350ms latency)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tablet Support==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Tablet'''&lt;br /&gt;
  |'''Supported Browser'''&lt;br /&gt;
  |'''OX App Suite User Front-End'''&lt;br /&gt;
  |'''Minimum Speed Requirements'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Apple iPad (all devices) on iOS 9 / iOS 10 / iOS 11&lt;br /&gt;
  |Safari&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
  |3G connections (512/256kBit/s, 350ms latency)&lt;br /&gt;
 |-&lt;br /&gt;
  |Tablets on Android 4.1 or later&lt;br /&gt;
  |Chrome (latest &amp;amp; previous version)&lt;br /&gt;
  |v7.8.3, v7.8.4&lt;br /&gt;
  |3G connections (512/256kBit/s, 350ms latency)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MS Windows / MS Outlook® / OX Updater ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |[http://oxpedia.org/wiki/index.php?title=AppSuite:Connector_for_Microsoft_Outlook '''Connector for Microsoft Outlook''']&lt;br /&gt;
  |'''OX Updater'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |-&lt;br /&gt;
  |Client PC operating system&lt;br /&gt;
  |Latest versions of Windows 8 (no support of start screen tiles), latest versions of Windows 10 (no support of Mac OS X clients with emulators and Windows RT)&lt;br /&gt;
  |Latest versions of Windows 8 (no support of start screen tiles), latest versions of Windows 10 (no support of Mac OS X clients with emulators and Windows RT)&lt;br /&gt;
 |-&lt;br /&gt;
  |Supported Outlook versions&lt;br /&gt;
  |Latest versions of Microsoft Outlook 2010 (each with 32 + 64 bit), Outlook 2013 and Outlook 2016 (each with 32 + 64 bit; no support of &amp;quot;Office 2010 Click-to-Run&amp;quot;, &amp;quot;Office Home and Business 2010 Testversion”)&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Calendar/Contact synchronization Apple Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |Calendar synchronization with CalDAV&lt;br /&gt;
  |Contacts synchronization with CardDAV&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
  |Mac OS X 10.11 (El Capitan)&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
  |macOS 10.12, 10.13 (Sierra &amp;amp; High Sierra)&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Calendar/Contact synchronization Apple iOS ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |Calendar synchronization with CalDAV&lt;br /&gt;
  |Contacts synchronization with CardDAV&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
  |Apple iOS 9 / iOS 10 / iOS 11&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Mobility Solution - Supported-  Platforms, Features and Devices ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Feature/Technology/Device'''&lt;br /&gt;
  |[http://oxpedia.org/wiki/index.php?title=OXtender_for_Business_Mobility '''OXtender for Business Mobility'''] (availalble for App Suite, OXHE, OXSE)&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Exchange Active Sync 2.5&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |-&lt;br /&gt;
  |Exchange Active Sync 12.1&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Access and creation of emails&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
  |Personal PIM folder&lt;br /&gt;
  |[[File:check.gif]] &lt;br /&gt;
|-&lt;br /&gt;
  |Public and Shared PIM folder&lt;br /&gt;
  |[[File:cross.gif]]&lt;br /&gt;
|-&lt;br /&gt;
  |Global address book&lt;br /&gt;
  |[[File:check.gif]] &lt;br /&gt;
|-&lt;br /&gt;
  |Push E-Mail&lt;br /&gt;
  |[[File:check.gif]] &lt;br /&gt;
|-&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Windows Phone 8 (latest &amp;amp; previous minor versions), Windows Phone 10 (latest &amp;amp; previous minor versions)&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |-&lt;br /&gt;
  |Apple iOS 9 / iOS 10 / iOS 11&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |-&lt;br /&gt;
  |Android 4.1 or later&lt;br /&gt;
  |[[File:check.gif]]&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OX Drive for Clients ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |'''System / Platform'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |OX App Suite v7.8.3, OX App Suite v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Drive for Windows&lt;br /&gt;
  |Latest versions of Windows 8, latest versions of Windows 10 (no support of Mac OS X clients with emulators and Windows RT)&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Drive for Mac OS&lt;br /&gt;
  |Mac OS X 10.11 (El Capitan), macOS 10.12, 10.13 (Sierra &amp;amp; High Sierra)&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Drive for iOS&lt;br /&gt;
  |Apple iOS 9, Apple iOS 10, Apple iOS 11&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Drive for Android&lt;br /&gt;
  |Smartphone on Android 4.1 or later with Chrome (latest &amp;amp; previous version), Tablets on Android 4.1 or later with Chrome (latest &amp;amp; previous version)&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OX Mail for Clients ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |'''System / Platform / User Interface'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |OX App Suite v7.8.3, OX App Suite v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Mail for iOS&lt;br /&gt;
  |Apple iOS 9, Apple iOS 10&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Mail for Android&lt;br /&gt;
  |Smartphone on Android 4.3 or later&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OX Sync App ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |'''System / Platform / User Interface'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |OX App Suite v7.8.3, OX App Suite v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |OX Sync App for Android&lt;br /&gt;
  |Smartphone on Android 4.0 or later&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OX Guard ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |'''System / Platform / User Interface'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |OX Guard since v2.6.0: OX App Suite v7.8.3&amp;lt;br&amp;gt;OX Guard since v2.8.0: OX App Suite v7.8.4&amp;lt;br&amp;gt;OX Guard since v2.10.0: OX App Suite v7.10.0&lt;br /&gt;
 |-&lt;br /&gt;
  |Mobile Device and Tablet Support&lt;br /&gt;
  |Apple iPhone on iOS 9 / iOS 10 / iOS 11: Safari (latest version &amp;amp; previous version)&amp;lt;br&amp;gt;Smartphone on Android 4.1 or later: Chrome (latest &amp;amp; previous version)&amp;lt;br&amp;gt;Apple iPad (all devices) on iOS 9 / iOS 10 / iOS 11: Safari Safari (latest version &amp;amp; previous version)&amp;lt;br&amp;gt;Tablets on Android 4.1 or later: Chrome (latest &amp;amp; previous version)&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== eM Client for OX App Suite ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Requirement'''&lt;br /&gt;
  |[http://oxpedia.org/wiki/index.php?title=AppSuite:EM_Client_for_OX_App_Suite '''eM Client for OX App Suite''']&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |OX App Suite&lt;br /&gt;
  |OX App Suite v7.8.3, OX App Suite v7.8.4&lt;br /&gt;
 |-&lt;br /&gt;
  |Client PC operating system&lt;br /&gt;
  |Latest versions of Windows 8 (no support of start screen tiles), latest versions of Windows 10 (no support of Mac OS X clients with emulators and Windows RT)&lt;br /&gt;
  |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Server Platforms ==&lt;br /&gt;
&lt;br /&gt;
 {|border=&amp;quot;2&amp;quot; rules=&amp;quot;all&amp;quot; align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
  |'''Platforms'''&lt;br /&gt;
  |'''Supported Java Versions'''&lt;br /&gt;
  |'''Supported Database'''&lt;br /&gt;
 |- &lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
  |&amp;amp;nbsp;&lt;br /&gt;
 |-&lt;br /&gt;
  |Suse Linux Enterprise Server 12&lt;br /&gt;
  |OpenJDK 7&lt;br /&gt;
  |MariaDB 10.0  &lt;br /&gt;
 |-&lt;br /&gt;
  |Red Hat Enterprise Linux 6&lt;br /&gt;
  |OpenJDK 7&lt;br /&gt;
  |MySQL 5.1&lt;br /&gt;
 |-&lt;br /&gt;
  |Red Hat Enterprise Linux 7&lt;br /&gt;
  |OpenJDK 8&lt;br /&gt;
  |MariaDB 5.5&lt;br /&gt;
 |-&lt;br /&gt;
  |Debian 8 (Jessie)&lt;br /&gt;
  |OpenJDK 7&lt;br /&gt;
  |MySQL 5.5, MariaDB 10.1 &lt;br /&gt;
 |-&lt;br /&gt;
  |CentOS 6&lt;br /&gt;
  |OpenJDK 7&lt;br /&gt;
  |MySQL 5.1&lt;br /&gt;
 |-&lt;br /&gt;
  |CentOS 7&lt;br /&gt;
  |OpenJDK 8&lt;br /&gt;
  |MariaDB 5.5 &lt;br /&gt;
 |-&lt;br /&gt;
  |Univention Corporate Server 4&lt;br /&gt;
  |OpenJDK 7&lt;br /&gt;
  |MySQL 5.5&lt;br /&gt;
 |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Please Note: To gain higher availability a setup based on Percona XtraDB Cluster is supported like described in this article: [http://oxpedia.org/wiki/index.php?title=OXLoadBalancingClustering_Database Galera database setup]. Open-Xchange supports the &amp;quot;Percona XtraDB Cluster 5.5&amp;quot; flavor of the Galera database and starting with OX 7.8.0 also version 5.6.x.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: OX7]]&lt;br /&gt;
[[Category: AppSuite]]&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=23870</id>
		<title>AppSuite:OX Guard Configuration 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Configuration_2_10&amp;diff=23870"/>
		<updated>2018-03-13T13:47:33Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Initial 2.10 configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard 2.10 Configuration =&lt;br /&gt;
&lt;br /&gt;
There are two main files for configuring OX Guard: &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;. The first configuration file is part of the OX backend and contains properties, among others, that enable the OX Guard functionality for various modules such as Mail and Drive as well as some capabilities. The second configuration file is part of the OX Guard and contains properties that configures the behaviour of the product.&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Main Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables Guard. If not set, no guard functions will be loaded in the UI. Needed if users should be able to do ANY Guard functions including reading encrypted emails. This level will allow users without &amp;amp;quot;guard-mail&amp;amp;quot; enabled to read emails sent to them, reply to those emails, but not create new emails. Recommended minimum level for all users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-mail = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the user(s) ability to send encrypted emails. If False but guard enabled, they can read encrypted emails and reply to the original sender, but they cannot compose new emails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-drive = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Enables the drive functionality. If false, user(s) will not be able to decode nor upload new encrypted files&lt;br /&gt;
&lt;br /&gt;
=== Optional Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.templateID = 0&amp;lt;/source&amp;gt;&lt;br /&gt;
Define template customization ID for the Guest reader emails, the Guest reader, and system emails. See [https://oxpedia.org/wiki/index.php?title%20=%20AppSuite:GuardCustomization Customization] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.endpoint =&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8009/guardadmin. By default is empty.&lt;br /&gt;
&lt;br /&gt;
==== Capabilities ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleterecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete the recovery keys. Makes it impossible to reset password, but also adds level of protection/security&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteprivate = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Guard 2.0) Disable the ability of the user to delete their private key. They can revoke it, but not delete the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-nodeleteonrevoke = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Default when revoking an item is to delete the content key, making the item impossible to decode. If this option is true, then the item is merely expired and can later be retrieved for decoding in case of legal requirements, corporate requirements, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.capability.guard-noextra = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(Deprecated as of Guard 2.0) Disables the ability to add an extra password to encrypted items. May be required by some industry&lt;br /&gt;
&lt;br /&gt;
== Configuration File (&amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
=== Database ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address of the MySQL database for OX Guard data. May be the same as the OX MySQL database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for the OX Guard database that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase&amp;lt;/source&amp;gt;&lt;br /&gt;
IP/Name for the location of the Guest database shards. Additional shards will be created on this database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardRead&amp;lt;/source&amp;gt;&lt;br /&gt;
Optional read-only IP/name for Guest database shards that might be used in Master-Slave setups.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername = username&amp;lt;/source&amp;gt;&lt;br /&gt;
The username to access the OX Backend and Guard database. This user needs to have select, create, lock, insert, update privileges. Guard database user also should have alter (for updates), drop, index.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databasePassword = password&amp;lt;/source&amp;gt;&lt;br /&gt;
The password for the databases&lt;br /&gt;
&lt;br /&gt;
=== OX API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname = localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
The address for the OX REST API. It would be the location of the OX Backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.OXBackendPort =  8009&amp;lt;/source&amp;gt;&lt;br /&gt;
The port for the OX Backend. Default is 8009 (which is direct communication with the backend). Could be 80, etc, if going through load balancers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername = open-xchange com.openexchange.guard.restApiPassword = secret&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and password for the REST API&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL = example.com/appsuite/api/oxguard/reader/reader.html&amp;lt;/source&amp;gt;&lt;br /&gt;
When Guard sends an encrypted eMail to members, they may not be using the webmail UI to read the email.  A help file is attached, and a link will be provided to log into their webmail to read the encrypted item.  This setting is used to point to a generic log in for the webmail system.  Sent to multiple recipients, so not customized to the individual recipient.&lt;br /&gt;
&lt;br /&gt;
=== Support API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.supportapiusername = xxxxx&lt;br /&gt;
com.openexchange.guard.supportapipassword = yyyyy&amp;lt;/source&amp;gt;&lt;br /&gt;
If the support API is to be used, a username and password should be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.exposedKeyDurationInHours = 168&amp;lt;/source&amp;gt;&lt;br /&gt;
When a user is deleted, the Private keys are saved in a temporary deleted Keys table (in case of accidental deletion). If support &amp;amp;quot;exposes&amp;amp;quot; the key, the user can then retrieve it using link generated. For security reasons, this link is only valid for a short period of time. This property defines that duration.&lt;br /&gt;
&lt;br /&gt;
=== File Storage ===&lt;br /&gt;
&lt;br /&gt;
Local/remote storage is required for temporary caching of encrypted emails to guest/non-OX users. This can be an attached local file store, or Amazon S3 compatible object store depending on which &amp;lt;code&amp;gt;open-xchange-guard-*-storage&amp;lt;/code&amp;gt; package is installed (&amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;S3&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==== General Properties ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&amp;lt;/source&amp;gt;&lt;br /&gt;
Specifies how long emails and guest accounts are maintained for guests that have not had any activity.  If the guest has not logged into the Guest account in the configured time, the emails are removed and the Guest account is closed.&lt;br /&gt;
&lt;br /&gt;
=== Storage Specific Properties ===&lt;br /&gt;
&lt;br /&gt;
==== File-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.file.uploadDirectory = /var/spool/open-xchange/guard/uploads&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines the temporary upload and cache directory for OX Guard Drive files for &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; package.&lt;br /&gt;
This directory needs to be shared between application servers serving the Guest Reader interface.&lt;br /&gt;
&lt;br /&gt;
==== S3-Storage ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.storage.s3.endpoint =&lt;br /&gt;
com.openexchange.guard.storage.s3.bucketName =&lt;br /&gt;
com.openexchange.guard.storage.s3.region =&lt;br /&gt;
com.openexchange.guard.storage.s3.accessKey =&lt;br /&gt;
com.openexchange.guard.storage.s3.secretKey =&amp;lt;/source&amp;gt;&lt;br /&gt;
S3 configuration options if the package &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; is selected.&lt;br /&gt;
&lt;br /&gt;
=== Crypto ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.aesKeyLength=256 (Depreciated)&amp;lt;/source&amp;gt;&lt;br /&gt;
AES Key length. 256 is preferred, but not supported on all systems. May need to have the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files] installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsaKeyLength=2048&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA key length. Used when creating PGP keys&lt;br /&gt;
&lt;br /&gt;
=== PGP ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
List of PGP Public key servers to query for public keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicKeyWhitelist&amp;lt;/source&amp;gt;&lt;br /&gt;
A list of IP addresses of TRUSTED Guard servers. When the public PGP key server is queried, it will normally only find Guard keys that have already been created. If on the whitelist, the Guard server will also query the OX backend to see if the email address exists on the OX system, and if so, will create new keys for the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keyValidDays = 3650&amp;lt;/source&amp;gt;&lt;br /&gt;
PGP keys created will only be valid for this number of days. Default is 10 years. Set to 0 if no expiration date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.pgpCacheDays=7&amp;lt;/source&amp;gt;&lt;br /&gt;
When looking up remote PGP keys, if found, the keys will be stored in a temporary cache. Set number of days until the cache item is expired and remote lookup is repeated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;com.openexchange.guard.usestarttls = true&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use TLS when delivering to the SMTP server when available&lt;br /&gt;
&lt;br /&gt;
=== Email ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.guestSMTPServer=smtp.example.com&lt;br /&gt;
com.openexchange.guard.guestSMTPPort=25&lt;br /&gt;
com.openexchange.guard.guestSMTPUsername=&lt;br /&gt;
com.openexchange.guard.guestSMTPPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
SMTP settings for outgoing emails from the guest reader. Emails sent from within the system use the OX Backend. The guest reader, however, sends replies through this SMTP. In addition, password emails (reset, initial) are sent through the SMTP server.&lt;br /&gt;
&lt;br /&gt;
=== Bad Attempts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badMinuteLock = 10&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how long someone will be locked out after bad attempts. Defaults to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.badPasswordCount = 5&amp;lt;/source&amp;gt;&lt;br /&gt;
Defines how many times a person can attempt to unlock an encrypted item before being locked out. Defaults to 5 times.&lt;br /&gt;
&lt;br /&gt;
=== RSA Key Generation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacache = true&amp;lt;/source&amp;gt;&lt;br /&gt;
RSA keys are pre-generated in the background, encrypted, and stored for future user keys. RSA key generation is the most time consuming function and the RSA cache significantly improves new user creation time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacachecount = 100&amp;lt;/source&amp;gt;&lt;br /&gt;
Number of RSA keys to pre-generate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.keycachecheckinterval = 30&amp;lt;/source&amp;gt;&lt;br /&gt;
Interval in seconds to check the RSA cache and re-populate if less than rsacachecount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.rsacertainty = 256&amp;lt;/source&amp;gt;&lt;br /&gt;
Bit certainty for RSA key generation. Higher numbers assure the number is in fact prime but time consuming. Lower is much faster. May need to be lower if not using cache.&lt;br /&gt;
&lt;br /&gt;
=== Passwords ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.newpasslength=8&amp;lt;/source&amp;gt;&lt;br /&gt;
Length of the randomly generated passwords when a user resets password.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.minpasswordlength=6&amp;lt;/source&amp;gt;&lt;br /&gt;
Minimum password length.&lt;br /&gt;
&lt;br /&gt;
=== Backend ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendpath = /ajax/&amp;lt;/source&amp;gt;&lt;br /&gt;
URL used to communicated directly with the OX backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxbackendidletime = 60&amp;lt;/source&amp;gt;&lt;br /&gt;
HTTP connections to the backend are kept open for faster response. This is the timeout setting that will close idle connections.&lt;br /&gt;
&lt;br /&gt;
=== Guest Accounts ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.shardsize=1000&amp;lt;/source&amp;gt;&lt;br /&gt;
Guest users data are placed in databases oxguard_x. After set number of users, another database shard is created&lt;br /&gt;
&lt;br /&gt;
=== Recovery ===&lt;br /&gt;
&lt;br /&gt;
If you do not want password recovery available, you can disable by adding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.noRecovery = true&amp;lt;/source&amp;gt;&lt;br /&gt;
Keep in mind, that a lost password will result in total loss of encrypted data.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.secureReply = true&amp;lt;/source&amp;gt;&lt;br /&gt;
(since Guard 2.2) Normally, when a person replies from an encrypted email, the reply is automatically encrypted. Set to false to disable this automatic encryption&lt;br /&gt;
&lt;br /&gt;
== SSL ==&lt;br /&gt;
&lt;br /&gt;
Starting with 2.4.0, OX Guard is running inside the OSGi container, meaning that all its servlets are being registered and served by Grizzly.&lt;br /&gt;
&lt;br /&gt;
=== API SSL ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.backendSSL = false&amp;lt;/source&amp;gt;&lt;br /&gt;
Per default the connection between the Guard backend and the configured Open-Xchange&lt;br /&gt;
REST API host is unencrypted. Even though that Guard will never transmit unencrypted&lt;br /&gt;
emails to or from the REST API you can optionally encrypt the whole communication between&lt;br /&gt;
those two components by using SSL. Please note: Enabling SSL might decrease performance&lt;br /&gt;
and/or create more system load due to additional encoding of the HTTP streams.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Incoming SSL ===&lt;br /&gt;
&lt;br /&gt;
The communication between the frontend load balancer (Apache or otherwise) to Guard is by default HTTP (if protected network). More information on how to enable SSL you can find [http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#X-FORWARDED-PROTO_Header here].&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Modular&amp;diff=23868</id>
		<title>AppSuite:OX Guard Modular</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Modular&amp;diff=23868"/>
		<updated>2018-03-13T12:36:22Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Configuring key servers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ox Guard Multi Node Setup =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
If there are multiple installations of Guard and OX backends some additional configuration may be required to maximize the user experience.&lt;br /&gt;
&lt;br /&gt;
When a Guard email is sent to a user not local to the Guard installation (not a member of the local OX installation), then Guard takes the following steps&lt;br /&gt;
&lt;br /&gt;
* Search for any keys available using configured key servers&lt;br /&gt;
* Search for SRV records containing PGP information&lt;br /&gt;
* If no keys found, then create a Guest account&lt;br /&gt;
&lt;br /&gt;
A Guest account creates a pair of PGP Public/Private keys, and sends the user a link to read the email using Guard's Guest reader.&lt;br /&gt;
&lt;br /&gt;
Ideally, if the recipient is in a Guard installation, they should receive an encrypted email using their Guard keys rather than a Guest account link.  That way, the experience is the same for them regardless if they received an email from a local user, or an external Guard account.&lt;br /&gt;
&lt;br /&gt;
== Configuring key servers ==&lt;br /&gt;
&lt;br /&gt;
In the file /opt/open-xchange/etc/guard-core.properties file, there is a configuration setting&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&lt;br /&gt;
&lt;br /&gt;
If you know of other Guard installations that your users will be using, then it should be added here.  The URLs can follow the standard hkp://domain:11371, or can specify a more detailed URL.  If a more detailed URL, then it should end with a &amp;quot;?&amp;quot; at which point the standard hkp parameters will be added.  If just the domain is given, then the standard &amp;quot;/pks/lookup?&amp;quot; is used.&lt;br /&gt;
&lt;br /&gt;
Guard servers, if addressed directly, should have the URL http://address:port/pgp/lookup?&lt;br /&gt;
&lt;br /&gt;
For example, if you are addressing another Guard server (say 10.10.10.100 using port 8080) directly, you would use the URL&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.publicPGPDirectory = http://10.10.10.100:8080/pgp/lookup?&lt;br /&gt;
&lt;br /&gt;
If, on the other hand, you are using an Apache front end load balancer as configured in the installation directions, the URL would be&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.publicPGPDirectory = http://frontend&lt;br /&gt;
&lt;br /&gt;
== Key Generation ==&lt;br /&gt;
&lt;br /&gt;
Guard creates user keys on demand.  Key generation, on the other hand, is very CPU intensive.  Therefore, the public key lookup service does not, by default, create keys for users.&lt;br /&gt;
&lt;br /&gt;
So, if sending to a user in another Guard installation that has a Guard server, but the user hasn't setup keys, the public key server will return &amp;quot;No keys&amp;quot; for the user.&lt;br /&gt;
&lt;br /&gt;
Again, this is less than ideal, as we would like that user to have the full UI experience.  To work around this, Guard has a whitelist setting for known Guard servers&lt;br /&gt;
&lt;br /&gt;
 # Comma delim CDIR notation or distinct IP.  eg &amp;quot;= 10.0.100.0/24, 192.168.10.3&amp;quot;&lt;br /&gt;
 com.openexchange.guard.publicKeyWhitelist=&lt;br /&gt;
&lt;br /&gt;
If the sending server is listed in this Whitelist, then the public key server WILL create keys for the user, and send that user a welcome message with a temporary password.&lt;br /&gt;
&lt;br /&gt;
With the Whitelist parameter set, the experience for the sender and recipient is the same as if both users were local.&lt;br /&gt;
&lt;br /&gt;
If there is a frontend used, the IP address of the sending Guard server might be masked, however.  In this case, Guard respect the HTTP parameter &amp;quot;X-Forwarded-For&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
The response of a Guard server can be tested by using the URL&lt;br /&gt;
&lt;br /&gt;
 http://guardserver:8080/pgp/lookup?op=index&amp;amp;search=john@somewhere.com&lt;br /&gt;
&lt;br /&gt;
Substitute the email address for a test user.  If the user has set up keys already, their public keys will be listed.  If they don't have keys yet, it will depend on the whitelist settings.  If your computer is in the whitelist, then keys should be generated and the user should receive a welcome email.&lt;br /&gt;
&lt;br /&gt;
Ideally, you should also check between two different nodes.  Log into an account in node 1.  Compose an email, enable encryption, then type the name of a user in node 2.  A PGP key icon should appear next to the name if proper lookup done.  If a &amp;quot;green man&amp;quot; icon appears, then a Guest account would be created and the key lookup failed.&lt;br /&gt;
&lt;br /&gt;
== User Capabilities ==&lt;br /&gt;
&lt;br /&gt;
We strongly encourage administrators to enable the capability&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
for all users.  This is the minimum Guard capability level.  It allows the user to read an encrypted emails sent to them, and reply to those emails.  This minimum level, though, does not allow the user to create new emails or encrypt files.  We feel this is the best experience for the sender and recipients, and provides an excellent upsell opportunity.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=23866</id>
		<title>AppSuite:OX Guard Upgrade 2 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_2_10&amp;diff=23866"/>
		<updated>2018-03-12T17:13:30Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: Initial 2.10 upgrade documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard to 2.10 from 2.6/2.8 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.10.0''' the experience for external recipients has changed significantly.  Pre 2.10, there was a guest reader HTML package that allowed recipients to decrypt and reply to PGP emails.  This has now changed.  External recipients now have an Appsuite Guest account created, similar to a file share, with an pseudo inbox that lists all of the encrypted emails sent to them.  The recipient will still be able to reply to emails sent to them, but will not be able to create new emails.&lt;br /&gt;
&lt;br /&gt;
Bringing external users into Appsuite presents additional upsell opportunity as well as advertising options.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.10.0.&lt;br /&gt;
&lt;br /&gt;
=== Guest Users ===&lt;br /&gt;
&lt;br /&gt;
All Guest users must have guard capability in order to read encrypted emails.  To do this, the following configuration file &amp;lt;code&amp;gt;/opt/open-xchange/etc/share.properties&amp;lt;/code&amp;gt; needs to be modified.&lt;br /&gt;
&lt;br /&gt;
Assuming the guestCapabilityMode is set to static, please add guard to the staticGuestCapabilities&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.share.guestCapabilityMode=static&lt;br /&gt;
 com.openexchange.share.staticGuestCapabilities=guard&lt;br /&gt;
&lt;br /&gt;
=== WebKey Service ===&lt;br /&gt;
&lt;br /&gt;
Optional WebKey server was added in 2.10.  This allows external users to look up the public PGP keys of Guard users as described [https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-02 here].  To enable this ability, an additional ProxyPass needs to be added to the proxy_http.conf file&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /.well-known/openpgpkey/hu balancer://oxguard/hu&lt;br /&gt;
&lt;br /&gt;
=== Reader Package ===&lt;br /&gt;
&lt;br /&gt;
The package com.openexchange.guard.reader is no longer required, but recommended for those upgrading from an earlier version.&lt;br /&gt;
The package no longer contains a full guest reader, rather it redirects old Guard guest share links to the new appsuite guest.  This package will be required for as long as old guest emails should remain functional.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Changes ===&lt;br /&gt;
&lt;br /&gt;
==== Guest Configuration ====&lt;br /&gt;
&lt;br /&gt;
Encrypted emails sent to external recipients was previously cached for a period of time, defaulting to 90 days.  After this time, the reader would not function unless the user uploaded the attachment sent with their emails.&lt;br /&gt;
&lt;br /&gt;
This has changed in 2.10.  Now, a Guest user has a virtual inbox, listing the encrypted emails sent to them.  A new configuration setting has been added&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.guestCleanedAfterDaysOfInactivity=365&lt;br /&gt;
&lt;br /&gt;
This configuration cleans up a Guest account after the configured number of days if the user has not logged in.  All emails for the guest account will be purged, and the Guest accounts removed from appsuite.  A setting of 0 disables the cleaning completely.&lt;br /&gt;
&lt;br /&gt;
==== Trust Levels ====&lt;br /&gt;
&lt;br /&gt;
Some PGP Public keys can be trusted more than others.  Guard now displays if the key is trusted or not by changing the color of the key next to a recipients email address, and provides details if the user hovers over the key.  The trust level can be configured in the guard-core.properties file&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.keySources.trustThreshold=4&lt;br /&gt;
 # The trust level for keys created by OX Guard&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuard=5&lt;br /&gt;
 # The trust level for keys uploaded by a user&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserUploaded=4&lt;br /&gt;
 # The trust level for keys uploaded by a user and shared among users in the same context&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelGuardUserShared=3&lt;br /&gt;
 # The trust level for keys fetched from public HKP servers&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPPublicServer=1&lt;br /&gt;
 # The trust level for keys fetched from HKP servers marked as trusted&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPTrustedServer=5&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVServer=4&lt;br /&gt;
 # The trust level for keys fetched from HKP servers queried via DNSSEC protected SRV DNS record&lt;br /&gt;
 com.openexchange.guard.keySources.trustLevelHKPSRVDNSSECServer=4&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23798</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23798"/>
		<updated>2018-01-19T15:02:07Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Support API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+) =&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|-&lt;br /&gt;
|7.8.4&lt;br /&gt;
|2.8.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 or higher will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files).&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (Apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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-core.properties file using the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportApiUsername=&lt;br /&gt;
com.openexchange.guard.supportApiPassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
=== Upgrade User (Release 2.10 and later) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=upgrade_guest&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upgrades a Guest account.  This action copies all of the keys from the Guest account to a full OX account, assuming that user has Guard capabilities.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; - The email address of the Guest user&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's new id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The user's new context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=23622</id>
		<title>AppSuite:GuardCustomization</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=23622"/>
		<updated>2017-08-24T15:03:44Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Emails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ox Guard Customization =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Guard uses several templates for emails and the Guest reader.  These templates are fully customizable, and can be customized at the global level, but also at the context/user level.  Changing images, colors, and layout is easy.  Changing the wording is also possible, though the translation tables will then need to be updated.&lt;br /&gt;
&lt;br /&gt;
== Template ID ==&lt;br /&gt;
Guard uses a template ID for choosing the templates to use.  The template ID can be chosen for a user or context using the configuration cascade.&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.templateID=x&lt;br /&gt;
&lt;br /&gt;
For any template below, a customized template can be created with the name x-templatename where x is the integer value of the template ID for the user.  For example, if you wanted a custom password template based on the template &amp;quot;passwordtempl.html&amp;quot; for a context of users, you could create a template &amp;quot;2-passwordtempl.html&amp;quot; and assign the value com.openexchange.guard.templateID=2 to the context.  Then, Guard will use any templates that start with &amp;quot;2-&amp;quot; for the context.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
If no template ID is specified, or if a file specified by the template ID is not found, then the default template is used.  The default is the templates with no number prefix, i.e. &amp;quot;passwordtempl.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
=== Emails ===&lt;br /&gt;
* guesttempl.html - Email template used when sending to a guest user (not an OX account)&lt;br /&gt;
* passwordtempl.html - Template used to send a new password to a guest user. As of 2.8, only used if newGuestsRequirePassword=true is configured&lt;br /&gt;
* oxpasswordtempl.html - Email template used when sending a new password to an OX user. No longer used after 2.6&lt;br /&gt;
* resettempl.html - Template used when sending a password reset&lt;br /&gt;
* guestresettempl.html - Template used when resetting guest account&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader ===&lt;br /&gt;
* reader.html - The main guest reader template.  THIS IS NOT CUSTOMIZABLE WITH TEMPLATE ID.  GLOBAL CHANGES ONLY.  We recommend not changing this file and using the header, footer, and style sheets for branding.&lt;br /&gt;
* header.html - Top header bar of the Guest reader&lt;br /&gt;
* footer.html - Footer of the Guest reader&lt;br /&gt;
* style.css - Style sheet for the Guest reader&lt;br /&gt;
&lt;br /&gt;
== Email Template GetText ==&lt;br /&gt;
In the HTML templates, wording is surrounded by a call to gettext, which will get the translation for the user.  It is used in a HTML call &amp;lt;$gettext(&amp;quot;text here&amp;quot;)&amp;gt;&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;$gettext(&amp;quot;You have received this email because $from has sent you a secure email message with OX Guard. You will receive a link to the secure message in a separate email.&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
Some email templates have space for variables depending on their function.  The variable name will begin with $ such as the above example $from.&lt;br /&gt;
&lt;br /&gt;
== Guest Reader Translations ==&lt;br /&gt;
The Guest reader webpage uses i18next for translations.  If changing the header and footer such that you need translation, use a call such as &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;h2 data-i18n=&amp;quot;PIN Required:&amp;quot;&amp;gt;PIN Required:&amp;lt;/h2&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;data-i18n&amp;quot; property results in the inner HTML wording being replaced with the translation (if available for the specified language)&lt;br /&gt;
&lt;br /&gt;
=====Guest Translations as of Version 2.4.2-rev8=====&lt;br /&gt;
Custom Guest reader translations can be managed by creating a file custom-Lang.json located in the /var/www/html/reader/l10n (on Debian 8)&lt;br /&gt;
This custom file should contain only the translations you want to replace in the default translation-Lang.json files.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to change the French translation of&lt;br /&gt;
&amp;quot;Welcome&amp;quot; from &amp;quot;Bienvenue&amp;quot; to &amp;quot;Bonjour&amp;quot;, you would create a file custom-FR_fr.json with the contents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;Welcome&amp;quot; : &amp;quot;Bonjour&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reader will load the file translations-FR_fr.json first, then it will load custom and overwrite any values found.&lt;br /&gt;
&lt;br /&gt;
= Guard Product Name Customization (2.4 or 2.2.1-8+) =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The Guard product name can be configured by general setting for smaller deployments, by configuration cascade, or by URL&lt;br /&gt;
&lt;br /&gt;
== Product name by configuration ==&lt;br /&gt;
&lt;br /&gt;
The configuration&lt;br /&gt;
 com.openexchange.guard.productName&lt;br /&gt;
can be defined in the guard-core.properties (2.4) or in the guard.properties file (2.2.1-8).  This product name will be passed to the UI.&lt;br /&gt;
&lt;br /&gt;
This value can also be configured at the configuration cascade level&lt;br /&gt;
&lt;br /&gt;
== Product name by URL ==&lt;br /&gt;
&lt;br /&gt;
By editing the file yml located in /opt/open-xchange/etc/as-config.yml the property&lt;br /&gt;
 guard.productName&lt;br /&gt;
can be defined based on the browser URL/IP used to address the OX backend.  This product name will the be passed to the UI to be displayed by the user.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23140</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23140"/>
		<updated>2017-03-21T13:15:44Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Reset password */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storagec&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
Response:&lt;br /&gt;
PRIMARY if the reset was sent to the primary email address.  SECONDARY if the reset email was sent to the secondary email address that the user specified&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23139</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=23139"/>
		<updated>2017-03-21T12:39:10Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Reset password */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/2.4.2/guard/DebianWheezy /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storagec&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
 deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/2.4.2/guard/SLES11 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/7.8.2/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
 $ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&lt;br /&gt;
 $ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/DebianWheezy /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
 deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get update&lt;br /&gt;
 $ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
 $ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
 [open-xchange-guard-stable-guard-updates]&lt;br /&gt;
 name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
 [ox-backend]&lt;br /&gt;
 name=Open-Xchange-backend&lt;br /&gt;
 baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
 gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
 enabled=1&lt;br /&gt;
 gpgcheck=1&lt;br /&gt;
 metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ yum update&lt;br /&gt;
 $ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 (valid until v2.4.2) ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/2.4.2/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/7.8.2/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
 $ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
 $ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
 $ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=22524</id>
		<title>AppSuite:GuardCustomization</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:GuardCustomization&amp;diff=22524"/>
		<updated>2016-11-10T18:12:36Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Guest Reader Translations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Ox Guard Customization =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Guard uses several templates for emails and the Guest reader.  These templates are fully customizable, and can be customized at the global level, but also at the context/user level.  Changing images, colors, and layout is easy.  Changing the wording is also possible, though the translation tables will then need to be updated.&lt;br /&gt;
&lt;br /&gt;
== Template ID ==&lt;br /&gt;
Guard uses a template ID for choosing the templates to use.  The template ID can be chosen for a user or context using the configuration cascade.&lt;br /&gt;
&lt;br /&gt;
 com.openexchange.guard.templateID=x&lt;br /&gt;
&lt;br /&gt;
For any template below, a customized template can be created with the name x-templatename where x is the integer value of the template ID for the user.  For example, if you wanted a custom password template based on the template &amp;quot;passwordtempl.html&amp;quot; for a context of users, you could create a template &amp;quot;2-passwordtempl.html&amp;quot; and assign the value com.openexchange.guard.templateID=2 to the context.  Then, Guard will use any templates that start with &amp;quot;2-&amp;quot; for the context.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
If no template ID is specified, or if a file specified by the template ID is not found, then the default template is used.  The default is the templates with no number prefix, i.e. &amp;quot;passwordtempl.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
=== Emails ===&lt;br /&gt;
* guesttempl.html - Email template used when sending to a guest user (not an OX account)&lt;br /&gt;
* passwordtempl.html - Template used to send a new password to a guest user&lt;br /&gt;
* oxpasswordtempl.html - Email template used when sending a new password to an OX user&lt;br /&gt;
* resettempl.html - Template used when sending a password reset&lt;br /&gt;
* oxtempl.html - Template used in Guard 1.2.  Depreciated in 2.0&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader ===&lt;br /&gt;
* reader.html - The main guest reader template.  THIS IS NOT CUSTOMIZABLE WITH TEMPLATE ID.  GLOBAL CHANGES ONLY.  We recommend not changing this file and using the header, footer, and style sheets for branding.&lt;br /&gt;
* header.html - Top header bar of the Guest reader&lt;br /&gt;
* footer.html - Footer of the Guest reader&lt;br /&gt;
* style.css - Style sheet for the Guest reader&lt;br /&gt;
&lt;br /&gt;
== Email Template GetText ==&lt;br /&gt;
In the HTML templates, wording is surrounded by a call to gettext, which will get the translation for the user.  It is used in a HTML call &amp;lt;$gettext(&amp;quot;text here&amp;quot;)&amp;gt;&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;$gettext(&amp;quot;You have received this email because $from has sent you a secure email message with OX Guard. You will receive a link to the secure message in a separate email.&amp;quot;)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
Some email templates have space for variables depending on their function.  The variable name will begin with $ such as the above example $from.&lt;br /&gt;
&lt;br /&gt;
== Guest Reader Translations ==&lt;br /&gt;
The Guest reader webpage uses i18next for translations.  If changing the header and footer such that you need translation, use a call such as &lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;h2 data-i18n=&amp;quot;PIN Required:&amp;quot;&amp;gt;PIN Required:&amp;lt;/h2&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;data-i18n&amp;quot; property results in the inner HTML wording being replaced with the translation (if available for the specified language)&lt;br /&gt;
&lt;br /&gt;
=====Guest Translations as of Version 2.4.2-rev8=====&lt;br /&gt;
Custom Guest reader translations can be managed by creating a file custom-Lang.json located in the /var/www/html/reader/l10n (on Debian 8)&lt;br /&gt;
This custom file should contain only the translations you want to replace in the default translation-Lang.json files.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to change the French translation of&lt;br /&gt;
&amp;quot;Welcome&amp;quot; from &amp;quot;Bienvenue&amp;quot; to &amp;quot;Bonjour&amp;quot;, you would create a file custom-FR_fr.json with the contents&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;Welcome&amp;quot; : &amp;quot;Bonjour&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reader will load the file translations-FR_fr.json first, then it will load custom and overwrite any values found.&lt;br /&gt;
&lt;br /&gt;
= Guard Product Name Customization (2.4 or 2.2.1-8+) =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The Guard product name can be configured by general setting for smaller deployments, by configuration cascade, or by URL&lt;br /&gt;
&lt;br /&gt;
== Product name by configuration ==&lt;br /&gt;
&lt;br /&gt;
The configuration&lt;br /&gt;
 com.openexchange.guard.productName&lt;br /&gt;
can be defined in the guard-core.properties (2.4) or in the guard.properties file (2.2.1-8).  This product name will be passed to the UI.&lt;br /&gt;
&lt;br /&gt;
This value can also be configured at the configuration cascade level&lt;br /&gt;
&lt;br /&gt;
== Product name by URL ==&lt;br /&gt;
&lt;br /&gt;
By editing the file yml located in /opt/open-xchange/etc/as-config.yml the property&lt;br /&gt;
 guard.productName&lt;br /&gt;
can be defined based on the browser URL/IP used to address the OX backend.  This product name will the be passed to the UI to be displayed by the user.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22523</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22523"/>
		<updated>2016-11-10T18:02:15Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Download and Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-backend-plugin&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storagec&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.  The packages &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; must be installed in the frontend (apache node).&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22522</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22522"/>
		<updated>2016-11-10T17:55:17Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* SUSE Linux Enterprise Server 12 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22521</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22521"/>
		<updated>2016-11-10T17:54:58Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* SUSE Linux Enterprise Server 11 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22520</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22520"/>
		<updated>2016-11-10T17:54:40Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* RedHat Enterprise Linux 6 or CentOS 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22519</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22519"/>
		<updated>2016-11-10T17:54:23Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Debian Linux 8.0 (Jessie) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22518</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22518"/>
		<updated>2016-11-10T17:54:09Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Debian Linux 7.0 (Wheezy) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin open-xchange-guard-reader&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22517</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22517"/>
		<updated>2016-11-10T17:52:28Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Mail Resolver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once Guard is installed, please be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22516</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=22516"/>
		<updated>2016-11-10T17:50:47Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
==== Version Matrix ====&lt;br /&gt;
{|&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot;| Core Version&lt;br /&gt;
! Guard Version&lt;br /&gt;
|-&lt;br /&gt;
|7.8.1&lt;br /&gt;
|2.4.0 or 2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.2&lt;br /&gt;
|2.4.2&lt;br /&gt;
|-&lt;br /&gt;
|7.8.3&lt;br /&gt;
|2.6.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21888</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21888"/>
		<updated>2016-05-04T12:39:11Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Support API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_OSGI&amp;diff=21774</id>
		<title>AppSuite:OX Guard Upgrade OSGI</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_OSGI&amp;diff=21774"/>
		<updated>2016-04-01T18:15:38Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Step 6 - Ensure that the Apache balancer directive uses the correct port */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard from 2.2.x to 2.4.0 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.4.0''' the first step was made and the product was moved into the OSGi stack. Although OX Guard now has a tighter integration with the core that does not mean that it lost its micro-service character. OX Guard still relies on the support API to accomplish its tasks; tasks like capability check, HTML sanitising and mail address resolving. The database calls however were completely eliminated (along with their support API) and now the core's OSGi services are used for that purpose. The same applies to the configuration.&lt;br /&gt;
&lt;br /&gt;
In the next few sections it is described what was changed and the necessary steps to upgrade from 2.2.x to 2.4.0. For a fresh installation refer to the main [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard OX Guard] article.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.4.0.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Structure ===&lt;br /&gt;
&lt;br /&gt;
Alongside with the OSGi-fication of the product, a bit of clean up took place, regarding the configuration files and their structure.&lt;br /&gt;
&lt;br /&gt;
The most obvious change was to get rid of the separate &amp;lt;code&amp;gt;/opt/open-xchange/guard&amp;lt;/code&amp;gt; directory that the entire configuration was residing in. The contents of this directory are now spread accross the appropriate folders in &amp;lt;code&amp;gt;/opt/open-xchange&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Templates ====&lt;br /&gt;
&lt;br /&gt;
The templates (originally located under &amp;lt;code&amp;gt;/opt/open-xchange/guard/templates&amp;lt;/code&amp;gt;) were moved to the &amp;lt;code&amp;gt;templates&amp;lt;/code&amp;gt; directory of the open-xchange installation, i.e. to &amp;lt;code&amp;gt;/opt/open-xchange/templates/guard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Translations ====&lt;br /&gt;
&lt;br /&gt;
The translations (originally located under &amp;lt;code&amp;gt;/opt/open-xchange/guard/l10n&amp;lt;/code&amp;gt;) were moved to the &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; directory of the open-xchange installation, i.e. to &amp;lt;code&amp;gt;/opt/open-xchange/i18n&amp;lt;/code&amp;gt;. The translations formerly had a prefix &amp;lt;code&amp;gt;main-*_*.po&amp;lt;/code&amp;gt; (i.e. &amp;lt;code&amp;gt;main-de_DE.po&amp;lt;/code&amp;gt;) should now start with &amp;lt;code&amp;gt;guard-&amp;lt;/code&amp;gt; (i.e. &amp;lt;code&amp;gt;guard-de_DE.po&amp;lt;/code&amp;gt;) to be able to differentiate between middleware translations and those provided by OX Guard. Even the &amp;lt;code&amp;gt;languages.xml&amp;lt;/code&amp;gt; and those starting with &amp;lt;code&amp;gt;templates-*&amp;lt;/code&amp;gt; should be located within the above mentioned &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
===== guard.properties =====&lt;br /&gt;
&lt;br /&gt;
Prior to 2.4.0, there were two &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; files, one for the core groupware which contained properties that were used to enable the OX Guard capability to various modules as well as some extra functionality, and one for OX Guard itself, containing all properties for that product. Since the &amp;lt;code&amp;gt;/opt/open-xchange/guard&amp;lt;/code&amp;gt; directory was deemed obsolete and subject to be removed and to avoid the name clashing of the two property files, they had to be renamed. A merge was not option, simply because they were provided and used by different packages. Therefore, the properties file &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; (under &amp;lt;code&amp;gt;/opt/open-xchange/etc/&amp;lt;/code&amp;gt;) which accomodated the properties for the AppSuite Guard bundle is now renamed to &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The OX Guard &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; file (under &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc&amp;lt;/code&amp;gt;) which housed all the OX Guard properties, is now renamed and moved under &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc/guard-core.properties&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== private_dns_key and public_dns_key =====&lt;br /&gt;
&lt;br /&gt;
Those two property files were not needed anymore, thus they were marked as obsolete and removed with OX Guard 2.4.0.&lt;br /&gt;
&lt;br /&gt;
=== Farewell Jetty, welcome Grizzly ===&lt;br /&gt;
&lt;br /&gt;
With the big step OX Guard took and moved into the OSGi stack, Jetty was rendered obsolete and had to be removed as well. OX Guard now uses [https://grizzly.java.net/ Grizzly] to register its servlets.&lt;br /&gt;
&lt;br /&gt;
=== Apache ===&lt;br /&gt;
&lt;br /&gt;
The first change in the Apache configuration is the port number of the balancer directive regarding OX Guard. Since Jetty was removed and Grizzly is in charge now, the port was adjusted to reflect that change.&lt;br /&gt;
&lt;br /&gt;
The second change is the order of the ProxyPass locations. The OX Guard one, had to be moved forward because it was getting masked and overwritten by the AppSuite ones.&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader moved to a separate package ===&lt;br /&gt;
&lt;br /&gt;
In order to allow more flexibility on distributed deployments, the &amp;amp;quot;Guest Reader&amp;amp;quot; component has moved to a separate package that is being installed on the frontend server. The UI is then provided by Apache rather than Jetty.&lt;br /&gt;
&lt;br /&gt;
Because of this, the location of the Guest reader URL will change.  By default, the reader package will be installed under /var/www/guard/reader&lt;br /&gt;
&lt;br /&gt;
So, in most setups, the reader URL would change from&lt;br /&gt;
&lt;br /&gt;
  domain/appsuite/api/oxguard/reader/reader.html?....&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  domain/guard/reader/reader.html?....&lt;br /&gt;
&lt;br /&gt;
To handle this change, the easiest thing to do is change the externalReaderPath configuration in the new guard-core.proprties file from the old location to the new&lt;br /&gt;
&lt;br /&gt;
  com.openexchange.guard.externalReaderPath=domain/guard/reader/reader.html&lt;br /&gt;
&lt;br /&gt;
Assuming that there are already several Guest emails out there with the old Jetty URL, Guard OSGI will automatically redirect all requests from the old location to the new&lt;br /&gt;
&lt;br /&gt;
=== Command Line Tool ===&lt;br /&gt;
&lt;br /&gt;
The command line tool also got a &amp;amp;quot;lifting&amp;amp;quot; and was brought to the standards of the rest of the command line tools of the OX family. The CLT now includes optional JMX authentication. Furthermore, the functionality of initialising the OX Guard installation was removed from the command line tool. It is now being done automatically upon server start up. The rest of the functionality is still there, though.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;usage: guard [-i [-d /custom/path]] [-t john.doe@example.com] [-u&lt;br /&gt;
             joan.doe@ox.io] [-e john.doe@example.com] [-n&lt;br /&gt;
             joan.doe@example.com] [-j jmxUser] [-w jmxPassword] [-x&lt;br /&gt;
             jmx.host] [-o &amp;amp;lt;JMX_PORT&amp;amp;gt;] [-p &amp;amp;lt;RMI_PORT&amp;amp;gt;] [--responsetimeout&lt;br /&gt;
             &amp;amp;lt;TIMEOUT&amp;amp;gt;]&lt;br /&gt;
 -d,--directory &amp;amp;lt;arg&amp;amp;gt;         Full path of the 'oxguardpass' file&lt;br /&gt;
                              (defaults to current directory). This flag&lt;br /&gt;
                              should be used in conjunction with the&lt;br /&gt;
                              '--init' switch.&lt;br /&gt;
                              e.g. guard --init --directory&lt;br /&gt;
                              /opt/open-xchange/etc&lt;br /&gt;
 -e,--reset &amp;amp;lt;arg&amp;amp;gt;             Resets the specified e-mail address and&lt;br /&gt;
                              sends a new password to the user&lt;br /&gt;
                              e.g. guard --reset john@somewhere.com&lt;br /&gt;
 -h,--help                    Prints a help text&lt;br /&gt;
 -i,--init                    Initialise guard.&lt;br /&gt;
 -j,--jmx-user &amp;amp;lt;arg&amp;amp;gt;          JMX user&lt;br /&gt;
 -n,--remove-pin &amp;amp;lt;arg&amp;amp;gt;        Removes the PIN for the specified user&lt;br /&gt;
                              e.g. guard --remove-pin john@somewhere.com&lt;br /&gt;
 -o,--jmx-port &amp;amp;lt;arg&amp;amp;gt;          JMX port (default: '9999')&lt;br /&gt;
 -p,--port &amp;amp;lt;arg&amp;amp;gt;              The optional RMI port (default:1099)&lt;br /&gt;
    --responsetimeout &amp;amp;lt;arg&amp;amp;gt;   The optional response timeout in seconds&lt;br /&gt;
                              when reading data from server (default: 0s;&lt;br /&gt;
                              infinite)&lt;br /&gt;
 -s,--server &amp;amp;lt;arg&amp;amp;gt;            The optional RMI server (default: localhost)&lt;br /&gt;
 -t,--test &amp;amp;lt;arg&amp;amp;gt;              Test the specified e-mail address against&lt;br /&gt;
                              the MailResolver&lt;br /&gt;
                              e.g. guard --test john@somewhere.com&lt;br /&gt;
 -u,--upgrade &amp;amp;lt;arg&amp;amp;gt;           Upgrades the specified guest account to an&lt;br /&gt;
                              OX account&lt;br /&gt;
                              e.g. guard --upgrade john@somewhere.com&lt;br /&gt;
 -w,--jmx-password &amp;amp;lt;arg&amp;amp;gt;      JMX password&lt;br /&gt;
 -x,--jmx-host &amp;amp;lt;arg&amp;amp;gt;          JMX host (default: 'localhost')&lt;br /&gt;
&lt;br /&gt;
Command line tool for OX Guard&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Logging ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc/logback.xml&amp;lt;/code&amp;gt; file for OX Guard was completely removed. Now logging is being configured globally in &amp;lt;code&amp;gt;/opt/open-xchange/etc/logback.xml&amp;lt;/code&amp;gt;. All OX Guard events that were previously logged in &amp;lt;code&amp;gt;/var/log/open-xchange/guard/guard.log&amp;lt;/code&amp;gt; are now being logged in the log file as the groupware, namely in &amp;lt;code&amp;gt;/var/log/open-xchange/open-xchange.log.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The SMTP relevant section is no longer present, but it can be configured separately by adding it again to the previous mentioned &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!-- Configure SMTP Triggered emails here.  Once done, uncomment out appender under root below --&amp;gt;&lt;br /&gt;
  &amp;lt;appender name=&amp;quot;SMTP&amp;quot; class=&amp;quot;ch.qos.logback.classic.net.SMTPAppender&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;smtpHost&amp;gt;smtphost&amp;lt;/smtpHost&amp;gt;&lt;br /&gt;
    &amp;lt;to&amp;gt;user@admin&amp;lt;/to&amp;gt;&lt;br /&gt;
    &amp;lt;from&amp;gt;notify@admin&amp;lt;/from&amp;gt;&lt;br /&gt;
    &amp;lt;subject&amp;gt;Guard - %marker - %msg%n &amp;lt;/subject&amp;gt;&lt;br /&gt;
    &amp;lt;layout class=&amp;quot;ch.qos.logback.classic.html.HTMLLayout&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;pattern&amp;gt;%date%level%logger{24}%msg&amp;lt;/pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;evaluator class=&amp;quot;ch.qos.logback.classic.boolex.JaninoEventEvaluator&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;expression&amp;gt;&lt;br /&gt;
        marker != null &amp;amp;&amp;amp; (marker.contains(&amp;quot;NOTIFY_MAJOR&amp;quot;) || marker.contains(&amp;quot;NOTIFY_MINOR&amp;quot;))&lt;br /&gt;
      &amp;lt;/expression&amp;gt;&lt;br /&gt;
    &amp;lt;/evaluator&amp;gt;&lt;br /&gt;
  &amp;lt;/appender&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
The following tag has to be added to the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; level in order for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;appender-ref ref=&amp;quot;SMTP&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;root level=&amp;quot;INFO&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;appender-ref ref=&amp;quot;ASYNC&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;appender-ref ref=&amp;quot;SMTP&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 2.2.x to 2.4.0 ==&lt;br /&gt;
&lt;br /&gt;
There are a few things to consider when upgrading from a version 2.2.x to 2.4.0. In this section we will cover that upgrade path.&lt;br /&gt;
&lt;br /&gt;
The first thing is that the file storage implementations are now being kept into two separate packages, i.e. &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; for the file storage and S3 storage support respectively. This means that one of the packages has to be manually installed after the upgrade.&lt;br /&gt;
&lt;br /&gt;
The second thing is that the &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; system service is now gone. Since, OX Guard is intergraded into the OSGi stack, it will start automatically with the backend, i.e. when the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service starts.&lt;br /&gt;
&lt;br /&gt;
With those two things in mind, OX Guard can be upgraded as described [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard#Update_OX_Guard here]. Again, after the upgrade is complete there is no need to restart the &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; system service; neither the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service should be restarted just yet. There are a few things to do before having a fully functional OX Guard backend.&lt;br /&gt;
&lt;br /&gt;
The Guest Reader component has moved to the &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; package, which needs to be installed on the frontend server next to App Suite UI.&lt;br /&gt;
&lt;br /&gt;
=== Step 1 - Enhance repository sources ===&lt;br /&gt;
&lt;br /&gt;
If you currently do not have an Open-Xchange middleware installed you have to adapt your Open-Xchange repository file to be able to solve required dependencies to the middleware packages. Add the following to the file that already should contain an entry for the OX Guard repository.&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian 8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Redhat Enterprise Linux 7 or CentOS 7 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
After adding new repositories retrieve new lists of packages by executing your desired package managers update call.&lt;br /&gt;
&lt;br /&gt;
=== Step 2 - Update OX Guard ===&lt;br /&gt;
&lt;br /&gt;
Upgrade the existing installation by executing your desired package mangers upgrade call, for instance &amp;lt;code&amp;gt;apt-get dist-upgrade&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;yum upgrade&amp;lt;/code&amp;gt; and so on.&lt;br /&gt;
&lt;br /&gt;
If you are running an '''OX Guard-only node''' (because of infelicitous set dependencies) you have to install an implementation of the package &amp;lt;code&amp;gt;open-xchange-authentication&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-spamhandler&amp;lt;/code&amp;gt; which will never be used but checked for. We suggest to install &amp;lt;code&amp;gt;open-xchange-authentication-database&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-spamhandler-default&amp;lt;/code&amp;gt;. Installing those packages as well as chosing a &amp;lt;code&amp;gt;open-xchange-guard-storage&amp;lt;/code&amp;gt; implementation will install all required middleware dependencies.&lt;br /&gt;
&lt;br /&gt;
After the update &amp;lt;code&amp;gt;/etc/init.d/open-xchange-guard&amp;lt;/code&amp;gt; shouldn't be available any more but OX Guard will start when starting the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 - Choose and install your storage ===&lt;br /&gt;
&lt;br /&gt;
According to your previous installation, you will have to manually install the relevant &amp;lt;code&amp;gt;open-xchange-guard-storage&amp;lt;/code&amp;gt; package. Of course, you can switch to the one or the other storage if you wish, but be aware that '''no data''' will be migrated. You will have to do this manually.&lt;br /&gt;
&lt;br /&gt;
==== File Storage Support ====&lt;br /&gt;
&lt;br /&gt;
If you want the file storage support, and depending on your Linux distribution, you can install it with the following command:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;apt-get install open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6.x/7.x or CentOS 6.x/7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x/12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;zypper in open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
==== S3 Storage Support ====&lt;br /&gt;
&lt;br /&gt;
If you want the S3 storage support, and depending on your Linux distribution, you can install it with the following command:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;apt-get install open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6.x/7.x or CentOS 6.x/7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x/12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;zypper in open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 4 - Install open-xchange-rest ===&lt;br /&gt;
&lt;br /&gt;
OX Guard requires access to existing middleware hosts. The endpoint is configured within the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; which you can find in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The endpoint configured via &amp;lt;code&amp;gt;com.openexchange.guard.restApiHostname&amp;lt;/code&amp;gt; need to have the package &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; installed to be able to retrieve and process OX Guard REST requests.&lt;br /&gt;
&lt;br /&gt;
Normally the post installation scripts from the open-xchange-guard package should take over the formerly configured endpoint so that you do not have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Step 5 - Ensure that the server keys are readable by the sever ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file should be owned by the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; user and have the permission 400, meaning read access only by the owner of the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ls -l /opt/open-xchange/etc/oxguardpass&lt;br /&gt;
-r-------- 1 open-xchange root 64 Nov 17 19:14 /opt/open-xchange/etc/oxguardpass&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 6 - Ensure that the Apache balancer directive uses the correct port ===&lt;br /&gt;
&lt;br /&gt;
Since OX Guard is part of the OSGi stack and Grizzly is used to register and serve the OX Guard servlets, the &amp;lt;code&amp;gt;oxguard&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;oxguardpgp&amp;lt;/code&amp;gt; balancer directives in the Apache configuration have to be adjusted in order to set the correct port and possibly removed.&lt;br /&gt;
&lt;br /&gt;
If the Proxy balancer for the backend (oxcluster) is the same as the Guard servers, then you can remove the balancer entries for Guard and just redirect the ProxyPass directive to the oxcluster like so&lt;br /&gt;
&lt;br /&gt;
  ProxyPass /appsuite/api/oxguard balancer://oxcluster/oxguard&lt;br /&gt;
  ProxyPass /pks balancer://oxcluster/pgp&lt;br /&gt;
&lt;br /&gt;
Otherwise, if the Guard servers are different from your backend, find the balancers containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;BalancerMember http://guardserver:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second Balancer (oxguardpgp) for PGP should just be removed.  The primary Guard balancer should look like below, removing the sub-directory &amp;quot;/oxuard&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
    BalancerMember http://guardserver:8009 timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
&lt;br /&gt;
The find the lines with the ProxyPass for &amp;lt;/appsuite/api/oxguard&amp;gt; and change the balancer to //oxguard/oxguard&lt;br /&gt;
Add the PGP balancer if you are exposing the PGP Public key server.  &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;Proxy /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
    ProxyPass balancer://oxguard/oxguard&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
  &amp;lt;Proxy /pks&amp;gt;&lt;br /&gt;
    ProxyPass balancer://oxguard/pgp&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Please note ''':  You cannot have more than one BalancerMember with the same URL.  So, if changing to the same URL as the OX Backend, you should just remove the Guard entries otherwise there will be some errors reported by Apache, and only the first entry will be used.&lt;br /&gt;
&lt;br /&gt;
=== Step 7 - Adapt configuration ===&lt;br /&gt;
&lt;br /&gt;
This chapter is only valid for '''OX Guard-only node''' where no additional middleware services haven't been desired and installed before! As Guard is now using existing middleware mechanisms to access the databases you have to configure the following properties.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* set &amp;lt;code&amp;gt;com.openexchange.connector.networkListenerHost&amp;lt;/code&amp;gt; to your desired hosts (e. g. &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
* consolidate your old OX Guard &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt; with the new one from within &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;jolokia.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;mpasswd&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy your existing &amp;lt;code&amp;gt;oxadminmaster&amp;lt;/code&amp;gt; credential storage to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* Adapt the property &amp;lt;code&amp;gt;com.openexchange.guard.endpoint&amp;lt;/code&amp;gt;. This can be as simple as replacing the old port 8080 with 8009 but may differ depending on your setup&lt;br /&gt;
* Adapt the property &amp;lt;code&amp;gt;com.openexchange.guard.externalReaderUrl&amp;lt;/code&amp;gt;.  Adjust to the new location of the Guard reader under apache.  Defaults to domain/guard/reader/reader.html&lt;br /&gt;
&lt;br /&gt;
After copying those files, please make sure that they are owned by the group &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt;, otherwise they cannot be read by the middleware service. In addition to the above mentioned properties you may would like to change the default configuration if the underlying middleware instance is only used for OX Guard:&lt;br /&gt;
&lt;br /&gt;
* Disable Hazelcast cluster discovery&lt;br /&gt;
* &amp;lt;code&amp;gt;hazelcast.properties: com.openexchange.hazelcast.network.join=empty&amp;lt;/code&amp;gt;&lt;br /&gt;
* remove all permissions set via configuration&lt;br /&gt;
* &amp;lt;code&amp;gt;permissions.properties&amp;lt;/code&amp;gt;: set entries to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 8 - Restart the groupware ===&lt;br /&gt;
&lt;br /&gt;
Last, and certainly not least, you need to restart the groupware process:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/RedHat Enterprise Linux 6.x/CentOS 6.x/SUSE Linux Enterprise Server 11.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;service open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian 8.x/RedHat Enterprise Linux 7.x/CentOS 7.x/SUSE Linux Enterprise Server 12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;systemctl restart open-xchange&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 9 - Execute update tasks ===&lt;br /&gt;
&lt;br /&gt;
Before OX Guard should receive the first requests you have to ensure that all database schemas are up to date. This can be done by executing &amp;lt;code&amp;gt;/opt/open-xchange/sbin/runupdate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You should now have a running OX Guard 2.4.0!&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
==== When trying to decode a message I get a 404 ====&lt;br /&gt;
&lt;br /&gt;
This happens probably because the AppSuite ProxyPass Location directives are overwriting the OX Guard ones. To solve this, you will have to move the OX Guard ProxyPass Location directive right before the AppSuite ones.&lt;br /&gt;
&lt;br /&gt;
Change the ordering of the locations from this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /ajax&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxguard&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxguard&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /ajax&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== After migration, OX Guard fails to accept any request ====&lt;br /&gt;
&lt;br /&gt;
This may happen if configuration files that were copied during migration do not have the correct permission set. Please have a look at the OX Guard middleware log file to find any &amp;lt;code&amp;gt;ERROR&amp;lt;/code&amp;gt; messages. The &amp;lt;code&amp;gt;getmissingservices&amp;lt;/code&amp;gt; command-line tool may also help to identify services that have not been started and why they failed to start.&lt;br /&gt;
&lt;br /&gt;
==== After migration, Guest reader doesn't work and report too many redirects ====&lt;br /&gt;
&lt;br /&gt;
The location of the Guest reader has been changed, and is now being handled by apache rather than the Jetty server previously used by Guard.&lt;br /&gt;
&lt;br /&gt;
To maintain compatibility with the Guest emails previously sent, Guard tries to redirect the old URL to the new...which is configured as the externalReaderPath in the guard-core.properties file.  Be sure to update this setting to the new location as mentioned above.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_OSGI&amp;diff=21773</id>
		<title>AppSuite:OX Guard Upgrade OSGI</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard_Upgrade_OSGI&amp;diff=21773"/>
		<updated>2016-04-01T18:13:19Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Step 6 - Ensure that the Apache balancer directive uses the correct port */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Upgrading OX Guard from 2.2.x to 2.4.0 =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
With '''OX Guard 2.4.0''' the first step was made and the product was moved into the OSGi stack. Although OX Guard now has a tighter integration with the core that does not mean that it lost its micro-service character. OX Guard still relies on the support API to accomplish its tasks; tasks like capability check, HTML sanitising and mail address resolving. The database calls however were completely eliminated (along with their support API) and now the core's OSGi services are used for that purpose. The same applies to the configuration.&lt;br /&gt;
&lt;br /&gt;
In the next few sections it is described what was changed and the necessary steps to upgrade from 2.2.x to 2.4.0. For a fresh installation refer to the main [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard OX Guard] article.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
This section covers the changes introduced with OX Guard 2.4.0.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Structure ===&lt;br /&gt;
&lt;br /&gt;
Alongside with the OSGi-fication of the product, a bit of clean up took place, regarding the configuration files and their structure.&lt;br /&gt;
&lt;br /&gt;
The most obvious change was to get rid of the separate &amp;lt;code&amp;gt;/opt/open-xchange/guard&amp;lt;/code&amp;gt; directory that the entire configuration was residing in. The contents of this directory are now spread accross the appropriate folders in &amp;lt;code&amp;gt;/opt/open-xchange&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Templates ====&lt;br /&gt;
&lt;br /&gt;
The templates (originally located under &amp;lt;code&amp;gt;/opt/open-xchange/guard/templates&amp;lt;/code&amp;gt;) were moved to the &amp;lt;code&amp;gt;templates&amp;lt;/code&amp;gt; directory of the open-xchange installation, i.e. to &amp;lt;code&amp;gt;/opt/open-xchange/templates/guard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Translations ====&lt;br /&gt;
&lt;br /&gt;
The translations (originally located under &amp;lt;code&amp;gt;/opt/open-xchange/guard/l10n&amp;lt;/code&amp;gt;) were moved to the &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; directory of the open-xchange installation, i.e. to &amp;lt;code&amp;gt;/opt/open-xchange/i18n&amp;lt;/code&amp;gt;. The translations formerly had a prefix &amp;lt;code&amp;gt;main-*_*.po&amp;lt;/code&amp;gt; (i.e. &amp;lt;code&amp;gt;main-de_DE.po&amp;lt;/code&amp;gt;) should now start with &amp;lt;code&amp;gt;guard-&amp;lt;/code&amp;gt; (i.e. &amp;lt;code&amp;gt;guard-de_DE.po&amp;lt;/code&amp;gt;) to be able to differentiate between middleware translations and those provided by OX Guard. Even the &amp;lt;code&amp;gt;languages.xml&amp;lt;/code&amp;gt; and those starting with &amp;lt;code&amp;gt;templates-*&amp;lt;/code&amp;gt; should be located within the above mentioned &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
===== guard.properties =====&lt;br /&gt;
&lt;br /&gt;
Prior to 2.4.0, there were two &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; files, one for the core groupware which contained properties that were used to enable the OX Guard capability to various modules as well as some extra functionality, and one for OX Guard itself, containing all properties for that product. Since the &amp;lt;code&amp;gt;/opt/open-xchange/guard&amp;lt;/code&amp;gt; directory was deemed obsolete and subject to be removed and to avoid the name clashing of the two property files, they had to be renamed. A merge was not option, simply because they were provided and used by different packages. Therefore, the properties file &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; (under &amp;lt;code&amp;gt;/opt/open-xchange/etc/&amp;lt;/code&amp;gt;) which accomodated the properties for the AppSuite Guard bundle is now renamed to &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The OX Guard &amp;lt;code&amp;gt;guard.properties&amp;lt;/code&amp;gt; file (under &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc&amp;lt;/code&amp;gt;) which housed all the OX Guard properties, is now renamed and moved under &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc/guard-core.properties&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== private_dns_key and public_dns_key =====&lt;br /&gt;
&lt;br /&gt;
Those two property files were not needed anymore, thus they were marked as obsolete and removed with OX Guard 2.4.0.&lt;br /&gt;
&lt;br /&gt;
=== Farewell Jetty, welcome Grizzly ===&lt;br /&gt;
&lt;br /&gt;
With the big step OX Guard took and moved into the OSGi stack, Jetty was rendered obsolete and had to be removed as well. OX Guard now uses [https://grizzly.java.net/ Grizzly] to register its servlets.&lt;br /&gt;
&lt;br /&gt;
=== Apache ===&lt;br /&gt;
&lt;br /&gt;
The first change in the Apache configuration is the port number of the balancer directive regarding OX Guard. Since Jetty was removed and Grizzly is in charge now, the port was adjusted to reflect that change.&lt;br /&gt;
&lt;br /&gt;
The second change is the order of the ProxyPass locations. The OX Guard one, had to be moved forward because it was getting masked and overwritten by the AppSuite ones.&lt;br /&gt;
&lt;br /&gt;
=== Guest Reader moved to a separate package ===&lt;br /&gt;
&lt;br /&gt;
In order to allow more flexibility on distributed deployments, the &amp;amp;quot;Guest Reader&amp;amp;quot; component has moved to a separate package that is being installed on the frontend server. The UI is then provided by Apache rather than Jetty.&lt;br /&gt;
&lt;br /&gt;
Because of this, the location of the Guest reader URL will change.  By default, the reader package will be installed under /var/www/guard/reader&lt;br /&gt;
&lt;br /&gt;
So, in most setups, the reader URL would change from&lt;br /&gt;
&lt;br /&gt;
  domain/appsuite/api/oxguard/reader/reader.html?....&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  domain/guard/reader/reader.html?....&lt;br /&gt;
&lt;br /&gt;
To handle this change, the easiest thing to do is change the externalReaderPath configuration in the new guard-core.proprties file from the old location to the new&lt;br /&gt;
&lt;br /&gt;
  com.openexchange.guard.externalReaderPath=domain/guard/reader/reader.html&lt;br /&gt;
&lt;br /&gt;
Assuming that there are already several Guest emails out there with the old Jetty URL, Guard OSGI will automatically redirect all requests from the old location to the new&lt;br /&gt;
&lt;br /&gt;
=== Command Line Tool ===&lt;br /&gt;
&lt;br /&gt;
The command line tool also got a &amp;amp;quot;lifting&amp;amp;quot; and was brought to the standards of the rest of the command line tools of the OX family. The CLT now includes optional JMX authentication. Furthermore, the functionality of initialising the OX Guard installation was removed from the command line tool. It is now being done automatically upon server start up. The rest of the functionality is still there, though.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;usage: guard [-i [-d /custom/path]] [-t john.doe@example.com] [-u&lt;br /&gt;
             joan.doe@ox.io] [-e john.doe@example.com] [-n&lt;br /&gt;
             joan.doe@example.com] [-j jmxUser] [-w jmxPassword] [-x&lt;br /&gt;
             jmx.host] [-o &amp;amp;lt;JMX_PORT&amp;amp;gt;] [-p &amp;amp;lt;RMI_PORT&amp;amp;gt;] [--responsetimeout&lt;br /&gt;
             &amp;amp;lt;TIMEOUT&amp;amp;gt;]&lt;br /&gt;
 -d,--directory &amp;amp;lt;arg&amp;amp;gt;         Full path of the 'oxguardpass' file&lt;br /&gt;
                              (defaults to current directory). This flag&lt;br /&gt;
                              should be used in conjunction with the&lt;br /&gt;
                              '--init' switch.&lt;br /&gt;
                              e.g. guard --init --directory&lt;br /&gt;
                              /opt/open-xchange/etc&lt;br /&gt;
 -e,--reset &amp;amp;lt;arg&amp;amp;gt;             Resets the specified e-mail address and&lt;br /&gt;
                              sends a new password to the user&lt;br /&gt;
                              e.g. guard --reset john@somewhere.com&lt;br /&gt;
 -h,--help                    Prints a help text&lt;br /&gt;
 -i,--init                    Initialise guard.&lt;br /&gt;
 -j,--jmx-user &amp;amp;lt;arg&amp;amp;gt;          JMX user&lt;br /&gt;
 -n,--remove-pin &amp;amp;lt;arg&amp;amp;gt;        Removes the PIN for the specified user&lt;br /&gt;
                              e.g. guard --remove-pin john@somewhere.com&lt;br /&gt;
 -o,--jmx-port &amp;amp;lt;arg&amp;amp;gt;          JMX port (default: '9999')&lt;br /&gt;
 -p,--port &amp;amp;lt;arg&amp;amp;gt;              The optional RMI port (default:1099)&lt;br /&gt;
    --responsetimeout &amp;amp;lt;arg&amp;amp;gt;   The optional response timeout in seconds&lt;br /&gt;
                              when reading data from server (default: 0s;&lt;br /&gt;
                              infinite)&lt;br /&gt;
 -s,--server &amp;amp;lt;arg&amp;amp;gt;            The optional RMI server (default: localhost)&lt;br /&gt;
 -t,--test &amp;amp;lt;arg&amp;amp;gt;              Test the specified e-mail address against&lt;br /&gt;
                              the MailResolver&lt;br /&gt;
                              e.g. guard --test john@somewhere.com&lt;br /&gt;
 -u,--upgrade &amp;amp;lt;arg&amp;amp;gt;           Upgrades the specified guest account to an&lt;br /&gt;
                              OX account&lt;br /&gt;
                              e.g. guard --upgrade john@somewhere.com&lt;br /&gt;
 -w,--jmx-password &amp;amp;lt;arg&amp;amp;gt;      JMX password&lt;br /&gt;
 -x,--jmx-host &amp;amp;lt;arg&amp;amp;gt;          JMX host (default: 'localhost')&lt;br /&gt;
&lt;br /&gt;
Command line tool for OX Guard&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Logging ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/opt/open-xchange/guard/etc/logback.xml&amp;lt;/code&amp;gt; file for OX Guard was completely removed. Now logging is being configured globally in &amp;lt;code&amp;gt;/opt/open-xchange/etc/logback.xml&amp;lt;/code&amp;gt;. All OX Guard events that were previously logged in &amp;lt;code&amp;gt;/var/log/open-xchange/guard/guard.log&amp;lt;/code&amp;gt; are now being logged in the log file as the groupware, namely in &amp;lt;code&amp;gt;/var/log/open-xchange/open-xchange.log.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The SMTP relevant section is no longer present, but it can be configured separately by adding it again to the previous mentioned &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!-- Configure SMTP Triggered emails here.  Once done, uncomment out appender under root below --&amp;gt;&lt;br /&gt;
  &amp;lt;appender name=&amp;quot;SMTP&amp;quot; class=&amp;quot;ch.qos.logback.classic.net.SMTPAppender&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;smtpHost&amp;gt;smtphost&amp;lt;/smtpHost&amp;gt;&lt;br /&gt;
    &amp;lt;to&amp;gt;user@admin&amp;lt;/to&amp;gt;&lt;br /&gt;
    &amp;lt;from&amp;gt;notify@admin&amp;lt;/from&amp;gt;&lt;br /&gt;
    &amp;lt;subject&amp;gt;Guard - %marker - %msg%n &amp;lt;/subject&amp;gt;&lt;br /&gt;
    &amp;lt;layout class=&amp;quot;ch.qos.logback.classic.html.HTMLLayout&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;pattern&amp;gt;%date%level%logger{24}%msg&amp;lt;/pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/layout&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;evaluator class=&amp;quot;ch.qos.logback.classic.boolex.JaninoEventEvaluator&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;expression&amp;gt;&lt;br /&gt;
        marker != null &amp;amp;&amp;amp; (marker.contains(&amp;quot;NOTIFY_MAJOR&amp;quot;) || marker.contains(&amp;quot;NOTIFY_MINOR&amp;quot;))&lt;br /&gt;
      &amp;lt;/expression&amp;gt;&lt;br /&gt;
    &amp;lt;/evaluator&amp;gt;&lt;br /&gt;
  &amp;lt;/appender&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
The following tag has to be added to the &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; level in order for this to work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;appender-ref ref=&amp;quot;SMTP&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;root level=&amp;quot;INFO&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;appender-ref ref=&amp;quot;ASYNC&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;appender-ref ref=&amp;quot;SMTP&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 2.2.x to 2.4.0 ==&lt;br /&gt;
&lt;br /&gt;
There are a few things to consider when upgrading from a version 2.2.x to 2.4.0. In this section we will cover that upgrade path.&lt;br /&gt;
&lt;br /&gt;
The first thing is that the file storage implementations are now being kept into two separate packages, i.e. &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; for the file storage and S3 storage support respectively. This means that one of the packages has to be manually installed after the upgrade.&lt;br /&gt;
&lt;br /&gt;
The second thing is that the &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; system service is now gone. Since, OX Guard is intergraded into the OSGi stack, it will start automatically with the backend, i.e. when the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service starts.&lt;br /&gt;
&lt;br /&gt;
With those two things in mind, OX Guard can be upgraded as described [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard#Update_OX_Guard here]. Again, after the upgrade is complete there is no need to restart the &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; system service; neither the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service should be restarted just yet. There are a few things to do before having a fully functional OX Guard backend.&lt;br /&gt;
&lt;br /&gt;
The Guest Reader component has moved to the &amp;lt;code&amp;gt;open-xchange-guard-reader&amp;lt;/code&amp;gt; package, which needs to be installed on the frontend server next to App Suite UI.&lt;br /&gt;
&lt;br /&gt;
=== Step 1 - Enhance repository sources ===&lt;br /&gt;
&lt;br /&gt;
If you currently do not have an Open-Xchange middleware installed you have to adapt your Open-Xchange repository file to be able to solve required dependencies to the middleware packages. Add the following to the file that already should contain an entry for the OX Guard repository.&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian 8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Redhat Enterprise Linux 7 or CentOS 7 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
After adding new repositories retrieve new lists of packages by executing your desired package managers update call.&lt;br /&gt;
&lt;br /&gt;
=== Step 2 - Update OX Guard ===&lt;br /&gt;
&lt;br /&gt;
Upgrade the existing installation by executing your desired package mangers upgrade call, for instance &amp;lt;code&amp;gt;apt-get dist-upgrade&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;yum upgrade&amp;lt;/code&amp;gt; and so on.&lt;br /&gt;
&lt;br /&gt;
If you are running an '''OX Guard-only node''' (because of infelicitous set dependencies) you have to install an implementation of the package &amp;lt;code&amp;gt;open-xchange-authentication&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-spamhandler&amp;lt;/code&amp;gt; which will never be used but checked for. We suggest to install &amp;lt;code&amp;gt;open-xchange-authentication-database&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-spamhandler-default&amp;lt;/code&amp;gt;. Installing those packages as well as chosing a &amp;lt;code&amp;gt;open-xchange-guard-storage&amp;lt;/code&amp;gt; implementation will install all required middleware dependencies.&lt;br /&gt;
&lt;br /&gt;
After the update &amp;lt;code&amp;gt;/etc/init.d/open-xchange-guard&amp;lt;/code&amp;gt; shouldn't be available any more but OX Guard will start when starting the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; system service.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 - Choose and install your storage ===&lt;br /&gt;
&lt;br /&gt;
According to your previous installation, you will have to manually install the relevant &amp;lt;code&amp;gt;open-xchange-guard-storage&amp;lt;/code&amp;gt; package. Of course, you can switch to the one or the other storage if you wish, but be aware that '''no data''' will be migrated. You will have to do this manually.&lt;br /&gt;
&lt;br /&gt;
==== File Storage Support ====&lt;br /&gt;
&lt;br /&gt;
If you want the file storage support, and depending on your Linux distribution, you can install it with the following command:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;apt-get install open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6.x/7.x or CentOS 6.x/7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x/12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;zypper in open-xchange-guard-file-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
==== S3 Storage Support ====&lt;br /&gt;
&lt;br /&gt;
If you want the S3 storage support, and depending on your Linux distribution, you can install it with the following command:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/8.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;apt-get install open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== RedHat Enterprise Linux 6.x/7.x or CentOS 6.x/7.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;yum install open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
===== SUSE Linux Enterprise Server 11.x/12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;zypper in open-xchange-guard-s3-storage&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 4 - Install open-xchange-rest ===&lt;br /&gt;
&lt;br /&gt;
OX Guard requires access to existing middleware hosts. The endpoint is configured within the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; which you can find in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The endpoint configured via &amp;lt;code&amp;gt;com.openexchange.guard.restApiHostname&amp;lt;/code&amp;gt; need to have the package &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; installed to be able to retrieve and process OX Guard REST requests.&lt;br /&gt;
&lt;br /&gt;
Normally the post installation scripts from the open-xchange-guard package should take over the formerly configured endpoint so that you do not have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Step 5 - Ensure that the server keys are readable by the sever ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file should be owned by the &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; user and have the permission 400, meaning read access only by the owner of the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;ls -l /opt/open-xchange/etc/oxguardpass&lt;br /&gt;
-r-------- 1 open-xchange root 64 Nov 17 19:14 /opt/open-xchange/etc/oxguardpass&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 6 - Ensure that the Apache balancer directive uses the correct port ===&lt;br /&gt;
&lt;br /&gt;
Since OX Guard is part of the OSGi stack and Grizzly is used to register and serve the OX Guard servlets, the &amp;lt;code&amp;gt;oxguard&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;oxguardpgp&amp;lt;/code&amp;gt; balancer directives in the Apache configuration have to be adjusted in order to set the correct port and possibly removed.&lt;br /&gt;
&lt;br /&gt;
If the Proxy balancer for the backend (oxcluster) is the same as the Guard servers, then you can remove the balancer entries for Guard and just redirect the ProxyPass directive to the oxcluster like so&lt;br /&gt;
&lt;br /&gt;
  ProxyPass /appsuite/api/oxguard balancer://oxcluster/oxguard&lt;br /&gt;
  ProxyPass /pks balancer://oxcluster/pgp&lt;br /&gt;
&lt;br /&gt;
Otherwise, if the Guard servers are different from your backend, find the lines like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;BalancerMember http://guardserver:8080/oxguard timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
BalancerMember http://guardserver:8080/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second Balancer (oxguardpgp) for PGP should just be removed.  The primary Guard balancer should look like below, removing the sub-directory &amp;quot;/oxuard&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
    BalancerMember http://guardserver:8009 timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
&lt;br /&gt;
The find the lines with the ProxyPass for &amp;lt;/appsuite/api/oxguard&amp;gt; and change the balancer to //oxguard/oxguard&lt;br /&gt;
Add the PGP balancer if you are exposing the PGP Public key server.  &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;Proxy /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
    ProxyPass balancer://oxguard/oxguard&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
  &amp;lt;Proxy /pks&amp;gt;&lt;br /&gt;
    ProxyPass balancer://oxguard/pgp&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Please note ''':&lt;br /&gt;
&lt;br /&gt;
=== Step 7 - Adapt configuration ===&lt;br /&gt;
&lt;br /&gt;
This chapter is only valid for '''OX Guard-only node''' where no additional middleware services haven't been desired and installed before! As Guard is now using existing middleware mechanisms to access the databases you have to configure the following properties.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* set &amp;lt;code&amp;gt;com.openexchange.connector.networkListenerHost&amp;lt;/code&amp;gt; to your desired hosts (e. g. &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
* consolidate your old OX Guard &amp;lt;code&amp;gt;logback.xml&amp;lt;/code&amp;gt; with the new one from within &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;jolokia.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy an already configured file from a middleware node to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;mpasswd&amp;lt;/code&amp;gt;&lt;br /&gt;
* copy your existing &amp;lt;code&amp;gt;oxadminmaster&amp;lt;/code&amp;gt; credential storage to &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt; on the OX Guard node.&lt;br /&gt;
* &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt;&lt;br /&gt;
* Adapt the property &amp;lt;code&amp;gt;com.openexchange.guard.endpoint&amp;lt;/code&amp;gt;. This can be as simple as replacing the old port 8080 with 8009 but may differ depending on your setup&lt;br /&gt;
* Adapt the property &amp;lt;code&amp;gt;com.openexchange.guard.externalReaderUrl&amp;lt;/code&amp;gt;.  Adjust to the new location of the Guard reader under apache.  Defaults to domain/guard/reader/reader.html&lt;br /&gt;
&lt;br /&gt;
After copying those files, please make sure that they are owned by the group &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt;, otherwise they cannot be read by the middleware service. In addition to the above mentioned properties you may would like to change the default configuration if the underlying middleware instance is only used for OX Guard:&lt;br /&gt;
&lt;br /&gt;
* Disable Hazelcast cluster discovery&lt;br /&gt;
* &amp;lt;code&amp;gt;hazelcast.properties: com.openexchange.hazelcast.network.join=empty&amp;lt;/code&amp;gt;&lt;br /&gt;
* remove all permissions set via configuration&lt;br /&gt;
* &amp;lt;code&amp;gt;permissions.properties&amp;lt;/code&amp;gt;: set entries to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 8 - Restart the groupware ===&lt;br /&gt;
&lt;br /&gt;
Last, and certainly not least, you need to restart the groupware process:&lt;br /&gt;
&lt;br /&gt;
===== Debian 7.x/RedHat Enterprise Linux 6.x/CentOS 6.x/SUSE Linux Enterprise Server 11.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;service open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian 8.x/RedHat Enterprise Linux 7.x/CentOS 7.x/SUSE Linux Enterprise Server 12.x =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;systemctl restart open-xchange&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Step 9 - Execute update tasks ===&lt;br /&gt;
&lt;br /&gt;
Before OX Guard should receive the first requests you have to ensure that all database schemas are up to date. This can be done by executing &amp;lt;code&amp;gt;/opt/open-xchange/sbin/runupdate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You should now have a running OX Guard 2.4.0!&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
==== When trying to decode a message I get a 404 ====&lt;br /&gt;
&lt;br /&gt;
This happens probably because the AppSuite ProxyPass Location directives are overwriting the OX Guard ones. To solve this, you will have to move the OX Guard ProxyPass Location directive right before the AppSuite ones.&lt;br /&gt;
&lt;br /&gt;
Change the ordering of the locations from this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /ajax&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxguard&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/oxguard&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxguard&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /ajax&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /appsuite/api&amp;gt;&lt;br /&gt;
  ProxyPass balancer://oxcluster/ajax&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== After migration, OX Guard fails to accept any request ====&lt;br /&gt;
&lt;br /&gt;
This may happen if configuration files that were copied during migration do not have the correct permission set. Please have a look at the OX Guard middleware log file to find any &amp;lt;code&amp;gt;ERROR&amp;lt;/code&amp;gt; messages. The &amp;lt;code&amp;gt;getmissingservices&amp;lt;/code&amp;gt; command-line tool may also help to identify services that have not been started and why they failed to start.&lt;br /&gt;
&lt;br /&gt;
==== After migration, Guest reader doesn't work and report too many redirects ====&lt;br /&gt;
&lt;br /&gt;
The location of the Guest reader has been changed, and is now being handled by apache rather than the Jetty server previously used by Guard.&lt;br /&gt;
&lt;br /&gt;
To maintain compatibility with the Guest emails previously sent, Guard tries to redirect the old URL to the new...which is configured as the externalReaderPath in the guard-core.properties file.  Be sure to update this setting to the new location as mentioned above.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21772</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21772"/>
		<updated>2016-04-01T18:00:50Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Support API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21771</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21771"/>
		<updated>2016-04-01T17:58:40Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* External */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/guardsupport&amp;gt;                                                               &lt;br /&gt;
    ProxyPass http://localhost:8009/guardsupport                                                    &lt;br /&gt;
    #...&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
It might also be preferable to add a new balancer directive for &amp;lt;code&amp;gt;guardsupport&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/guardsupport&amp;gt;                                                               &lt;br /&gt;
    ProxyPass balancer://oxguardsupport                                                           &lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Proxy balancer://oxguardsupport&amp;gt;                                                                &lt;br /&gt;
    #...&lt;br /&gt;
    BalancerMember http://localhost:8009/guardsupport #...&lt;br /&gt;
    #...&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21770</id>
		<title>AppSuite:OX Guard</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=AppSuite:OX_Guard&amp;diff=21770"/>
		<updated>2016-04-01T17:57:39Z</updated>

		<summary type="html">&lt;p&gt;Greg.hill: /* Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OX Guard (Version 2.4+ )=&lt;br /&gt;
&lt;br /&gt;
For previous versions of OX Guard, please click here&lt;br /&gt;
* [[AppSuite:OX_Guard_2-0|Installation and information of OX Guard 2.0 - 2.2]]&lt;br /&gt;
&lt;br /&gt;
If upgrading from 2.0 or 2.2, please see the following article&lt;br /&gt;
* [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* To setup a single server installation&lt;br /&gt;
* To setup a single Guard instance on an existing Open-Xchange installation, no cluster&lt;br /&gt;
* To use the database service on the existing Open-Xchange installation for Guard, no replication&lt;br /&gt;
* To provide a basic configuration setup, no mail server configuration&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
* Simple security at the touch of a button&lt;br /&gt;
* Provides user based security - Separate from provider&lt;br /&gt;
* Supplementary security to Provider based security - Layered&lt;br /&gt;
* Powerful features yet simple to use and understand&lt;br /&gt;
* Security - Inside and outside of the OX environment&lt;br /&gt;
* Email and Drive integration&lt;br /&gt;
* Uses proven PGP security&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Please review [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_System_Requirements#OX_Guard OX Guard Requirements] for a full list of requirements.&lt;br /&gt;
&lt;br /&gt;
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. OX App Suite v7.8.1 or later is required to operate this extension both in a single or multi server environments.&lt;br /&gt;
&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
&lt;br /&gt;
* Open-Xchange REST API&lt;br /&gt;
* Grizzly HTTP connector (open-xchange-grizzly)&lt;br /&gt;
* A supported Java Virtual Machine (Java 7)&lt;br /&gt;
* An Open-Xchange App Suite installation v7.8.1 or later&lt;br /&gt;
* Please Note: To get access to the latest minor features and bug fixes, you need to have a valid license. The article [https://oxpedia.org/wiki/index.php?title=AppSuite:UpdatingOXPackages Updating OX-Packages] explains how that can be done.&lt;br /&gt;
&lt;br /&gt;
=== Important Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Customisation ====&lt;br /&gt;
&lt;br /&gt;
OX Guard version supports branding / theming using the configuration cascade, defining a templateID for a user or context. Check the [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization OX Guard Customisation] article for more details.&lt;br /&gt;
&lt;br /&gt;
==== Mail Resolver ====&lt;br /&gt;
&lt;br /&gt;
READ THIS VERY CAREFULLY; BEFORE PROCEEDING WITH GUARD INSTALLATION!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Be sure to test the mail resolver using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard test email@domain&amp;lt;/source&amp;gt;&lt;br /&gt;
to see if the mail Resolver works.&lt;br /&gt;
&lt;br /&gt;
If the test does not work, you will likely need a custom Mail Resolver. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver Mail Resolver] page&lt;br /&gt;
&lt;br /&gt;
This resolver software ''depends heavily on your local deployment''.&lt;br /&gt;
&lt;br /&gt;
== Download and Installation ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The installation of the &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; package which is required for Guard and the main &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; package in version 2.4.0 will eventually execute database update tasks if installed and activated. Please take this into account.&lt;br /&gt;
&lt;br /&gt;
There are several components to the Guard service. They can be all installed on the same server as the OX middleware or on a separate server.&lt;br /&gt;
&lt;br /&gt;
The components required for the OX middleware are: &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components required for the OX frontend are: &amp;lt;code&amp;gt;open-xchange-guard-ui&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;open-xchange-guard-ui-static&amp;lt;/code&amp;gt; and optionally &amp;lt;code&amp;gt;open-xchange-guard-help-en-us&amp;lt;/code&amp;gt; (or preferred language for help files)&lt;br /&gt;
&lt;br /&gt;
The components required for the Guard server &amp;lt;code&amp;gt;open-xchange-guard&amp;lt;/code&amp;gt; and either &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;open-xchange-guard-s3-storage&amp;lt;/code&amp;gt; depending on what storage you want to use. The examples below make use of the &amp;lt;code&amp;gt;open-xchange-guard-file-storage&amp;lt;/code&amp;gt;. Adjust the commands accordingly to fit your needs. In addition &amp;lt;code&amp;gt;open-xchange&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-core&amp;lt;/code&amp;gt; are required to run OX Guard.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianWheezy /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://software.open-xchange.com/products/guard/stable/guard/DebianJessie /&lt;br /&gt;
deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== RedHat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/guard/stable/guard/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum install open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLES11 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static open-xchange-guard-backend-plugin&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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. Therefore we have to set Java 1.7 as the default instead of Java 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using zypper if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://software.open-xchange.com/products/guard/stable/guard/SLE_12 guard-stable-guard&lt;br /&gt;
$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run for a single node installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-rest open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
or the following for a distributed installation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&lt;br /&gt;
$ zypper in open-xchange-guard open-xchange-guard-file-storage open-xchange-guard-ui open-xchange-guard-ui-static &amp;lt;/source&amp;gt;&lt;br /&gt;
The packages &amp;lt;code&amp;gt;open-xchange-rest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;open-xchange-guard-backend-plugin&amp;lt;/code&amp;gt; missing in the distributed installation have to be installed on the node running the middleware.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ update-alternatives --config java&amp;lt;/source&amp;gt;&lt;br /&gt;
Now select the Java 1.7 JRE, example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;There are 2 alternatives which provide 'java'.&lt;br /&gt;
&lt;br /&gt;
  Selection    Alternative&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
*         1    /usr/lib64/jvm/jre-1.6.0-ibm/bin/java&lt;br /&gt;
 +        2    /usr/lib64/jvm/jre-1.7.0-ibm/bin/java&lt;br /&gt;
&lt;br /&gt;
Press enter to keep the default[*], or type selection number: 2&lt;br /&gt;
Using '/usr/lib64/jvm/jre-1.7.0-ibm/bin/java' to provide 'java'.&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;amp;quot;Univention Configuration Registry&amp;amp;quot;. The variable has to contain the external FQDN of the OX Guard system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;oxguard/cfg/guard.properties/com.openexchange.guard.externalEmailURL=HOSTNAME.DOMAINNAME&amp;lt;/source&amp;gt;&lt;br /&gt;
== Update OX Guard ==&lt;br /&gt;
&lt;br /&gt;
This section contains information about updating a 2.4.0 version (e.g. for patch fixes). Upgrading from prior versions is discussed in different articles. You can find more information in the '''Update OX Guard Versions &amp;amp;lt;= 2.2.x''' and '''Update OX Guard Versions &amp;amp;lt;= 2.0.x''' sections below.&lt;br /&gt;
&lt;br /&gt;
=== Debian Linux 7.0 (Wheezy) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianWheezy /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Debian Linux 8.0 (Jessie) ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange apt configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/DebianJessie /&lt;br /&gt;
deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/DebianJessie /&amp;lt;/source&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get update&lt;br /&gt;
$ apt-get dist-upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want to see, what apt-get is going to do without actually doing it, you can run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get dist-upgrade -s&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 6 or CentOS 6 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Redhat Enterprise Linux 7 or CentOS 7 ===&lt;br /&gt;
&lt;br /&gt;
If not already done, add the following repositories to your Open-Xchange yum configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;[open-xchange-guard-stable-guard-updates]&lt;br /&gt;
name=Open-Xchange-guard-stable-guard-updates&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&lt;br /&gt;
&lt;br /&gt;
[ox-backend]&lt;br /&gt;
name=Open-Xchange-backend&lt;br /&gt;
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/&lt;br /&gt;
gpgkey=https://software.open-xchange.com/oxbuildkey.pub&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
metadata_expire=0m&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ yum update&lt;br /&gt;
$ yum upgrade&amp;lt;/source&amp;gt;&lt;br /&gt;
=== SUSE Linux Enterprise Server 11 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLES11 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== SUSE Linux Enterprise Server 12 ===&lt;br /&gt;
&lt;br /&gt;
Add the package repository using &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; if not already present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/guard/stable/guard/updates/SLE_12 guard-stable-guard-updates&lt;br /&gt;
$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/backend/updates/SLE_12 ox-backend&amp;lt;/source&amp;gt;&lt;br /&gt;
and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper dup -r guard-stable-guard-backend-updates&lt;br /&gt;
$ zypper dup -r guard-stable-guard-ui-updates&amp;lt;/source&amp;gt;&lt;br /&gt;
You might need to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ zypper ref&amp;lt;/source&amp;gt;&lt;br /&gt;
to update the repository metadata before running &amp;lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; up.&lt;br /&gt;
&lt;br /&gt;
=== Univention Corporate Server ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Update OX Guard Versions &amp;amp;lt;= 2.2.x ===&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from a 2.2 version to 2.4, please read the [[Appsuite:OX_Guard_Upgrade_OSGI|Upgrading from 2.0 or 2.2 to 2.4]] article.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; located in &amp;lt;code&amp;gt;/opt/open-xchange/etc&amp;lt;/code&amp;gt;. The default configuration should be sufficient for a basic &amp;amp;quot;up-and-running&amp;amp;quot; 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 in the [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Configuration Guard Configuration] article.&lt;br /&gt;
&lt;br /&gt;
=== Basic Configuration ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-core.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database for storing Guard user information, main lookup tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardDatabaseHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard database that stores keys for guest users. May be the same as above. New guest shards will be created on this database as needed. If not supplied, will use the &amp;lt;code&amp;gt;oxguardDatabaseHostname&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxguardShardDatabase=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Username and Password for the databases above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.databaseUsername=openexchange&lt;br /&gt;
com.openexchange.guard.databasePassword=db_password&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=localhost&amp;lt;/source&amp;gt;&lt;br /&gt;
Open-Xchange REST API username and password (need to be defined in the OX backend in the &amp;amp;quot;Configure services&amp;amp;quot; below):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiUsername=apiusername&lt;br /&gt;
com.openexchange.guard.restApiPassword=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
External URL for this Open-Xchange installation. This setting will be used to generate the link to the secure content for external recipients:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.externalEmailURL=URL_TO_OX&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Middleware Configuration on OX Guard node ===&lt;br /&gt;
&lt;br /&gt;
If you are installing OX Guard on a node that until yet did not host an Open-Xchange middleware you have to additionally configure some parts of the following properties files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;configdb.properties&amp;lt;/code&amp;gt;: information about the existing configuration database.&lt;br /&gt;
* &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt;: information about the connections have to be set.&lt;br /&gt;
* &amp;lt;code&amp;gt;system.properties&amp;lt;/code&amp;gt;: at least &amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt; should be set.&lt;br /&gt;
&lt;br /&gt;
=== Sevices Configuration ===&lt;br /&gt;
&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;code&amp;gt;mod_proxy_http&amp;lt;/code&amp;gt; module by adding the Guard API.&lt;br /&gt;
&lt;br /&gt;
===== Redhat Enterprise Linux 6 or CentOS 6 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/httpd/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
===== Debian GNU/Linux 7.0 and SUSE Linux Enterprise Server 11 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /etc/apache2/conf.d/proxy_http.conf&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguard&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all&lt;br /&gt;
&lt;br /&gt;
       BalancerMember http://localhost:8009/ timeout=1800 smax=0 ttl=60 retry=60 loadfactor=100 route=OX1&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProxyPass /appsuite/api/oxguard balancer://oxguard/oxguard&lt;br /&gt;
ProxyPass /pks balancer://oxguard/pgp&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': The Guard API settings must be inserted '''''before''''' the existing &amp;lt;code&amp;gt;&amp;amp;lt;Proxy /appsuite/api&amp;amp;gt;&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
'''Also Note''':  If you already have a Proxy balancer for the OX backend with the same URL (say http://localhost:8080) then you don't need the second BalacnerMember entry, and you can just have the ProxyPass address that balancer instead.&lt;br /&gt;
&lt;br /&gt;
After the configuration is done, restart the Apache webserver&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apachectl restart&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; configuration file for the OX backend which contain some general Guard settings. Please remove comments in front of the following settings to the configuration file &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; on the Open-Xchange backend servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# OX GUard general permission, required to activate Guard in the AppSuite UI.&lt;br /&gt;
com.openexchange.capability.guard=true&lt;br /&gt;
&lt;br /&gt;
# Default theme template id for all users that have no custom template id configured.&lt;br /&gt;
com.openexchange.guard.templateID=0&amp;lt;/source&amp;gt;&lt;br /&gt;
Configure the API username and password that you assigned to Guard in the &amp;lt;code&amp;gt;server.properties&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the user name used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.login=apiusername&lt;br /&gt;
&lt;br /&gt;
# Specify the password used for HTTP basic auth by internal REST servlet&lt;br /&gt;
com.openexchange.rest.services.basic-auth.password=apipassword&amp;lt;/source&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;/guardadmin&amp;lt;/code&amp;gt;. In the event of a cluster setup, any Guard server can be referenced here, as it is not session specific, though ideally would have a HTTP load balancer/failover URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/guard-api.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specifies the URI to the OX Guard end-point; e.g. http://guard.host.invalid:8081/guardadmin&lt;br /&gt;
# Default is empty&lt;br /&gt;
com.openexchange.guard.endpoint=http://guardserver:8009/guardadmin&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the OX backend&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /etc/init.d/open-xchange restart&amp;lt;/source&amp;gt;&lt;br /&gt;
==== SELinux ====&lt;br /&gt;
&lt;br /&gt;
Running SELinux prohibits your local Open-Xchange backend service to connect to localhost:8009, which is where the Guard backend service listens to. In order to allow localhost connections to 8009 execute the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ setsebool -P httpd_can_network_connect 1&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Generating the &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
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 master password file in &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt;. The initiation only needs to be done '''once''' for a multi server setup, for details please see the sections '''Optional''' and/or '''Clustering'''.&lt;br /&gt;
&lt;br /&gt;
'''Please Note''': If you run a cluster of OX / Guard nodes, only execute this command on '''ONE''' node. Not on all nodes! See [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering] for details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/guard --init&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''': It is important to understand that the master password file located at &amp;lt;code&amp;gt;/opt/open-xchange/etc/oxguardpass&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
=== Test Setup ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To test, use an email address that exists on the OX backend (john@example.com for this example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;/opt/open-xchange/sbin/guard --test john@example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
Guard should return information from the OX backend regarding the user associated with &amp;amp;quot;john@example.com&amp;amp;quot;. Problems resolving information for the user should be resolved before using Guard. Check Rest API passwords and settings if errors returned.&lt;br /&gt;
&lt;br /&gt;
=== Enabling Guard for Users ===&lt;br /&gt;
&lt;br /&gt;
Guard provides two capabilities for users in the environment as well as a basic &amp;amp;quot;core&amp;amp;quot; level:&lt;br /&gt;
&lt;br /&gt;
* Guard: &amp;lt;code&amp;gt;com.openexchange.capability.guard&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Mail: &amp;lt;code&amp;gt;com.openexchange.capability.guard-mail&amp;lt;/code&amp;gt;&lt;br /&gt;
* Guard Drive: &amp;lt;code&amp;gt;com.openexchange.capability.guard-drive&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;amp;quot;core&amp;amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
'''Guard Mail''' and '''Guard Drive''' are additional options for users. &amp;amp;quot;Guard Mail&amp;amp;quot; allows users the full functionality of Guard emails. &amp;amp;quot;Guard Drive&amp;amp;quot; allows for encryption and decryption of drive files.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
==== Guard Mail: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-mail=true&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Guard Drive: ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u testuser --config/com.openexchange.capability.guard-drive=true&amp;lt;/source&amp;gt;&lt;br /&gt;
'''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 &amp;lt;code&amp;gt;guard-api.properties&amp;lt;/code&amp;gt; file on the OX bakend.&lt;br /&gt;
&lt;br /&gt;
=== Recipient key detection ===&lt;br /&gt;
&lt;br /&gt;
==== Local ====&lt;br /&gt;
&lt;br /&gt;
Guard needs to determine if an email recipients email address is an internal or external (non-ox) user.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;com.openexchange.mailmapping.MailResolver&amp;lt;/code&amp;gt; class or by interfacing Guard with your mail resolver system. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardMailResolver OX Guard Mail Resolver] for details.&lt;br /&gt;
&lt;br /&gt;
==== External ====&lt;br /&gt;
&lt;br /&gt;
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].&lt;br /&gt;
&lt;br /&gt;
External PGP servers to use can be configured in the guard.properties file on the Guard servers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.publicPGPDirectory = hkp://keys.gnupg.net:11371, hkp://pgp.mit.edu:11371&amp;lt;/source&amp;gt;&lt;br /&gt;
If you would like this Guard installation discoverable by other Guard servers, then create an SRV record for each domain (&amp;amp;quot;example.com&amp;amp;quot; in this illustration):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;_hkp._tcp.open-xchange.com. 28800 IN    SRV     10 1 80 appsuite.example.com.&amp;lt;/source&amp;gt;&lt;br /&gt;
You will also need to make additional entries in the apache &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Proxy balancer://oxguardpgp&amp;gt;&lt;br /&gt;
       Order deny,allow&lt;br /&gt;
       Allow from all, add&lt;br /&gt;
       BalancerMember http://guardserver:8009/pgp timeout=1800 smax=0 ttl=60 retry=60 loadfactor=50 route=OX3&lt;br /&gt;
       ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=ON&lt;br /&gt;
       SetEnv proxy-initial-not-pooled&lt;br /&gt;
       SetEnv proxy-sendchunked&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;br /&gt;
&amp;lt;Proxy /pks&amp;gt;&lt;br /&gt;
       ProxyPass balancer://oxguardpgp&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Please Note''' PGP Public key servers by default append use the URL server/pks when the record is obtained from an SRV record. The proxy above routes anything with the Apache domain/pks to the OX Guard PGP server.&lt;br /&gt;
&lt;br /&gt;
=== Clustering ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== MySQL ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;my.cnf&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;bind = 0.0.0.0&amp;lt;/source&amp;gt;&lt;br /&gt;
This allows the Guard backend to bind to the MySQL host which is configured in the &amp;lt;code&amp;gt;guard-core.properties&amp;lt;/code&amp;gt; file with &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;. 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'oxguard.example.com' IDENTIFIED BY ‘secret’;&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Apache ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; we need to add a servlet called &amp;amp;quot;preliminary&amp;amp;quot; to &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;, example based on a clustered &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt;configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /preliminary&amp;gt;&lt;br /&gt;
     Order Deny,Allow&lt;br /&gt;
     Deny from all&lt;br /&gt;
     # Only allow access from Guard servers within the network. Do not expose this&lt;br /&gt;
     # location outside of your network. In case you use a load balancing service in front&lt;br /&gt;
     # of your Apache infrastructure you should make sure that access to /preliminary will&lt;br /&gt;
     # be blocked from the Internet / outside clients. Examples:&lt;br /&gt;
     # Allow from 192.168.0.1&lt;br /&gt;
     # Allow from 192.168.1.1 192.168.1.2&lt;br /&gt;
     # Allow from 192.168.0.&lt;br /&gt;
     ProxyPass /preliminary balancer://oxcluster/preliminary&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure that the balancer is properly configured in the &amp;lt;code&amp;gt;mod_proxy&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; from WAN to restrict access to the servlet to internal network services only.&lt;br /&gt;
&lt;br /&gt;
Now add the OX Guard &amp;lt;code&amp;gt;BalancerMembers&amp;lt;/code&amp;gt; to the oxguard balancer configuration (also in &amp;lt;code&amp;gt;proxy_http.conf&amp;lt;/code&amp;gt;) 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.&lt;br /&gt;
&lt;br /&gt;
If the Apache server is a dedicated server &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui-static&amp;lt;/source&amp;gt;&lt;br /&gt;
==== Open-Xchange ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ vim /opt/open-xchange/etc/server.properties&amp;lt;/source&amp;gt;&lt;br /&gt;
and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.IPCheck=false&amp;lt;/source&amp;gt;&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ apt-get install open-xchange-guard-ui&amp;lt;/source&amp;gt;&lt;br /&gt;
Restart the Open-Xchange service afterwards.&lt;br /&gt;
&lt;br /&gt;
==== OX Guard ====&lt;br /&gt;
&lt;br /&gt;
For details in clustering Guard servers, please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCluster OX Guard Clustering]. It is '''critical''' that all Guard servers have the same &amp;lt;code&amp;gt;oxguardpass&amp;lt;/code&amp;gt; file. Please see the clustering link for details. Do not run &amp;lt;code&amp;gt;/opt/open-xchange/sbin/guard --init&amp;lt;/code&amp;gt; on more than one server.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.restApiHostname=apache.example.com&amp;lt;/source&amp;gt;&lt;br /&gt;
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 servlet &amp;lt;code&amp;gt;/preliminary&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/opt/open-xchange/etc/guard-core.properties&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;com.openexchange.guard.oxBackendPort=80&amp;lt;/source&amp;gt;&lt;br /&gt;
Please also change all settings in regards to MySQL like &amp;lt;code&amp;gt;com.openexchange.guard.configdbHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.oxguardDatabaseHostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;com.openexchange.guard.databaseUsername&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;om.openexchange.guard.databasePassword&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Afterwards restart the OX Guard service and check the log file if the OX Guard backend is able to connect to the configured REST API.&lt;br /&gt;
&lt;br /&gt;
=== Multi Node ===&lt;br /&gt;
&lt;br /&gt;
If you have multiple OX and Guard installations, please see the following documentation [https://oxpedia.org/wiki/index.php?title=AppSuite:OX_Guard_Modular OX Guard Modular Setup].&lt;br /&gt;
&lt;br /&gt;
== Support API ==&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;# Specify the username and password for accessing the Support API of Guard&lt;br /&gt;
com.openexchange.guard.supportapiusername=&lt;br /&gt;
com.openexchange.guard.supportapipassword=&amp;lt;/source&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
'''Warning''': Exposing the support API to the internet could be huge security risk. Only add to Apache if you know what you are doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/guardsupport&amp;gt;                                                               &lt;br /&gt;
    ProxyPass http://localhost:8009/guardsupport                                                    &lt;br /&gt;
    #...&lt;br /&gt;
&amp;lt;/Location&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
It might also be preferable to add a new balancer directive for &amp;lt;code&amp;gt;guardsupport&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;Location /appsuite/api/guardsupport&amp;gt;                                                               &lt;br /&gt;
    ProxyPass balancer://oxguardsupport                                                           &lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Proxy balancer://oxguardsupport&amp;gt;                                                                &lt;br /&gt;
    #...&lt;br /&gt;
    BalancerMember http://localhost:8009/guardsupport #...&lt;br /&gt;
    #...&lt;br /&gt;
&amp;lt;/Proxy&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Reset password ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=reset_password&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. The reset password function is currently not available for guest users. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to reset the password for&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; (optional) – The email address to send the new password to, if the user did not specify a secondary email address&lt;br /&gt;
&lt;br /&gt;
=== Expose key ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=expose_key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Marks a deleted user key temporary as “exposed” and creates a unique URL for downloading the exposed key. Automatic resetting of exposed keys to &amp;amp;quot;not exposed&amp;amp;quot; 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. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; – The email address of the user to expose the deleted keys for&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; – The context id&lt;br /&gt;
&lt;br /&gt;
Response: A URL pointing to the downloadable exposed keys.&lt;br /&gt;
&lt;br /&gt;
=== Delete user ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;POST /guardsupport/?action=delete_user&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deletes all keys related to a certain user. The keys are backed up and can be exposed using the “expose_key” call. (''Since Guard 2.0'')&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user_id&amp;lt;/code&amp;gt; – The user's id&lt;br /&gt;
* &amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; - The context id&lt;br /&gt;
&lt;br /&gt;
== Customisation ==&lt;br /&gt;
&lt;br /&gt;
Guard's templates are customisable at the user and context level. Please see [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardCustomization Customisation] for details.&lt;br /&gt;
&lt;br /&gt;
== Entropy ==&lt;br /&gt;
&lt;br /&gt;
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 [https://oxpedia.org/wiki/index.php?title=AppSuite:GuardEntropy Entropy] for a possible solution.&lt;/div&gt;</summary>
		<author><name>Greg.hill</name></author>
	</entry>
</feed>