Debian Codegraph @

doc/sources/admin/applications/odoo.rst

raw
1 Odoo
2 ====
3
4 |image0|
5
6 Presentation
7 ------------
8
9 Odoo is a suite of business management software tools including, for example, CRM, e-commerce, billing, accounting, manufacturing, warehouse, project management, and inventory management.
10
11 Requirements
12 ------------
13
14 This guide explains how to authenticate your Odoo users using LemonLDAP::NG 's SAML provider.
15
16 Make sure you have :doc:`set up LemonLDAP::NG a SAML IDP <../samlservice>`
17
18 .. warning::
19 Odoo requires your public SAML Signature key to be in `BEGIN CERTIFICATE`
20 format, if this is not the case, you need to :ref:`convert your SAML key to
21 a certificate<samlservice-convert-certificate>`)
22
23 .. warning::
24 Odoo requires LL::NG 2.0.14 in order to handle RelayState correctly
25
26 Configuring Odoo
27 ----------------
28
29 Pre-requisites
30 ~~~~~~~~~~~~~~
31
32 On the Odoo side, you need to install the ``auth_saml`` module from OCA:
33
34 * https://github.com/OCA/server-auth/tree/14.0/auth_saml
35 * https://odoo-community.org/shop/product/saml2-authentication-3211
36
37 This module requires the ``pysaml2`` and ``xmlsec1`` python dependencies.
38
39 Configuration
40 ~~~~~~~~~~~~~
41
42 After installing the module, you will see two new menus in the Odoo admin:
43
44
45 * Settings » Users & Companies » SAML Providers
46 * And a new *SAML* tab in Settings » Users & Companies » Users
47
48
49 Creating a new SAML Provider
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 Create a new SAML provider in Settings » Users & Companies » SAML Providers
53
54 * Choose a name
55 * Copy the metadata from https://auth.example.com/saml/metadata/idp in the *Identity Provider Metadata* field
56 * Import a certificate and a private key in the *Odoo Public Certificate* and *Odoo Private Key* fields
57
58 To generate a key/certificate pair, you can run the following command::
59
60 openssl req -x509 -newkey rsa:4096 -keyout odoo-key.pem -out odoo-cert.pem -sha256 -days 3650 -nodes
61
62 * Select a signature method in the *Signature Algorithm*, such as *SIG_RSA_SHA256*
63 * If you do not want to use the email address to match between LL::NG and Odoo accounts, set the *Identity Provider matching attribute* to a different value
64 * All other fields may be left to default values
65
66 Configuring users
67 ~~~~~~~~~~~~~~~~~
68
69 For each user you want to enable SAML on, you need to edit them in Settings » Users & Companies » Users
70
71 In the *SAML* tab, set the SAML provider you just created, and their email address as the identifier.
72
73 Configuring LemonLDAP
74 ---------------------
75
76 Add a new :ref:`new SAML Service Provider to the LemonLDAP::NG configuration<samlidp-register-sp>`
77 with the following parameters:
78
79 * **Metadata**
80 * Copy the Metadata found at the URL referenced in Odoo's Settings » Users & Companies » SAML Providers menu » Your provider » Metadata URL
81 * **Exported Attributes**
82 * Declare the attribute that you set in Odoo's *Identity Provider matching attribute*
83 * If you are using the email, you don't need to declare anything
84
85
86 .. |image0| image:: /applications/odoo_logo.png
87 :class: align-center
88