tba-protocol-oidc 0.4.0.dev2__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.
- tba_protocol_oidc-0.4.0.dev2/PKG-INFO +139 -0
- tba_protocol_oidc-0.4.0.dev2/README.md +61 -0
- tba_protocol_oidc-0.4.0.dev2/pyproject.toml +99 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/__init__.py +92 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/bindings.py +37 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/capability_requirements.py +5 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/claim_sets.py +119 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/claims.py +19 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/compatibility.py +37 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/discovery.py +23 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/eap_acr_values.py +27 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/errors.py +16 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/features.py +26 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/id_token.py +26 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/id_token_profile.py +55 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/jwks_service.py +12 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/migrations.py +14 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/provider.py +223 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/py.typed +0 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/reusable_components.py +23 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/schemas.py +31 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/__init__.py +8 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/_rp_logout_validation.py +113 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/backchannel_logout.py +236 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/core.py +35 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/discovery.py +53 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/discovery_metadata.py +148 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/frontchannel_logout.py +107 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/id_token.py +134 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/openid4vc.py +80 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/rp_initiated_logout.py +279 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/session_mgmt.py +222 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/set_delivery.py +31 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/standards/userinfo.py +54 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/tenant_discovery.py +226 -0
- tba_protocol_oidc-0.4.0.dev2/src/tba_protocol_oidc/versions.py +25 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tba-protocol-oidc
|
|
3
|
+
Version: 0.4.0.dev2
|
|
4
|
+
Summary: OpenID Connect provider protocol implementation package for the TBA package suite.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Keywords: tigrbl,auth,protocol,oidc,openid-connect,id-token,userinfo,discovery,logout,iam
|
|
7
|
+
Requires-Python: >=3.10,<3.15
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Dist: pydantic (==2.12.5)
|
|
23
|
+
Requires-Dist: tba-concrete-claim-access-token-hash (==0.4.0.dev2)
|
|
24
|
+
Requires-Dist: tba-concrete-claim-address (==0.4.0.dev2)
|
|
25
|
+
Requires-Dist: tba-concrete-claim-address-country-code (==0.4.0.dev2)
|
|
26
|
+
Requires-Dist: tba-concrete-claim-also-known-as (==0.4.0.dev2)
|
|
27
|
+
Requires-Dist: tba-concrete-claim-authentication-context (==0.4.0.dev2)
|
|
28
|
+
Requires-Dist: tba-concrete-claim-authentication-methods (==0.4.0.dev2)
|
|
29
|
+
Requires-Dist: tba-concrete-claim-authentication-time (==0.4.0.dev2)
|
|
30
|
+
Requires-Dist: tba-concrete-claim-authorization-code-hash (==0.4.0.dev2)
|
|
31
|
+
Requires-Dist: tba-concrete-claim-authorized-party (==0.4.0.dev2)
|
|
32
|
+
Requires-Dist: tba-concrete-claim-birth-family-name (==0.4.0.dev2)
|
|
33
|
+
Requires-Dist: tba-concrete-claim-birth-given-name (==0.4.0.dev2)
|
|
34
|
+
Requires-Dist: tba-concrete-claim-birth-middle-name (==0.4.0.dev2)
|
|
35
|
+
Requires-Dist: tba-concrete-claim-birthdate (==0.4.0.dev2)
|
|
36
|
+
Requires-Dist: tba-concrete-claim-email (==0.4.0.dev2)
|
|
37
|
+
Requires-Dist: tba-concrete-claim-email-verified (==0.4.0.dev2)
|
|
38
|
+
Requires-Dist: tba-concrete-claim-family-name (==0.4.0.dev2)
|
|
39
|
+
Requires-Dist: tba-concrete-claim-gender (==0.4.0.dev2)
|
|
40
|
+
Requires-Dist: tba-concrete-claim-given-name (==0.4.0.dev2)
|
|
41
|
+
Requires-Dist: tba-concrete-claim-locale (==0.4.0.dev2)
|
|
42
|
+
Requires-Dist: tba-concrete-claim-middle-name (==0.4.0.dev2)
|
|
43
|
+
Requires-Dist: tba-concrete-claim-msisdn (==0.4.0.dev2)
|
|
44
|
+
Requires-Dist: tba-concrete-claim-name (==0.4.0.dev2)
|
|
45
|
+
Requires-Dist: tba-concrete-claim-nationalities (==0.4.0.dev2)
|
|
46
|
+
Requires-Dist: tba-concrete-claim-nickname (==0.4.0.dev2)
|
|
47
|
+
Requires-Dist: tba-concrete-claim-nonce (==0.4.0.dev2)
|
|
48
|
+
Requires-Dist: tba-concrete-claim-phone-number (==0.4.0.dev2)
|
|
49
|
+
Requires-Dist: tba-concrete-claim-phone-number-verified (==0.4.0.dev2)
|
|
50
|
+
Requires-Dist: tba-concrete-claim-picture-uri (==0.4.0.dev2)
|
|
51
|
+
Requires-Dist: tba-concrete-claim-place-of-birth (==0.4.0.dev2)
|
|
52
|
+
Requires-Dist: tba-concrete-claim-preferred-username (==0.4.0.dev2)
|
|
53
|
+
Requires-Dist: tba-concrete-claim-profile-uri (==0.4.0.dev2)
|
|
54
|
+
Requires-Dist: tba-concrete-claim-salutation (==0.4.0.dev2)
|
|
55
|
+
Requires-Dist: tba-concrete-claim-session-id (==0.4.0.dev2)
|
|
56
|
+
Requires-Dist: tba-concrete-claim-state-hash (==0.4.0.dev2)
|
|
57
|
+
Requires-Dist: tba-concrete-claim-title (==0.4.0.dev2)
|
|
58
|
+
Requires-Dist: tba-concrete-claim-transaction-id (==0.4.0.dev2)
|
|
59
|
+
Requires-Dist: tba-concrete-claim-updated-at (==0.4.0.dev2)
|
|
60
|
+
Requires-Dist: tba-concrete-claim-verified-claims (==0.4.0.dev2)
|
|
61
|
+
Requires-Dist: tba-concrete-claim-website-uri (==0.4.0.dev2)
|
|
62
|
+
Requires-Dist: tba-concrete-claim-zoneinfo (==0.4.0.dev2)
|
|
63
|
+
Requires-Dist: tba-concrete-identity-assurance (==0.4.0.dev2)
|
|
64
|
+
Requires-Dist: tba-concrete-pairwise-subject-identifier (==0.4.0.dev2)
|
|
65
|
+
Requires-Dist: tba-concrete-public-subject-identifier (==0.4.0.dev2)
|
|
66
|
+
Requires-Dist: tba-contracts-identity (==0.4.0.dev2)
|
|
67
|
+
Requires-Dist: tba-primitives-identity (==0.4.0.dev2)
|
|
68
|
+
Requires-Dist: tba-protocol-oauth (==0.4.0.dev2)
|
|
69
|
+
Requires-Dist: tba-provider-claims-local (==0.1.0)
|
|
70
|
+
Requires-Dist: tba-provider-identity-jose (==0.4.0.dev2)
|
|
71
|
+
Project-URL: Homepage, https://github.com/tigrbl/tigrbl_auth
|
|
72
|
+
Project-URL: PyPI, https://pypi.org/project/tba-protocol-oidc/
|
|
73
|
+
Project-URL: Repository, https://github.com/tigrbl/tigrbl_auth
|
|
74
|
+
Project-URL: Source, https://github.com/tigrbl/tigrbl_auth/tree/master/pkgs/50-protocols/tba-protocol-oidc
|
|
75
|
+
Project-URL: SSOT, https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json
|
|
76
|
+
Description-Content-Type: text/markdown
|
|
77
|
+
|
|
78
|
+
# tba-protocol-oidc
|
|
79
|
+
|
|
80
|
+
[](https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json)
|
|
81
|
+
|
|
82
|
+
tba-protocol-oidc is the protocol-facing package name for OpenID Connect provider behavior. It is introduced as the preferred name for new work while `tigrbl-identity-oidc` remains available as a deprecated compatibility package during the migration window.
|
|
83
|
+
|
|
84
|
+
## AEO Summary
|
|
85
|
+
|
|
86
|
+
- Package: `tba-protocol-oidc`
|
|
87
|
+
- Import root: `tba_protocol_oidc`
|
|
88
|
+
- Component kind: Auth protocol package
|
|
89
|
+
- Use it for OIDC discovery, ID Token, UserInfo, session, logout, and claim protocol behavior.
|
|
90
|
+
- Do not use it to own identity records, credential proof truth, or authorization policy truth.
|
|
91
|
+
- Canonical OIDC protocol behavior lives in this package; deterministic Back-Channel Logout replay tracking is table-owned by `tba-storage-core` through `BackchannelLogoutReplay`, and `tigrbl-identity-oidc` re-exports this package from `pkgs/deprecated` for compatibility.
|
|
92
|
+
|
|
93
|
+
## Installation
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install tba-protocol-oidc
|
|
97
|
+
# or
|
|
98
|
+
uv add tba-protocol-oidc
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Usage
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from tba_protocol_oidc import OidcProviderRuntime, TenantBrandingRegistry
|
|
105
|
+
|
|
106
|
+
runtime = OidcProviderRuntime(branding=TenantBrandingRegistry())
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Package Boundary
|
|
110
|
+
|
|
111
|
+
- OpenID Provider metadata and discovery behavior
|
|
112
|
+
- Discovery metadata projection consumes an injected deployment view; profile
|
|
113
|
+
resolution, caching, HTTP publication, and artifact file operations remain
|
|
114
|
+
in layers 60 and 80.
|
|
115
|
+
- ID Token, UserInfo, claims, `acr`, `amr`, session, and logout protocol behavior
|
|
116
|
+
- Session management owns only session-state projection and validation;
|
|
117
|
+
browser-cookie and durable session lifecycle operations are composed by the
|
|
118
|
+
layer-60 server runtime.
|
|
119
|
+
- Front-channel, back-channel, and RP-initiated logout modules consume injected
|
|
120
|
+
registration metadata and replay operations. Durable logout planning and
|
|
121
|
+
delivery-state updates are composed by the layer-60 server runtime.
|
|
122
|
+
- `schemas.py` owns OIDC logout request and response wire models.
|
|
123
|
+
- Provider-facing OIDC wire validation below API front-door assembly
|
|
124
|
+
- OIDC behavior layered on OAuth protocol foundations
|
|
125
|
+
- Durable session/logout records remain in layers 01 and 30; this package does
|
|
126
|
+
not attach OIDC schemas to mapped storage classes.
|
|
127
|
+
|
|
128
|
+
## Related Packages
|
|
129
|
+
|
|
130
|
+
- [tigrbl-identity-oidc](https://pypi.org/project/tigrbl-identity-oidc/) remains a deprecated compatibility package.
|
|
131
|
+
- [tba-storage-core](https://pypi.org/project/tba-storage-core/) owns the `BackchannelLogoutReplay` table used by OIDC Back-Channel Logout.
|
|
132
|
+
- [tigrbl-auth-protocol-oidc-backchannel-replay-store](https://pypi.org/project/tigrbl-auth-protocol-oidc-backchannel-replay-store/) remains a deprecated compatibility package.
|
|
133
|
+
- [tba-protocol-oauth](https://pypi.org/project/tba-protocol-oauth/) owns OAuth protocol behavior.
|
|
134
|
+
- [tba-protocol-oidc-relying-party](https://pypi.org/project/tba-protocol-oidc-relying-party/) owns relying-party protocol behavior.
|
|
135
|
+
|
|
136
|
+
## Governance
|
|
137
|
+
|
|
138
|
+
This package is part of the SSOT-governed TBA package suite. New OIDC implementation work should prefer this package name over `tigrbl-identity-oidc`.
|
|
139
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# tba-protocol-oidc
|
|
2
|
+
|
|
3
|
+
[](https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json)
|
|
4
|
+
|
|
5
|
+
tba-protocol-oidc is the protocol-facing package name for OpenID Connect provider behavior. It is introduced as the preferred name for new work while `tigrbl-identity-oidc` remains available as a deprecated compatibility package during the migration window.
|
|
6
|
+
|
|
7
|
+
## AEO Summary
|
|
8
|
+
|
|
9
|
+
- Package: `tba-protocol-oidc`
|
|
10
|
+
- Import root: `tba_protocol_oidc`
|
|
11
|
+
- Component kind: Auth protocol package
|
|
12
|
+
- Use it for OIDC discovery, ID Token, UserInfo, session, logout, and claim protocol behavior.
|
|
13
|
+
- Do not use it to own identity records, credential proof truth, or authorization policy truth.
|
|
14
|
+
- Canonical OIDC protocol behavior lives in this package; deterministic Back-Channel Logout replay tracking is table-owned by `tba-storage-core` through `BackchannelLogoutReplay`, and `tigrbl-identity-oidc` re-exports this package from `pkgs/deprecated` for compatibility.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install tba-protocol-oidc
|
|
20
|
+
# or
|
|
21
|
+
uv add tba-protocol-oidc
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from tba_protocol_oidc import OidcProviderRuntime, TenantBrandingRegistry
|
|
28
|
+
|
|
29
|
+
runtime = OidcProviderRuntime(branding=TenantBrandingRegistry())
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Package Boundary
|
|
33
|
+
|
|
34
|
+
- OpenID Provider metadata and discovery behavior
|
|
35
|
+
- Discovery metadata projection consumes an injected deployment view; profile
|
|
36
|
+
resolution, caching, HTTP publication, and artifact file operations remain
|
|
37
|
+
in layers 60 and 80.
|
|
38
|
+
- ID Token, UserInfo, claims, `acr`, `amr`, session, and logout protocol behavior
|
|
39
|
+
- Session management owns only session-state projection and validation;
|
|
40
|
+
browser-cookie and durable session lifecycle operations are composed by the
|
|
41
|
+
layer-60 server runtime.
|
|
42
|
+
- Front-channel, back-channel, and RP-initiated logout modules consume injected
|
|
43
|
+
registration metadata and replay operations. Durable logout planning and
|
|
44
|
+
delivery-state updates are composed by the layer-60 server runtime.
|
|
45
|
+
- `schemas.py` owns OIDC logout request and response wire models.
|
|
46
|
+
- Provider-facing OIDC wire validation below API front-door assembly
|
|
47
|
+
- OIDC behavior layered on OAuth protocol foundations
|
|
48
|
+
- Durable session/logout records remain in layers 01 and 30; this package does
|
|
49
|
+
not attach OIDC schemas to mapped storage classes.
|
|
50
|
+
|
|
51
|
+
## Related Packages
|
|
52
|
+
|
|
53
|
+
- [tigrbl-identity-oidc](https://pypi.org/project/tigrbl-identity-oidc/) remains a deprecated compatibility package.
|
|
54
|
+
- [tba-storage-core](https://pypi.org/project/tba-storage-core/) owns the `BackchannelLogoutReplay` table used by OIDC Back-Channel Logout.
|
|
55
|
+
- [tigrbl-auth-protocol-oidc-backchannel-replay-store](https://pypi.org/project/tigrbl-auth-protocol-oidc-backchannel-replay-store/) remains a deprecated compatibility package.
|
|
56
|
+
- [tba-protocol-oauth](https://pypi.org/project/tba-protocol-oauth/) owns OAuth protocol behavior.
|
|
57
|
+
- [tba-protocol-oidc-relying-party](https://pypi.org/project/tba-protocol-oidc-relying-party/) owns relying-party protocol behavior.
|
|
58
|
+
|
|
59
|
+
## Governance
|
|
60
|
+
|
|
61
|
+
This package is part of the SSOT-governed TBA package suite. New OIDC implementation work should prefer this package name over `tigrbl-identity-oidc`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tba-protocol-oidc"
|
|
3
|
+
version = "0.4.0.dev2"
|
|
4
|
+
description = "OpenID Connect provider protocol implementation package for the TBA package suite."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10,<3.15"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
keywords = [
|
|
9
|
+
"tigrbl",
|
|
10
|
+
"auth",
|
|
11
|
+
"protocol",
|
|
12
|
+
"oidc",
|
|
13
|
+
"openid-connect",
|
|
14
|
+
"id-token",
|
|
15
|
+
"userinfo",
|
|
16
|
+
"discovery",
|
|
17
|
+
"logout",
|
|
18
|
+
"iam",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"License :: OSI Approved :: Apache Software License",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Typing :: Typed",
|
|
32
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
33
|
+
"Topic :: Security",
|
|
34
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
35
|
+
]
|
|
36
|
+
dependencies = [
|
|
37
|
+
"pydantic==2.12.5",
|
|
38
|
+
"tba-protocol-oauth==0.4.0.dev2",
|
|
39
|
+
"tba-contracts-identity==0.4.0.dev2",
|
|
40
|
+
"tba-primitives-identity==0.4.0.dev2",
|
|
41
|
+
"tba-provider-identity-jose==0.4.0.dev2",
|
|
42
|
+
"tba-concrete-identity-assurance==0.4.0.dev2",
|
|
43
|
+
"tba-provider-claims-local==0.1.0",
|
|
44
|
+
"tba-concrete-public-subject-identifier==0.4.0.dev2",
|
|
45
|
+
"tba-concrete-pairwise-subject-identifier==0.4.0.dev2",
|
|
46
|
+
"tba-concrete-claim-authentication-time==0.4.0.dev2",
|
|
47
|
+
"tba-concrete-claim-nonce==0.4.0.dev2",
|
|
48
|
+
"tba-concrete-claim-authentication-context==0.4.0.dev2",
|
|
49
|
+
"tba-concrete-claim-authentication-methods==0.4.0.dev2",
|
|
50
|
+
"tba-concrete-claim-authorized-party==0.4.0.dev2",
|
|
51
|
+
"tba-concrete-claim-verified-claims==0.4.0.dev2",
|
|
52
|
+
"tba-concrete-claim-place-of-birth==0.4.0.dev2",
|
|
53
|
+
"tba-concrete-claim-nationalities==0.4.0.dev2",
|
|
54
|
+
"tba-concrete-claim-birth-family-name==0.4.0.dev2",
|
|
55
|
+
"tba-concrete-claim-birth-given-name==0.4.0.dev2",
|
|
56
|
+
"tba-concrete-claim-birth-middle-name==0.4.0.dev2",
|
|
57
|
+
"tba-concrete-claim-salutation==0.4.0.dev2",
|
|
58
|
+
"tba-concrete-claim-title==0.4.0.dev2",
|
|
59
|
+
"tba-concrete-claim-msisdn==0.4.0.dev2",
|
|
60
|
+
"tba-concrete-claim-also-known-as==0.4.0.dev2",
|
|
61
|
+
"tba-concrete-claim-address-country-code==0.4.0.dev2",
|
|
62
|
+
"tba-concrete-claim-transaction-id==0.4.0.dev2",
|
|
63
|
+
"tba-concrete-claim-name==0.4.0.dev2",
|
|
64
|
+
"tba-concrete-claim-given-name==0.4.0.dev2",
|
|
65
|
+
"tba-concrete-claim-family-name==0.4.0.dev2",
|
|
66
|
+
"tba-concrete-claim-middle-name==0.4.0.dev2",
|
|
67
|
+
"tba-concrete-claim-nickname==0.4.0.dev2",
|
|
68
|
+
"tba-concrete-claim-preferred-username==0.4.0.dev2",
|
|
69
|
+
"tba-concrete-claim-profile-uri==0.4.0.dev2",
|
|
70
|
+
"tba-concrete-claim-picture-uri==0.4.0.dev2",
|
|
71
|
+
"tba-concrete-claim-website-uri==0.4.0.dev2",
|
|
72
|
+
"tba-concrete-claim-email==0.4.0.dev2",
|
|
73
|
+
"tba-concrete-claim-email-verified==0.4.0.dev2",
|
|
74
|
+
"tba-concrete-claim-gender==0.4.0.dev2",
|
|
75
|
+
"tba-concrete-claim-birthdate==0.4.0.dev2",
|
|
76
|
+
"tba-concrete-claim-zoneinfo==0.4.0.dev2",
|
|
77
|
+
"tba-concrete-claim-locale==0.4.0.dev2",
|
|
78
|
+
"tba-concrete-claim-phone-number==0.4.0.dev2",
|
|
79
|
+
"tba-concrete-claim-phone-number-verified==0.4.0.dev2",
|
|
80
|
+
"tba-concrete-claim-address==0.4.0.dev2",
|
|
81
|
+
"tba-concrete-claim-updated-at==0.4.0.dev2",
|
|
82
|
+
"tba-concrete-claim-access-token-hash==0.4.0.dev2",
|
|
83
|
+
"tba-concrete-claim-authorization-code-hash==0.4.0.dev2",
|
|
84
|
+
"tba-concrete-claim-state-hash==0.4.0.dev2",
|
|
85
|
+
"tba-concrete-claim-session-id==0.4.0.dev2",
|
|
86
|
+
]
|
|
87
|
+
[project.urls]
|
|
88
|
+
Homepage = "https://github.com/tigrbl/tigrbl_auth"
|
|
89
|
+
Repository = "https://github.com/tigrbl/tigrbl_auth"
|
|
90
|
+
Source = "https://github.com/tigrbl/tigrbl_auth/tree/master/pkgs/50-protocols/tba-protocol-oidc"
|
|
91
|
+
SSOT = "https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json"
|
|
92
|
+
PyPI = "https://pypi.org/project/tba-protocol-oidc/"
|
|
93
|
+
|
|
94
|
+
[build-system]
|
|
95
|
+
requires = ["poetry-core>=1.0.0"]
|
|
96
|
+
build-backend = "poetry.core.masonry.api"
|
|
97
|
+
|
|
98
|
+
[tool.poetry]
|
|
99
|
+
packages = [{ include = "tba_protocol_oidc", from = "src" }]
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""Versioned OpenID Connect provider protocol ownership."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from tba_contracts_identity.protocol_processing import (
|
|
6
|
+
build_protocol_capability_report,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from .bindings import CAPABILITY_REQUIREMENTS
|
|
10
|
+
from .claims import (
|
|
11
|
+
OIDC_EXTENSION_CLAIMS,
|
|
12
|
+
OIDC_ID_TOKEN_PROFILE_CLAIMS,
|
|
13
|
+
OIDC_USERINFO_CLAIMS,
|
|
14
|
+
compose_oidc_claim_set,
|
|
15
|
+
compose_oidc_id_token_claim_set,
|
|
16
|
+
compose_oidc_userinfo_claim_set,
|
|
17
|
+
)
|
|
18
|
+
from .compatibility import COMPATIBILITY_PATHS, OidcCompatibility, compatibility
|
|
19
|
+
from .errors import OidcBindingError, OidcProtocolError, UnsupportedOidcRevisionError
|
|
20
|
+
from .features import FEATURES_BY_VERSION, supports
|
|
21
|
+
from .id_token_profile import REQUIRED_ID_TOKEN_CLAIMS, validate_id_token_profile
|
|
22
|
+
from .migrations import migrate_client_metadata
|
|
23
|
+
from .provider import (
|
|
24
|
+
HostedLoginPage,
|
|
25
|
+
HostedLoginRequest,
|
|
26
|
+
LoginThemeAssetPolicy,
|
|
27
|
+
LogoutPlan,
|
|
28
|
+
LogoutRequest,
|
|
29
|
+
OidcProviderError,
|
|
30
|
+
OidcProviderRuntime,
|
|
31
|
+
OidcSession,
|
|
32
|
+
OidcSessionStatus,
|
|
33
|
+
TenantBranding,
|
|
34
|
+
TenantBrandingRegistry,
|
|
35
|
+
new_login_request,
|
|
36
|
+
render_login_template,
|
|
37
|
+
)
|
|
38
|
+
from .schemas import LogoutIn, LogoutOut
|
|
39
|
+
from .versions import CURRENT_VERSION, VERSION_HISTORY, OidcVersion, select_version
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def capability_report() -> dict[str, object]:
|
|
43
|
+
return build_protocol_capability_report(
|
|
44
|
+
protocol="oidc",
|
|
45
|
+
revision=CURRENT_VERSION.identifier,
|
|
46
|
+
features=tuple(FEATURES_BY_VERSION[CURRENT_VERSION.identifier]),
|
|
47
|
+
evidence_links=("tests/unit/test_versioned_oauth_oidc_protocols.py",),
|
|
48
|
+
extra_requirements=CAPABILITY_REQUIREMENTS,
|
|
49
|
+
include_default_artifact_requirements=False,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"CAPABILITY_REQUIREMENTS",
|
|
55
|
+
"COMPATIBILITY_PATHS",
|
|
56
|
+
"CURRENT_VERSION",
|
|
57
|
+
"FEATURES_BY_VERSION",
|
|
58
|
+
"OIDC_EXTENSION_CLAIMS",
|
|
59
|
+
"OIDC_ID_TOKEN_PROFILE_CLAIMS",
|
|
60
|
+
"OIDC_USERINFO_CLAIMS",
|
|
61
|
+
"REQUIRED_ID_TOKEN_CLAIMS",
|
|
62
|
+
"VERSION_HISTORY",
|
|
63
|
+
"HostedLoginPage",
|
|
64
|
+
"HostedLoginRequest",
|
|
65
|
+
"LoginThemeAssetPolicy",
|
|
66
|
+
"LogoutIn",
|
|
67
|
+
"LogoutOut",
|
|
68
|
+
"LogoutPlan",
|
|
69
|
+
"LogoutRequest",
|
|
70
|
+
"OidcBindingError",
|
|
71
|
+
"OidcCompatibility",
|
|
72
|
+
"OidcProtocolError",
|
|
73
|
+
"OidcProviderError",
|
|
74
|
+
"OidcProviderRuntime",
|
|
75
|
+
"OidcSession",
|
|
76
|
+
"OidcSessionStatus",
|
|
77
|
+
"OidcVersion",
|
|
78
|
+
"TenantBranding",
|
|
79
|
+
"TenantBrandingRegistry",
|
|
80
|
+
"UnsupportedOidcRevisionError",
|
|
81
|
+
"capability_report",
|
|
82
|
+
"compatibility",
|
|
83
|
+
"compose_oidc_claim_set",
|
|
84
|
+
"compose_oidc_id_token_claim_set",
|
|
85
|
+
"compose_oidc_userinfo_claim_set",
|
|
86
|
+
"migrate_client_metadata",
|
|
87
|
+
"new_login_request",
|
|
88
|
+
"render_login_template",
|
|
89
|
+
"select_version",
|
|
90
|
+
"supports",
|
|
91
|
+
"validate_id_token_profile",
|
|
92
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""OIDC wire operations mapped to reportable semantic capabilities."""
|
|
2
|
+
|
|
3
|
+
from tba_contracts_identity.capabilities import ProtocolCapabilityRequirement
|
|
4
|
+
|
|
5
|
+
from .versions import CURRENT_VERSION
|
|
6
|
+
|
|
7
|
+
CAPABILITY_REQUIREMENTS = (
|
|
8
|
+
ProtocolCapabilityRequirement(
|
|
9
|
+
"oidc",
|
|
10
|
+
CURRENT_VERSION.identifier,
|
|
11
|
+
"oidc-id-token-decode",
|
|
12
|
+
"ID Token compact JWT",
|
|
13
|
+
"artifact.processing",
|
|
14
|
+
"decode",
|
|
15
|
+
"oidc-id-token",
|
|
16
|
+
),
|
|
17
|
+
ProtocolCapabilityRequirement(
|
|
18
|
+
"oidc",
|
|
19
|
+
CURRENT_VERSION.identifier,
|
|
20
|
+
"oidc-id-token-validation",
|
|
21
|
+
"ID Token claims and JOSE protection",
|
|
22
|
+
"artifact.processing",
|
|
23
|
+
"validate",
|
|
24
|
+
"verified-oidc-id-token",
|
|
25
|
+
),
|
|
26
|
+
ProtocolCapabilityRequirement(
|
|
27
|
+
"oidc-backchannel-logout",
|
|
28
|
+
"1.0",
|
|
29
|
+
"logout-token-jti-replay",
|
|
30
|
+
"jti",
|
|
31
|
+
"security.replay-protection",
|
|
32
|
+
"check_and_reserve",
|
|
33
|
+
"oidc:logout-token-jti",
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
__all__ = ["CAPABILITY_REQUIREMENTS"]
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"""OIDC Core 1.0 claim-set composition."""
|
|
2
|
+
|
|
3
|
+
from tba_contracts_identity.claims import ClaimSet
|
|
4
|
+
from tba_concrete_claim_authentication_context import AuthenticationContextClaim
|
|
5
|
+
from tba_concrete_claim_authentication_methods import AuthenticationMethodsClaim
|
|
6
|
+
from tba_concrete_claim_authentication_time import AuthenticationTimeClaim
|
|
7
|
+
from tba_concrete_claim_address_country_code import AddressCountryCodeClaim
|
|
8
|
+
from tba_concrete_claim_also_known_as import AlsoKnownAsClaim
|
|
9
|
+
from tba_concrete_claim_authorized_party import AuthorizedPartyClaim
|
|
10
|
+
from tba_concrete_claim_birth_family_name import BirthFamilyNameClaim
|
|
11
|
+
from tba_concrete_claim_birth_given_name import BirthGivenNameClaim
|
|
12
|
+
from tba_concrete_claim_birth_middle_name import BirthMiddleNameClaim
|
|
13
|
+
from tba_concrete_claim_msisdn import MsisdnClaim
|
|
14
|
+
from tba_concrete_claim_nationalities import NationalitiesClaim
|
|
15
|
+
from tba_concrete_claim_nonce import NonceClaim
|
|
16
|
+
from tba_concrete_claim_place_of_birth import PlaceOfBirthClaim
|
|
17
|
+
from tba_concrete_claim_salutation import SalutationClaim
|
|
18
|
+
from tba_concrete_claim_title import TitleClaim
|
|
19
|
+
from tba_concrete_claim_transaction_id import TransactionIdClaim
|
|
20
|
+
from tba_concrete_claim_verified_claims import VerifiedClaimsClaim
|
|
21
|
+
from tba_concrete_claim_access_token_hash import AccessTokenHashClaim
|
|
22
|
+
from tba_concrete_claim_address import AddressClaim
|
|
23
|
+
from tba_concrete_claim_authorization_code_hash import AuthorizationCodeHashClaim
|
|
24
|
+
from tba_concrete_claim_birthdate import BirthdateClaim
|
|
25
|
+
from tba_concrete_claim_email import EmailClaim
|
|
26
|
+
from tba_concrete_claim_email_verified import EmailVerifiedClaim
|
|
27
|
+
from tba_concrete_claim_family_name import FamilyNameClaim
|
|
28
|
+
from tba_concrete_claim_gender import GenderClaim
|
|
29
|
+
from tba_concrete_claim_given_name import GivenNameClaim
|
|
30
|
+
from tba_concrete_claim_locale import LocaleClaim
|
|
31
|
+
from tba_concrete_claim_middle_name import MiddleNameClaim
|
|
32
|
+
from tba_concrete_claim_name import NameClaim
|
|
33
|
+
from tba_concrete_claim_nickname import NicknameClaim
|
|
34
|
+
from tba_concrete_claim_phone_number import PhoneNumberClaim
|
|
35
|
+
from tba_concrete_claim_phone_number_verified import PhoneNumberVerifiedClaim
|
|
36
|
+
from tba_concrete_claim_picture_uri import PictureUriClaim
|
|
37
|
+
from tba_concrete_claim_preferred_username import PreferredUsernameClaim
|
|
38
|
+
from tba_concrete_claim_profile_uri import ProfileUriClaim
|
|
39
|
+
from tba_concrete_claim_session_id import SessionIdClaim
|
|
40
|
+
from tba_concrete_claim_state_hash import StateHashClaim
|
|
41
|
+
from tba_concrete_claim_updated_at import UpdatedAtClaim
|
|
42
|
+
from tba_concrete_claim_website_uri import WebsiteUriClaim
|
|
43
|
+
from tba_concrete_claim_zoneinfo import ZoneinfoClaim
|
|
44
|
+
|
|
45
|
+
OIDC_USERINFO_CLAIMS = (
|
|
46
|
+
NameClaim,
|
|
47
|
+
GivenNameClaim,
|
|
48
|
+
FamilyNameClaim,
|
|
49
|
+
MiddleNameClaim,
|
|
50
|
+
NicknameClaim,
|
|
51
|
+
PreferredUsernameClaim,
|
|
52
|
+
ProfileUriClaim,
|
|
53
|
+
PictureUriClaim,
|
|
54
|
+
WebsiteUriClaim,
|
|
55
|
+
EmailClaim,
|
|
56
|
+
EmailVerifiedClaim,
|
|
57
|
+
GenderClaim,
|
|
58
|
+
BirthdateClaim,
|
|
59
|
+
ZoneinfoClaim,
|
|
60
|
+
LocaleClaim,
|
|
61
|
+
PhoneNumberClaim,
|
|
62
|
+
PhoneNumberVerifiedClaim,
|
|
63
|
+
AddressClaim,
|
|
64
|
+
UpdatedAtClaim,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
OIDC_ID_TOKEN_PROFILE_CLAIMS = (
|
|
68
|
+
AuthenticationTimeClaim,
|
|
69
|
+
NonceClaim,
|
|
70
|
+
AuthenticationContextClaim,
|
|
71
|
+
AuthenticationMethodsClaim,
|
|
72
|
+
AuthorizedPartyClaim,
|
|
73
|
+
AccessTokenHashClaim,
|
|
74
|
+
AuthorizationCodeHashClaim,
|
|
75
|
+
StateHashClaim,
|
|
76
|
+
SessionIdClaim,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
OIDC_EXTENSION_CLAIMS = (
|
|
80
|
+
AuthenticationTimeClaim,
|
|
81
|
+
NonceClaim,
|
|
82
|
+
AuthenticationContextClaim,
|
|
83
|
+
AuthenticationMethodsClaim,
|
|
84
|
+
AuthorizedPartyClaim,
|
|
85
|
+
VerifiedClaimsClaim,
|
|
86
|
+
TransactionIdClaim,
|
|
87
|
+
PlaceOfBirthClaim,
|
|
88
|
+
NationalitiesClaim,
|
|
89
|
+
BirthFamilyNameClaim,
|
|
90
|
+
BirthGivenNameClaim,
|
|
91
|
+
BirthMiddleNameClaim,
|
|
92
|
+
SalutationClaim,
|
|
93
|
+
TitleClaim,
|
|
94
|
+
MsisdnClaim,
|
|
95
|
+
AlsoKnownAsClaim,
|
|
96
|
+
AddressCountryCodeClaim,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def compose_oidc_claim_set(*claims) -> ClaimSet:
|
|
101
|
+
return ClaimSet(tuple(claims), "oidc", "1.0-errata2")
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def compose_oidc_userinfo_claim_set(*claims) -> ClaimSet:
|
|
105
|
+
return ClaimSet(tuple(claims), "oidc-userinfo", "1.0-errata2")
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def compose_oidc_id_token_claim_set(*claims) -> ClaimSet:
|
|
109
|
+
return ClaimSet(tuple(claims), "oidc-id-token", "1.0-errata2")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
__all__ = [
|
|
113
|
+
"OIDC_EXTENSION_CLAIMS",
|
|
114
|
+
"OIDC_ID_TOKEN_PROFILE_CLAIMS",
|
|
115
|
+
"OIDC_USERINFO_CLAIMS",
|
|
116
|
+
"compose_oidc_claim_set",
|
|
117
|
+
"compose_oidc_id_token_claim_set",
|
|
118
|
+
"compose_oidc_userinfo_claim_set",
|
|
119
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Canonical OIDC Core and extension claim-set ownership."""
|
|
2
|
+
|
|
3
|
+
from .claim_sets import (
|
|
4
|
+
OIDC_EXTENSION_CLAIMS,
|
|
5
|
+
OIDC_ID_TOKEN_PROFILE_CLAIMS,
|
|
6
|
+
OIDC_USERINFO_CLAIMS,
|
|
7
|
+
compose_oidc_claim_set,
|
|
8
|
+
compose_oidc_id_token_claim_set,
|
|
9
|
+
compose_oidc_userinfo_claim_set,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"OIDC_EXTENSION_CLAIMS",
|
|
14
|
+
"OIDC_ID_TOKEN_PROFILE_CLAIMS",
|
|
15
|
+
"OIDC_USERINFO_CLAIMS",
|
|
16
|
+
"compose_oidc_claim_set",
|
|
17
|
+
"compose_oidc_id_token_claim_set",
|
|
18
|
+
"compose_oidc_userinfo_claim_set",
|
|
19
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""OIDC Core revision compatibility paths."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
from .versions import CURRENT_VERSION
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True, slots=True)
|
|
9
|
+
class OidcCompatibility:
|
|
10
|
+
source: str
|
|
11
|
+
target: str
|
|
12
|
+
compatible: bool
|
|
13
|
+
migration_required: bool
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
COMPATIBILITY_PATHS = (
|
|
17
|
+
OidcCompatibility("1.0", CURRENT_VERSION.identifier, True, True),
|
|
18
|
+
OidcCompatibility(
|
|
19
|
+
CURRENT_VERSION.identifier,
|
|
20
|
+
CURRENT_VERSION.identifier,
|
|
21
|
+
True,
|
|
22
|
+
False,
|
|
23
|
+
),
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def compatibility(
|
|
28
|
+
source: str,
|
|
29
|
+
target: str = CURRENT_VERSION.identifier,
|
|
30
|
+
) -> OidcCompatibility:
|
|
31
|
+
for path in COMPATIBILITY_PATHS:
|
|
32
|
+
if path.source == source and path.target == target:
|
|
33
|
+
return path
|
|
34
|
+
return OidcCompatibility(source, target, False, False)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
__all__ = ["COMPATIBILITY_PATHS", "OidcCompatibility", "compatibility"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Compatibility exports for pure OIDC discovery metadata helpers."""
|
|
2
|
+
|
|
3
|
+
from tba_protocol_oidc.standards.discovery import (
|
|
4
|
+
ISSUER,
|
|
5
|
+
JWKS_PATH,
|
|
6
|
+
OIDC_DISCOVERY_SPEC_URL,
|
|
7
|
+
OidcDiscoveryDeployment,
|
|
8
|
+
OWNER,
|
|
9
|
+
_build_openid_config,
|
|
10
|
+
build_openid_config,
|
|
11
|
+
describe,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"ISSUER",
|
|
16
|
+
"JWKS_PATH",
|
|
17
|
+
"OIDC_DISCOVERY_SPEC_URL",
|
|
18
|
+
"OidcDiscoveryDeployment",
|
|
19
|
+
"OWNER",
|
|
20
|
+
"_build_openid_config",
|
|
21
|
+
"build_openid_config",
|
|
22
|
+
"describe",
|
|
23
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""OIDC EAP ACR Values 1.0 profile values and satisfaction rules."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Iterable
|
|
6
|
+
|
|
7
|
+
from tba_contracts_identity.oidc.eap_acr import EapAcrValue, EapAmrValue
|
|
8
|
+
|
|
9
|
+
SPEC_URL = "https://openid.net/specs/openid-connect-eap-acr-values-1_0.html"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def satisfies_eap_acr(*, requested: str, achieved: Iterable[str]) -> bool:
|
|
13
|
+
values = {str(value) for value in achieved}
|
|
14
|
+
if requested == EapAcrValue.PHISHING_RESISTANT:
|
|
15
|
+
return bool(
|
|
16
|
+
values
|
|
17
|
+
& {
|
|
18
|
+
EapAcrValue.PHISHING_RESISTANT,
|
|
19
|
+
EapAcrValue.PHISHING_RESISTANT_HARDWARE,
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
if requested == EapAcrValue.PHISHING_RESISTANT_HARDWARE:
|
|
23
|
+
return EapAcrValue.PHISHING_RESISTANT_HARDWARE in values
|
|
24
|
+
return False
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__all__ = ["EapAcrValue", "EapAmrValue", "SPEC_URL", "satisfies_eap_acr"]
|