otdf-python 0.4.0__tar.gz → 0.4.2__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.
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.pre-commit-config.yaml +1 -1
- otdf_python-0.4.2/.release-please-manifest.json +3 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.vscode/extensions.json +1 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/CHANGELOG.md +23 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/PKG-INFO +3 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/conftest.py +4 -6
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/buf.gen.yaml +1 -1
- otdf_python-0.4.0/otdf-python-proto/scripts/setup_connect_rpc.py → otdf_python-0.4.2/otdf-python-proto/generated/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/pyproject.toml +1 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/scripts/generate_connect_proto.py +6 -8
- otdf_python-0.4.0/src/otdf_python/connect_client.py → otdf_python-0.4.2/otdf-python-proto/scripts/setup_connect_rpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/__init__.py +2 -6
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/authorization/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/authorization/authorization_connect.py +250 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_connect.py +315 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/entityresolution/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_connect.py +185 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_connect.py +185 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/kas/__init__.py +2 -2
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/kas/kas_connect.py +259 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/actions/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_connect.py +380 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/attributes/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_connect.py +1310 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_connect.py +912 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_connect.py +380 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/namespaces/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_connect.py +648 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_connect.py +770 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_connect.py +790 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_connect.py +851 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/unsafe/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_connect.py +705 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/__init__.py +11 -0
- otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_connect.py +124 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/uv.lock +123 -123
- {otdf_python-0.4.0 → otdf_python-0.4.2}/pyproject.toml +32 -24
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/__init__.py +1 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/__main__.py +1 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/address_normalizer.py +8 -10
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/aesgcm.py +8 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/assertion_config.py +21 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/asym_crypto.py +18 -22
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/auth_headers.py +7 -6
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/autoconfigure_utils.py +21 -7
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/cli.py +5 -5
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/collection_store.py +13 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/collection_store_impl.py +5 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/config.py +13 -0
- otdf_python-0.4.2/src/otdf_python/connect_client.py +1 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/constants.py +2 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/crypto_utils.py +4 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/dpop.py +3 -5
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/ecc_constants.py +12 -14
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/ecc_mode.py +7 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/ecdh.py +24 -31
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/eckeypair.py +5 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/header.py +5 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/invalid_zip_exception.py +6 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/kas_client.py +66 -55
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/kas_connect_rpc_client.py +75 -38
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/kas_info.py +4 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/kas_key_cache.py +10 -9
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/key_type.py +4 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/key_type_constants.py +4 -11
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/manifest.py +24 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/nanotdf.py +30 -28
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/nanotdf_ecdsa_struct.py +5 -11
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/nanotdf_type.py +13 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/policy_binding_serializer.py +6 -4
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/policy_info.py +6 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/policy_object.py +8 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/policy_stub.py +2 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/resource_locator.py +22 -13
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/sdk.py +51 -73
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/sdk_builder.py +60 -47
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/sdk_exceptions.py +11 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/symmetric_and_payload_config.py +6 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/tdf.py +47 -10
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/tdf_reader.py +10 -13
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/tdf_writer.py +5 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/token_source.py +4 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/version.py +5 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/zip_reader.py +10 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/src/otdf_python/zip_writer.py +11 -0
- otdf_python-0.4.2/tests/__init__.py +1 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/config_pydantic.py +2 -5
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/conftest.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_only/test_otdfctl_generated_fixtures.py +0 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_cli_comparison.py +1 -5
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_cli_decrypt.py +4 -13
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_cli_inspect.py +3 -10
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_nanotdf_cli_comparison.py +3 -8
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_python_nanotdf_only.py +2 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/otdfctl_to_python/test_tdf_reader_integration.py +1 -6
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/python_only/test_kas_client_integration.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/support_sdk.py +1 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_cli_integration.py +4 -16
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_cli_tdf_validation.py +4 -11
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_pe_interaction.py +2 -4
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/server_logs.py +6 -8
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/support_cli_args.py +3 -9
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/support_common.py +1 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/support_otdfctl.py +3 -5
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/support_otdfctl_args.py +5 -9
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_address_normalizer.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_cli.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_ecdh.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_kas_client.py +57 -72
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_kas_key_cache.py +6 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_kas_key_management.py +2 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_key_type.py +8 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_log_collection.py +1 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_manifest.py +2 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_manifest_format.py +1 -4
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_nanotdf.py +6 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_nanotdf_ecdh.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_nanotdf_ecdsa_struct.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_nanotdf_integration.py +3 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_nanotdf_type.py +10 -1
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_policy_object.py +7 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_sdk.py +16 -4
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_sdk_builder.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_sdk_exceptions.py +6 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_sdk_mock.py +13 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_sdk_tdf_integration.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_tdf.py +4 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_tdf_key_management.py +2 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_tdf_reader.py +1 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_tdf_writer.py +8 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_token_source.py +3 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_url_normalization.py +2 -2
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_use_plaintext_flow.py +1 -6
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_validate_otdf_python.py +6 -3
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_version.py +8 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_zip_reader.py +7 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_zip_writer.py +6 -0
- otdf_python-0.4.2/uv.lock +849 -0
- otdf_python-0.4.0/.release-please-manifest.json +0 -3
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/authorization/__init__.py +0 -1
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2_connect.py +0 -191
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2_connect.py +0 -233
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/entityresolution/__init__.py +0 -1
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +0 -149
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +0 -149
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2_connect.py +0 -192
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2_connect.py +0 -275
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2_connect.py +0 -863
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +0 -611
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +0 -275
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +0 -443
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +0 -527
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +0 -527
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +0 -569
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +0 -485
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/__init__.py +0 -1
- otdf_python-0.4.0/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +0 -107
- otdf_python-0.4.0/tests/__init__.py +0 -1
- otdf_python-0.4.0/uv.lock +0 -1531
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/check_entitlements.sh +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/start_opentdf_docker.sh +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/workflows/build-python.yaml +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/workflows/platform-integration-test.yaml +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/workflows/release-please.yaml +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.github/workflows/test-suite.yaml +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.gitignore +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.release-please-config-develop.json +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.release-please-config.json +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.release-please-manifest-develop.json +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/.vscode/settings.json +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/LICENSE +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/README.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/docs/CONNECT_RPC.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/docs/DEVELOPING.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/docs/LEGACY_VERSION.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/docs/RELEASES.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/README.md +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/buf.lock +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/buf.yaml +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/authorization/authorization.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/authorization/v2/authorization.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/common/common.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/entity/entity.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/entityresolution/entity_resolution.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/entityresolution/v2/entity_resolution.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/kas/kas.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/logger/audit/test.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/actions/actions.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/attributes/attributes.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/kasregistry/key_access_server_registry.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/keymanagement/key_management.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/namespaces/namespaces.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/objects.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/registeredresources/registered_resources.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/resourcemapping/resource_mapping.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/selectors.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/subjectmapping/subject_mapping.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/policy/unsafe/unsafe.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/proto-files/wellknownconfiguration/wellknown_configuration.proto +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/scripts/build_connect_proto.sh +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/common/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entity/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/authorization_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/v2/authorization_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/common/common_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entity/entity_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/entity_resolution_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/v2/entity_resolution_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/kas/kas_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/logger/audit/test_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/actions/actions_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/attributes/attributes_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/kasregistry/key_access_server_registry_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/keymanagement/key_management_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/namespaces/namespaces_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/objects_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/registeredresources/registered_resources_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/resourcemapping/resource_mapping_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/selectors_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/subjectmapping/subject_mapping_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/unsafe/unsafe_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/wellknownconfiguration/wellknown_configuration_pb2_grpc.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/logger/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/__init__.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.pyi +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_data/empty_file.txt +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_data/sample_binary.png +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_data/sample_text.txt +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/integration/test_data/sample_with_attributes.txt +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/mock_crypto.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_aesgcm.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_assertion_config.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_asym_encryption.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_autoconfigure_utils.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_collection_store.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_config.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_crypto_utils.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_eckeypair.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_header.py +0 -0
- {otdf_python-0.4.0 → otdf_python-0.4.2}/tests/test_inner_classes.py +0 -0
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.2](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.4.1...otdf-python-v0.4.2) (2026-01-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **main:** Upgrade from connect-python 0.4.2 to 0.6.0
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **main:** ensure compatibility with the latest `connect-python` ([#123](https://github.com/b-long/opentdf-python-sdk/issues/123)) ([4d160db](https://github.com/b-long/opentdf-python-sdk/commit/4d160dbed2bdedc4baaa807f97903aad710de943))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Miscellaneous Chores
|
|
16
|
+
|
|
17
|
+
* release 0.4.2 ([a840f28](https://github.com/b-long/opentdf-python-sdk/commit/a840f284bed82a4b7de170ca1224bd232108047b))
|
|
18
|
+
|
|
19
|
+
## [0.4.1](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.4.0...otdf-python-v0.4.1) (2025-12-09)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* preserve exception chain ([#119](https://github.com/b-long/opentdf-python-sdk/issues/119)) ([09984b8](https://github.com/b-long/opentdf-python-sdk/commit/09984b843b369a6d2c76dc8a81d6315f195ea773))
|
|
25
|
+
|
|
3
26
|
## [0.4.0](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.3.5...otdf-python-v0.4.0) (2025-11-20)
|
|
4
27
|
|
|
5
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: otdf-python
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Unofficial OpenTDF SDK for Python
|
|
5
5
|
Project-URL: Homepage, https://github.com/b-long/opentdf-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/b-long/opentdf-python-sdk
|
|
@@ -22,13 +22,14 @@ Classifier: Topic :: Security :: Cryptography
|
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
24
|
Requires-Python: >=3.10
|
|
25
|
-
Requires-Dist: connect-python
|
|
25
|
+
Requires-Dist: connect-python<0.7,>=0.6.0
|
|
26
26
|
Requires-Dist: cryptography>=45.0.4
|
|
27
27
|
Requires-Dist: grpcio-status>=1.74.0
|
|
28
28
|
Requires-Dist: grpcio-tools>=1.74.0
|
|
29
29
|
Requires-Dist: grpcio>=1.74.0
|
|
30
30
|
Requires-Dist: httpx>=0.28.1
|
|
31
31
|
Requires-Dist: protobuf>=6.31.1
|
|
32
|
+
Requires-Dist: protoc-gen-connect-python<0.7,>=0.6.0
|
|
32
33
|
Requires-Dist: protoc-gen-openapiv2>=0.0.1
|
|
33
34
|
Requires-Dist: pyjwt>=2.10.1
|
|
34
35
|
Requires-Dist: typing-extensions>=4.14.1
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Pytest configuration and fixtures for the OpenTDF Python SDK tests.
|
|
1
|
+
"""Pytest configuration and fixtures for the OpenTDF Python SDK tests.
|
|
3
2
|
|
|
4
3
|
This module contains pytest hooks and fixtures that will be automatically
|
|
5
4
|
loaded by pytest when running tests.
|
|
@@ -14,13 +13,13 @@ from tests.server_logs import log_server_logs_on_failure
|
|
|
14
13
|
|
|
15
14
|
@pytest.fixture(scope="session")
|
|
16
15
|
def project_root(request) -> Path:
|
|
16
|
+
"""Get project root directory."""
|
|
17
17
|
return request.config.rootpath # Project root
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
|
21
21
|
def pytest_runtest_makereport(item, call):
|
|
22
|
-
"""
|
|
23
|
-
Hook that runs after each test phase (setup, call, teardown).
|
|
22
|
+
"""Collect server logs when test fails after each test phase.
|
|
24
23
|
|
|
25
24
|
This hook automatically collects server logs when a test fails.
|
|
26
25
|
"""
|
|
@@ -53,8 +52,7 @@ def pytest_runtest_makereport(item, call):
|
|
|
53
52
|
|
|
54
53
|
@pytest.fixture
|
|
55
54
|
def collect_server_logs():
|
|
56
|
-
"""
|
|
57
|
-
Fixture that provides a function to manually collect server logs.
|
|
55
|
+
"""Fixture that provides a function to manually collect server logs.
|
|
58
56
|
|
|
59
57
|
Usage:
|
|
60
58
|
def test_something(collect_server_logs):
|
|
File without changes
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Enhanced script to generate Python Connect RPC clients from .proto definitions.
|
|
2
|
+
"""Enhanced script to generate Python Connect RPC clients from .proto definitions.
|
|
4
3
|
|
|
5
4
|
This script:
|
|
6
5
|
1. Downloads the latest proto files from OpenTDF platform
|
|
@@ -38,7 +37,7 @@ def check_dependencies() -> bool:
|
|
|
38
37
|
print(" # macOS: brew install bufbuild/buf/buf")
|
|
39
38
|
print(" # Or: go install github.com/bufbuild/buf/cmd/buf@latest")
|
|
40
39
|
elif dep == "connect-python":
|
|
41
|
-
print(" uv add connect-python
|
|
40
|
+
print(" uv add connect-python protoc-gen-connect-python")
|
|
42
41
|
return False
|
|
43
42
|
|
|
44
43
|
return True
|
|
@@ -142,9 +141,9 @@ def run_buf_generate(proto_gen_dir: Path) -> bool:
|
|
|
142
141
|
print("Generating protobuf and Connect RPC files...")
|
|
143
142
|
|
|
144
143
|
try:
|
|
145
|
-
# First, get the path to protoc-gen-
|
|
144
|
+
# First, get the path to protoc-gen-connect-python
|
|
146
145
|
result = subprocess.run(
|
|
147
|
-
["uv", "run", "which", "protoc-gen-
|
|
146
|
+
["uv", "run", "which", "protoc-gen-connect-python"],
|
|
148
147
|
cwd=proto_gen_dir,
|
|
149
148
|
capture_output=True,
|
|
150
149
|
text=True,
|
|
@@ -160,7 +159,7 @@ def run_buf_generate(proto_gen_dir: Path) -> bool:
|
|
|
160
159
|
|
|
161
160
|
# Replace the local plugin path
|
|
162
161
|
updated_content = content.replace(
|
|
163
|
-
"- local: protoc-gen-
|
|
162
|
+
"- local: protoc-gen-connect-python", f"- local: {connect_plugin_path}"
|
|
164
163
|
)
|
|
165
164
|
|
|
166
165
|
with buf_gen_path.open("w") as f:
|
|
@@ -200,8 +199,7 @@ def create_init_files(generated_dir: Path) -> None:
|
|
|
200
199
|
|
|
201
200
|
|
|
202
201
|
def _fix_ignore_if_default_value(proto_files_dir):
|
|
203
|
-
"""
|
|
204
|
-
TODO: Fix buf validation: Updated the proto files to use the correct enum value:
|
|
202
|
+
"""TODO: Fix buf validation: Updated the proto files to use the correct enum value:
|
|
205
203
|
|
|
206
204
|
Changed IGNORE_IF_DEFAULT_VALUE → IGNORE_IF_ZERO_VALUE in:
|
|
207
205
|
attributes.proto
|
|
File without changes
|
|
@@ -13,25 +13,21 @@ except metadata.PackageNotFoundError:
|
|
|
13
13
|
__version__ = "0.0.0"
|
|
14
14
|
|
|
15
15
|
# Import submodules to make them available
|
|
16
|
-
|
|
16
|
+
# Note: authorization, entityresolution, wellknownconfiguration and policy subdirectories
|
|
17
|
+
# are imported lazily to avoid import errors from generated protobuf files
|
|
17
18
|
from . import common
|
|
18
19
|
from . import entity
|
|
19
|
-
from . import entityresolution
|
|
20
20
|
from . import kas
|
|
21
21
|
from . import legacy_grpc
|
|
22
22
|
from . import logger
|
|
23
23
|
from . import policy
|
|
24
|
-
from . import wellknownconfiguration
|
|
25
24
|
|
|
26
25
|
# Export main module categories
|
|
27
26
|
__all__ = [
|
|
28
|
-
"authorization",
|
|
29
27
|
"common",
|
|
30
28
|
"entity",
|
|
31
|
-
"entityresolution",
|
|
32
29
|
"kas",
|
|
33
30
|
"legacy_grpc",
|
|
34
31
|
"logger",
|
|
35
32
|
"policy",
|
|
36
|
-
"wellknownconfiguration",
|
|
37
33
|
]
|
otdf_python-0.4.2/otdf-python-proto/src/otdf_python_proto/authorization/authorization_connect.py
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
|
+
# source: authorization/authorization.proto
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
|
|
6
|
+
from typing import Protocol
|
|
7
|
+
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
|
+
from . import authorization_pb2 as authorization_dot_authorization__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AuthorizationService(Protocol):
|
|
19
|
+
async def get_decisions(self, request: authorization_dot_authorization__pb2.GetDecisionsRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetDecisionsResponse:
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
async def get_decisions_by_token(self, request: authorization_dot_authorization__pb2.GetDecisionsByTokenRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetDecisionsByTokenResponse:
|
|
23
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
24
|
+
|
|
25
|
+
async def get_entitlements(self, request: authorization_dot_authorization__pb2.GetEntitlementsRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetEntitlementsResponse:
|
|
26
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AuthorizationServiceASGIApplication(ConnectASGIApplication[AuthorizationService]):
|
|
30
|
+
def __init__(self, service: AuthorizationService | AsyncGenerator[AuthorizationService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
31
|
+
super().__init__(
|
|
32
|
+
service=service,
|
|
33
|
+
endpoints=lambda svc: {
|
|
34
|
+
"/authorization.AuthorizationService/GetDecisions": Endpoint.unary(
|
|
35
|
+
method=MethodInfo(
|
|
36
|
+
name="GetDecisions",
|
|
37
|
+
service_name="authorization.AuthorizationService",
|
|
38
|
+
input=authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
39
|
+
output=authorization_dot_authorization__pb2.GetDecisionsResponse,
|
|
40
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
41
|
+
),
|
|
42
|
+
function=svc.get_decisions,
|
|
43
|
+
),
|
|
44
|
+
"/authorization.AuthorizationService/GetDecisionsByToken": Endpoint.unary(
|
|
45
|
+
method=MethodInfo(
|
|
46
|
+
name="GetDecisionsByToken",
|
|
47
|
+
service_name="authorization.AuthorizationService",
|
|
48
|
+
input=authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
49
|
+
output=authorization_dot_authorization__pb2.GetDecisionsByTokenResponse,
|
|
50
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
51
|
+
),
|
|
52
|
+
function=svc.get_decisions_by_token,
|
|
53
|
+
),
|
|
54
|
+
"/authorization.AuthorizationService/GetEntitlements": Endpoint.unary(
|
|
55
|
+
method=MethodInfo(
|
|
56
|
+
name="GetEntitlements",
|
|
57
|
+
service_name="authorization.AuthorizationService",
|
|
58
|
+
input=authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
59
|
+
output=authorization_dot_authorization__pb2.GetEntitlementsResponse,
|
|
60
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
61
|
+
),
|
|
62
|
+
function=svc.get_entitlements,
|
|
63
|
+
),
|
|
64
|
+
},
|
|
65
|
+
interceptors=interceptors,
|
|
66
|
+
read_max_bytes=read_max_bytes,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def path(self) -> str:
|
|
71
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
72
|
+
return "/authorization.AuthorizationService"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class AuthorizationServiceClient(ConnectClient):
|
|
76
|
+
async def get_decisions(
|
|
77
|
+
self,
|
|
78
|
+
request: authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
79
|
+
*,
|
|
80
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
81
|
+
timeout_ms: int | None = None,
|
|
82
|
+
) -> authorization_dot_authorization__pb2.GetDecisionsResponse:
|
|
83
|
+
return await self.execute_unary(
|
|
84
|
+
request=request,
|
|
85
|
+
method=MethodInfo(
|
|
86
|
+
name="GetDecisions",
|
|
87
|
+
service_name="authorization.AuthorizationService",
|
|
88
|
+
input=authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
89
|
+
output=authorization_dot_authorization__pb2.GetDecisionsResponse,
|
|
90
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
91
|
+
),
|
|
92
|
+
headers=headers,
|
|
93
|
+
timeout_ms=timeout_ms,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
async def get_decisions_by_token(
|
|
97
|
+
self,
|
|
98
|
+
request: authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
99
|
+
*,
|
|
100
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
101
|
+
timeout_ms: int | None = None,
|
|
102
|
+
) -> authorization_dot_authorization__pb2.GetDecisionsByTokenResponse:
|
|
103
|
+
return await self.execute_unary(
|
|
104
|
+
request=request,
|
|
105
|
+
method=MethodInfo(
|
|
106
|
+
name="GetDecisionsByToken",
|
|
107
|
+
service_name="authorization.AuthorizationService",
|
|
108
|
+
input=authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
109
|
+
output=authorization_dot_authorization__pb2.GetDecisionsByTokenResponse,
|
|
110
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
111
|
+
),
|
|
112
|
+
headers=headers,
|
|
113
|
+
timeout_ms=timeout_ms,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
async def get_entitlements(
|
|
117
|
+
self,
|
|
118
|
+
request: authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
119
|
+
*,
|
|
120
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
121
|
+
timeout_ms: int | None = None,
|
|
122
|
+
) -> authorization_dot_authorization__pb2.GetEntitlementsResponse:
|
|
123
|
+
return await self.execute_unary(
|
|
124
|
+
request=request,
|
|
125
|
+
method=MethodInfo(
|
|
126
|
+
name="GetEntitlements",
|
|
127
|
+
service_name="authorization.AuthorizationService",
|
|
128
|
+
input=authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
129
|
+
output=authorization_dot_authorization__pb2.GetEntitlementsResponse,
|
|
130
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
131
|
+
),
|
|
132
|
+
headers=headers,
|
|
133
|
+
timeout_ms=timeout_ms,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class AuthorizationServiceSync(Protocol):
|
|
138
|
+
def get_decisions(self, request: authorization_dot_authorization__pb2.GetDecisionsRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetDecisionsResponse:
|
|
139
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
140
|
+
def get_decisions_by_token(self, request: authorization_dot_authorization__pb2.GetDecisionsByTokenRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetDecisionsByTokenResponse:
|
|
141
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
142
|
+
def get_entitlements(self, request: authorization_dot_authorization__pb2.GetEntitlementsRequest, ctx: RequestContext) -> authorization_dot_authorization__pb2.GetEntitlementsResponse:
|
|
143
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class AuthorizationServiceWSGIApplication(ConnectWSGIApplication):
|
|
147
|
+
def __init__(self, service: AuthorizationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
148
|
+
super().__init__(
|
|
149
|
+
endpoints={
|
|
150
|
+
"/authorization.AuthorizationService/GetDecisions": EndpointSync.unary(
|
|
151
|
+
method=MethodInfo(
|
|
152
|
+
name="GetDecisions",
|
|
153
|
+
service_name="authorization.AuthorizationService",
|
|
154
|
+
input=authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
155
|
+
output=authorization_dot_authorization__pb2.GetDecisionsResponse,
|
|
156
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
157
|
+
),
|
|
158
|
+
function=service.get_decisions,
|
|
159
|
+
),
|
|
160
|
+
"/authorization.AuthorizationService/GetDecisionsByToken": EndpointSync.unary(
|
|
161
|
+
method=MethodInfo(
|
|
162
|
+
name="GetDecisionsByToken",
|
|
163
|
+
service_name="authorization.AuthorizationService",
|
|
164
|
+
input=authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
165
|
+
output=authorization_dot_authorization__pb2.GetDecisionsByTokenResponse,
|
|
166
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
167
|
+
),
|
|
168
|
+
function=service.get_decisions_by_token,
|
|
169
|
+
),
|
|
170
|
+
"/authorization.AuthorizationService/GetEntitlements": EndpointSync.unary(
|
|
171
|
+
method=MethodInfo(
|
|
172
|
+
name="GetEntitlements",
|
|
173
|
+
service_name="authorization.AuthorizationService",
|
|
174
|
+
input=authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
175
|
+
output=authorization_dot_authorization__pb2.GetEntitlementsResponse,
|
|
176
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
177
|
+
),
|
|
178
|
+
function=service.get_entitlements,
|
|
179
|
+
),
|
|
180
|
+
},
|
|
181
|
+
interceptors=interceptors,
|
|
182
|
+
read_max_bytes=read_max_bytes,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
@property
|
|
186
|
+
def path(self) -> str:
|
|
187
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
188
|
+
return "/authorization.AuthorizationService"
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class AuthorizationServiceClientSync(ConnectClientSync):
|
|
192
|
+
def get_decisions(
|
|
193
|
+
self,
|
|
194
|
+
request: authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
195
|
+
*,
|
|
196
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
197
|
+
timeout_ms: int | None = None,
|
|
198
|
+
) -> authorization_dot_authorization__pb2.GetDecisionsResponse:
|
|
199
|
+
return self.execute_unary(
|
|
200
|
+
request=request,
|
|
201
|
+
method=MethodInfo(
|
|
202
|
+
name="GetDecisions",
|
|
203
|
+
service_name="authorization.AuthorizationService",
|
|
204
|
+
input=authorization_dot_authorization__pb2.GetDecisionsRequest,
|
|
205
|
+
output=authorization_dot_authorization__pb2.GetDecisionsResponse,
|
|
206
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
207
|
+
),
|
|
208
|
+
headers=headers,
|
|
209
|
+
timeout_ms=timeout_ms,
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
def get_decisions_by_token(
|
|
213
|
+
self,
|
|
214
|
+
request: authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
215
|
+
*,
|
|
216
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
217
|
+
timeout_ms: int | None = None,
|
|
218
|
+
) -> authorization_dot_authorization__pb2.GetDecisionsByTokenResponse:
|
|
219
|
+
return self.execute_unary(
|
|
220
|
+
request=request,
|
|
221
|
+
method=MethodInfo(
|
|
222
|
+
name="GetDecisionsByToken",
|
|
223
|
+
service_name="authorization.AuthorizationService",
|
|
224
|
+
input=authorization_dot_authorization__pb2.GetDecisionsByTokenRequest,
|
|
225
|
+
output=authorization_dot_authorization__pb2.GetDecisionsByTokenResponse,
|
|
226
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
227
|
+
),
|
|
228
|
+
headers=headers,
|
|
229
|
+
timeout_ms=timeout_ms,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
def get_entitlements(
|
|
233
|
+
self,
|
|
234
|
+
request: authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
235
|
+
*,
|
|
236
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
237
|
+
timeout_ms: int | None = None,
|
|
238
|
+
) -> authorization_dot_authorization__pb2.GetEntitlementsResponse:
|
|
239
|
+
return self.execute_unary(
|
|
240
|
+
request=request,
|
|
241
|
+
method=MethodInfo(
|
|
242
|
+
name="GetEntitlements",
|
|
243
|
+
service_name="authorization.AuthorizationService",
|
|
244
|
+
input=authorization_dot_authorization__pb2.GetEntitlementsRequest,
|
|
245
|
+
output=authorization_dot_authorization__pb2.GetEntitlementsResponse,
|
|
246
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
247
|
+
),
|
|
248
|
+
headers=headers,
|
|
249
|
+
timeout_ms=timeout_ms,
|
|
250
|
+
)
|