tba-profile-workload-credential-wimse-wit 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.
@@ -0,0 +1,10 @@
1
+ from .validation import REQUIRED_WIT_CLAIMS, validate_wit
2
+ from .versions import CURRENT_VERSION, VERSION_HISTORY, WitVersion
3
+
4
+ __all__ = [
5
+ "CURRENT_VERSION",
6
+ "REQUIRED_WIT_CLAIMS",
7
+ "VERSION_HISTORY",
8
+ "WitVersion",
9
+ "validate_wit",
10
+ ]
@@ -0,0 +1,5 @@
1
+ """Capability bindings owned by the versioned protocol package."""
2
+
3
+ PROTOCOL_CAPABILITY_BINDINGS: tuple[str, ...] = ()
4
+
5
+ __all__ = ["PROTOCOL_CAPABILITY_BINDINGS"]
@@ -0,0 +1,5 @@
1
+ """Claim vocabulary selected by the versioned protocol package."""
2
+
3
+ PROTOCOL_CLAIM_NAMES: tuple[str, ...] = ()
4
+
5
+ __all__ = ["PROTOCOL_CLAIM_NAMES"]
@@ -0,0 +1,3 @@
1
+ def require_version(identifier: str) -> None:
2
+ if identifier != "draft-ietf-wimse-workload-creds-02":
3
+ raise ValueError(f"unsupported WIT draft: {identifier}")
@@ -0,0 +1,8 @@
1
+ """Errors raised by the versioned protocol package."""
2
+
3
+
4
+ class ProtocolProfileError(ValueError):
5
+ """The artifact or request does not satisfy the selected protocol profile."""
6
+
7
+
8
+ __all__ = ["ProtocolProfileError"]
@@ -0,0 +1,3 @@
1
+ FEATURES = frozenset(
2
+ {"wit-jwt", "confirmation-key", "short-lifetime", "proof-presentation"}
3
+ )
@@ -0,0 +1,6 @@
1
+ def migration_path(
2
+ source: str, target: str = "draft-ietf-wimse-workload-creds-02"
3
+ ) -> tuple[str, ...]:
4
+ if source == target:
5
+ return ()
6
+ raise ValueError(f"manual WIT draft migration required: {source} to {target}")
File without changes
@@ -0,0 +1,5 @@
1
+ """Wire-schema inventory owned by the versioned protocol package."""
2
+
3
+ PROTOCOL_WIRE_SCHEMA_NAMES: tuple[str, ...] = ()
4
+
5
+ __all__ = ["PROTOCOL_WIRE_SCHEMA_NAMES"]
@@ -0,0 +1,19 @@
1
+ from collections.abc import Mapping
2
+
3
+ REQUIRED_WIT_CLAIMS = frozenset({"iss", "sub", "cnf", "exp", "iat"})
4
+
5
+
6
+ def validate_wit(headers: Mapping[str, object], claims: Mapping[str, object]) -> None:
7
+ if headers.get("typ") != "wit+jwt":
8
+ raise ValueError("WIT requires typ=wit+jwt")
9
+ if headers.get("alg") in {None, "none"}:
10
+ raise ValueError("WIT must be signed")
11
+ missing = REQUIRED_WIT_CLAIMS.difference(claims)
12
+ if missing:
13
+ raise ValueError(f"missing WIT claims: {sorted(missing)}")
14
+ if "aud" in claims:
15
+ raise ValueError(
16
+ "WIT is presented through a workload proof; aud belongs on the proof"
17
+ )
18
+ if not isinstance(claims["cnf"], Mapping) or not claims["cnf"]:
19
+ raise ValueError("WIT requires a confirmation key")
@@ -0,0 +1,16 @@
1
+ from dataclasses import dataclass
2
+
3
+
4
+ @dataclass(frozen=True, slots=True)
5
+ class WitVersion:
6
+ identifier: str
7
+ status: str
8
+ specification_uri: str
9
+
10
+
11
+ CURRENT_VERSION = WitVersion(
12
+ "draft-ietf-wimse-workload-creds-02",
13
+ "IETF-draft",
14
+ "https://datatracker.ietf.org/doc/draft-ietf-wimse-workload-creds/02/",
15
+ )
16
+ VERSION_HISTORY = (CURRENT_VERSION,)
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: tba-profile-workload-credential-wimse-wit
3
+ Version: 0.4.0.dev2
4
+ Summary:
5
+ Requires-Python: >=3.10,<3.15
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.10
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
@@ -0,0 +1,14 @@
1
+ tba_profile_workload_credential_wimse_wit/__init__.py,sha256=MBYi82c1q1R0LtO-s7kIMI_tMTL8N5kFpAT0hxsJec4,251
2
+ tba_profile_workload_credential_wimse_wit/bindings.py,sha256=geO7qbQkZg0dzzGv3daVxr3WhKaDUdlb382DITlWey4,163
3
+ tba_profile_workload_credential_wimse_wit/claims.py,sha256=WibdHFxqAyKK9njjKwo37vO1RKj76jedqoDQs22LF6U,147
4
+ tba_profile_workload_credential_wimse_wit/compatibility.py,sha256=blAPNN9tX4l6AK00uVEVt3BftrV0hpYn1LoZE9B1eho,170
5
+ tba_profile_workload_credential_wimse_wit/errors.py,sha256=KwHVry4N9TO5ZP3zolvxALLJPBFjBOpiNq_-vH4F9lQ,216
6
+ tba_profile_workload_credential_wimse_wit/features.py,sha256=NkdFsacddfvbNCC6SqbVB0dmaqmHItSnZDOfOYMD8Ls,100
7
+ tba_profile_workload_credential_wimse_wit/migrations.py,sha256=cbTpA34GR_1dW27Cn5zb6Bm0YLIap-PAakGOuhUFCZo,236
8
+ tba_profile_workload_credential_wimse_wit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ tba_profile_workload_credential_wimse_wit/schemas.py,sha256=QHrkgNjQDZ4CzMQvwCKcenekGhjq2ezTtR8VdgdbcWQ,161
10
+ tba_profile_workload_credential_wimse_wit/validation.py,sha256=3Xzn1KBLDCqOGJ2FkjFf_Iw4Cipsb52ygz4u7pS61hw,786
11
+ tba_profile_workload_credential_wimse_wit/versions.py,sha256=yGHkSQ8oPuHjU22yM-Ekge1QhIfCklQIGlgoGFAfE0o,360
12
+ tba_profile_workload_credential_wimse_wit-0.4.0.dev2.dist-info/METADATA,sha256=nzQKIYDr3GfOSb4LT78P4i_Qj8hHCOC2endOkls6Wz0,433
13
+ tba_profile_workload_credential_wimse_wit-0.4.0.dev2.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
14
+ tba_profile_workload_credential_wimse_wit-0.4.0.dev2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.5.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any