Allow users to login through OpenID Connect Provider
Project description
This module allows users to login through an OpenID Connect provider using the authorization code flow or implicit flow.
Note the implicit flow is not recommended because it exposes access tokens to the browser and in http logs.
Table of contents
Installation
This module depends on the python-jose library, not to be confused with jose which is also available on PyPI.
Configuration
Setup for Microsoft Azure
Example configuration with OpenID Connect implicit flow. This configuration is not recommended because it exposes the access token to the client, and in logs.
- # configure a new web application in Azure with OpenID and implicit flow (see
- # in this application the redirect url must be be “<url of your
server>/auth_oauth/signin” and of course this URL should be reachable from Azure
- # create a new authentication provider in Odoo with the following
parameters (see the portal documentation for more information):
Provider Name: Azure
Auth Flow: OpenID Connect
Client ID: use the value of the OAuth2 autorization endoing (v2) from the Azure Endpoints list
Body: Azure SSO
Authentication URL: use the value of “OAuth2 autorization endpoint (v2)” from the Azure endpoints list
Scope: openid email
Validation URL: use the value of “OAuth2 token endpoint (v2)” from the Azure endpoints list
Allowed: yes
Setup for Keycloak
Example configuration with OpenID Connect authorization code flow.
In Keycloak:
# configure a new Client # make sure Authorization Code Flow is Enabled. # configure the client Access Type as “confidential” and take note of the client secret in the Credentials tab # configure the redirect url to be “<url of your server>/auth_oauth/signin”
In Odoo, create a new Oauth Provider with the following parameters:
Provider name: Keycloak (or any name you like that identify your keycloak provider)
Auth Flow: OpenID Connect (authorization code flow)
Client ID: the same Client ID you entered when configuring the client in Keycloak
Client Secret: found in keycloak on the client Credentials tab
Allowed: yes
Body: the link text to appear on the login page, such as Login with Keycloak
Scope: openid email
Authentication URL: The “authorization_endpoint” URL found in the OpenID Endpoint Configuration of your Keycloak realm
Token URL: The “token_endpoint” URL found in the OpenID Endpoint Configuration of your Keycloak realm
JWKS URL: The “jwks_uri” URL found in the OpenID Endpoint Configuration of your Keycloak realm
Usage
On the login page, click on the authentication provider you configured.
Known issues / Roadmap
When going to the login screen, check for a existing token and do a direct login without the clicking on the SSO link
When doing a logout an extra option to also logout at the SSO provider.
Changelog
13.0.1.1.0 2023-11-20
Forward port OpenID Connect fixes from 12.0 to 13.0
13.0.1.0.1 2021-06-25
Updated readme and pot
13.0.1.0.0 2020-04-10
Odoo 13 migration, add authorization code flow.
10.0.1.0.0 2018-10-05
Initial implementation
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
Stéphane Bidoul <stephane.bidoul@acsone.eu>
Andreas Perhab <andreas.perhab@wt-io-it.at>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/server-auth project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo13_addon_auth_oidc-13.0.1.1.1-py3-none-any.whl
.
File metadata
- Download URL: odoo13_addon_auth_oidc-13.0.1.1.1-py3-none-any.whl
- Upload date:
- Size: 41.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d0945a1800556904638811854b220ff39a980725269a75d60ae4f03a8caa2f8 |
|
MD5 | 0ef83cfad84b2015d5d891b52100958c |
|
BLAKE2b-256 | 7b3f5137fbf3b7a64e2c5e9bbc1e328eb30ed5ede2d6ab8948729c88c8b9422b |