From b5aa4cdc176d0e025901ceb3246f80b98e3d8c9bcef7f65851375e6f960ff9b1 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 14 Feb 2024 01:32:43 +0000 Subject: [PATCH] - Update to 3.7.0: * add KeycloakAdmin.get_idp() * Update dynamic client using registration access token * add an optional search criteria to the get_realm_roles function * added KeycloakAdmin.update_client_authz_resource() * Implement missing admin method create_client_authz_scope_based_permission() and create_client_authz_policy() * Add query to get users group method and permit pagination * Changes the exchange token API * do not swap realm for user_realm when logging in with a client service account * Fixes `Authorization.load_config` breaking if a scope based permission is linked with anything other than a role based policy. * Add get and delete methods for client authz resources * loose requests pgk and remove urllib3 as dependency * Check if _s exists in ConnectionManager before deleting it * deprecation warnings in keycloak_admin.py * Add UMA policy management and permission tickets * add initial access token support and policy delete method * Check if applyPolicies exists in the config * implement cache clearing API * get_group_by_path uses Keycloak API to load * add Keycloak UMA client * update header if token is given * init KeycloakAdmin with token * added default realm roles handlers * fix testing create_client_authz_scopes parameters * option for enabling users * helping functions for disabling users - Add patch fix-version.patch: OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-keycloak?expand=0&rev=6 --- fix-version.patch | 12 ++++++++++++ python-keycloak-2.6.0.tar.gz | 3 --- python-keycloak-3.7.0.tar.gz | 3 +++ python-python-keycloak.changes | 36 ++++++++++++++++++++++++++++++++++ python-python-keycloak.spec | 28 +++++++++++++++----------- 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 fix-version.patch delete mode 100644 python-keycloak-2.6.0.tar.gz create mode 100644 python-keycloak-3.7.0.tar.gz diff --git a/fix-version.patch b/fix-version.patch new file mode 100644 index 0000000..3388dd2 --- /dev/null +++ b/fix-version.patch @@ -0,0 +1,12 @@ +Index: python-keycloak-3.7.0/pyproject.toml +=================================================================== +--- python-keycloak-3.7.0.orig/pyproject.toml ++++ python-keycloak-3.7.0/pyproject.toml +@@ -1,6 +1,6 @@ + [tool.poetry] + name = "python-keycloak" +-version = "0.0.0" ++version = "3.7.0" + description = "python-keycloak is a Python package providing access to the Keycloak API." + license = "MIT" + readme = "README.md" diff --git a/python-keycloak-2.6.0.tar.gz b/python-keycloak-2.6.0.tar.gz deleted file mode 100644 index 43f8229..0000000 --- a/python-keycloak-2.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08c530ff86f631faccb8033d9d9345cc3148cb2cf132ff7564f025292e4dbd96 -size 40915 diff --git a/python-keycloak-3.7.0.tar.gz b/python-keycloak-3.7.0.tar.gz new file mode 100644 index 0000000..1931274 --- /dev/null +++ b/python-keycloak-3.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2564b08e25f12e6e0f8b4febbbb6a1df9f2f76a2a16706f28b97aa7dc024c006 +size 2432393 diff --git a/python-python-keycloak.changes b/python-python-keycloak.changes index d61c041..7c7f682 100644 --- a/python-python-keycloak.changes +++ b/python-python-keycloak.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Wed Feb 14 01:32:07 UTC 2024 - Steve Kowalik + +- Update to 3.7.0: + * add KeycloakAdmin.get_idp() + * Update dynamic client using registration access token + * add an optional search criteria to the get_realm_roles function + * added KeycloakAdmin.update_client_authz_resource() + * Implement missing admin method create_client_authz_scope_based_permission() + and create_client_authz_policy() + * Add query to get users group method and permit pagination + * Changes the exchange token API + * do not swap realm for user_realm when logging in with a client service + account + * Fixes `Authorization.load_config` breaking if a scope based permission + is linked with anything other than a role based policy. + * Add get and delete methods for client authz resources + * loose requests pgk and remove urllib3 as dependency + * Check if _s exists in ConnectionManager before deleting it + * deprecation warnings in keycloak_admin.py + * Add UMA policy management and permission tickets + * add initial access token support and policy delete method + * Check if applyPolicies exists in the config + * implement cache clearing API + * get_group_by_path uses Keycloak API to load + * add Keycloak UMA client + * update header if token is given + * init KeycloakAdmin with token + * added default realm roles handlers + * fix testing create_client_authz_scopes parameters + * option for enabling users + * helping functions for disabling users +- Add patch fix-version.patch: + * Set a version in pyproject.toml. +- Switch to github tarball. + ------------------------------------------------------------------- Tue Dec 13 18:49:15 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-python-keycloak.spec b/python-python-keycloak.spec index d98a563..7ed6059 100644 --- a/python-python-keycloak.spec +++ b/python-python-keycloak.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-python-keycloak # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,27 +17,29 @@ %global modname python-keycloak -%define skip_python2 1 Name: python-%{modname} -Version: 2.6.0 +Version: 3.7.0 Release: 0 Summary: Python package providing access to the Keycloak API License: MIT -Group: Development/Languages/Python URL: https://github.com/marcospereirampj/python-keycloak -Source: https://files.pythonhosted.org/packages/source/p/python-keycloak/%{modname}-%{version}.tar.gz +Source: https://github.com/marcospereirampj/python-keycloak/archive/refs/tags/v%{version}.tar.gz#/python-keycloak-%{version}.tar.gz +Patch0: fix-version.patch BuildRequires: %{python_module base} +BuildRequires: %{python_module deprecation} +BuildRequires: %{python_module freezegun} BuildRequires: %{python_module httmock} BuildRequires: %{python_module pip} BuildRequires: %{python_module poetry} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-jose} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-deprecation Requires: python-python-jose >= 1.4.0 Requires: python-requests >= 2.20.0 -Requires: python-setuptools +Requires: python-requests-toolbelt BuildArch: noarch %python_subpackages @@ -55,15 +57,19 @@ Python package providing access to the Keycloak API %fdupes %{buildroot} %check -%pyunittest discover -v +# Certain parts of the testsuite requiring a running keycloak service. However +# the code is absolutely dependant on these variables being in the environment +. tox.env +export KEYCLOAK_HOST=localhost +export KEYCLOAK_ADMIN KEYCLOAK_ADMIN_PASSWORD KEYCLOAK_PORT +%pytest --ignore tests/test_keycloak_admin.py --ignore tests/test_keycloak_openid.py --ignore tests/test_keycloak_uma.py %files %{python_files} %doc README.md %doc %{python_sitelib}/CHANGELOG.md %doc %{python_sitelib}/CONTRIBUTING.md -%doc %{python_sitelib}/CODEOWNERS %license %{python_sitelib}/LICENSE %{python_sitelib}/keycloak -%{python_sitelib}/python_keycloak-%{version}*-info +%{python_sitelib}/python_keycloak-%{version}.dist-info %changelog