rp_python_sdk 1.2.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/PKG-INFO +13 -3
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/README.md +10 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/pyproject.toml +4 -4
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/get_participants.py +17 -2
- rp_python_sdk-1.3.1/rp_python_sdk/endpoints/util/version_info.py +2 -0
- rp_python_sdk-1.2.0/rp_python_sdk/endpoints/util/version_info.py +0 -2
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/__init__.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/cache/__init__.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/cache/http_cache.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/pushed_authorisation_request.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/retrieve_tokens.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/user_info.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/util/fapi.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/util/mapping.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/util/system_info.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/util/user_agent.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/filters/participant_filters.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/model.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/relying_party_client_sdk.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/relying_party_client_sdk_exception.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/sdk_config.py +0 -0
- {rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/setup_logger.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rp_python_sdk
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: Python SDK for Relying Parties to enable simple integration with the Digital Identity ecosystem
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Erik Pragt
|
|
@@ -13,8 +13,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.14
|
|
14
14
|
Requires-Dist: authlib (>=1.6.6,<2.0.0)
|
|
15
15
|
Requires-Dist: cffi (>=2.0.0,<3.0.0)
|
|
16
|
-
Requires-Dist: cryptography (>=46.0.
|
|
17
|
-
Requires-Dist: joserfc (>=1.6.
|
|
16
|
+
Requires-Dist: cryptography (>=46.0.5,<47.0.0)
|
|
17
|
+
Requires-Dist: joserfc (>=1.6.3,<2.0.0)
|
|
18
18
|
Requires-Dist: requests (>=2.32.5,<3.0.0)
|
|
19
19
|
Requires-Dist: urllib3 (>=2.6.3,<3.0.0)
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
@@ -451,6 +451,16 @@ poetry publish
|
|
|
451
451
|
|
|
452
452
|
## Release Notes
|
|
453
453
|
|
|
454
|
+
### 1.3.1 (May 4, 2026)
|
|
455
|
+
- Updated dependencies
|
|
456
|
+
|
|
457
|
+
### 1.3.0 (23 Mar, 2026)
|
|
458
|
+
- **OpenID Connect Discovery Section 4.3 Compliance**: Implemented issuer validation to ensure the issuer value in the provider configuration matches the Issuer URL used to retrieve it
|
|
459
|
+
- Added validation that compares the issuer in `/.well-known/openid-configuration` response with the expected issuer URL
|
|
460
|
+
- Properly handles trailing slash normalisation per RFC 3986
|
|
461
|
+
- Throws descriptive exception when issuer mismatch is detected, stopping the flow as required by the specification
|
|
462
|
+
- Validates both fresh and cached issuer metadata
|
|
463
|
+
|
|
454
464
|
### 1.2.0 (Feb 11, 2026)
|
|
455
465
|
- **New Feature: HTTP Response Cache** - Added in-memory LRU cache for HTTP responses to improve SDK performance
|
|
456
466
|
- Caches participants registry, OIDC discovery documents, and JWKS endpoints
|
|
@@ -430,6 +430,16 @@ poetry publish
|
|
|
430
430
|
|
|
431
431
|
## Release Notes
|
|
432
432
|
|
|
433
|
+
### 1.3.1 (May 4, 2026)
|
|
434
|
+
- Updated dependencies
|
|
435
|
+
|
|
436
|
+
### 1.3.0 (23 Mar, 2026)
|
|
437
|
+
- **OpenID Connect Discovery Section 4.3 Compliance**: Implemented issuer validation to ensure the issuer value in the provider configuration matches the Issuer URL used to retrieve it
|
|
438
|
+
- Added validation that compares the issuer in `/.well-known/openid-configuration` response with the expected issuer URL
|
|
439
|
+
- Properly handles trailing slash normalisation per RFC 3986
|
|
440
|
+
- Throws descriptive exception when issuer mismatch is detected, stopping the flow as required by the specification
|
|
441
|
+
- Validates both fresh and cached issuer metadata
|
|
442
|
+
|
|
433
443
|
### 1.2.0 (Feb 11, 2026)
|
|
434
444
|
- **New Feature: HTTP Response Cache** - Added in-memory LRU cache for HTTP responses to improve SDK performance
|
|
435
445
|
- Caches participants registry, OIDC discovery documents, and JWKS endpoints
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "rp_python_sdk"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.1"
|
|
4
4
|
description = "Python SDK for Relying Parties to enable simple integration with the Digital Identity ecosystem"
|
|
5
5
|
authors = ["Erik Pragt <erik.pragt@connectid.com.au>"]
|
|
6
6
|
license = "Proprietary"
|
|
@@ -10,8 +10,8 @@ readme = "README.md"
|
|
|
10
10
|
python = "^3.12"
|
|
11
11
|
requests = "^2.32.5"
|
|
12
12
|
authlib = "^1.6.6"
|
|
13
|
-
cryptography = "^46.0.
|
|
14
|
-
joserfc = "^1.6.
|
|
13
|
+
cryptography = "^46.0.5"
|
|
14
|
+
joserfc = "^1.6.3"
|
|
15
15
|
cffi = "^2.0.0"
|
|
16
16
|
urllib3 = "^2.6.3"
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ httpx = "^0.28.1"
|
|
|
21
21
|
toml = "^0.10.2"
|
|
22
22
|
|
|
23
23
|
[tool.poetry.group.dev.dependencies]
|
|
24
|
-
black = "^26.
|
|
24
|
+
black = "^26.3.1"
|
|
25
25
|
pre-commit = "^4.5.1"
|
|
26
26
|
mypy = "^1.19.1"
|
|
27
27
|
requests-mock = "^1.12.1"
|
|
@@ -117,6 +117,17 @@ def get_auth_server_details(config: SdkConfig, authorisation_server_id: str, cac
|
|
|
117
117
|
return result
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
def _validate_issuer_match(discovery_url: str, actual_issuer: str) -> None:
|
|
121
|
+
well_known_suffix = "/.well-known/openid-configuration"
|
|
122
|
+
if well_known_suffix not in discovery_url or not actual_issuer:
|
|
123
|
+
return
|
|
124
|
+
expected_issuer = discovery_url[:discovery_url.index(well_known_suffix)]
|
|
125
|
+
if expected_issuer.rstrip("/") != actual_issuer.rstrip("/"):
|
|
126
|
+
raise RelyingPartyClientSdkException(
|
|
127
|
+
f"Issuer mismatch: discovery URL implies issuer '{expected_issuer}' "
|
|
128
|
+
f"but discovery document contains issuer '{actual_issuer}'")
|
|
129
|
+
|
|
130
|
+
|
|
120
131
|
def get_issuer_metadata(authorisation_server: AuthorisationServer, cache: HttpCache) -> IssuerMetadata:
|
|
121
132
|
url = authorisation_server.open_i_d_discovery_document
|
|
122
133
|
|
|
@@ -124,7 +135,9 @@ def get_issuer_metadata(authorisation_server: AuthorisationServer, cache: HttpCa
|
|
|
124
135
|
cached = cache.get(url)
|
|
125
136
|
if cached:
|
|
126
137
|
logger.debug(f"Cache hit for URL: {url}")
|
|
127
|
-
|
|
138
|
+
metadata = from_dict(IssuerMetadata, json.loads(cached))
|
|
139
|
+
_validate_issuer_match(url, metadata.issuer)
|
|
140
|
+
return metadata
|
|
128
141
|
|
|
129
142
|
logger.debug(f"Cache miss for URL: {url}")
|
|
130
143
|
|
|
@@ -137,7 +150,9 @@ def get_issuer_metadata(authorisation_server: AuthorisationServer, cache: HttpCa
|
|
|
137
150
|
cache.put(url, response.text)
|
|
138
151
|
logger.debug(f"Cached response for URL: {url}, size: {len(response.text)} bytes")
|
|
139
152
|
|
|
140
|
-
|
|
153
|
+
metadata = from_dict(IssuerMetadata, json.loads(response.text))
|
|
154
|
+
_validate_issuer_match(url, metadata.issuer)
|
|
155
|
+
return metadata
|
|
141
156
|
|
|
142
157
|
except requests.exceptions.HTTPError as http_err:
|
|
143
158
|
raise RelyingPartyClientSdkException(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/endpoints/pushed_authorisation_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rp_python_sdk-1.2.0 → rp_python_sdk-1.3.1}/rp_python_sdk/relying_party_client_sdk_exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|