From 685f785341c6969bac44a0c0c0325690ecf90942 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 2 Jun 2021 14:38:57 +0200 Subject: [PATCH 1/5] fix: little things in Documentations and setup.py --- docs/source/contents/conf.rst | 73 +++++++++++++++-------------------- setup.py | 5 ++- 2 files changed, 35 insertions(+), 43 deletions(-) diff --git a/docs/source/contents/conf.rst b/docs/source/contents/conf.rst index d12ba6e1..f95eae14 100644 --- a/docs/source/contents/conf.rst +++ b/docs/source/contents/conf.rst @@ -13,7 +13,7 @@ The issuer ID of the OP, a unique value in URI format. session params -------------- -Configuration parameters used by session manager +Configuration parameters used by session manager:: "session_params": { "password": "__password_used_to_encrypt_access_token_sid_value", @@ -32,19 +32,26 @@ Configuration parameters used by session manager } } } - }, + }, + password ######## -Encryption key used to encrypt the SessionID (sid) in access_token. +Optional. Encryption key used to encrypt the SessionID (sid) in access_token. If unset it will be random. salt #### -Salt, value or filename, used in sub_funcs (pairwise, public) for creating the opaque hash of *sub* claim. +Optional. Salt, value or filename, used in sub_funcs (pairwise, public) for creating the opaque hash of *sub* claim. + + +sub_funcs +######### + +Optional. Functions involved in *sub*ject value creation. ------ add_on @@ -149,46 +156,30 @@ An example:: backchannel_logout_session_supported: True check_session_iframe: https://127.0.0.1:5000/check_session_iframe - ------------ -cookie_name ------------ - -An example:: - - "cookie_name": { - "session": "oidc_op", - "register": "oidc_op_rp", - "session_management": "sman" - }, - -------------- -cookie_dealer -------------- +-------------- +cookie_handler +-------------- An example:: - "cookie_dealer": { - "class": "oidcop.cookie.CookieDealer", - "kwargs": { - "sign_jwk": { - "filename": "private/cookie_sign_jwk.json", - "type": "OCT", - "kid": "cookie_sign_key_id" - }, - "enc_jwk": { - "filename": "private/cookie_enc_jwk.json", - "type": "OCT", - "kid": "cookie_enc_key_id" - }, - "default_values": { - "name": "oidc_op", - "domain": "127.0.0.1", - "path": "/", - "max_age": 3600 - } + "cookie_handler": { + "class": "oidcop.cookie_handler.CookieHandler", + "kwargs": { + "keys": { + "private_path": f"{OIDC_JWKS_PRIVATE_PATH}/cookie_jwks.json", + "key_defs": [ + {"type": "OCT", "use": ["enc"], "kid": "enc"}, + {"type": "OCT", "use": ["sig"], "kid": "sig"} + ], + "read_only": False + }, + "name": { + "session": "oidc_op", + "register": "oidc_op_rp", + "session_management": "sman" + } } - }, + }, -------- endpoint @@ -444,7 +435,7 @@ An example:: "template_dir": "templates" -For any further customization of template here an example of what used in django-oidc-op +For any further customization of template here an example of what used in django-oidc-op:: "authentication": { "user": { diff --git a/setup.py b/setup.py index 8b03c90b..61cecad6 100644 --- a/setup.py +++ b/setup.py @@ -50,18 +50,19 @@ def run_tests(self): author="Roland Hedberg", author_email="roland@catalogix.se", license="Apache 2.0", - url='https://github.com/IdentityPython/oidcop', + url='https://github.com/IdentityPython/oidc-op', package_dir={"": "src"}, packages=["oidcop", 'oidcop/oidc', 'oidcop/authz', 'oidcop/user_authn', 'oidcop/user_info', 'oidcop/oauth2', 'oidcop/oidc/add_on', 'oidcop/oauth2/add_on', 'oidcop/session', 'oidcop/token'], classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules"], install_requires=[ "oidcmsg==1.3.2", From 77fb9c59a38b5d197e6666c865c474a810b82342 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 2 Jun 2021 14:42:07 +0200 Subject: [PATCH 2/5] chore: README badges for the youth --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 26c1da66..d5e0f755 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # oidc-op +![CI build](https://github.com/IdentityPython/oidc-op/workflows/oidc-op/badge.svg) +![pypi](https://img.shields.io/pypi/v/oidcop.svg) +![License](https://img.shields.io/badge/license-Apache%202-blue.svg) +![Django versions](https://img.shields.io/pypi/djversions/oidcop) +![Documentation Status](https://readthedocs.org/projects/oidcop/badge/?version=latest) +![Python version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg) + This project is a Python implementation of an **OIDC Provider** on top of [jwtconnect.io](https://jwtconnect.io/) that shows to you how to 'build' an OP using the classes and functions provided by oidc-op. If you want to add or replace functionality the official documentation should be able to tell you how. From d366cbffe797ad20a4211a2efb8ce2b9bc512772 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 2 Jun 2021 14:43:09 +0200 Subject: [PATCH 3/5] fix: pypi description --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 61cecad6..f9722022 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,8 @@ def run_tests(self): name="oidcop", version=version, description="Python implementation of OIDC Provider", + long_description=read('README.md'), + long_description_content_type='text/markdown', author="Roland Hedberg", author_email="roland@catalogix.se", license="Apache 2.0", From 1d00a5c3b948eab3f96157123ab1949d96d8879d Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 2 Jun 2021 14:47:04 +0200 Subject: [PATCH 4/5] fix: setup.py README --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f9722022..472212a4 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +import os import re import sys @@ -43,11 +44,14 @@ def run_tests(self): version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) +with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: + README = readme.read() + setup( name="oidcop", version=version, description="Python implementation of OIDC Provider", - long_description=read('README.md'), + long_description=README, long_description_content_type='text/markdown', author="Roland Hedberg", author_email="roland@catalogix.se", From fbd76f3ffcdea149c6bee6fbe95937f2803d7304 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 2 Jun 2021 14:59:08 +0200 Subject: [PATCH 5/5] fix: django badge? removed! --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d5e0f755..924fd3c0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ ![CI build](https://github.com/IdentityPython/oidc-op/workflows/oidc-op/badge.svg) ![pypi](https://img.shields.io/pypi/v/oidcop.svg) ![License](https://img.shields.io/badge/license-Apache%202-blue.svg) -![Django versions](https://img.shields.io/pypi/djversions/oidcop) ![Documentation Status](https://readthedocs.org/projects/oidcop/badge/?version=latest) ![Python version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg)