Difference between revisions of "Open-Xchange servlet for external login masks"

(Installation)
Line 8: Line 8:
 
  http://ox-server/servlet/easylogin
 
  http://ox-server/servlet/easylogin
  
=== Installation ===
+
{{InstallPlugin|pluginname=open-xchange-easylogin|sopath=unsupported/stable/extensions}}
The open-xchange-easylogin package, available in the [[CommunitySoftwareRepositories]] , needs to be installed using the operation system tools for package maintenance (e.g. dpkg, rpm). After installation, the groupware process has to be restarted:
 
/etc/init.d/open-xchange restart
 
  
 
=== Configuration ===
 
=== Configuration ===

Revision as of 12:30, 13 May 2009

Open-Xchange servlet for external login masks

Who should read this document

This document is written for web developers who would like to create a custom login mask for the Open-Xchange server. The login mask can reside on an external server i. e., not directly located in the domain of the Open-Xchange machines. It is also intended for administrators who install and maintain Open-Xchange services.

Description

The open-xchange-easylogin package provides a servlet which expects a user name and password via HTTP GET or POST. For security reasons, GET is disabled by default but can be turned on via configuration. With that information the servlet generates java code that is then executed in the user's browser so that the user gets automatically logged in to the Open-Xchange application. After the installation the servlet URL is:

http://ox-server/servlet/easylogin

Install on OX AppSuite

Debian GNU/Linux 8.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/OX6/unsupported/stable/extensions/DebianJessie/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/DebianJessie/ /

and run

$ apt-get update
$ apt-get install open-xchange-easylogin

Debian GNU/Linux 9.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/OX6/unsupported/stable/extensions/DebianStretch/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/DebianStretch/ /

and run

$ apt-get update
$ apt-get install open-xchange-easylogin

SUSE Linux Enterprise Server 12

Add the package repository using zypper if not already present:

$ zypper ar https://software.open-xchange.com/OX6/unsupported/stable/extensions/SLE_12 ox

If you have a valid maintenance subscription, please run the following command and add the ldb account data to the url so that the most recent packages get installed:

$ zypper ar https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/SLES11 ox-updates

and run

$ zypper ref
$ zypper in open-xchange-easylogin

RedHat Enterprise Linux 6

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/unsupported/stable/extensions/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-easylogin

RedHat Enterprise Linux 7

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/unsupported/stable/extensions/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-easylogin

CentOS 6

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/unsupported/stable/extensions/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-easylogin

CentOS 7

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/unsupported/stable/extensions/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/unsupported/stable/extensions/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-easylogin

Configuration

Configuration file is:

/opt/open-xchange/etc/groupware/easylogin.properties

following configuration options are available (the groupware must be restarted to make changes effective):

# easylogin configuration file

# GET/POST variable name for the password
com.openexchange.easylogin.passwordPara = password 

# GET/POST variable name for the login name
com.openexchange.easylogin.loginPara = login 

# AJAX root path on the Open-Xchange server 
# do not change unless you know what you are doing
com.openexchange.easylogin.AJAX_ROOT = /ajax

# the relative path to the Open-Xchange GUI
com.openexchange.easylogin.OX_PATH_RELATIVE = ../

# enable GET for the servlet 
# possible parameters: true/false
com.openexchange.easylogin.doGetEnabled = true

Example HTML form

The examples below show how an HTML form for a custom login mask looks like. One example is for HTML POST and one for GET (for security reasons we recommend to use POST). When using the example for your own purposes, the ox-server string needs to be replaced by the name of the Open-Xchange server:

 <html>
 <body>

 <h1>Login via POST:</h1>
 <form action="http://ox-server/servlet/easylogin" method="POST">
     <p>
     <label for="login">Username: </label>
               <input type="text" name="login" id="login"><br>
     <label for="password">Password:  </label>
               <input type="password" name="password" id="password"><br><br>
     <input type="submit" value="POST login">
     </p>
  </form>
 
  <h1>Login via GET:</h1>
  <form action="http://ox-server/servlet/easylogin" method="GET">
     <p>
     <label for="login">Username: </label>
               <input type="text" name="login" id="login"><br>
     <label for="password">Password:  </label>
               <input type="password" name="password" id="password"><br><br>
     <input type="submit" value="GET login">
     </p>
  </form>
 
  </body>
 </html>