|
| 1 | +======================== |
| 2 | +360 ERP - Auth User Role |
| 3 | +======================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:6b4bcdd74e55d4277803a74f7ac68e4bc51c14d2c4dec736cdfd1dea0ec9ee20 |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
| 18 | + :alt: License: LGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/server-auth/tree/18.0/auth_user_role |
| 21 | + :alt: OCA/server-auth |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-auth_user_role |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=18.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module provides a generic engine to map Identity Provider (IdP) |
| 32 | +attributes to Odoo user roles. It acts as an abstraction layer built on |
| 33 | +top of the ``base_user_role`` module. |
| 34 | + |
| 35 | +By itself, this module does not handle authentication. Instead, it is |
| 36 | +designed to be triggered by specialized "glue" modules (e.g., SAML, |
| 37 | +OAuth, LDAP) during the login process. It evaluates incoming identity |
| 38 | +payloads against a set of configured global rules and dynamically |
| 39 | +provisions or revokes user roles. |
| 40 | + |
| 41 | +**Table of contents** |
| 42 | + |
| 43 | +.. contents:: |
| 44 | + :local: |
| 45 | + |
| 46 | +Configuration |
| 47 | +============= |
| 48 | + |
| 49 | +To configure role mappings: |
| 50 | + |
| 51 | +1. Navigate to **Settings > Users & Companies > Identity Role |
| 52 | + Mappings**. |
| 53 | +2. Create a new mapping rule. |
| 54 | +3. Define the **Identity Attribute**: Enter the exact payload attribute |
| 55 | + key provided by your IdP (e.g., ``department``, ``groups``, |
| 56 | + ``eduPersonAffiliation``). |
| 57 | +4. Select the **Operator**: |
| 58 | + |
| 59 | + - **equals**: The payload value must exactly match the defined value. |
| 60 | + - **contains**: The payload value must contain the defined value |
| 61 | + (useful for comma-separated lists or longer strings). |
| 62 | + |
| 63 | +5. Define the **Value** you expect to receive from the IdP. |
| 64 | +6. Select the **Role** (from ``base_user_role``) that should be assigned |
| 65 | + when the condition is met. |
| 66 | + |
| 67 | +Usage |
| 68 | +===== |
| 69 | + |
| 70 | +There is no direct user interaction required for this module. Once |
| 71 | +configured, the evaluation and assignment of roles happen automatically |
| 72 | +in the background whenever an integrated authentication provider |
| 73 | +triggers the ``evaluate_and_apply_auth_roles`` method during user |
| 74 | +sign-in. |
| 75 | + |
| 76 | +All role grants, reactivations, and revocations are automatically logged |
| 77 | +in the Odoo server logs for security auditing. |
| 78 | + |
| 79 | +Bug Tracker |
| 80 | +=========== |
| 81 | + |
| 82 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_. |
| 83 | +In case of trouble, please check there if your issue has already been reported. |
| 84 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 85 | +`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_user_role%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 86 | + |
| 87 | +Do not contact contributors directly about support or help with technical issues. |
| 88 | + |
| 89 | +Credits |
| 90 | +======= |
| 91 | + |
| 92 | +Authors |
| 93 | +------- |
| 94 | + |
| 95 | +* 360 ERP |
| 96 | + |
| 97 | +Contributors |
| 98 | +------------ |
| 99 | + |
| 100 | +- Andrea Stirpe |
| 101 | + |
| 102 | +Other credits |
| 103 | +------------- |
| 104 | + |
| 105 | +The development of this module has been financially supported by: |
| 106 | + |
| 107 | +- 360 ERP |
| 108 | + |
| 109 | +Maintainers |
| 110 | +----------- |
| 111 | + |
| 112 | +This module is maintained by the OCA. |
| 113 | + |
| 114 | +.. image:: https://odoo-community.org/logo.png |
| 115 | + :alt: Odoo Community Association |
| 116 | + :target: https://odoo-community.org |
| 117 | + |
| 118 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 119 | +mission is to support the collaborative development of Odoo features and |
| 120 | +promote its widespread use. |
| 121 | + |
| 122 | +This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/18.0/auth_user_role>`_ project on GitHub. |
| 123 | + |
| 124 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments