Metadata-Version: 2.1
Name: invenio-shibboleth
Version: 1.0.4
Summary: Invenio module module that provides SAML integration.
Home-page: https://github.com/tu-graz-library/invenio-shibboleth
Author: Mojib Wali
Author-email: mb_wali@hotmail.com
License: MIT
Keywords: invenio TODO
Platform: any
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Development Status :: 3 - Alpha
Requires-Dist: python3-saml (>=1.5.0)
Requires-Dist: invenio-oauthclient (>=1.4.1)
Requires-Dist: invenio-accounts (>=1.4.0)
Requires-Dist: idna (<3,>=2.5)
Provides-Extra: all
Requires-Dist: Sphinx (>=3) ; extra == 'all'
Requires-Dist: pytest-invenio (>=1.4.1) ; extra == 'all'
Requires-Dist: invenio-app (<2.0.0,>=1.3.0) ; extra == 'all'
Requires-Dist: invenio-mail (>=1.0.0) ; extra == 'all'
Requires-Dist: invenio-userprofiles (>=1.0.0) ; extra == 'all'
Requires-Dist: redis (>=2.10.5) ; extra == 'all'
Requires-Dist: mock (>=2.0.0) ; extra == 'all'
Requires-Dist: psycopg2-binary (>=2.8.6) ; extra == 'all'
Provides-Extra: docs
Requires-Dist: Sphinx (>=3) ; extra == 'docs'
Provides-Extra: mysql
Requires-Dist: invenio-db[mysql,versioning] (<1.1.0,>=1.0.9) ; extra == 'mysql'
Provides-Extra: postgresql
Requires-Dist: invenio-db[postgresql,versioning] (<1.1.0,>=1.0.9) ; extra == 'postgresql'
Provides-Extra: sqlite
Requires-Dist: invenio-db[versioning] (<1.1.0,>=1.0.9) ; extra == 'sqlite'
Provides-Extra: tests
Requires-Dist: pytest-invenio (>=1.4.1) ; extra == 'tests'
Requires-Dist: invenio-app (<2.0.0,>=1.3.0) ; extra == 'tests'
Requires-Dist: invenio-mail (>=1.0.0) ; extra == 'tests'
Requires-Dist: invenio-userprofiles (>=1.0.0) ; extra == 'tests'
Requires-Dist: redis (>=2.10.5) ; extra == 'tests'
Requires-Dist: mock (>=2.0.0) ; extra == 'tests'
Requires-Dist: psycopg2-binary (>=2.8.6) ; extra == 'tests'

..
    Copyright (C) 2020 CERN.
    Copyright (C) 2020 TU Graz.

    invenio-shibboleth is free software; you can redistribute it and/or
    modify it under the terms of the MIT License; see LICENSE file for more
    details.

====================
 invenio-shibboleth
====================

.. image:: https://github.com/tu-graz-library/invenio-shibboleth/workflows/CI/badge.svg
        :target: https://github.com/tu-graz-library/invenio-shibboleth/actions

.. image:: https://img.shields.io/coveralls/mb-wali/invenio-shibboleth.svg
        :target: https://coveralls.io/r/mb-wali/invenio-shibboleth

.. image:: https://img.shields.io/github/tag/tu-graz-library/invenio-shibboleth.svg
        :target: https://github.com/tu-graz-library/invenio-shibboleth/releases

.. image:: https://img.shields.io/pypi/dm/invenio-shibboleth.svg
        :target: https://pypi.python.org/pypi/invenio-shibboleth

.. image:: https://img.shields.io/github/license/tu-graz-library/invenio-shibboleth.svg
        :target: https://github.com/tu-graz-library/invenio-shibboleth/blob/master/LICENSE

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black

Invenio module that provides SAML integration.

These two modules has been merged into one:

* ``invenio-saml`` Further documentation is available on https://invenio-saml.readthedocs.io/
* ``flask-sso-saml`` Further documentation is available on https://flask-sso-saml.readthedocs.io/

====================
 Installation
====================
*First of all you need some packages, execute:*

``apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl``

*Install*

``pip install invenio-shibboleth``

====================
Configuration
====================

``from invenio_shibboleth.handlers import acs_handler_factory``

.. code:: python

   SSO_SAML_IDPS = {
    "onelogin": {
                # settings_file_path can be either json or xml.
		"settings_file_path": "./saml/onelogin/onelogin.json",
		"sp_cert_file": "./saml/onelogin/cert/sp.crt",
		"sp_key_file": "./saml/onelogin/cert/sp.key",

        "settings": {
            "sp": {
                "NameIDFormat': "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
            },
            "security": {
                "authnRequestsSigned": False,
                "failOnAuthnContextMismatch": False,
                "logoutRequestSigned": False,
                "logoutResponseSigned": False,
                "metadataCacheDuration": None,
                "metadataValidUntil": None,
                "nameIdEncrypted": False,
                "requestedAuthnContext": False,
                "requestedAuthnContextComparison": "exact",
                "signMetadata": False,
                "signatureAlgorithm":
                    "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
                "wantAssertionsEncrypted": False,
                "wantAssertionsSigned": False,
                "wantAttributeStatement": False,
                "wantMessagesSigned": False,
                "wantNameId": True,
                "wantNameIdEncrypted": False,
                "digestAlgorithm":
                    "http://www.w3.org/2001/04/xmlenc#sha256"
            },
        },

          "mappings": {
            # invenio  #origin
            "email": "email",
            "name": "username",
            "surname": "full_name",
            "external_id": "external_id",
        },

        "acs_handler": acs_handler_factory("onelogin"),

          },

           }

Further documentation is available on
https://invenio-shibboleth.readthedocs.io/


..
    Copyright (C) 2020 CERN.
    Copyright (C) 2020 TU Graz.

    invenio-shibboleth is free software; you can redistribute it and/or
    modify it under the terms of the MIT License; see LICENSE file for more
    details.

Changes
=======

Version 0.1.0 (released TBD)

- Initial public release.


