diff --git a/CONTRIBUTORS b/CONTRIBUTORS deleted file mode 100644 index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_Q09OVFJJQlVUT1JT..0000000000000000000000000000000000000000 --- a/CONTRIBUTORS +++ /dev/null @@ -1,7 +0,0 @@ -by order of appearance: - - - Florent Aide, <florent.aide@xcg-consulting.fr> - - Vincent Hatakeyama, <vincent.hatakeyama@xcg-consulting.fr> - - Alexandre Brun, <alexandre.brun@xcg-consulting.fr> - - Jeremy Co Kim Len, <jeremy.cokimlen@vinci-concessions.com> - - Houzefa Abbasbhay <houzefa.abba@xcg-consulting.fr> diff --git a/LICENSE b/LICENSE index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_TElDRU5TRQ==..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_TElDRU5TRQ== 100644 --- a/LICENSE +++ b/LICENSE @@ -1,10 +1,3 @@ -This module is covered by the Gnu Affero General Public License. -It is copyright XGC Consulting SAS. - -A copy of the full licence is provided below. - -====================================================================== - GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 diff --git a/NEWS b/NEWS.rst similarity index 100% rename from NEWS rename to NEWS.rst diff --git a/README b/README.rst similarity index 11% rename from README rename to README.rst index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_UkVBRE1F..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_UkVBRE1FLnJzdA== 100644 --- a/README +++ b/README.rst @@ -1,3 +1,15 @@ -### README ### +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +==================== +SAML2 authentication +==================== + +Let users log into Odoo via an SAML2 provider. + +This module allows to deport the management of users and passwords in an +external authentication system to provide SSO functionality (Single Sign On) +between Odoo and other applications of your ecosystem. @@ -2,7 +14,7 @@ -### Authentification SAML for Odoo/OpenERP ### - -This is a module for odoo/OpenERP 7. It provides authentification via SAML. +WARNING: this module requires auth_crypt. This is because you still have the + option if not recommended to allow users to have a password stored in odoo + at the same time as having a SALM provider and id. @@ -7,9 +19,5 @@ -This module allows to deport the management of users and passwords in an -external authentication system to provide SSO functionality (Single Sign On ) -between Odoo and other applications of your ecosystem. - Benefits ======== @@ -19,5 +27,47 @@ * Centralizing authentication systems. -* Securing all input levels / exit / access to multiple systems without prompting users. +* Securing all input levels / exit / access to multiple systems without + prompting users. + +* The centralization of access control information for compliance testing to + different standards. + + +Installation +============ + +Install as you would install any Odoo addon. + +Dependencies +------------ + +This addon requires `lasso`_. + +.. _lasso: http://lasso.entrouvert.org + + +Configuration +============= + +There are SAML-related settings in Configuration > General settings. + + +Usage +===== + +To use this module, you need an authentic2 server, properly set up. +Read the doc at documentation/index.rst for more information. + + +Demo +==== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/149/8.0 + + +Known issues / Roadmap +====================== @@ -23,2 +73,45 @@ -* The centralization of access control information for compliance testing to different standards. +None for now. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues <https://github.com/OCA/ +{project_repo}/issues>`_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/ +{project_repo}/issues/new?body=module:%20 +{module_name}%0Aversion:%20 +{version}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. + + +Credits +======= + +Contributors +------------ + +In order of appearance: + + - Florent Aide, <florent.aide@xcg-consulting.fr> + - Vincent Hatakeyama, <vincent.hatakeyama@xcg-consulting.fr> + - Alexandre Brun, <alexandre.brun@xcg-consulting.fr> + - Jeremy Co Kim Len, <jeremy.cokimlen@vinci-concessions.com> + - Houzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr> + + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/__init__.py b/__init__.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_X19pbml0X18ucHk=..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_X19pbml0X18ucHk= 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,4 @@ # flake8: noqa -import controllers -import model +from . import controllers +from . import model diff --git a/__openerp__.py b/__openerp__.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_X19vcGVuZXJwX18ucHk=..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_X19vcGVuZXJwX18ucHk= 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # Saml2 Authentication for Odoo -# Copyright (C) 2010-2015 XCG Consulting <http://odoo.consulting> +# Copyright (C) 2010-2016 XCG Consulting <http://odoo.consulting> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -24,25 +24,6 @@ 'name': 'Saml2 Authentication', 'version': '3.0', 'category': 'Tools', - 'description': """ -Allow users to login through Saml2 Provider. -============================================ - -WARNING: this module requires auth_crypt. This is because you still have the - option if not recommended to allow users to have a password stored in odoo - at the same time as having a SALM provider and id. - -This module is covered by the GNU Affero General Public License, version 3 or -later. - -The full source code and history can always be downloaded, modified -and redistributed from here: - - https://bitbucket.org/xcg/auth_saml/ - or - https://github.com/xcgd/auth_saml - -""", - 'author': 'XCG Consulting s.a.s.', - 'maintainer': 'XCG Consulting s.a.s.', + 'author': 'XCG Consulting, Odoo Community Association (OCA)', + 'maintainer': 'XCG Consulting', 'website': 'http://odoo.consulting', @@ -48,4 +29,5 @@ 'website': 'http://odoo.consulting', + 'license': 'AGPL-3', 'depends': [ 'base', 'base_setup', diff --git a/controllers/__init__.py b/controllers/__init__.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_Y29udHJvbGxlcnMvX19pbml0X18ucHk=..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_Y29udHJvbGxlcnMvX19pbml0X18ucHk= 100644 --- a/controllers/__init__.py +++ b/controllers/__init__.py @@ -1,5 +1,3 @@ # flake8: noqa -import main - -# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4: +from . import main diff --git a/controllers/main.py b/controllers/main.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_Y29udHJvbGxlcnMvbWFpbi5weQ==..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_Y29udHJvbGxlcnMvbWFpbi5weQ== 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import functools import logging @@ -43,6 +45,8 @@ # ---------------------------------------------------------- # Controller # ---------------------------------------------------------- + + class SAMLLogin(openerp.addons.web.controllers.main.Home): def list_providers(self): diff --git a/model/__init__.py b/model/__init__.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_bW9kZWwvX19pbml0X18ucHk=..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_bW9kZWwvX19pbml0X18ucHk= 100644 --- a/model/__init__.py +++ b/model/__init__.py @@ -1,6 +1,6 @@ # flake8: noqa -import auth_saml -import base_settings -import res_users -import saml_token +from . import auth_saml +from . import base_settings +from . import res_users +from . import saml_token diff --git a/model/auth_saml.py b/model/auth_saml.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_bW9kZWwvYXV0aF9zYW1sLnB5..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_bW9kZWwvYXV0aF9zYW1sLnB5 100644 --- a/model/auth_saml.py +++ b/model/auth_saml.py @@ -1,7 +1,5 @@ -# -*- encoding: utf-8 -*- -from openerp import models -from openerp import api -from openerp import fields +# -*- coding: utf-8 -*- + import lasso import simplejson @@ -5,4 +3,7 @@ import lasso import simplejson +from openerp import api +from openerp import fields +from openerp import models @@ -8,5 +9,6 @@ -class auth_saml_provider(models.Model): + +class AuthSamlProvider(models.Model): """Class defining the configuration values of an Saml2 provider""" _name = 'auth.saml.provider' diff --git a/model/base_settings.py b/model/base_settings.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_bW9kZWwvYmFzZV9zZXR0aW5ncy5weQ==..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_bW9kZWwvYmFzZV9zZXR0aW5ncy5weQ== 100644 --- a/model/base_settings.py +++ b/model/base_settings.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from openerp import fields from openerp import models from openerp import api @@ -6,7 +8,7 @@ _SAML_UID_AND_PASS_SETTING = 'auth_saml.allow_saml.uid_and_internal_password' -class base_settings(models.TransientModel): +class BaseSettings(models.TransientModel): """Inherit from base.config.settings to add a setting. This is only here for easier access; the setting is not actually stored by this (transient) collection. Instead, it is kept in sync with the diff --git a/model/res_users.py b/model/res_users.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_bW9kZWwvcmVzX3VzZXJzLnB5..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_bW9kZWwvcmVzX3VzZXJzLnB5 100644 --- a/model/res_users.py +++ b/model/res_users.py @@ -1,4 +1,5 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- + import logging # this is our very own dependency import lasso diff --git a/model/saml_token.py b/model/saml_token.py index 5603ce2ebeac7da63283fe880a2cccbe96eb95ba_bW9kZWwvc2FtbF90b2tlbi5weQ==..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_bW9kZWwvc2FtbF90b2tlbi5weQ== 100644 --- a/model/saml_token.py +++ b/model/saml_token.py @@ -1,5 +1,4 @@ -# -*- encoding: utf-8 -*- -__author__ = 'faide' +# -*- coding: utf-8 -*- import logging from openerp import fields @@ -8,7 +7,7 @@ _logger = logging.getLogger(__name__) -class saml_token(models.Model): +class SamlToken(models.Model): _name = "auth_saml.token" _rec_name = "user_id" diff --git a/static/description/index.html b/static/description/index.html new file mode 100755 index 0000000000000000000000000000000000000000..94e857380fc98137fa5d662622b3b7b8a4cc6ff3_c3RhdGljL2Rlc2NyaXB0aW9uL2luZGV4Lmh0bWw= --- /dev/null +++ b/static/description/index.html @@ -0,0 +1,82 @@ +<a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><object data="https://img.shields.io/badge/licence-AGPL--3-blue.svg" type="image/svg+xml">License: AGPL-3</object></a> +<div class="section" id="saml2-authentication"> +<h1>SAML2 authentication</h1> +<p>Let users log into Odoo via an SAML2 provider.</p> +<p>This module allows to deport the management of users and passwords in an +external authentication system to provide SSO functionality (Single Sign On) +between Odoo and other applications of your ecosystem.</p> +<dl class="docutils"> +<dt>WARNING: this module requires auth_crypt. This is because you still have the</dt> +<dd>option if not recommended to allow users to have a password stored in odoo +at the same time as having a SALM provider and id.</dd> +</dl> +<div class="section" id="benefits"> +<h2>Benefits</h2> +<ul class="simple"> +<li>Reducing the time spent typing different passwords for different accounts.</li> +<li>Reducing the time spent in IT support for password oversights.</li> +<li>Centralizing authentication systems.</li> +<li>Securing all input levels / exit / access to multiple systems without +prompting users.</li> +<li>The centralization of access control information for compliance testing to +different standards.</li> +</ul> +</div> +<div class="section" id="installation"> +<h2>Installation</h2> +<p>Install as you would install any Odoo addon.</p> +<div class="section" id="dependencies"> +<h3>Dependencies</h3> +<p>This addon requires <a class="reference external" href="http://lasso.entrouvert.org">lasso</a>.</p> +</div> +</div> +<div class="section" id="configuration"> +<h2>Configuration</h2> +<p>There are SAML-related settings in Configuration > General settings.</p> +</div> +<div class="section" id="usage"> +<h2>Usage</h2> +<p>To use this module, you need an authentic2 server, properly set up. +Read the doc at documentation/index.rst for more information.</p> +</div> +<div class="section" id="demo"> +<h2>Demo</h2> +<a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/149/8.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> +</div> +<div class="section" id="known-issues-roadmap"> +<h2>Known issues / Roadmap</h2> +<p>None for now.</p> +</div> +<div class="section" id="bug-tracker"> +<h2>Bug Tracker</h2> +<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/{project_repo}/issues">GitHub Issues</a>. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback <a class="reference external" href="https://github.com/OCA/{project_repo}/issues/new?body=module:%20{module_name}%0Aversion:%20{version}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">here</a>.</p> +</div> +<div class="section" id="credits"> +<h2>Credits</h2> +<div class="section" id="contributors"> +<h3>Contributors</h3> +<p>In order of appearance:</p> +<blockquote> +<ul class="simple"> +<li>Florent Aide, <<a class="reference external" href="mailto:florent.aide@xcg-consulting.fr">florent.aide@xcg-consulting.fr</a>></li> +<li>Vincent Hatakeyama, <<a class="reference external" href="mailto:vincent.hatakeyama@xcg-consulting.fr">vincent.hatakeyama@xcg-consulting.fr</a>></li> +<li>Alexandre Brun, <<a class="reference external" href="mailto:alexandre.brun@xcg-consulting.fr">alexandre.brun@xcg-consulting.fr</a>></li> +<li>Jeremy Co Kim Len, <<a class="reference external" href="mailto:jeremy.cokimlen@vinci-concessions.com">jeremy.cokimlen@vinci-concessions.com</a>></li> +<li>Houzéfa Abbasbhay <<a class="reference external" href="mailto:houzefa.abba@xcg-consulting.fr">houzefa.abba@xcg-consulting.fr</a>></li> +</ul> +</blockquote> +</div> +<div class="section" id="maintainer"> +<h3>Maintainer</h3> +<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> +<p>This module is maintained by the OCA.</p> +<p>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.</p> +<p>To contribute to this module, please visit <a class="reference external" href="http://odoo-community.org">http://odoo-community.org</a>.</p> +</div> +</div> +</div> +</div>