tba-storage-core 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_storage_core/__init__.py +25 -0
- tba_storage_core/components.py +35 -0
- tba_storage_core/framework.py +3 -0
- tba_storage_core/migrations/__init__.py +15 -0
- tba_storage_core/migrations/contract.py +74 -0
- tba_storage_core/migrations/env.py +7 -0
- tba_storage_core/migrations/helpers.py +219 -0
- tba_storage_core/migrations/versions/0001_initial_identity_tables.py +17 -0
- tba_storage_core/migrations/versions/0002_client_and_service_tables.py +23 -0
- tba_storage_core/migrations/versions/0003_authorization_runtime_tables.py +17 -0
- tba_storage_core/migrations/versions/0004_device_par_revocation_tables.py +17 -0
- tba_storage_core/migrations/versions/0005_session_logout_tables.py +17 -0
- tba_storage_core/migrations/versions/0006_key_rotation_and_audit_tables.py +17 -0
- tba_storage_core/migrations/versions/0007_browser_session_cookie_and_auth_code_linkage.py +50 -0
- tba_storage_core/migrations/versions/0008_refresh_token_family_state.py +44 -0
- tba_storage_core/migrations/versions/0009_admin_identity_bootstrap_and_password_recovery.py +48 -0
- tba_storage_core/migrations/versions/0010_realm_namespace_tables.py +33 -0
- tba_storage_core/migrations/versions/0011_delegation_grant_lifecycle_tables.py +39 -0
- tba_storage_core/migrations/versions/0012_key_version_and_token_provenance_tables.py +36 -0
- tba_storage_core/migrations/versions/0013_contract_durable_state_tables.py +59 -0
- tba_storage_core/migrations/versions/0014_optional_contract_state_tables.py +57 -0
- tba_storage_core/migrations/versions/0015_principal_identity_credential_tables.py +85 -0
- tba_storage_core/migrations/versions/0016_crypto_key_storage_tables.py +84 -0
- tba_storage_core/migrations/versions/0017_authorization_server_table.py +21 -0
- tba_storage_core/migrations/versions/0018_policy_tables.py +27 -0
- tba_storage_core/migrations/versions/0019_federation_and_invariant_tables.py +35 -0
- tba_storage_core/migrations/versions/0020_backchannel_logout_replay_table.py +21 -0
- tba_storage_core/migrations/versions/0021_authentication_challenge_table.py +21 -0
- tba_storage_core/migrations/versions/0022_authority_and_trust_graph_tables.py +35 -0
- tba_storage_core/migrations/versions/0023_artifact_and_token_profile_discriminators.py +65 -0
- tba_storage_core/migrations/versions/0024_credential_issuer_wallet_and_configuration.py +32 -0
- tba_storage_core/migrations/versions/0025_credential_issuance_and_status.py +34 -0
- tba_storage_core/migrations/versions/0026_presentation_transaction_and_replay.py +28 -0
- tba_storage_core/migrations/versions/0027_attestation_and_reference_material.py +32 -0
- tba_storage_core/migrations/versions/0028_spiffe_svid_and_trust_bundles.py +22 -0
- tba_storage_core/migrations/versions/0029_security_event_delivery.py +28 -0
- tba_storage_core/migrations/versions/0030_optional_did_and_gnap_state.py +37 -0
- tba_storage_core/migrations/versions/0031_certificate_trust_and_status.py +22 -0
- tba_storage_core/migrations/versions/0032_claim_definition_and_provenance.py +30 -0
- tba_storage_core/migrations/versions/0033_replay_reservations.py +18 -0
- tba_storage_core/migrations/versions/0034_dpop_replay_nonce_tables.py +21 -0
- tba_storage_core/migrations/versions/0035_webauthn_rp_ceremony_and_credentials.py +76 -0
- tba_storage_core/migrations/versions/0036_workload_credentials_artifacts_and_proof_replay.py +27 -0
- tba_storage_core/migrations/versions/0037_operator_tables.py +30 -0
- tba_storage_core/migrations/versions/0038_adopt_component_ownership.py +66 -0
- tba_storage_core/migrations/versions/0039_normalized_platform_iam.py +17 -0
- tba_storage_core/py.typed +0 -0
- tba_storage_core/storage.lock.toml +211 -0
- tba_storage_core/storage.toml +34 -0
- tba_storage_core/tables/__init__.py +179 -0
- tba_storage_core/tables/_graph_base.py +53 -0
- tba_storage_core/tables/_registry.py +200 -0
- tba_storage_core/tables/access_review_campaign/__init__.py +9 -0
- tba_storage_core/tables/access_review_campaign/_table.py +25 -0
- tba_storage_core/tables/access_review_decision/__init__.py +9 -0
- tba_storage_core/tables/access_review_decision/_table.py +27 -0
- tba_storage_core/tables/access_review_item/__init__.py +9 -0
- tba_storage_core/tables/access_review_item/_table.py +26 -0
- tba_storage_core/tables/attestation_appraisal_policy/__init__.py +3 -0
- tba_storage_core/tables/attestation_endorsement/__init__.py +3 -0
- tba_storage_core/tables/attestation_evidence/__init__.py +3 -0
- tba_storage_core/tables/attestation_reference_manifest/__init__.py +3 -0
- tba_storage_core/tables/attestation_reference_value/__init__.py +3 -0
- tba_storage_core/tables/attestation_result/__init__.py +3 -0
- tba_storage_core/tables/attestation_state.py +124 -0
- tba_storage_core/tables/attribute_policy/__init__.py +9 -0
- tba_storage_core/tables/attribute_policy/_table.py +40 -0
- tba_storage_core/tables/audit_event/__init__.py +10 -0
- tba_storage_core/tables/audit_event/_table.py +47 -0
- tba_storage_core/tables/auth_code/__init__.py +13 -0
- tba_storage_core/tables/auth_code/_table.py +41 -0
- tba_storage_core/tables/auth_session/__init__.py +13 -0
- tba_storage_core/tables/auth_session/_table.py +45 -0
- tba_storage_core/tables/authentication_challenge/__init__.py +7 -0
- tba_storage_core/tables/authentication_challenge/_table.py +38 -0
- tba_storage_core/tables/authority_derivation_graph/__init__.py +15 -0
- tba_storage_core/tables/authority_derivation_graph/_table.py +94 -0
- tba_storage_core/tables/authorization_invariant/__init__.py +5 -0
- tba_storage_core/tables/authorization_invariant/_table.py +34 -0
- tba_storage_core/tables/authorization_server/__init__.py +6 -0
- tba_storage_core/tables/authorization_server/_table.py +61 -0
- tba_storage_core/tables/authz_verification_report/__init__.py +9 -0
- tba_storage_core/tables/authz_verification_report/_table.py +29 -0
- tba_storage_core/tables/backchannel_logout_replay/__init__.py +5 -0
- tba_storage_core/tables/backchannel_logout_replay/_table.py +37 -0
- tba_storage_core/tables/certificate_record/__init__.py +3 -0
- tba_storage_core/tables/certificate_state.py +82 -0
- tba_storage_core/tables/certificate_status_snapshot/__init__.py +3 -0
- tba_storage_core/tables/claim_state.py +98 -0
- tba_storage_core/tables/client/__init__.py +9 -0
- tba_storage_core/tables/client/_table.py +41 -0
- tba_storage_core/tables/client_registration/__init__.py +10 -0
- tba_storage_core/tables/client_registration/_table.py +47 -0
- tba_storage_core/tables/consent/__init__.py +13 -0
- tba_storage_core/tables/consent/_table.py +57 -0
- tba_storage_core/tables/control_correctness_report/__init__.py +9 -0
- tba_storage_core/tables/control_correctness_report/_table.py +20 -0
- tba_storage_core/tables/credential/__init__.py +9 -0
- tba_storage_core/tables/credential/_table.py +74 -0
- tba_storage_core/tables/credential_api_key/__init__.py +9 -0
- tba_storage_core/tables/credential_api_key/_table.py +50 -0
- tba_storage_core/tables/credential_audit_event/__init__.py +9 -0
- tba_storage_core/tables/credential_audit_event/_table.py +25 -0
- tba_storage_core/tables/credential_client_secret/__init__.py +9 -0
- tba_storage_core/tables/credential_client_secret/_table.py +24 -0
- tba_storage_core/tables/credential_configuration/__init__.py +3 -0
- tba_storage_core/tables/credential_deferred_transaction/__init__.py +3 -0
- tba_storage_core/tables/credential_dpop_key/__init__.py +9 -0
- tba_storage_core/tables/credential_dpop_key/_table.py +22 -0
- tba_storage_core/tables/credential_ecosystem_registry.py +119 -0
- tba_storage_core/tables/credential_issuance_state.py +154 -0
- tba_storage_core/tables/credential_issuance_transaction/__init__.py +3 -0
- tba_storage_core/tables/credential_issuer/__init__.py +3 -0
- tba_storage_core/tables/credential_mfa_factor/__init__.py +9 -0
- tba_storage_core/tables/credential_mfa_factor/_table.py +24 -0
- tba_storage_core/tables/credential_mtls_certificate/__init__.py +9 -0
- tba_storage_core/tables/credential_mtls_certificate/_table.py +26 -0
- tba_storage_core/tables/credential_notification/__init__.py +3 -0
- tba_storage_core/tables/credential_offer/__init__.py +3 -0
- tba_storage_core/tables/credential_password/__init__.py +9 -0
- tba_storage_core/tables/credential_password/_table.py +24 -0
- tba_storage_core/tables/credential_recovery_code/__init__.py +9 -0
- tba_storage_core/tables/credential_recovery_code/_table.py +23 -0
- tba_storage_core/tables/credential_service_key/__init__.py +9 -0
- tba_storage_core/tables/credential_service_key/_table.py +49 -0
- tba_storage_core/tables/credential_status_entry/__init__.py +3 -0
- tba_storage_core/tables/credential_status_list/__init__.py +3 -0
- tba_storage_core/tables/credential_status_publication/__init__.py +3 -0
- tba_storage_core/tables/credential_webauthn_passkey/__init__.py +9 -0
- tba_storage_core/tables/credential_webauthn_passkey/_table.py +42 -0
- tba_storage_core/tables/crypto_key/__init__.py +13 -0
- tba_storage_core/tables/crypto_key/_table.py +52 -0
- tba_storage_core/tables/crypto_key_version/__init__.py +13 -0
- tba_storage_core/tables/crypto_key_version/_table.py +53 -0
- tba_storage_core/tables/delegated_admin_scope/__init__.py +9 -0
- tba_storage_core/tables/delegated_admin_scope/_table.py +34 -0
- tba_storage_core/tables/delegation_grant/__init__.py +13 -0
- tba_storage_core/tables/delegation_grant/_table.py +134 -0
- tba_storage_core/tables/device_code/__init__.py +13 -0
- tba_storage_core/tables/device_code/_table.py +54 -0
- tba_storage_core/tables/did_document/__init__.py +3 -0
- tba_storage_core/tables/did_document_version/__init__.py +3 -0
- tba_storage_core/tables/did_gnap_state.py +169 -0
- tba_storage_core/tables/did_resolution_cache/__init__.py +3 -0
- tba_storage_core/tables/did_service/__init__.py +3 -0
- tba_storage_core/tables/did_verification_method/__init__.py +3 -0
- tba_storage_core/tables/dpop_nonce/__init__.py +5 -0
- tba_storage_core/tables/dpop_nonce/_table.py +77 -0
- tba_storage_core/tables/dpop_replay/__init__.py +5 -0
- tba_storage_core/tables/dpop_replay/_table.py +97 -0
- tba_storage_core/tables/entitlement/__init__.py +9 -0
- tba_storage_core/tables/entitlement/_table.py +22 -0
- tba_storage_core/tables/entitlement_assignment/__init__.py +9 -0
- tba_storage_core/tables/entitlement_assignment/_table.py +26 -0
- tba_storage_core/tables/federated_session/__init__.py +5 -0
- tba_storage_core/tables/federated_session/_table.py +32 -0
- tba_storage_core/tables/federation/__init__.py +5 -0
- tba_storage_core/tables/federation/_table.py +37 -0
- tba_storage_core/tables/gnap_client_instance/__init__.py +3 -0
- tba_storage_core/tables/gnap_continuation/__init__.py +3 -0
- tba_storage_core/tables/gnap_grant/__init__.py +3 -0
- tba_storage_core/tables/gnap_interaction/__init__.py +3 -0
- tba_storage_core/tables/identity_provider/__init__.py +5 -0
- tba_storage_core/tables/identity_provider/_table.py +37 -0
- tba_storage_core/tables/invariant_evaluation/__init__.py +5 -0
- tba_storage_core/tables/invariant_evaluation/_table.py +29 -0
- tba_storage_core/tables/invariant_violation/__init__.py +5 -0
- tba_storage_core/tables/invariant_violation/_table.py +27 -0
- tba_storage_core/tables/key_attestation_evidence/__init__.py +13 -0
- tba_storage_core/tables/key_attestation_evidence/_table.py +99 -0
- tba_storage_core/tables/key_envelope/__init__.py +13 -0
- tba_storage_core/tables/key_envelope/_table.py +54 -0
- tba_storage_core/tables/key_rotation_event/__init__.py +9 -0
- tba_storage_core/tables/key_rotation_event/_table.py +44 -0
- tba_storage_core/tables/key_rotation_policy/__init__.py +9 -0
- tba_storage_core/tables/key_rotation_policy/_table.py +38 -0
- tba_storage_core/tables/logout_state/__init__.py +10 -0
- tba_storage_core/tables/logout_state/_table.py +67 -0
- tba_storage_core/tables/machine_identity/__init__.py +9 -0
- tba_storage_core/tables/machine_identity/_table.py +49 -0
- tba_storage_core/tables/operator_activity/__init__.py +9 -0
- tba_storage_core/tables/operator_activity/_table.py +29 -0
- tba_storage_core/tables/operator_audit_event/__init__.py +9 -0
- tba_storage_core/tables/operator_audit_event/_table.py +29 -0
- tba_storage_core/tables/operator_metadata/__init__.py +9 -0
- tba_storage_core/tables/operator_metadata/_table.py +19 -0
- tba_storage_core/tables/operator_record/__init__.py +9 -0
- tba_storage_core/tables/operator_record/_table.py +44 -0
- tba_storage_core/tables/operator_transaction/__init__.py +9 -0
- tba_storage_core/tables/operator_transaction/_table.py +33 -0
- tba_storage_core/tables/plugin_descriptor/__init__.py +9 -0
- tba_storage_core/tables/plugin_descriptor/_table.py +23 -0
- tba_storage_core/tables/plugin_lifecycle_event/__init__.py +9 -0
- tba_storage_core/tables/plugin_lifecycle_event/_table.py +22 -0
- tba_storage_core/tables/policy/__init__.py +5 -0
- tba_storage_core/tables/policy/_table.py +30 -0
- tba_storage_core/tables/policy_condition/__init__.py +9 -0
- tba_storage_core/tables/policy_condition/_table.py +21 -0
- tba_storage_core/tables/policy_set/__init__.py +5 -0
- tba_storage_core/tables/policy_set/_table.py +33 -0
- tba_storage_core/tables/policy_set_member/__init__.py +5 -0
- tba_storage_core/tables/policy_set_member/_table.py +32 -0
- tba_storage_core/tables/policy_target/__init__.py +5 -0
- tba_storage_core/tables/policy_target/_table.py +36 -0
- tba_storage_core/tables/policy_version/__init__.py +5 -0
- tba_storage_core/tables/policy_version/_table.py +35 -0
- tba_storage_core/tables/presentation_consent/__init__.py +3 -0
- tba_storage_core/tables/presentation_replay/__init__.py +3 -0
- tba_storage_core/tables/presentation_state.py +98 -0
- tba_storage_core/tables/presentation_transaction/__init__.py +3 -0
- tba_storage_core/tables/principal/__init__.py +9 -0
- tba_storage_core/tables/principal/_table.py +49 -0
- tba_storage_core/tables/principal_key_binding/__init__.py +13 -0
- tba_storage_core/tables/principal_key_binding/_table.py +48 -0
- tba_storage_core/tables/provider_artifact/__init__.py +9 -0
- tba_storage_core/tables/provider_artifact/_table.py +22 -0
- tba_storage_core/tables/pushed_authorization_request/__init__.py +13 -0
- tba_storage_core/tables/pushed_authorization_request/_table.py +59 -0
- tba_storage_core/tables/realm/__init__.py +13 -0
- tba_storage_core/tables/realm/_table.py +87 -0
- tba_storage_core/tables/release_attestation_event/__init__.py +9 -0
- tba_storage_core/tables/release_attestation_event/_table.py +21 -0
- tba_storage_core/tables/release_authorization_state/__init__.py +9 -0
- tba_storage_core/tables/release_authorization_state/_table.py +21 -0
- tba_storage_core/tables/release_capability_record/__init__.py +9 -0
- tba_storage_core/tables/release_capability_record/_table.py +21 -0
- tba_storage_core/tables/release_posture/__init__.py +9 -0
- tba_storage_core/tables/release_posture/_table.py +21 -0
- tba_storage_core/tables/release_security_posture/__init__.py +9 -0
- tba_storage_core/tables/release_security_posture/_table.py +22 -0
- tba_storage_core/tables/replay_reservation.py +34 -0
- tba_storage_core/tables/residency_zone/__init__.py +9 -0
- tba_storage_core/tables/residency_zone/_table.py +20 -0
- tba_storage_core/tables/resource_server_contract/__init__.py +9 -0
- tba_storage_core/tables/resource_server_contract/_table.py +21 -0
- tba_storage_core/tables/revoked_token/__init__.py +13 -0
- tba_storage_core/tables/revoked_token/_table.py +39 -0
- tba_storage_core/tables/role/__init__.py +9 -0
- tba_storage_core/tables/role/_table.py +22 -0
- tba_storage_core/tables/runtime_qualification/__init__.py +9 -0
- tba_storage_core/tables/runtime_qualification/_table.py +21 -0
- tba_storage_core/tables/scim_group/__init__.py +9 -0
- tba_storage_core/tables/scim_group/_table.py +21 -0
- tba_storage_core/tables/scim_patch_event/__init__.py +9 -0
- tba_storage_core/tables/scim_patch_event/_table.py +22 -0
- tba_storage_core/tables/scim_schema/__init__.py +9 -0
- tba_storage_core/tables/scim_schema/_table.py +21 -0
- tba_storage_core/tables/scim_user/__init__.py +9 -0
- tba_storage_core/tables/scim_user/_table.py +21 -0
- tba_storage_core/tables/sdk_package/__init__.py +9 -0
- tba_storage_core/tables/sdk_package/_table.py +23 -0
- tba_storage_core/tables/security_event/__init__.py +3 -0
- tba_storage_core/tables/security_event_delivery/__init__.py +3 -0
- tba_storage_core/tables/security_event_replay/__init__.py +3 -0
- tba_storage_core/tables/security_event_state.py +100 -0
- tba_storage_core/tables/security_event_subscription/__init__.py +3 -0
- tba_storage_core/tables/service_identity/__init__.py +9 -0
- tba_storage_core/tables/service_identity/_table.py +47 -0
- tba_storage_core/tables/spiffe_state.py +83 -0
- tba_storage_core/tables/spiffe_trust_bundle/__init__.py +3 -0
- tba_storage_core/tables/subject_alias/__init__.py +9 -0
- tba_storage_core/tables/subject_alias/_table.py +21 -0
- tba_storage_core/tables/svid_record/__init__.py +3 -0
- tba_storage_core/tables/tenant/__init__.py +13 -0
- tba_storage_core/tables/tenant/_table.py +83 -0
- tba_storage_core/tables/tenant_membership/__init__.py +9 -0
- tba_storage_core/tables/tenant_membership/_table.py +28 -0
- tba_storage_core/tables/tenant_residency/__init__.py +9 -0
- tba_storage_core/tables/tenant_residency/_table.py +23 -0
- tba_storage_core/tables/token_record/__init__.py +10 -0
- tba_storage_core/tables/token_record/_table.py +123 -0
- tba_storage_core/tables/trust_anchor/__init__.py +3 -0
- tba_storage_core/tables/trust_domain_federation/__init__.py +3 -0
- tba_storage_core/tables/trust_federation_graph/__init__.py +15 -0
- tba_storage_core/tables/trust_federation_graph/_table.py +94 -0
- tba_storage_core/tables/user/__init__.py +13 -0
- tba_storage_core/tables/user/_table.py +127 -0
- tba_storage_core/tables/verifier_registration/__init__.py +3 -0
- tba_storage_core/tables/wallet_attestation/__init__.py +3 -0
- tba_storage_core/tables/wallet_instance/__init__.py +3 -0
- tba_storage_core/tables/wallet_key_binding/__init__.py +3 -0
- tba_storage_core/tables/wallet_registration/__init__.py +3 -0
- tba_storage_core/tables/webauthn_attestation_record/__init__.py +3 -0
- tba_storage_core/tables/webauthn_attestation_record/_table.py +28 -0
- tba_storage_core/tables/webauthn_ceremony/__init__.py +3 -0
- tba_storage_core/tables/webauthn_ceremony/_table.py +43 -0
- tba_storage_core/tables/webauthn_relying_party/__init__.py +3 -0
- tba_storage_core/tables/webauthn_relying_party/_table.py +24 -0
- tba_storage_core/tables/workload_credential_state.py +57 -0
- tba_storage_core/tables/workload_identity/__init__.py +9 -0
- tba_storage_core/tables/workload_identity/_table.py +89 -0
- tba_storage_core-0.4.0.dev2.dist-info/METADATA +126 -0
- tba_storage_core-0.4.0.dev2.dist-info/RECORD +294 -0
- tba_storage_core-0.4.0.dev2.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Durable WebAuthn registration and authentication ceremony state."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import datetime as dt
|
|
6
|
+
|
|
7
|
+
from tba_storage_core.framework import (
|
|
8
|
+
GUIDPk,
|
|
9
|
+
LargeBinary,
|
|
10
|
+
Mapped,
|
|
11
|
+
RestOltpTable,
|
|
12
|
+
S,
|
|
13
|
+
String,
|
|
14
|
+
TZDateTime,
|
|
15
|
+
Timestamped,
|
|
16
|
+
acol,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class WebAuthnCeremony(RestOltpTable, GUIDPk, Timestamped):
|
|
21
|
+
__tablename__ = "webauthn_ceremonies"
|
|
22
|
+
__table_args__ = {"extend_existing": True, "schema": "authn"}
|
|
23
|
+
|
|
24
|
+
ceremony_id: Mapped[str] = acol(storage=S(String(255), nullable=False, unique=True, index=True))
|
|
25
|
+
tenant_id: Mapped[str] = acol(storage=S(String(255), nullable=False, index=True))
|
|
26
|
+
principal_id: Mapped[str | None] = acol(storage=S(String(255), nullable=True, index=True))
|
|
27
|
+
ceremony_kind: Mapped[str] = acol(storage=S(String(32), nullable=False, index=True))
|
|
28
|
+
rp_id: Mapped[str] = acol(storage=S(String(255), nullable=False, index=True))
|
|
29
|
+
expected_origin: Mapped[str] = acol(storage=S(String(2048), nullable=False))
|
|
30
|
+
challenge_digest: Mapped[bytes] = acol(storage=S(LargeBinary, nullable=False))
|
|
31
|
+
options_digest: Mapped[bytes | None] = acol(storage=S(LargeBinary, nullable=True))
|
|
32
|
+
user_verification_requirement: Mapped[str] = acol(storage=S(String(32), nullable=False, default="preferred"))
|
|
33
|
+
resident_key_requirement: Mapped[str | None] = acol(storage=S(String(32), nullable=True))
|
|
34
|
+
attestation_preference: Mapped[str | None] = acol(storage=S(String(32), nullable=True))
|
|
35
|
+
state: Mapped[str] = acol(storage=S(String(32), nullable=False, default="pending", index=True))
|
|
36
|
+
issued_at: Mapped[dt.datetime] = acol(storage=S(TZDateTime, nullable=False, index=True))
|
|
37
|
+
expires_at: Mapped[dt.datetime] = acol(storage=S(TZDateTime, nullable=False, index=True))
|
|
38
|
+
consumed_at: Mapped[dt.datetime | None] = acol(storage=S(TZDateTime, nullable=True, index=True))
|
|
39
|
+
bound_credential_id: Mapped[str | None] = acol(storage=S(String(255), nullable=True, index=True))
|
|
40
|
+
failure_code: Mapped[str | None] = acol(storage=S(String(128), nullable=True))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
__all__ = ["WebAuthnCeremony"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Tenant-scoped WebAuthn relying-party configuration."""
|
|
2
|
+
|
|
3
|
+
from tba_storage_core.framework import Boolean, GUIDPk, JSON, Mapped, RestOltpTable, S, String, Timestamped, acol
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class WebAuthnRelyingParty(RestOltpTable, GUIDPk, Timestamped):
|
|
7
|
+
__tablename__ = "webauthn_relying_parties"
|
|
8
|
+
__table_args__ = {"extend_existing": True, "schema": "authn"}
|
|
9
|
+
|
|
10
|
+
rp_config_id: Mapped[str] = acol(storage=S(String(255), nullable=False, unique=True, index=True))
|
|
11
|
+
tenant_id: Mapped[str] = acol(storage=S(String(255), nullable=False, index=True))
|
|
12
|
+
rp_id: Mapped[str] = acol(storage=S(String(255), nullable=False, index=True))
|
|
13
|
+
display_name: Mapped[str] = acol(storage=S(String(255), nullable=False))
|
|
14
|
+
allowed_origins: Mapped[list] = acol(storage=S(JSON, nullable=False, default=list))
|
|
15
|
+
allowed_algorithms: Mapped[list] = acol(storage=S(JSON, nullable=False, default=list))
|
|
16
|
+
user_verification_policy: Mapped[str] = acol(storage=S(String(32), nullable=False, default="preferred"))
|
|
17
|
+
resident_key_policy: Mapped[str] = acol(storage=S(String(32), nullable=False, default="preferred"))
|
|
18
|
+
attestation_policy: Mapped[str] = acol(storage=S(String(32), nullable=False, default="none"))
|
|
19
|
+
allowed_attestation_formats: Mapped[list | None] = acol(storage=S(JSON, nullable=True))
|
|
20
|
+
related_origins: Mapped[list | None] = acol(storage=S(JSON, nullable=True))
|
|
21
|
+
enabled: Mapped[bool] = acol(storage=S(Boolean, nullable=False, default=True, index=True))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__all__ = ["WebAuthnRelyingParty"]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Durable workload references, credential entitlements, artifact locators, and proof replay."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
import datetime as dt
|
|
4
|
+
from tba_storage_core.framework import Boolean, GUIDPk, JSON, Mapped, RestOltpTable, S, String, TZDateTime, Timestamped, acol
|
|
5
|
+
|
|
6
|
+
class WorkloadReferenceBinding(RestOltpTable, GUIDPk, Timestamped):
|
|
7
|
+
__tablename__="workload_reference_bindings"; __table_args__=({"schema":"authn"},)
|
|
8
|
+
reference_id: Mapped[str]=acol(storage=S(String(255),nullable=False,unique=True,index=True))
|
|
9
|
+
tenant_id: Mapped[str]=acol(storage=S(String(255),nullable=False,index=True))
|
|
10
|
+
reference_kind: Mapped[str]=acol(storage=S(String(64),nullable=False,index=True))
|
|
11
|
+
reference_digest: Mapped[str]=acol(storage=S(String(128),nullable=False,index=True))
|
|
12
|
+
reference_scope: Mapped[str]=acol(storage=S(String(1000),nullable=False,index=True))
|
|
13
|
+
canonical_locator: Mapped[str|None]=acol(storage=S(String(2000),nullable=True))
|
|
14
|
+
resolved_workload_id: Mapped[str|None]=acol(storage=S(String(1000),nullable=True,index=True))
|
|
15
|
+
lifecycle_version: Mapped[str|None]=acol(storage=S(String(255),nullable=True))
|
|
16
|
+
active: Mapped[bool]=acol(storage=S(Boolean,nullable=False,default=True,index=True))
|
|
17
|
+
valid_from: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
18
|
+
valid_until: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
19
|
+
last_resolved_at: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
20
|
+
|
|
21
|
+
class WorkloadCredentialEntitlement(RestOltpTable, GUIDPk, Timestamped):
|
|
22
|
+
__tablename__="workload_credential_entitlements"; __table_args__=({"schema":"authn"},)
|
|
23
|
+
entitlement_id: Mapped[str]=acol(storage=S(String(255),nullable=False,unique=True,index=True))
|
|
24
|
+
tenant_id: Mapped[str]=acol(storage=S(String(255),nullable=False,index=True))
|
|
25
|
+
actor_principal_id: Mapped[str]=acol(storage=S(String(255),nullable=False,index=True))
|
|
26
|
+
workload_reference_id: Mapped[str]=acol(storage=S(String(255),nullable=False,index=True))
|
|
27
|
+
credential_format: Mapped[str]=acol(storage=S(String(64),nullable=False,index=True))
|
|
28
|
+
identity_constraint: Mapped[str|None]=acol(storage=S(String(1000),nullable=True,index=True))
|
|
29
|
+
audience_constraint: Mapped[dict|None]=acol(storage=S(JSON,nullable=True))
|
|
30
|
+
trust_domain_constraint: Mapped[str|None]=acol(storage=S(String(255),nullable=True,index=True))
|
|
31
|
+
policy_reference: Mapped[str|None]=acol(storage=S(String(1000),nullable=True))
|
|
32
|
+
enabled: Mapped[bool]=acol(storage=S(Boolean,nullable=False,default=True,index=True))
|
|
33
|
+
valid_from: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
34
|
+
valid_until: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
35
|
+
|
|
36
|
+
class ProtectedArtifactReference(RestOltpTable, GUIDPk, Timestamped):
|
|
37
|
+
__tablename__="protected_artifact_references"; __table_args__=({"schema":"authn"},)
|
|
38
|
+
artifact_id: Mapped[str]=acol(storage=S(String(255),nullable=False,unique=True,index=True))
|
|
39
|
+
artifact_kind: Mapped[str]=acol(storage=S(String(64),nullable=False,index=True))
|
|
40
|
+
artifact_format: Mapped[str]=acol(storage=S(String(128),nullable=False,index=True))
|
|
41
|
+
profile: Mapped[str|None]=acol(storage=S(String(255),nullable=True,index=True))
|
|
42
|
+
immutable_locator: Mapped[str]=acol(storage=S(String(2000),nullable=False))
|
|
43
|
+
artifact_digest: Mapped[str]=acol(storage=S(String(128),nullable=False,index=True))
|
|
44
|
+
media_type: Mapped[str|None]=acol(storage=S(String(255),nullable=True))
|
|
45
|
+
valid_until: Mapped[dt.datetime|None]=acol(storage=S(TZDateTime,nullable=True,index=True))
|
|
46
|
+
|
|
47
|
+
class PossessionProofReplay(RestOltpTable, GUIDPk, Timestamped):
|
|
48
|
+
__tablename__="possession_proof_replays"; __table_args__=({"schema":"authn"},)
|
|
49
|
+
replay_key: Mapped[str]=acol(storage=S(String(128),nullable=False,unique=True,index=True))
|
|
50
|
+
profile: Mapped[str]=acol(storage=S(String(128),nullable=False,index=True))
|
|
51
|
+
proof_id: Mapped[str]=acol(storage=S(String(255),nullable=False,index=True))
|
|
52
|
+
credential_digest: Mapped[str|None]=acol(storage=S(String(128),nullable=True,index=True))
|
|
53
|
+
audience_digest: Mapped[str|None]=acol(storage=S(String(128),nullable=True,index=True))
|
|
54
|
+
first_seen_at: Mapped[dt.datetime]=acol(storage=S(TZDateTime,nullable=False,index=True))
|
|
55
|
+
expires_at: Mapped[dt.datetime]=acol(storage=S(TZDateTime,nullable=False,index=True))
|
|
56
|
+
|
|
57
|
+
__all__=["PossessionProofReplay","ProtectedArtifactReference","WorkloadCredentialEntitlement","WorkloadReferenceBinding"]
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Durable workload identity records."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from tba_storage_core.framework import (
|
|
7
|
+
ColumnSpec,
|
|
8
|
+
F,
|
|
9
|
+
GUIDPk,
|
|
10
|
+
IO,
|
|
11
|
+
JSON,
|
|
12
|
+
Mapped,
|
|
13
|
+
RestOltpTable,
|
|
14
|
+
S,
|
|
15
|
+
String,
|
|
16
|
+
Timestamped,
|
|
17
|
+
acol,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class WorkloadIdentity(RestOltpTable, GUIDPk, Timestamped):
|
|
22
|
+
__tablename__ = "workload_identities"
|
|
23
|
+
__table_args__ = {"extend_existing": True, "schema": "authn"}
|
|
24
|
+
|
|
25
|
+
principal_id: Mapped[str] = acol(
|
|
26
|
+
spec=ColumnSpec(
|
|
27
|
+
storage=S(String(255), nullable=False, unique=True, index=True),
|
|
28
|
+
field=F(constraints={"max_length": 255}, required_in=("create",)),
|
|
29
|
+
io=IO(
|
|
30
|
+
in_verbs=("create", "update", "replace"),
|
|
31
|
+
out_verbs=("read", "list"),
|
|
32
|
+
filter_ops=("eq",),
|
|
33
|
+
),
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
workload_subject: Mapped[str] = acol(
|
|
37
|
+
spec=ColumnSpec(
|
|
38
|
+
storage=S(String(1000), nullable=False, unique=True, index=True),
|
|
39
|
+
field=F(constraints={"max_length": 1000}, required_in=("create",)),
|
|
40
|
+
io=IO(
|
|
41
|
+
in_verbs=("create", "update", "replace"),
|
|
42
|
+
out_verbs=("read", "list"),
|
|
43
|
+
filter_ops=("eq", "ilike"),
|
|
44
|
+
),
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
tenant_id: Mapped[str | None] = acol(
|
|
48
|
+
storage=S(String(255), nullable=True, index=True)
|
|
49
|
+
)
|
|
50
|
+
realm_id: Mapped[str | None] = acol(
|
|
51
|
+
storage=S(String(255), nullable=True, index=True)
|
|
52
|
+
)
|
|
53
|
+
trust_domain: Mapped[str | None] = acol(
|
|
54
|
+
storage=S(String(255), nullable=True, index=True)
|
|
55
|
+
)
|
|
56
|
+
spiffe_id: Mapped[str | None] = acol(
|
|
57
|
+
storage=S(String(1000), nullable=True, unique=True, index=True)
|
|
58
|
+
)
|
|
59
|
+
selector_digest: Mapped[str | None] = acol(
|
|
60
|
+
storage=S(String(128), nullable=True, index=True)
|
|
61
|
+
)
|
|
62
|
+
svid_type: Mapped[str | None] = acol(
|
|
63
|
+
storage=S(String(32), nullable=True, index=True)
|
|
64
|
+
)
|
|
65
|
+
bundle_version: Mapped[str | None] = acol(
|
|
66
|
+
storage=S(String(128), nullable=True, index=True)
|
|
67
|
+
)
|
|
68
|
+
namespace: Mapped[str | None] = acol(
|
|
69
|
+
storage=S(String(255), nullable=True, index=True)
|
|
70
|
+
)
|
|
71
|
+
service_account: Mapped[str | None] = acol(
|
|
72
|
+
storage=S(String(255), nullable=True, index=True)
|
|
73
|
+
)
|
|
74
|
+
cloud_provider: Mapped[str | None] = acol(
|
|
75
|
+
storage=S(String(64), nullable=True, index=True)
|
|
76
|
+
)
|
|
77
|
+
cloud_subject: Mapped[str | None] = acol(
|
|
78
|
+
storage=S(String(1000), nullable=True, index=True)
|
|
79
|
+
)
|
|
80
|
+
image_digest: Mapped[str | None] = acol(
|
|
81
|
+
storage=S(String(255), nullable=True, index=True)
|
|
82
|
+
)
|
|
83
|
+
status: Mapped[str] = acol(
|
|
84
|
+
storage=S(String(32), nullable=False, default="active", index=True)
|
|
85
|
+
)
|
|
86
|
+
workload_metadata: Mapped[dict | None] = acol(storage=S(JSON, nullable=True))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
__all__ = ["WorkloadIdentity"]
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tba-storage-core
|
|
3
|
+
Version: 0.4.0.dev2
|
|
4
|
+
Summary: Tigrbl and SQLAlchemy identity tables, ORM models, migrations, persistence helpers, and table-owned operations for IAM runtimes.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Keywords: tigrbl,identity,storage,sqlalchemy,tba-tables,migrations,database,iam,persistence,table-operations
|
|
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: tba-contracts-security-trust (==0.1.0)
|
|
23
|
+
Requires-Dist: tba-primitives-identity (==0.4.0.dev2)
|
|
24
|
+
Requires-Dist: tba-storage-access-governance (==0.4.0.dev2)
|
|
25
|
+
Requires-Dist: tba-storage-attestation (==0.4.0.dev2)
|
|
26
|
+
Requires-Dist: tba-storage-audit (==0.4.0.dev2)
|
|
27
|
+
Requires-Dist: tba-storage-authentication (==0.4.0.dev2)
|
|
28
|
+
Requires-Dist: tba-storage-authority-graph (==0.4.0.dev2)
|
|
29
|
+
Requires-Dist: tba-storage-authorization-policy (==0.4.0.dev2)
|
|
30
|
+
Requires-Dist: tba-storage-certificate (==0.4.0.dev2)
|
|
31
|
+
Requires-Dist: tba-storage-claims (==0.4.0.dev2)
|
|
32
|
+
Requires-Dist: tba-storage-consent (==0.4.0.dev2)
|
|
33
|
+
Requires-Dist: tba-storage-delegation (==0.4.0.dev2)
|
|
34
|
+
Requires-Dist: tba-storage-did (==0.4.0.dev2)
|
|
35
|
+
Requires-Dist: tba-storage-digital-credential (==0.4.0.dev2)
|
|
36
|
+
Requires-Dist: tba-storage-federation (==0.4.0.dev2)
|
|
37
|
+
Requires-Dist: tba-storage-gnap (==0.4.0.dev2)
|
|
38
|
+
Requires-Dist: tba-storage-key-material (==0.4.0.dev3)
|
|
39
|
+
Requires-Dist: tba-storage-oauth (==0.4.0.dev2)
|
|
40
|
+
Requires-Dist: tba-storage-oidc (==0.4.0.dev2)
|
|
41
|
+
Requires-Dist: tba-storage-operator (==0.4.0.dev2)
|
|
42
|
+
Requires-Dist: tba-storage-presentation (==0.4.0.dev2)
|
|
43
|
+
Requires-Dist: tba-storage-principals (==0.4.0.dev2)
|
|
44
|
+
Requires-Dist: tba-storage-release-governance (==0.4.0.dev2)
|
|
45
|
+
Requires-Dist: tba-storage-replay-protection (==0.4.0.dev2)
|
|
46
|
+
Requires-Dist: tba-storage-residency (==0.4.0.dev2)
|
|
47
|
+
Requires-Dist: tba-storage-scim (==0.4.0.dev2)
|
|
48
|
+
Requires-Dist: tba-storage-security-event (==0.4.0.dev2)
|
|
49
|
+
Requires-Dist: tba-storage-tenancy (==0.4.0.dev2)
|
|
50
|
+
Requires-Dist: tba-storage-token (==0.4.0.dev2)
|
|
51
|
+
Requires-Dist: tba-storage-trust-federation-graph (==0.4.0.dev2)
|
|
52
|
+
Requires-Dist: tba-storage-webauthn (==0.4.0.dev2)
|
|
53
|
+
Requires-Dist: tba-storage-workload-identity (==0.4.0.dev2)
|
|
54
|
+
Requires-Dist: tigrbl (==0.4.5.dev4)
|
|
55
|
+
Requires-Dist: tigrbl-core (==0.4.5.dev4)
|
|
56
|
+
Requires-Dist: tigrbl-migrations (>=0.4.5.dev4)
|
|
57
|
+
Project-URL: Homepage, https://github.com/tigrbl/tigrbl_auth
|
|
58
|
+
Project-URL: PyPI, https://pypi.org/project/tba-storage-core/
|
|
59
|
+
Project-URL: Repository, https://github.com/tigrbl/tigrbl_auth
|
|
60
|
+
Project-URL: Source, https://github.com/tigrbl/tigrbl_auth/tree/master/pkgs/01-storage/tba-storage-core
|
|
61
|
+
Project-URL: SSOT, https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json
|
|
62
|
+
Description-Content-Type: text/markdown
|
|
63
|
+
|
|
64
|
+
# tba-storage-core
|
|
65
|
+
|
|
66
|
+
[](https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json)
|
|
67
|
+
|
|
68
|
+
tba-storage-core owns mapped persistence state for the TBA identity
|
|
69
|
+
suite. It contains Tigrbl/SQLAlchemy tables and migrations while executable
|
|
70
|
+
durable operations live in layer 30 and protocol wire behavior lives in layer
|
|
71
|
+
50.
|
|
72
|
+
|
|
73
|
+
## AEO Summary
|
|
74
|
+
|
|
75
|
+
- Package: `tba-storage-core`
|
|
76
|
+
- Import root: `tba_storage_core`
|
|
77
|
+
- Component kind: Platform package
|
|
78
|
+
- Use it when a deployment needs identity table mappings or migrations.
|
|
79
|
+
- It is named storage so alternate backends can fit the boundary, even though the current implementation includes Tigrbl and SQLAlchemy assets.
|
|
80
|
+
- It should not own OAuth, OIDC, admin policy, or ASGI runtime behavior.
|
|
81
|
+
|
|
82
|
+
## Installation
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pip install tba-storage-core
|
|
86
|
+
# or
|
|
87
|
+
uv add tba-storage-core
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Usage
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
from tba_storage_core.tables import Role, Tenant
|
|
94
|
+
|
|
95
|
+
tenant_table = Tenant
|
|
96
|
+
role_table = Role
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Package Boundary
|
|
100
|
+
|
|
101
|
+
- Tigrbl and SQLAlchemy table mappings
|
|
102
|
+
- ORM and migration modules
|
|
103
|
+
- Passive mapped relationships, constraints, indexes, and storage defaults
|
|
104
|
+
- No routers, HTTP schemas, runtime binding activation, hashing providers, or
|
|
105
|
+
executable durable operations
|
|
106
|
+
|
|
107
|
+
## Related Packages
|
|
108
|
+
|
|
109
|
+
- [tba-runtime-identity-administration](https://pypi.org/project/tba-runtime-identity-administration/)
|
|
110
|
+
- [tba-storage-core](https://pypi.org/project/tba-storage-core/)
|
|
111
|
+
- [tba-server-identity](https://pypi.org/project/tba-server-identity/)
|
|
112
|
+
- [tba-runtime-identity](https://pypi.org/project/tba-runtime-identity/)
|
|
113
|
+
- [tba-operator-identity](https://pypi.org/project/tba-operator-identity/)
|
|
114
|
+
- [tba-testkit-identity](https://pypi.org/project/tba-testkit-identity/)
|
|
115
|
+
|
|
116
|
+
## Project Links
|
|
117
|
+
|
|
118
|
+
- [PyPI package](https://pypi.org/project/tba-storage-core/)
|
|
119
|
+
- [Source repository](https://github.com/tigrbl/tigrbl_auth)
|
|
120
|
+
- [Package source](https://github.com/tigrbl/tigrbl_auth/tree/master/pkgs/01-storage/tba-storage-core)
|
|
121
|
+
- [SSOT registry](https://github.com/tigrbl/tigrbl_auth/blob/master/.ssot/registry.json)
|
|
122
|
+
|
|
123
|
+
## Governance
|
|
124
|
+
|
|
125
|
+
This package is part of the SSOT-governed TBA identity package suite. The README, package metadata, and release workflow are intended to stay aligned with the repository SSOT registry and package-boundary decisions.
|
|
126
|
+
|