diff --git a/auth_oidc/README.rst b/auth_oidc/README.rst index a0ca767c5e..5d551ee657 100644 --- a/auth_oidc/README.rst +++ b/auth_oidc/README.rst @@ -7,7 +7,7 @@ Authentication OpenID Connect !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:bdea2939597996bddfbd2c7949c8da2ad701b61203c3fd62c0c640bb5721eaf1 + !! source digest: sha256:a54c4126f9873d2af17b9228f9afa844806a2541b42dc7945ec41be08379a915 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -28,11 +28,11 @@ Authentication OpenID Connect |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows users to login through an OpenID Connect provider using the -authorization code flow or implicit flow. +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. +Note the implicit flow is not recommended because it exposes access +tokens to the browser and in http logs. **Table of contents** @@ -42,80 +42,90 @@ the browser and in http logs. Installation ============ -This module depends on the `python-jose `__ -library, not to be confused with ``jose`` which is also available on PyPI. +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 authorization code flow. -# configure a new web application in Azure with OpenID and code flow (see - the `provider documentation - `_) -# in this application the redirect url must be be "/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): +1. configure a new web application in Azure with OpenID and code flow + (see the `provider + documentation `__)) -.. image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/oauth-microsoft_azure-api_permissions.png +2. in this application the redirect url must be be "/auth_oauth/signin" and of course this URL should be reachable + from Azure -.. image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/oauth-microsoft_azure-optional_claims.png +3. create a new authentication provider in Odoo with the following + parameters (see the `portal + documentation `__ + for more information): -Single tenant provider limits the access to user of your tenant, -while Multitenants allow access for all AzureAD users, so user of foreign companies can use their AzureAD login -without an guest account. +|image| -* Provider Name: Azure AD Single Tenant -* Client ID: Application (client) id -* Client Secret: Client secret -* Allowed: yes +|image1| -or +Single tenant provider limits the access to user of your tenant, while +Multitenants allow access for all AzureAD users, so user of foreign +companies can use their AzureAD login without an guest account. + +- Provider Name: Azure AD Single Tenant +- Client ID: Application (client) id +- Client Secret: Client secret +- Allowed: yes -* Provider Name: Azure AD Multitenant -* Client ID: Application (client) id -* Client Secret: Client secret -* Allowed: yes -* replace {tenant_id} in urls with your Azure tenant id +or -.. image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/odoo-azure_ad_multitenant.png +- Provider Name: Azure AD Multitenant +- Client ID: Application (client) id +- Client Secret: Client secret +- Allowed: yes +- replace {tenant_id} in urls with your Azure tenant id +|image2| 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 "/auth_oauth/signin" +1. configure a new Client +2. make sure Authorization Code Flow is Enabled. +3. configure the client Access Type as "confidential" and take note of + the client secret in the Credentials tab +4. configure the redirect url to be "/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 +- 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 + +.. |image| image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/static/description/oauth-microsoft_azure-api_permissions.png +.. |image1| image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/static/description/oauth-microsoft_azure-optional_claims.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/static/description/odoo-azure_ad_multitenant.png Usage ===== @@ -125,26 +135,28 @@ 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. +- 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 ========= 14.0.1.0.0 2021-12-10 -~~~~~~~~~~~~~~~~~~~~~ +--------------------- -* Odoo 14 migration +- Odoo 14 migration 13.0.1.0.0 2020-04-10 -~~~~~~~~~~~~~~~~~~~~~ +--------------------- -* Odoo 13 migration, add authorization code flow. +- Odoo 13 migration, add authorization code flow. 10.0.1.0.0 2018-10-05 -~~~~~~~~~~~~~~~~~~~~~ +--------------------- -* Initial implementation +- Initial implementation Bug Tracker =========== @@ -160,21 +172,21 @@ Credits ======= Authors -~~~~~~~ +------- * ICTSTUDIO * André Schenkels * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Alexandre Fayolle -* Stéphane Bidoul -* David Jaen +- Alexandre Fayolle +- Stéphane Bidoul +- David Jaen Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. diff --git a/auth_oidc/__manifest__.py b/auth_oidc/__manifest__.py index 1d4a3e1a7a..4e855e6f73 100644 --- a/auth_oidc/__manifest__.py +++ b/auth_oidc/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Authentication OpenID Connect", - "version": "16.0.1.0.1", + "version": "16.0.1.0.2", "license": "AGPL-3", "author": ( "ICTSTUDIO, André Schenkels, " diff --git a/auth_oidc/readme/CONFIGURE.md b/auth_oidc/readme/CONFIGURE.md new file mode 100644 index 0000000000..275e4c0a20 --- /dev/null +++ b/auth_oidc/readme/CONFIGURE.md @@ -0,0 +1,72 @@ +## Setup for Microsoft Azure + +Example configuration with OpenID Connect authorization code flow. + +1. configure a new web application in Azure with OpenID and code flow (see +the [provider +documentation](https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/configure-openid-provider))) + +2. in this application the redirect url must be be "\/auth_oauth/signin" and of course this URL should be reachable +from Azure + +3. create a new authentication provider in Odoo with the following +parameters (see the [portal +documentation](https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/configure-openid-settings) +for more information): + +![image](../static/description/oauth-microsoft_azure-api_permissions.png) + +![image](../static/description/oauth-microsoft_azure-optional_claims.png) + +Single tenant provider limits the access to user of your tenant, while +Multitenants allow access for all AzureAD users, so user of foreign +companies can use their AzureAD login without an guest account. + +- Provider Name: Azure AD Single Tenant +- Client ID: Application (client) id +- Client Secret: Client secret +- Allowed: yes + +or + +- Provider Name: Azure AD Multitenant +- Client ID: Application (client) id +- Client Secret: Client secret +- Allowed: yes +- replace {tenant_id} in urls with your Azure tenant id + +![image](../static/description/odoo-azure_ad_multitenant.png) + +## Setup for Keycloak + +Example configuration with OpenID Connect authorization code flow. + +In Keycloak: + +1. configure a new Client +2. make sure Authorization Code Flow is +Enabled. +3. configure the client Access Type as "confidential" and take +note of the client secret in the Credentials tab +4. configure the +redirect url to be "\/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 diff --git a/auth_oidc/readme/CONFIGURE.rst b/auth_oidc/readme/CONFIGURE.rst deleted file mode 100644 index 64734fe209..0000000000 --- a/auth_oidc/readme/CONFIGURE.rst +++ /dev/null @@ -1,68 +0,0 @@ -Setup for Microsoft Azure -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Example configuration with OpenID Connect authorization code flow. - -# configure a new web application in Azure with OpenID and code flow (see - the `provider documentation - `_) -# in this application the redirect url must be be "/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): - -.. image:: ..static/description/oauth-microsoft_azure-api_permissions.png - -.. image:: ..static/description/oauth-microsoft_azure-optional_claims.png - -Single tenant provider limits the access to user of your tenant, -while Multitenants allow access for all AzureAD users, so user of foreign companies can use their AzureAD login -without an guest account. - -* Provider Name: Azure AD Single Tenant -* Client ID: Application (client) id -* Client Secret: Client secret -* Allowed: yes - -or - -* Provider Name: Azure AD Multitenant -* Client ID: Application (client) id -* Client Secret: Client secret -* Allowed: yes -* replace {tenant_id} in urls with your Azure tenant id - -.. image:: ..static/description/odoo-azure_ad_multitenant.png - - -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 "/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 diff --git a/auth_oidc/readme/CONTRIBUTORS.md b/auth_oidc/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..5663785334 --- /dev/null +++ b/auth_oidc/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Alexandre Fayolle \<\> +- Stéphane Bidoul \<\> +- David Jaen \<\> diff --git a/auth_oidc/readme/CONTRIBUTORS.rst b/auth_oidc/readme/CONTRIBUTORS.rst deleted file mode 100644 index 303011adb2..0000000000 --- a/auth_oidc/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,3 +0,0 @@ -* Alexandre Fayolle -* Stéphane Bidoul -* David Jaen diff --git a/auth_oidc/readme/DESCRIPTION.rst b/auth_oidc/readme/DESCRIPTION.md similarity index 56% rename from auth_oidc/readme/DESCRIPTION.rst rename to auth_oidc/readme/DESCRIPTION.md index ae89dd9d73..3677c8bbaa 100644 --- a/auth_oidc/readme/DESCRIPTION.rst +++ b/auth_oidc/readme/DESCRIPTION.md @@ -1,5 +1,5 @@ -This module allows users to login through an OpenID Connect provider using the -authorization code flow or implicit flow. +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. +Note the implicit flow is not recommended because it exposes access +tokens to the browser and in http logs. diff --git a/auth_oidc/readme/HISTORY.md b/auth_oidc/readme/HISTORY.md new file mode 100644 index 0000000000..98e99203b8 --- /dev/null +++ b/auth_oidc/readme/HISTORY.md @@ -0,0 +1,11 @@ +## 14.0.1.0.0 2021-12-10 + +- Odoo 14 migration + +## 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 diff --git a/auth_oidc/readme/HISTORY.rst b/auth_oidc/readme/HISTORY.rst deleted file mode 100644 index 33b336582e..0000000000 --- a/auth_oidc/readme/HISTORY.rst +++ /dev/null @@ -1,14 +0,0 @@ -14.0.1.0.0 2021-12-10 -~~~~~~~~~~~~~~~~~~~~~ - -* Odoo 14 migration - -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 diff --git a/auth_oidc/readme/INSTALL.md b/auth_oidc/readme/INSTALL.md new file mode 100644 index 0000000000..37af7b9c93 --- /dev/null +++ b/auth_oidc/readme/INSTALL.md @@ -0,0 +1,3 @@ +This module depends on the +[python-jose](https://pypi.org/project/python-jose/) library, not to be +confused with `jose` which is also available on PyPI. diff --git a/auth_oidc/readme/INSTALL.rst b/auth_oidc/readme/INSTALL.rst deleted file mode 100644 index bccbbbad79..0000000000 --- a/auth_oidc/readme/INSTALL.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module depends on the `python-jose `__ -library, not to be confused with ``jose`` which is also available on PyPI. diff --git a/auth_oidc/readme/ROADMAP.md b/auth_oidc/readme/ROADMAP.md new file mode 100644 index 0000000000..712da2fde6 --- /dev/null +++ b/auth_oidc/readme/ROADMAP.md @@ -0,0 +1,4 @@ +- 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. diff --git a/auth_oidc/readme/ROADMAP.rst b/auth_oidc/readme/ROADMAP.rst deleted file mode 100644 index 6a95f19054..0000000000 --- a/auth_oidc/readme/ROADMAP.rst +++ /dev/null @@ -1,2 +0,0 @@ -* 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. diff --git a/auth_oidc/readme/USAGE.rst b/auth_oidc/readme/USAGE.md similarity index 100% rename from auth_oidc/readme/USAGE.rst rename to auth_oidc/readme/USAGE.md diff --git a/auth_oidc/static/description/index.html b/auth_oidc/static/description/index.html index 6ff3594f3c..40f1cb7ce6 100644 --- a/auth_oidc/static/description/index.html +++ b/auth_oidc/static/description/index.html @@ -367,13 +367,13 @@

