tba-protocol-oidc 0.4.0.dev2__py3-none-any.whl
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/__init__.py +92 -0
- tba_protocol_oidc/bindings.py +37 -0
- tba_protocol_oidc/capability_requirements.py +5 -0
- tba_protocol_oidc/claim_sets.py +119 -0
- tba_protocol_oidc/claims.py +19 -0
- tba_protocol_oidc/compatibility.py +37 -0
- tba_protocol_oidc/discovery.py +23 -0
- tba_protocol_oidc/eap_acr_values.py +27 -0
- tba_protocol_oidc/errors.py +16 -0
- tba_protocol_oidc/features.py +26 -0
- tba_protocol_oidc/id_token.py +26 -0
- tba_protocol_oidc/id_token_profile.py +55 -0
- tba_protocol_oidc/jwks_service.py +12 -0
- tba_protocol_oidc/migrations.py +14 -0
- tba_protocol_oidc/provider.py +223 -0
- tba_protocol_oidc/py.typed +0 -0
- tba_protocol_oidc/reusable_components.py +23 -0
- tba_protocol_oidc/schemas.py +31 -0
- tba_protocol_oidc/standards/__init__.py +8 -0
- tba_protocol_oidc/standards/_rp_logout_validation.py +113 -0
- tba_protocol_oidc/standards/backchannel_logout.py +236 -0
- tba_protocol_oidc/standards/core.py +35 -0
- tba_protocol_oidc/standards/discovery.py +53 -0
- tba_protocol_oidc/standards/discovery_metadata.py +148 -0
- tba_protocol_oidc/standards/frontchannel_logout.py +107 -0
- tba_protocol_oidc/standards/id_token.py +134 -0
- tba_protocol_oidc/standards/openid4vc.py +80 -0
- tba_protocol_oidc/standards/rp_initiated_logout.py +279 -0
- tba_protocol_oidc/standards/session_mgmt.py +222 -0
- tba_protocol_oidc/standards/set_delivery.py +31 -0
- tba_protocol_oidc/standards/userinfo.py +54 -0
- tba_protocol_oidc/tenant_discovery.py +226 -0
- tba_protocol_oidc/versions.py +25 -0
- tba_protocol_oidc-0.4.0.dev2.dist-info/METADATA +139 -0
- tba_protocol_oidc-0.4.0.dev2.dist-info/RECORD +36 -0
- tba_protocol_oidc-0.4.0.dev2.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import replace
|
|
4
|
+
from types import SimpleNamespace
|
|
5
|
+
from typing import Any, Mapping
|
|
6
|
+
|
|
7
|
+
from tba_contracts_identity.authority import (
|
|
8
|
+
RealmTrustDomainAuthority,
|
|
9
|
+
TenantTrustDomainAuthority,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
TENANT_OPENID_CONFIGURATION_PATH = (
|
|
13
|
+
"/tenants/{tenant_slug}/.well-known/openid-configuration"
|
|
14
|
+
)
|
|
15
|
+
TENANT_JWKS_PATH = "/tenants/{tenant_slug}/.well-known/jwks.json"
|
|
16
|
+
REALM_OPENID_CONFIGURATION_PATH = (
|
|
17
|
+
"/realms/{realm_slug}/.well-known/openid-configuration"
|
|
18
|
+
)
|
|
19
|
+
REALM_JWKS_PATH = "/realms/{realm_slug}/.well-known/jwks.json"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def tenant_issuer(root_issuer: str, tenant_slug: str) -> str:
|
|
23
|
+
return f"{root_issuer.rstrip('/')}/tenants/{tenant_slug}"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def realm_issuer(root_issuer: str, realm_slug: str) -> str:
|
|
27
|
+
return f"{root_issuer.rstrip('/')}/realms/{realm_slug}"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def realm_jwks_path(realm_slug: str) -> str:
|
|
31
|
+
return REALM_JWKS_PATH.format(realm_slug=realm_slug)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def realm_openid_configuration_path(realm_slug: str) -> str:
|
|
35
|
+
return REALM_OPENID_CONFIGURATION_PATH.format(realm_slug=realm_slug)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def tenant_jwks_path(tenant_slug: str) -> str:
|
|
39
|
+
return TENANT_JWKS_PATH.format(tenant_slug=tenant_slug)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def tenant_openid_configuration_path(tenant_slug: str) -> str:
|
|
43
|
+
return TENANT_OPENID_CONFIGURATION_PATH.format(tenant_slug=tenant_slug)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _deployment_value(deployment: object, name: str, default: str | None = None) -> str:
|
|
47
|
+
value = getattr(deployment, name, default)
|
|
48
|
+
if value is None:
|
|
49
|
+
raise ValueError(f"deployment.{name} is required")
|
|
50
|
+
return str(value)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def resolve_tenant_trust_domain_authority(
|
|
54
|
+
deployment: object, tenant_slug: str
|
|
55
|
+
) -> TenantTrustDomainAuthority:
|
|
56
|
+
root_issuer = _deployment_value(deployment, "issuer")
|
|
57
|
+
issuer = tenant_issuer(root_issuer, tenant_slug)
|
|
58
|
+
jwks_path = tenant_jwks_path(tenant_slug)
|
|
59
|
+
protected_resource_identifier = f"{_deployment_value(deployment, 'protected_resource_identifier', root_issuer).rstrip('/')}/tenants/{tenant_slug}"
|
|
60
|
+
return TenantTrustDomainAuthority(
|
|
61
|
+
tenant_slug=tenant_slug,
|
|
62
|
+
issuer=issuer,
|
|
63
|
+
jwks_uri=f"{root_issuer.rstrip('/')}{jwks_path}",
|
|
64
|
+
jwks_path=jwks_path,
|
|
65
|
+
subject_namespace=f"{tenant_slug}:subjects",
|
|
66
|
+
protected_resource_identifier=protected_resource_identifier,
|
|
67
|
+
signing_scope=f"tenant:{tenant_slug}",
|
|
68
|
+
accepted_issuers=(issuer,),
|
|
69
|
+
verification_scope=(issuer, protected_resource_identifier),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def resolve_realm_trust_domain_authority(
|
|
74
|
+
deployment: object, realm_slug: str
|
|
75
|
+
) -> RealmTrustDomainAuthority:
|
|
76
|
+
root_issuer = _deployment_value(deployment, "issuer")
|
|
77
|
+
issuer = realm_issuer(root_issuer, realm_slug)
|
|
78
|
+
jwks_path = realm_jwks_path(realm_slug)
|
|
79
|
+
protected_resource_identifier = f"{_deployment_value(deployment, 'protected_resource_identifier', root_issuer).rstrip('/')}/realms/{realm_slug}"
|
|
80
|
+
return RealmTrustDomainAuthority(
|
|
81
|
+
realm_slug=realm_slug,
|
|
82
|
+
issuer=issuer,
|
|
83
|
+
jwks_uri=f"{root_issuer.rstrip('/')}{jwks_path}",
|
|
84
|
+
jwks_path=jwks_path,
|
|
85
|
+
subject_namespace=f"realm:{realm_slug}:subjects",
|
|
86
|
+
protected_resource_identifier=protected_resource_identifier,
|
|
87
|
+
signing_scope=f"realm:{realm_slug}",
|
|
88
|
+
accepted_issuers=(issuer,),
|
|
89
|
+
verification_scope=(issuer, protected_resource_identifier),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def tenant_trust_domain_authority_from_root_issuer(
|
|
94
|
+
root_issuer: str,
|
|
95
|
+
tenant_slug: str,
|
|
96
|
+
*,
|
|
97
|
+
protected_resource_identifier: str | None = None,
|
|
98
|
+
) -> TenantTrustDomainAuthority:
|
|
99
|
+
issuer = tenant_issuer(root_issuer, tenant_slug)
|
|
100
|
+
jwks_path = tenant_jwks_path(tenant_slug)
|
|
101
|
+
resource_base = (
|
|
102
|
+
protected_resource_identifier or f"{str(root_issuer).rstrip('/')}/resource"
|
|
103
|
+
)
|
|
104
|
+
resource = f"{str(resource_base).rstrip('/')}/tenants/{tenant_slug}"
|
|
105
|
+
return TenantTrustDomainAuthority(
|
|
106
|
+
tenant_slug=tenant_slug,
|
|
107
|
+
issuer=issuer,
|
|
108
|
+
jwks_uri=f"{str(root_issuer).rstrip('/')}{jwks_path}",
|
|
109
|
+
jwks_path=jwks_path,
|
|
110
|
+
subject_namespace=f"{tenant_slug}:subjects",
|
|
111
|
+
protected_resource_identifier=resource,
|
|
112
|
+
signing_scope=f"tenant:{tenant_slug}",
|
|
113
|
+
accepted_issuers=(issuer,),
|
|
114
|
+
verification_scope=(issuer, resource),
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def tenant_deployment(deployment: object, tenant_slug: str) -> object:
|
|
119
|
+
authority = resolve_tenant_trust_domain_authority(deployment, tenant_slug)
|
|
120
|
+
try:
|
|
121
|
+
return replace(
|
|
122
|
+
deployment,
|
|
123
|
+
issuer=authority.issuer,
|
|
124
|
+
protected_resource_identifier=authority.protected_resource_identifier,
|
|
125
|
+
)
|
|
126
|
+
except TypeError:
|
|
127
|
+
values = dict(getattr(deployment, "__dict__", {}))
|
|
128
|
+
values["issuer"] = authority.issuer
|
|
129
|
+
values["protected_resource_identifier"] = (
|
|
130
|
+
authority.protected_resource_identifier
|
|
131
|
+
)
|
|
132
|
+
return SimpleNamespace(**values)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def realm_deployment(deployment: object, realm_slug: str) -> object:
|
|
136
|
+
authority = resolve_realm_trust_domain_authority(deployment, realm_slug)
|
|
137
|
+
try:
|
|
138
|
+
return replace(
|
|
139
|
+
deployment,
|
|
140
|
+
issuer=authority.issuer,
|
|
141
|
+
protected_resource_identifier=authority.protected_resource_identifier,
|
|
142
|
+
)
|
|
143
|
+
except TypeError:
|
|
144
|
+
values = dict(getattr(deployment, "__dict__", {}))
|
|
145
|
+
values["issuer"] = authority.issuer
|
|
146
|
+
values["protected_resource_identifier"] = (
|
|
147
|
+
authority.protected_resource_identifier
|
|
148
|
+
)
|
|
149
|
+
return SimpleNamespace(**values)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def build_tenant_openid_config(deployment: object, tenant_slug: str) -> dict[str, Any]:
|
|
153
|
+
authority = resolve_tenant_trust_domain_authority(deployment, tenant_slug)
|
|
154
|
+
root = _deployment_value(deployment, "issuer")
|
|
155
|
+
base = root.rstrip("/")
|
|
156
|
+
return {
|
|
157
|
+
"issuer": authority.issuer,
|
|
158
|
+
"authorization_endpoint": f"{base}/authorize",
|
|
159
|
+
"token_endpoint": f"{base}/token",
|
|
160
|
+
"jwks_uri": authority.jwks_uri,
|
|
161
|
+
"userinfo_endpoint": f"{base}/userinfo",
|
|
162
|
+
"response_types_supported": ["code"],
|
|
163
|
+
"subject_types_supported": ["public"],
|
|
164
|
+
"id_token_signing_alg_values_supported": list(
|
|
165
|
+
getattr(deployment, "id_token_algs", ("ES256",))
|
|
166
|
+
),
|
|
167
|
+
"scopes_supported": ["openid", "profile", "email"],
|
|
168
|
+
"tba_auth_subject_namespace": authority.subject_namespace,
|
|
169
|
+
"tba_auth_signing_scope": authority.signing_scope,
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def build_realm_openid_config(deployment: object, realm_slug: str) -> dict[str, Any]:
|
|
174
|
+
authority = resolve_realm_trust_domain_authority(deployment, realm_slug)
|
|
175
|
+
root = _deployment_value(deployment, "issuer")
|
|
176
|
+
base = root.rstrip("/")
|
|
177
|
+
return {
|
|
178
|
+
"issuer": authority.issuer,
|
|
179
|
+
"authorization_endpoint": f"{base}/authorize",
|
|
180
|
+
"token_endpoint": f"{base}/token",
|
|
181
|
+
"jwks_uri": authority.jwks_uri,
|
|
182
|
+
"userinfo_endpoint": f"{base}/userinfo",
|
|
183
|
+
"response_types_supported": ["code"],
|
|
184
|
+
"subject_types_supported": ["public"],
|
|
185
|
+
"id_token_signing_alg_values_supported": list(
|
|
186
|
+
getattr(deployment, "id_token_algs", ("ES256",))
|
|
187
|
+
),
|
|
188
|
+
"scopes_supported": ["openid", "profile", "email"],
|
|
189
|
+
"tba_auth_subject_namespace": authority.subject_namespace,
|
|
190
|
+
"tba_auth_signing_scope": authority.signing_scope,
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def require_tenant_issuer(
|
|
195
|
+
payload: Mapping[str, Any], *, root_issuer: str, tenant_slug: str
|
|
196
|
+
) -> None:
|
|
197
|
+
authority = tenant_trust_domain_authority_from_root_issuer(root_issuer, tenant_slug)
|
|
198
|
+
actual = str(payload.get("iss") or "")
|
|
199
|
+
if actual not in set(authority.accepted_issuers):
|
|
200
|
+
raise ValueError(
|
|
201
|
+
f"tenant token issuer mismatch: expected {authority.issuer!r}, got {actual!r}"
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
__all__ = [
|
|
206
|
+
"REALM_JWKS_PATH",
|
|
207
|
+
"REALM_OPENID_CONFIGURATION_PATH",
|
|
208
|
+
"RealmTrustDomainAuthority",
|
|
209
|
+
"TenantTrustDomainAuthority",
|
|
210
|
+
"TENANT_JWKS_PATH",
|
|
211
|
+
"TENANT_OPENID_CONFIGURATION_PATH",
|
|
212
|
+
"build_realm_openid_config",
|
|
213
|
+
"build_tenant_openid_config",
|
|
214
|
+
"require_tenant_issuer",
|
|
215
|
+
"realm_deployment",
|
|
216
|
+
"realm_issuer",
|
|
217
|
+
"realm_jwks_path",
|
|
218
|
+
"realm_openid_configuration_path",
|
|
219
|
+
"resolve_realm_trust_domain_authority",
|
|
220
|
+
"resolve_tenant_trust_domain_authority",
|
|
221
|
+
"tenant_trust_domain_authority_from_root_issuer",
|
|
222
|
+
"tenant_deployment",
|
|
223
|
+
"tenant_issuer",
|
|
224
|
+
"tenant_jwks_path",
|
|
225
|
+
"tenant_openid_configuration_path",
|
|
226
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@dataclass(frozen=True, slots=True)
|
|
5
|
+
class OidcVersion:
|
|
6
|
+
identifier: str
|
|
7
|
+
status: str
|
|
8
|
+
published: str
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
VERSION_HISTORY = (
|
|
12
|
+
OidcVersion("1.0", "final", "2014-11-08"),
|
|
13
|
+
OidcVersion("1.0-errata2", "final-errata", "2023-12-15"),
|
|
14
|
+
)
|
|
15
|
+
CURRENT_VERSION = VERSION_HISTORY[-1]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def select_version(identifier: str = "1.0-errata2") -> OidcVersion:
|
|
19
|
+
for version in VERSION_HISTORY:
|
|
20
|
+
if version.identifier == identifier:
|
|
21
|
+
return version
|
|
22
|
+
raise ValueError(f"unsupported OIDC version: {identifier}")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
__all__ = ["CURRENT_VERSION", "VERSION_HISTORY", "OidcVersion", "select_version"]
|
|
@@ -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,36 @@
|
|
|
1
|
+
tba_protocol_oidc/__init__.py,sha256=GqHHPSJuVpRIpxzJnNW0ycj-G43cRD_ztK7Yfkg8kbE,2682
|
|
2
|
+
tba_protocol_oidc/bindings.py,sha256=GsD2Px65Ag-iE_TCS-fCx6k35fYU_nGYZU3zdKVIOks,995
|
|
3
|
+
tba_protocol_oidc/capability_requirements.py,sha256=H__ryug810rr0iYVPgp6y5HDIBzWHlA8riTrMHJxhQM,157
|
|
4
|
+
tba_protocol_oidc/claim_sets.py,sha256=z8ScXHR8irzzrPIH1wlTkvkT6bFFsStc7tiw62oyeEg,4282
|
|
5
|
+
tba_protocol_oidc/claims.py,sha256=w4j34NlQHdQWZzf4i0iBLR6O1zHt3habQaGQH812FDs,495
|
|
6
|
+
tba_protocol_oidc/compatibility.py,sha256=vKdbfkXGmUxJ_6vDLx27bTENASb12SiuXE3JMUiQkeA,856
|
|
7
|
+
tba_protocol_oidc/discovery.py,sha256=u3pijoZmFPwcRMWrfIykAAyrY-dmDz1EcMbGyQyT-fY,478
|
|
8
|
+
tba_protocol_oidc/eap_acr_values.py,sha256=gm3KsLdo14okxo6gMgg7VAb2T7FGm4lA5-7f83ImT1c,876
|
|
9
|
+
tba_protocol_oidc/errors.py,sha256=Rnjo-N2zy8VqJagstkPY-Tx0v5RqTusQ2HGE2cnAyOU,480
|
|
10
|
+
tba_protocol_oidc/features.py,sha256=TqukRKnAeJth6d8PfxtCIA_zZw4FyKVdyEY7LcaLe-w,671
|
|
11
|
+
tba_protocol_oidc/id_token.py,sha256=UDkjtAA01dcpZ1R3alAspSygCkZ4snMtctY6SSt-EIo,650
|
|
12
|
+
tba_protocol_oidc/id_token_profile.py,sha256=Le-eJi6VwQ52COG_DljISBUeGoXddQNZY3R8zeHbl0g,2074
|
|
13
|
+
tba_protocol_oidc/jwks_service.py,sha256=Ty21WFlvxmTeRTG9bda2kDT0Ir1F_1txiBkhA-uliR8,311
|
|
14
|
+
tba_protocol_oidc/migrations.py,sha256=9IuwxmE9artS-SjJq8PERq0uNdMzulXtoltRGeFnKzs,402
|
|
15
|
+
tba_protocol_oidc/provider.py,sha256=_D0GczzDQMdDnDU68zoXpmwkwJSspv187UaUTqOcHWI,7970
|
|
16
|
+
tba_protocol_oidc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
tba_protocol_oidc/reusable_components.py,sha256=zr_U3-tQBgI125glX4prFxmMsqEyQDDXLLZn6gslD6U,733
|
|
18
|
+
tba_protocol_oidc/schemas.py,sha256=_zwDSlBulqOKbw7zX9OIh87AhW8DAz8dvuuxzjEXk_g,819
|
|
19
|
+
tba_protocol_oidc/standards/__init__.py,sha256=Iv5RGJaObHHvW6_Birjn-XSuTrhI_bn6tv5Xyf-HyoM,226
|
|
20
|
+
tba_protocol_oidc/standards/_rp_logout_validation.py,sha256=AdgZHZbSL2kDhVPbxhH52lqj3qbb67i7dsWDZBR5VTU,3557
|
|
21
|
+
tba_protocol_oidc/standards/backchannel_logout.py,sha256=61M66GOqYsXMpZii75L8pfGcceHvx6pcrrZhQXWrgH4,7754
|
|
22
|
+
tba_protocol_oidc/standards/core.py,sha256=uCz-18_pnq4wD4kgik1KjUZZgIn_pfOgDwWcD79A1x0,791
|
|
23
|
+
tba_protocol_oidc/standards/discovery.py,sha256=maEY9VP65dAItlW0qzrxwuLr9mM30oOvkq7YBi1WwF4,1354
|
|
24
|
+
tba_protocol_oidc/standards/discovery_metadata.py,sha256=mr2wWCmMrxL92S5FunaTc8QxgnRw6TQAIti12rPH-3Q,5888
|
|
25
|
+
tba_protocol_oidc/standards/frontchannel_logout.py,sha256=RbpCs9hGtoy0B9cxvhBtJzTkZBGFQeEQ0o-7-PEYeyo,3501
|
|
26
|
+
tba_protocol_oidc/standards/id_token.py,sha256=F7fCsaXsvtq5RrstZzGUQptkkd9tM88N26sKsD9LoMw,3973
|
|
27
|
+
tba_protocol_oidc/standards/openid4vc.py,sha256=6_ZRFKaW2vq_fkZnwwnk5mA3Yy0HI0YqXCP9oWG7UH4,2514
|
|
28
|
+
tba_protocol_oidc/standards/rp_initiated_logout.py,sha256=aTVVXbC3DxFSRJ0oGm32t5-54a-hFHDk8BmDCDauHEk,9179
|
|
29
|
+
tba_protocol_oidc/standards/session_mgmt.py,sha256=A9g8NMugCd5AgqDr2jWKK7GcfNVV52WRF_FOKD0PE3U,7097
|
|
30
|
+
tba_protocol_oidc/standards/set_delivery.py,sha256=vtN2pV0v54hCpL7P0Zfekw4oZpcQHLqUphLcjFrba8c,874
|
|
31
|
+
tba_protocol_oidc/standards/userinfo.py,sha256=GnYFlHplIZr0x5q4q7JGfHKfXsiQ-cZ8bZzTIMC_XCk,1478
|
|
32
|
+
tba_protocol_oidc/tenant_discovery.py,sha256=ZjATI2i-LENCcIoiOCx02jCzJwY0YrRuq6nOCeFKNlw,8331
|
|
33
|
+
tba_protocol_oidc/versions.py,sha256=09jqxgS5sXwXfaQ7iWW_hc0G0EIcNxloIQFj1-mJgRc,643
|
|
34
|
+
tba_protocol_oidc-0.4.0.dev2.dist-info/METADATA,sha256=hb2sYajwUMXNibxOm1bYXtSX6HV-sBf_y50poC_q_vQ,7592
|
|
35
|
+
tba_protocol_oidc-0.4.0.dev2.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
36
|
+
tba_protocol_oidc-0.4.0.dev2.dist-info/RECORD,,
|