# documentation:2.0:authremote
Keywords: documentation,2.0,authremote

# Remote

Authentication | Users | Password
--- | --- | ---
✔ | ✔ |

This module is a LL::NG specific identity federation protocol. You may rather use standards protocols like SAML, OpenID Connect or CAS.

## Presentation

- The main portal is configured to use CDA. The secondary portal is declared in the Manager of the main LL::NG structure (else user will be rejected).
- The portal of the secondary LL::NG structure is configured to delegate authentication to a remote portal. A request to the main session database is done (trough SOAP session backend) to be sure that the session exists.
- If `exportedAttr` is set, only those attributes are copied in the session database of the secondary LL::NG structure. Else, all data are copied in the session database.

1. User tries to access to an application in the secondary LL::NG structure without having a session in this area
2. Redirection to the portal of the secondary area (transparent)
3. Redirection to the portal of the main area and normal authentication (if not done before)
4. Redirection to the portal of the secondary area (transparent)
5. Secondary portal check if remote session is available. It can be done via direct access to the session database or using SOAP access. Then it creates the session (with attribute filter)
6. User can now access to the protected application

Note that if the user is already authenticated on the first portal, all redirections are transparent.

## Configuration

### Main LL::NG structure

Go in Manager, and:

- activate CDA in `General Parameters` » `Cookies` » `Multiple domains`
- declare secondary portal in `General Parameters` » `Advanced Parameters` » `Security` » `Trusted domains`

### Secondary LL::NG structure

Configure the portal to use the remote LL::NG structure.

In Manager, go in `General Parameters` » `Authentication modules` and choose Remote for authentication and users.

Then, go in `Remote parameters`:

- Portal URL: remote portal URL
- Cookie name (optional): name of the cookie of primary portal, if different from secondary portal
- Sessions module: set `Lemonldap::NG::Common::Apache::Session::SOAP` for SOAP session backend.
- Sessions module options:
  - proxy: SOAP sessions end point (see SOAP session backend documentation)

### Example: interoperability between 2 organizations

Using this, we can do a very simple interoperability system between 2 organizations using two LL::NG structures:

- each area has 2 portals:
  - One standard portal
  - One remote portal that delegates authentication to the second organization (just an other file on the same server)
- The normal portal has a link included in the authentication form pointing to the remote portal for the users of the other organization

So on each main portal, internal users can access normally, and users issued from the other organization have just to click on the link:

1. One user tries to access to the portal
2. External user clicks to be redirected to the remote type portal
3. After redirection, normal authentication in the remote portal
4. Redirection to the remote type portal
5. Validation of the session: external user has now a local session