Authentication OpenID Connect

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:bdea2939597996bddfbd2c7949c8da2ad701b61203c3fd62c0c640bb5721eaf1 +!! source digest: sha256:a54c4126f9873d2af17b9228f9afa844806a2541b42dc7945ec41be08379a915 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runboat

-

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.

+

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

    @@ -402,29 +402,32 @@

    Authentication OpenID Connect

Installation

-

This module depends on the python-jose -library, not to be confused with jose which is also available on PyPI.

+

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 authorization code flow.

-
-
# configure a new web application in Azure with OpenID and code flow (see
-
the provider documentation)
-
# 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):
-
-https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/oauth-microsoft_azure-api_permissions.png -https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/oauth-microsoft_azure-optional_claims.png -

Single tenant provider limits the access to user of your tenant, -while Multitenants allow access for all AzureAD users, so user of foreign companies can use their AzureAD login -without an guest account.

+
    +
  1. configure a new web application in Azure with OpenID and code flow +(see the provider +documentation))
  2. +
  3. 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
  4. +
  5. create a new authentication provider in Odoo with the following +parameters (see the portal +documentation +for more information):
  6. +
+

image

+

image1

+

Single tenant provider limits the access to user of your tenant, while +Multitenants allow access for all AzureAD users, so user of foreign +companies can use their AzureAD login without an guest account.

  • Provider Name: Azure AD Single Tenant
  • Client ID: Application (client) id
  • @@ -439,32 +442,38 @@

    Setup for Microsoft Azure

    Allowed: yes
  • replace {tenant_id} in urls with your Azure tenant id
-https://raw.githubusercontent.com/OCA/server-auth/16.0/auth_oidc/..static/description/odoo-azure_ad_multitenant.png +

image2

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”

+
    +
  1. configure a new Client
  2. +
  3. make sure Authorization Code Flow is Enabled.
  4. +
  5. configure the client Access Type as “confidential” and take note of +the client secret in the Credentials tab
  6. +
  7. configure the redirect url to be “<url of your +server>/auth_oauth/signin”
  8. +

In Odoo, create a new Oauth Provider with the following parameters:

    -
  • Provider name: Keycloak (or any name you like that identify your keycloak -provider)
  • +
  • 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 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
  • +
  • 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
  • +
  • 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
@@ -475,8 +484,10 @@

Usage

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.
  • +
  • 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.