Support Knowledge Base

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Confirmed: still relevant
Warning

DRAFT

Affected version(s): OXAppSuite 7.10.0 and above, also OXGuard 2.10.0 and above

Problem:

Suppose the current scenario:
Info

You are trying unable to set the default value for certain users under "Security > domain.com OXGuard"   so which would allow your users can to send encrypted emails all the time as by default when composing new emailmail.
You may have found are using the following documentation pages while looking through our documentation, which is not working:

https://oxpedia.org/wiki/index.php?title=AppSuite:User_management#changeuser
http://oxpedia.org/wiki/index.php?title=OX6:Gui_pathThe second link, is quite older, but is worth the understanding of how to accomplish this task.

How can this be configured for a select group of users, who have not yet set up OX Guard? What exactly is the correct syntax for "changeuser --addguipreferences"?

Root Cause:

Info

The documentation above applies only for the OX6 version of Appsuite. The -addguipreferences parameter will not work for later versions of the product. If you try to For instance on this type of issue, you may try and set the flag for a certain user, and when you have done that, you may see this in the logs, or something similarthe command will appear to be successful:

code
Code Block
titlechangeuser --addguipreferences command result
"2019-08-13T12:25:11,331+0200 INFO  [RMI TCP Connection(2492)-10.192.0.110] com.openexchange.admin.storage.mysqlStorage.OXUserMySQLStorage.change(OXUserMySQLStorage.java:648)
User 3 in context 1 changed! Changed attributes: password-mechanism, gui, username"

But after you try and set that, you end up finding out that it was not set after all. 
So, how can you do this for a special group of users, who not yet have set up the guard? What exactly is the correct syntax for the "changeuser --addguipreferences" tool?(warning) This is because the property is successfully set, but it does not provide the needed function in versions later than OX6 Appsuite.

Solution:

Info

The following solution can be used for OX Appsuite 7.10.0 and later.

(info) We recommend that you test this in a staging or QA environment first.
(info) Take care that

Some background...

with the --addduipreferences parameter, that is just for version OX6, so that will not won't work here for this situation.
Also, this has not been extensively tested, so we would suggest you test this out first in your Staging or QA env. 

(warning) Note to be sure

your spacing is correct in yml files

. If not, your OXAppSuite will

, or OX Appsuite may not start

!

correctly.


In your /opt/open-xchange/etc/meta/guard.yml, add the following, to map a middleware configuration value to the UI value:

Code Block
languageyml
title/opt/open-xchange/etc/meta/guard.yml
com.openexchange.guard.defaultEncrypted:
    preferencePath: oxguard//defaultEncrypted


This line essentially maps a middleware configuration value to the UI value.
(warning) IMPORTANT (warning) IMPORTANT (warning)
You would then need to MUST add a default value for this com.openexchange.guard.defaultEncrypted in a properties file
(probably the . We recommend adding it to guard-api.properties, but could be in any configuration file in the middleware )will work.  If you are running Guard on the middleware servers (not separate servers),
then you could also put this in the guard-core.properties file.

Code Block
title/opt/open-xchange/etc/guard-core.properties
com.openexchange.guard.defaultEncrypted=false


(info) If the middleware doesn't have (warning) If you do not set a default value for this setting, then Guard will think that
there is a need for upgrading in a properties file, it will trigger OX Guard to upgrade from 2.8 to 2.10 (when this value was added), and the users would or will lose their default settings for signing, encryptencryption, and inline.


Finally, how to Once the above is in place, you can set the default encryption option for composing an email to be encrypted.

Command would be

new mail with the changeuser command as follows:

code
Code Block
titlecom.openexchange.guard.defaultEncrypted
/opt/open-xchange/sbin/changeuser -A oxadmin -P secret -c 1 -i 5 --config/com.openexchange.guard.defaultEncrypted=true

(info) -A = the oxadmin user, -P = the oxadmin password, -c = the context, -i = the user ID

This can also be set at context level if your have a large context of users.  
with changecontext, if desired. This will set the value to true for the user, but they will be able to uncheck it if they choose.