|
| 1 | +============================= |
| 2 | +Authentication OpenID Connect |
| 3 | +============================= |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:e65c1c978ca0266a8e54f8121675cbf710359cf407413e35518f670be9c9753f |
| 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-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-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_oidc |
| 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_oidc |
| 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 allows users to login through an OpenID Connect provider |
| 32 | +using the authorization code flow or implicit flow. |
| 33 | + |
| 34 | +Note the implicit flow is not recommended because it exposes access |
| 35 | +tokens to the browser and in http logs. |
| 36 | + |
| 37 | +**Table of contents** |
| 38 | + |
| 39 | +.. contents:: |
| 40 | + :local: |
| 41 | + |
| 42 | +Installation |
| 43 | +============ |
| 44 | + |
| 45 | +This module depends on the |
| 46 | +`python-jose <https://pypi.org/project/python-jose/>`__ library, not to |
| 47 | +be confused with ``jose`` which is also available on PyPI. |
| 48 | + |
| 49 | +Configuration |
| 50 | +============= |
| 51 | + |
| 52 | +Setup for Microsoft Azure |
| 53 | +------------------------- |
| 54 | + |
| 55 | +Example configuration with OpenID Connect authorization code flow. |
| 56 | + |
| 57 | +1. configure a new web application in Azure with OpenID and code flow |
| 58 | + (see the `provider |
| 59 | + documentation <https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/configure-openid-provider>`__)) |
| 60 | + |
| 61 | +2. in this application the redirect url must be be "<url of your |
| 62 | + server>/auth_oauth/signin" and of course this URL should be reachable |
| 63 | + from Azure |
| 64 | + |
| 65 | +3. create a new authentication provider in Odoo with the following |
| 66 | + parameters (see the `portal |
| 67 | + documentation <https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/configure-openid-settings>`__ |
| 68 | + for more information): |
| 69 | + |
| 70 | +|image| |
| 71 | + |
| 72 | +|image1| |
| 73 | + |
| 74 | +Single tenant provider limits the access to user of your tenant, while |
| 75 | +Multitenants allow access for all AzureAD users, so user of foreign |
| 76 | +companies can use their AzureAD login without an guest account. |
| 77 | + |
| 78 | +- Provider Name: Azure AD Single Tenant |
| 79 | +- Client ID: Application (client) id |
| 80 | +- Client Secret: Client secret |
| 81 | +- Allowed: yes |
| 82 | + |
| 83 | +or |
| 84 | + |
| 85 | +- Provider Name: Azure AD Multitenant |
| 86 | +- Client ID: Application (client) id |
| 87 | +- Client Secret: Client secret |
| 88 | +- Allowed: yes |
| 89 | +- replace {tenant_id} in urls with your Azure tenant id |
| 90 | + |
| 91 | +|image2| |
| 92 | + |
| 93 | +Setup for Keycloak |
| 94 | +------------------ |
| 95 | + |
| 96 | +Example configuration with OpenID Connect authorization code flow. |
| 97 | + |
| 98 | +In Keycloak: |
| 99 | + |
| 100 | +1. configure a new Client |
| 101 | +2. make sure Authorization Code Flow is Enabled. |
| 102 | +3. configure the client Access Type as "confidential" and take note of |
| 103 | + the client secret in the Credentials tab |
| 104 | +4. configure the redirect url to be "<url of your |
| 105 | + server>/auth_oauth/signin" |
| 106 | + |
| 107 | +In Odoo, create a new Oauth Provider with the following parameters: |
| 108 | + |
| 109 | +- Provider name: Keycloak (or any name you like that identify your |
| 110 | + keycloak provider) |
| 111 | +- Auth Flow: OpenID Connect (authorization code flow) |
| 112 | +- Client ID: the same Client ID you entered when configuring the client |
| 113 | + in Keycloak |
| 114 | +- Client Secret: found in keycloak on the client Credentials tab |
| 115 | +- Allowed: yes |
| 116 | +- Body: the link text to appear on the login page, such as Login with |
| 117 | + Keycloak |
| 118 | +- Scope: openid email |
| 119 | +- Authentication URL: The "authorization_endpoint" URL found in the |
| 120 | + OpenID Endpoint Configuration of your Keycloak realm |
| 121 | +- Token URL: The "token_endpoint" URL found in the OpenID Endpoint |
| 122 | + Configuration of your Keycloak realm |
| 123 | +- JWKS URL: The "jwks_uri" URL found in the OpenID Endpoint |
| 124 | + Configuration of your Keycloak realm |
| 125 | + |
| 126 | +.. |image| image:: https://raw.githubusercontent.com/OCA/server-auth/18.0/auth_oidc/static/description/oauth-microsoft_azure-api_permissions.png |
| 127 | +.. |image1| image:: https://raw.githubusercontent.com/OCA/server-auth/18.0/auth_oidc/static/description/oauth-microsoft_azure-optional_claims.png |
| 128 | +.. |image2| image:: https://raw.githubusercontent.com/OCA/server-auth/18.0/auth_oidc/static/description/odoo-azure_ad_multitenant.png |
| 129 | + |
| 130 | +Usage |
| 131 | +===== |
| 132 | + |
| 133 | +On the login page, click on the authentication provider you configured. |
| 134 | + |
| 135 | +Known issues / Roadmap |
| 136 | +====================== |
| 137 | + |
| 138 | +- When going to the login screen, check for a existing token and do a |
| 139 | + direct login without the clicking on the SSO link |
| 140 | +- When doing a logout an extra option to also logout at the SSO |
| 141 | + provider. |
| 142 | + |
| 143 | +Changelog |
| 144 | +========= |
| 145 | + |
| 146 | +18.0.1.0.0 2024-10-09 |
| 147 | +--------------------- |
| 148 | + |
| 149 | +- Odoo 18 migration |
| 150 | + |
| 151 | +17.0.1.0.0 2024-03-20 |
| 152 | +--------------------- |
| 153 | + |
| 154 | +- Odoo 17 migration |
| 155 | + |
| 156 | +16.0.1.1.0 2024-02-28 |
| 157 | +--------------------- |
| 158 | + |
| 159 | +- Forward port OpenID Connect fixes from 15.0 to 16.0 |
| 160 | + |
| 161 | +16.0.1.0.2 2023-11-16 |
| 162 | +--------------------- |
| 163 | + |
| 164 | +- Readme link updates |
| 165 | + |
| 166 | +16.0.1.0.1 2023-10-09 |
| 167 | +--------------------- |
| 168 | + |
| 169 | +- Add AzureAD code flow provider |
| 170 | + |
| 171 | +16.0.1.0.0 2023-01-27 |
| 172 | +--------------------- |
| 173 | + |
| 174 | +- Odoo 16 migration |
| 175 | + |
| 176 | +15.0.1.0.0 2023-01-06 |
| 177 | +--------------------- |
| 178 | + |
| 179 | +- Odoo 15 migration |
| 180 | + |
| 181 | +14.0.1.0.0 2021-12-10 |
| 182 | +--------------------- |
| 183 | + |
| 184 | +- Odoo 14 migration |
| 185 | + |
| 186 | +13.0.1.0.0 2020-04-10 |
| 187 | +--------------------- |
| 188 | + |
| 189 | +- Odoo 13 migration, add authorization code flow. |
| 190 | + |
| 191 | +10.0.1.0.0 2018-10-05 |
| 192 | +--------------------- |
| 193 | + |
| 194 | +- Initial implementation |
| 195 | + |
| 196 | +Bug Tracker |
| 197 | +=========== |
| 198 | + |
| 199 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_. |
| 200 | +In case of trouble, please check there if your issue has already been reported. |
| 201 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 202 | +`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oidc%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 203 | + |
| 204 | +Do not contact contributors directly about support or help with technical issues. |
| 205 | + |
| 206 | +Credits |
| 207 | +======= |
| 208 | + |
| 209 | +Authors |
| 210 | +------- |
| 211 | + |
| 212 | +* ICTSTUDIO |
| 213 | +* André Schenkels |
| 214 | +* ACSONE SA/NV |
| 215 | + |
| 216 | +Contributors |
| 217 | +------------ |
| 218 | + |
| 219 | +- Alexandre Fayolle < [email protected]> |
| 220 | +- Stéphane Bidoul < [email protected]> |
| 221 | + |
| 222 | +- Andreas Perhab < [email protected]> |
| 223 | + |
| 224 | +Maintainers |
| 225 | +----------- |
| 226 | + |
| 227 | +This module is maintained by the OCA. |
| 228 | + |
| 229 | +.. image:: https://odoo-community.org/logo.png |
| 230 | + :alt: Odoo Community Association |
| 231 | + :target: https://odoo-community.org |
| 232 | + |
| 233 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 234 | +mission is to support the collaborative development of Odoo features and |
| 235 | +promote its widespread use. |
| 236 | + |
| 237 | +.. |maintainer-sbidoul| image:: https://github.com/sbidoul.png?size=40px |
| 238 | + :target: https://github.com/sbidoul |
| 239 | + :alt: sbidoul |
| 240 | + |
| 241 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 242 | + |
| 243 | +|maintainer-sbidoul| |
| 244 | + |
| 245 | +This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/18.0/auth_oidc>`_ project on GitHub. |
| 246 | + |
| 247 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments