otdf-python 0.4.4__tar.gz → 0.5.0__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.5.0/.gemini/config.yaml +4 -0
- otdf_python-0.5.0/.release-please-manifest.json +3 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/CHANGELOG.md +7 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/PKG-INFO +1 -1
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/authorization/v2/authorization.proto +18 -9
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/kasregistry/key_access_server_registry.proto +36 -4
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/objects.proto +45 -1
- otdf_python-0.5.0/otdf-python-proto/proto-files/policy/obligations/obligations.proto +260 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/unsafe/unsafe.proto +8 -1
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/pyproject.toml +3 -2
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/scripts/generate_connect_proto.py +20 -15
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/__init__.py +83 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_connect.py +1 -1
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.py +107 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_connect.py +1 -1
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/kas/kas_connect.py +1 -1
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/v2/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/common/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entity/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/v2/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/kas/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/logger/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/logger/audit/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/actions/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/attributes/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/kasregistry/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/kasregistry/key_access_server_registry_pb2_grpc.py +44 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/keymanagement/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/namespaces/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/obligations/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/obligations/obligations_pb2_grpc.py +680 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/registeredresources/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/resourcemapping/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/subjectmapping/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/unsafe/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/legacy_grpc/wellknownconfiguration/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/logger/audit/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_connect.py +65 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.py +53 -41
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.pyi +40 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.py +33 -27
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/objects_pb2.pyi +40 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/policy/obligations/__init__.py +0 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/policy/obligations/obligations_connect.py +920 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/policy/obligations/obligations_pb2.py +110 -0
- otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/policy/obligations/obligations_pb2.pyi +224 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.py +10 -6
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_pb2.pyi +8 -4
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_connect.py +1 -1
- otdf_python-0.5.0/otdf-python-proto/tests/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/tests/test_generate_connect_proto.py +1 -1
- otdf_python-0.5.0/otdf-python-proto/tests/test_package_imports.py +66 -0
- otdf_python-0.5.0/otdf-python-proto/uv.lock +465 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/pyproject.toml +1 -1
- otdf_python-0.5.0/tests/integration/test_data/empty_file.txt +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/uv.lock +1 -1
- otdf_python-0.4.4/.release-please-manifest.json +0 -3
- otdf_python-0.4.4/otdf-python-proto/src/otdf_python_proto/__init__.py +0 -33
- otdf_python-0.4.4/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.py +0 -105
- otdf_python-0.4.4/otdf-python-proto/uv.lock +0 -1065
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/check_entitlements.sh +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/start_opentdf_docker.sh +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/workflows/build-python.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/workflows/platform-integration-test.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/workflows/release-please.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.github/workflows/test-suite.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.gitignore +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.pre-commit-config.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.release-please-config-develop.json +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.release-please-config.json +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.release-please-manifest-develop.json +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.vscode/extensions.json +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/.vscode/settings.json +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/LICENSE +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/README.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/conftest.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/docs/CONNECT_RPC.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/docs/DEVELOPING.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/docs/LEGACY_VERSION.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/docs/RELEASES.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/README.md +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/buf.gen.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/buf.lock +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/buf.yaml +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/generated/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/authorization/authorization.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/common/common.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/entity/entity.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/entityresolution/entity_resolution.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/entityresolution/v2/entity_resolution.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/kas/kas.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/logger/audit/test.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/actions/actions.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/attributes/attributes.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/keymanagement/key_management.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/namespaces/namespaces.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/registeredresources/registered_resources.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/resourcemapping/resource_mapping.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/selectors.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/subjectmapping/subject_mapping.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/wellknownconfiguration/wellknown_configuration.proto +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/scripts/build_connect_proto.sh +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/scripts/setup_connect_rpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/authorization_pb2.pyi +0 -0
- {otdf_python-0.4.4/otdf-python-proto/tests → otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/authorization/v2}/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/authorization/v2/authorization_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/common/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/common/common_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entity/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entity/entity_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/entity_resolution_pb2.pyi +0 -0
- /otdf_python-0.4.4/tests/integration/test_data/empty_file.txt → /otdf_python-0.5.0/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/entityresolution/v2/entity_resolution_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/kas/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/kas/kas_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/authorization_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/authorization/v2/authorization_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/common/common_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entity/entity_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/entity_resolution_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/entityresolution/v2/entity_resolution_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/kas/kas_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/logger/audit/test_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/actions/actions_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/attributes/attributes_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/keymanagement/key_management_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/namespaces/namespaces_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/objects_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/registeredresources/registered_resources_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/resourcemapping/resource_mapping_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/selectors_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/subjectmapping/subject_mapping_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/policy/unsafe/unsafe_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/legacy_grpc/wellknownconfiguration/wellknown_configuration_pb2_grpc.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/logger/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/logger/audit/test_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/actions/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/actions/actions_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/attributes/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/attributes/attributes_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/kasregistry/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/keymanagement/key_management_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/namespaces/namespaces_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/registeredresources/registered_resources_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/selectors_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/policy/unsafe/unsafe_connect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/src/otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.pyi +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/__main__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/address_normalizer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/aesgcm.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/assertion_config.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/asym_crypto.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/auth_headers.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/autoconfigure_utils.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/cli.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/collection_store.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/collection_store_impl.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/config.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/connect_client.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/constants.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/crypto_utils.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/dpop.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/ecc_constants.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/ecc_mode.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/ecdh.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/eckeypair.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/header.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/invalid_zip_exception.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/kas_allowlist.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/kas_client.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/kas_connect_rpc_client.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/kas_info.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/kas_key_cache.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/key_type.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/key_type_constants.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/manifest.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/nanotdf.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/nanotdf_ecdsa_struct.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/nanotdf_type.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/policy_binding_serializer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/policy_info.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/policy_object.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/policy_stub.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/resource_locator.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/sdk.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/sdk_builder.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/sdk_exceptions.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/symmetric_and_payload_config.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/tdf.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/tdf_reader.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/tdf_writer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/token_source.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/version.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/zip_reader.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/src/otdf_python/zip_writer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/__init__.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/config_pydantic.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/conftest.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_only/test_otdfctl_generated_fixtures.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_cli_comparison.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_cli_decrypt.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_cli_inspect.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_nanotdf_cli_comparison.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_python_nanotdf_only.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/otdfctl_to_python/test_tdf_reader_integration.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/python_only/test_kas_client_integration.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/support_sdk.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_cli_integration.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_cli_tdf_validation.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_data/sample_binary.png +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_data/sample_text.txt +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_data/sample_with_attributes.txt +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/integration/test_pe_interaction.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/mock_crypto.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/server_logs.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/support_cli_args.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/support_common.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/support_otdfctl.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/support_otdfctl_args.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_address_normalizer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_aesgcm.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_assertion_config.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_asym_encryption.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_autoconfigure_utils.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_cli.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_collection_store.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_config.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_crypto_utils.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_ecdh.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_eckeypair.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_header.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_inner_classes.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_kas_allowlist.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_kas_client.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_kas_key_cache.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_kas_key_management.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_key_type.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_log_collection.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_manifest.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_manifest_format.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_nanotdf.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_nanotdf_ecdh.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_nanotdf_ecdsa_struct.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_nanotdf_integration.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_nanotdf_type.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_policy_object.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_sdk.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_sdk_builder.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_sdk_exceptions.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_sdk_mock.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_sdk_tdf_integration.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_tdf.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_tdf_key_management.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_tdf_reader.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_tdf_writer.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_token_source.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_url_normalization.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_use_plaintext_flow.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_validate_otdf_python.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_version.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_zip_reader.py +0 -0
- {otdf_python-0.4.4 → otdf_python-0.5.0}/tests/test_zip_writer.py +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.4.4...otdf-python-v0.5.0) (2026-05-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **main:** update proto GIT_TAG to service/v0.8.0 ([#137](https://github.com/b-long/opentdf-python-sdk/issues/137)) ([05ea9a4](https://github.com/b-long/opentdf-python-sdk/commit/05ea9a4c2dcf23d2a709e421802f45ddb89d2ace))
|
|
9
|
+
|
|
3
10
|
## [0.4.4](https://github.com/b-long/opentdf-python-sdk/compare/otdf-python-v0.4.3...otdf-python-v0.4.4) (2026-04-30)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -21,11 +21,11 @@ message EntityIdentifier {
|
|
|
21
21
|
oneof identifier {
|
|
22
22
|
option (buf.validate.oneof).required = true;
|
|
23
23
|
|
|
24
|
-
// chain of one or more entities
|
|
24
|
+
// chain of one or more entities and at most 10
|
|
25
25
|
entity.EntityChain entity_chain = 1 [(buf.validate.field).cel = {
|
|
26
26
|
id: "entity_chain_required"
|
|
27
|
-
message: "entities must be provided"
|
|
28
|
-
expression: "has(this.entities) && this.entities.size() > 0"
|
|
27
|
+
message: "entities must be provided and between 1 and 10 in count"
|
|
28
|
+
expression: "has(this.entities) && this.entities.size() > 0 && this.entities.size() <= 10"
|
|
29
29
|
}];
|
|
30
30
|
|
|
31
31
|
// fully qualified name of the registered resource value stored in platform policy, where in
|
|
@@ -65,11 +65,13 @@ message Resource {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
oneof resource {
|
|
68
|
+
// a set of attribute value FQNs, such as those on a TDF, between 1 and 20 in count
|
|
68
69
|
AttributeValues attribute_values = 2 [(buf.validate.field).cel = {
|
|
69
70
|
id: "attribute_values_required"
|
|
70
|
-
message: "if provided, resource.attribute_values must
|
|
71
|
-
expression: "this.fqns.size() > 0 && this.fqns.all(item, item.isUri())"
|
|
71
|
+
message: "if provided, resource.attribute_values must be between 1 and 20 in count with all valid FQNs"
|
|
72
|
+
expression: "this.fqns.size() > 0 && this.fqns.size() <= 20 && this.fqns.all(item, item.isUri())"
|
|
72
73
|
}];
|
|
74
|
+
// fully qualified name of the registered resource value stored in platform policy
|
|
73
75
|
string registered_resource_value_fqn = 3 [(buf.validate.field).string = {
|
|
74
76
|
min_len: 1
|
|
75
77
|
uri: true
|
|
@@ -112,15 +114,17 @@ message GetDecisionResponse {
|
|
|
112
114
|
// 1. one entity reference (actor)
|
|
113
115
|
// 2. one action
|
|
114
116
|
// 3. multiple resources
|
|
115
|
-
// Note: this is a more performant bulk request for multiple resource decisions
|
|
117
|
+
// Note: this is a more performant bulk request for multiple resource decisions, up to 1000 per request
|
|
116
118
|
message GetDecisionMultiResourceRequest {
|
|
117
119
|
// an entity must be identified for authorization decisioning
|
|
118
120
|
EntityIdentifier entity_identifier = 1 [(buf.validate.field).required = true];
|
|
119
121
|
// name on action is required
|
|
120
122
|
policy.Action action = 2 [(buf.validate.field).required = true];
|
|
121
123
|
repeated Resource resources = 3 [
|
|
122
|
-
(buf.validate.field).
|
|
123
|
-
|
|
124
|
+
(buf.validate.field).repeated = {
|
|
125
|
+
min_items: 1
|
|
126
|
+
max_items: 1000
|
|
127
|
+
}
|
|
124
128
|
];
|
|
125
129
|
|
|
126
130
|
option (buf.validate.message).cel = {
|
|
@@ -141,7 +145,12 @@ message GetDecisionMultiResourceResponse {
|
|
|
141
145
|
// This is a more performant bulk request for complex decisioning (i.e. multiple entity chains or actions on
|
|
142
146
|
// multiple resources)
|
|
143
147
|
message GetDecisionBulkRequest {
|
|
144
|
-
repeated GetDecisionMultiResourceRequest decision_requests = 1
|
|
148
|
+
repeated GetDecisionMultiResourceRequest decision_requests = 1 [
|
|
149
|
+
(buf.validate.field).repeated = {
|
|
150
|
+
min_items: 1
|
|
151
|
+
max_items: 200
|
|
152
|
+
}
|
|
153
|
+
];
|
|
145
154
|
}
|
|
146
155
|
message GetDecisionBulkResponse {
|
|
147
156
|
repeated GetDecisionMultiResourceResponse decision_responses = 1;
|
|
@@ -403,7 +403,7 @@ message CreateKeyRequest {
|
|
|
403
403
|
Algorithm key_algorithm = 3 [(buf.validate.field).cel = {
|
|
404
404
|
id: "key_algorithm_defined"
|
|
405
405
|
message: "The key_algorithm must be one of the defined values."
|
|
406
|
-
expression: "this in [1, 2, 3, 4]" // Allow
|
|
406
|
+
expression: "this in [1, 2, 3, 4, 5]" // Allow ALGORITHM_RSA_2048, ALGORITHM_RSA_4096, ALGORITHM_EC_P256, ALGORITHM_EC_P384, ALGORITHM_EC_P521
|
|
407
407
|
}]; // The algorithm to be used for the key
|
|
408
408
|
// Required
|
|
409
409
|
KeyMode key_mode = 4 [(buf.validate.field).cel = {
|
|
@@ -445,7 +445,7 @@ message ListKeysRequest {
|
|
|
445
445
|
Algorithm key_algorithm = 1 [(buf.validate.field).cel = {
|
|
446
446
|
id: "key_algorithm_defined"
|
|
447
447
|
message: "The key_algorithm must be one of the defined values."
|
|
448
|
-
expression: "this in [0, 1, 2, 3, 4]" // Allow
|
|
448
|
+
expression: "this in [0, 1, 2, 3, 4, 5]" // Allow unspecified and object.Algorithm values for currently supported RSA bit sizes and EC curve types
|
|
449
449
|
}]; // Filter keys by algorithm
|
|
450
450
|
|
|
451
451
|
oneof kas_filter {
|
|
@@ -545,7 +545,7 @@ message RotateKeyRequest {
|
|
|
545
545
|
Algorithm algorithm = 2 [(buf.validate.field).cel = {
|
|
546
546
|
id: "key_algorithm_defined"
|
|
547
547
|
message: "The key_algorithm must be one of the defined values."
|
|
548
|
-
expression: "this in [1, 2, 3, 4]" // Allow
|
|
548
|
+
expression: "this in [1, 2, 3, 4, 5]" // Allow ALGORITHM_RSA_2048, ALGORITHM_RSA_4096, ALGORITHM_EC_P256, ALGORITHM_EC_P384, ALGORITHM_EC_P521
|
|
549
549
|
}];
|
|
550
550
|
// Required
|
|
551
551
|
KeyMode key_mode = 3 [
|
|
@@ -553,7 +553,7 @@ message RotateKeyRequest {
|
|
|
553
553
|
(buf.validate.field).cel = {
|
|
554
554
|
id: "new_key_mode_defined"
|
|
555
555
|
message: "The new key_mode must be one of the defined values (1-4)."
|
|
556
|
-
expression: "this in [1, 2, 3, 4]" // Allow
|
|
556
|
+
expression: "this in [1, 2, 3, 4]" // Allow modes CONFIG_ROOT_KEY, PROVIDER_ROOT_KEY, REMOTE, PUBLIC_KEY_ONLY
|
|
557
557
|
}
|
|
558
558
|
];
|
|
559
559
|
// Required
|
|
@@ -617,6 +617,35 @@ message SetBaseKeyResponse {
|
|
|
617
617
|
SimpleKasKey previous_base_key = 2; // The previous base key, if any
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
+
message MappedPolicyObject {
|
|
621
|
+
string id = 1; // The unique identifier of the policy object
|
|
622
|
+
string fqn = 2; // The fully qualified name of the policy object
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
message KeyMapping {
|
|
626
|
+
string kid = 1;
|
|
627
|
+
string kas_uri = 2;
|
|
628
|
+
repeated MappedPolicyObject namespace_mappings = 3; // List of namespaces mapped to the key
|
|
629
|
+
repeated MappedPolicyObject attribute_mappings = 4; // List of attribute definitions mapped to the key
|
|
630
|
+
repeated MappedPolicyObject value_mappings = 5; // List of attribute values mapped to the key
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
message ListKeyMappingsRequest {
|
|
634
|
+
oneof identifier {
|
|
635
|
+
option (buf.validate.oneof).required = false;
|
|
636
|
+
string id = 2 [(buf.validate.field).string.uuid = true]; // The unique identifier of the key to retrieve
|
|
637
|
+
KasKeyIdentifier key = 3;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
policy.PageRequest pagination = 10; // Pagination request for the list of keys
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
message ListKeyMappingsResponse {
|
|
644
|
+
repeated KeyMapping key_mappings = 1; // The list of key mappings
|
|
645
|
+
|
|
646
|
+
policy.PageResponse pagination = 10; // Pagination response for the list of keys
|
|
647
|
+
}
|
|
648
|
+
|
|
620
649
|
service KeyAccessServerRegistryService {
|
|
621
650
|
rpc ListKeyAccessServers(ListKeyAccessServersRequest) returns (ListKeyAccessServersResponse) {
|
|
622
651
|
option (google.api.http) = {get: "/key-access-servers"};
|
|
@@ -660,4 +689,7 @@ service KeyAccessServerRegistryService {
|
|
|
660
689
|
|
|
661
690
|
// Get Default kas keys
|
|
662
691
|
rpc GetBaseKey(GetBaseKeyRequest) returns (GetBaseKeyResponse) {}
|
|
692
|
+
|
|
693
|
+
// Request to list key mappings in the Key Access Service.
|
|
694
|
+
rpc ListKeyMappings(ListKeyMappingsRequest) returns (ListKeyMappingsResponse) {}
|
|
663
695
|
}
|
|
@@ -5,6 +5,7 @@ package policy;
|
|
|
5
5
|
import "buf/validate/validate.proto";
|
|
6
6
|
import "common/common.proto";
|
|
7
7
|
import "google/protobuf/wrappers.proto";
|
|
8
|
+
// import "google/protobuf/struct.proto";
|
|
8
9
|
|
|
9
10
|
message SimpleKasPublicKey {
|
|
10
11
|
Algorithm algorithm = 1;
|
|
@@ -447,7 +448,6 @@ message RegisteredResourceValue {
|
|
|
447
448
|
// Common metadata
|
|
448
449
|
common.Metadata metadata = 100;
|
|
449
450
|
}
|
|
450
|
-
|
|
451
451
|
string id = 1;
|
|
452
452
|
|
|
453
453
|
string value = 2;
|
|
@@ -460,6 +460,50 @@ message RegisteredResourceValue {
|
|
|
460
460
|
common.Metadata metadata = 100;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
message Obligation {
|
|
464
|
+
string id = 1;
|
|
465
|
+
|
|
466
|
+
Namespace namespace = 2;
|
|
467
|
+
|
|
468
|
+
string name = 3;
|
|
469
|
+
|
|
470
|
+
repeated ObligationValue values = 4;
|
|
471
|
+
|
|
472
|
+
common.Metadata metadata = 100;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
message ObligationValue {
|
|
476
|
+
string id = 1;
|
|
477
|
+
|
|
478
|
+
Obligation obligation = 2;
|
|
479
|
+
|
|
480
|
+
string value = 3;
|
|
481
|
+
|
|
482
|
+
common.Metadata metadata = 100;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
message ObligationTrigger {
|
|
486
|
+
string id = 1;
|
|
487
|
+
|
|
488
|
+
ObligationValue obligation_value = 2;
|
|
489
|
+
|
|
490
|
+
Action action = 3;
|
|
491
|
+
|
|
492
|
+
Value attribute_value = 4;
|
|
493
|
+
|
|
494
|
+
common.Metadata metadata = 100;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// message ObligationFulfiller {
|
|
498
|
+
// string id = 1;
|
|
499
|
+
|
|
500
|
+
// ObligationValue obligation_value = 2;
|
|
501
|
+
|
|
502
|
+
// google.protobuf.Struct conditionals = 3;
|
|
503
|
+
|
|
504
|
+
// common.Metadata metadata = 100;
|
|
505
|
+
// }
|
|
506
|
+
|
|
463
507
|
// Supported key algorithms.
|
|
464
508
|
enum Algorithm {
|
|
465
509
|
ALGORITHM_UNSPECIFIED = 0;
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package policy.obligations;
|
|
4
|
+
|
|
5
|
+
import "common/common.proto";
|
|
6
|
+
import "policy/objects.proto";
|
|
7
|
+
import "policy/selectors.proto";
|
|
8
|
+
// import "google/protobuf/struct.proto";
|
|
9
|
+
|
|
10
|
+
///
|
|
11
|
+
/// Obligation
|
|
12
|
+
///
|
|
13
|
+
|
|
14
|
+
// Definitions
|
|
15
|
+
message GetObligationRequest {
|
|
16
|
+
oneof identifier {
|
|
17
|
+
string id = 1;
|
|
18
|
+
string fqn = 2;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetObligationResponse {
|
|
23
|
+
policy.Obligation obligation = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetObligationsByFQNsRequest {
|
|
27
|
+
repeated string fqns = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message GetObligationsByFQNsResponse {
|
|
31
|
+
map<string, policy.Obligation> fqn_obligation_map = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message CreateObligationRequest {
|
|
35
|
+
// Required
|
|
36
|
+
oneof namespace_identifier {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string fqn = 2;
|
|
39
|
+
}
|
|
40
|
+
string name = 3;
|
|
41
|
+
// Optional
|
|
42
|
+
// Common metadata
|
|
43
|
+
common.MetadataMutable metadata = 100;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message CreateObligationResponse {
|
|
47
|
+
policy.Obligation obligation = 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message UpdateObligationRequest {
|
|
51
|
+
// Required
|
|
52
|
+
string id = 1;
|
|
53
|
+
|
|
54
|
+
// Optional
|
|
55
|
+
string name = 2;
|
|
56
|
+
common.MetadataMutable metadata = 100;
|
|
57
|
+
common.MetadataUpdateEnum metadata_update_behavior = 101;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message UpdateObligationResponse {
|
|
61
|
+
policy.Obligation obligation = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message DeleteObligationRequest {
|
|
65
|
+
oneof identifier {
|
|
66
|
+
string id = 1;
|
|
67
|
+
string fqn = 2;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message DeleteObligationResponse {
|
|
72
|
+
policy.Obligation obligation = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message ListObligationsRequest {
|
|
76
|
+
// Optional
|
|
77
|
+
// Namespace ID or FQN
|
|
78
|
+
oneof namespace_identifier {
|
|
79
|
+
string id = 1;
|
|
80
|
+
string fqn = 2;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Optional
|
|
84
|
+
policy.PageRequest pagination = 10;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message ListObligationsResponse {
|
|
88
|
+
repeated policy.Obligation obligations = 1;
|
|
89
|
+
|
|
90
|
+
policy.PageResponse pagination = 10;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Values
|
|
94
|
+
message GetObligationValueRequest {
|
|
95
|
+
oneof identifier {
|
|
96
|
+
string id = 1;
|
|
97
|
+
string fqn = 2;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message GetObligationValueResponse {
|
|
102
|
+
policy.ObligationValue value = 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message GetObligationValuesByFQNsRequest {
|
|
106
|
+
repeated string fqns = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message GetObligationValuesByFQNsResponse {
|
|
110
|
+
map<string, policy.ObligationValue> fqn_value_map = 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message CreateObligationValueRequest {
|
|
114
|
+
// Required
|
|
115
|
+
oneof obligation_identifier {
|
|
116
|
+
string id = 1;
|
|
117
|
+
string fqn = 2;
|
|
118
|
+
}
|
|
119
|
+
string value = 3;
|
|
120
|
+
|
|
121
|
+
// Optional
|
|
122
|
+
// Common metadata
|
|
123
|
+
common.MetadataMutable metadata = 100;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message CreateObligationValueResponse {
|
|
127
|
+
policy.ObligationValue value = 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
message UpdateObligationValueRequest {
|
|
131
|
+
// Required
|
|
132
|
+
string id = 1;
|
|
133
|
+
|
|
134
|
+
// Optional
|
|
135
|
+
string value = 2;
|
|
136
|
+
common.MetadataMutable metadata = 100;
|
|
137
|
+
common.MetadataUpdateEnum metadata_update_behavior = 101;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message UpdateObligationValueResponse {
|
|
141
|
+
policy.ObligationValue value = 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message DeleteObligationValueRequest {
|
|
145
|
+
oneof identifier {
|
|
146
|
+
string id = 1;
|
|
147
|
+
string fqn = 2;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message DeleteObligationValueResponse {
|
|
152
|
+
policy.ObligationValue value = 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Triggers
|
|
156
|
+
message AddObligationTriggerRequest {
|
|
157
|
+
// Required
|
|
158
|
+
string obligation_value_id = 1;
|
|
159
|
+
string action_id = 2;
|
|
160
|
+
string attribute_value_id = 3;
|
|
161
|
+
// Optional
|
|
162
|
+
// Common metadata
|
|
163
|
+
common.MetadataMutable metadata = 100;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
message AddObligationTriggerResponse {
|
|
167
|
+
policy.ObligationTrigger trigger = 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message RemoveObligationTriggerRequest {
|
|
171
|
+
string id = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message RemoveObligationTriggerResponse {
|
|
175
|
+
policy.ObligationTrigger trigger = 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Fulfillers
|
|
179
|
+
// message AddObligationFulfillerRequest {
|
|
180
|
+
// // Required
|
|
181
|
+
// string obligation_value_id = 1;
|
|
182
|
+
// google.protobuf.Struct conditionals = 2;
|
|
183
|
+
// // Optional
|
|
184
|
+
// // Common metadata
|
|
185
|
+
// common.MetadataMutable metadata = 100;
|
|
186
|
+
// }
|
|
187
|
+
|
|
188
|
+
// message AddObligationFulfillerResponse {
|
|
189
|
+
// policy.ObligationFulfiller fulfiller = 1;
|
|
190
|
+
// }
|
|
191
|
+
|
|
192
|
+
// message RemoveObligationFulfillerRequest {
|
|
193
|
+
// string id = 1;
|
|
194
|
+
// }
|
|
195
|
+
|
|
196
|
+
// message RemoveObligationFulfillerResponse {
|
|
197
|
+
// policy.ObligationFulfiller fulfiller = 1;
|
|
198
|
+
// }
|
|
199
|
+
|
|
200
|
+
///
|
|
201
|
+
/// Obligation Service
|
|
202
|
+
///
|
|
203
|
+
service Service {
|
|
204
|
+
|
|
205
|
+
/*--------------------------------------*
|
|
206
|
+
* Obligation RPCs
|
|
207
|
+
*--------------------------------------*/
|
|
208
|
+
|
|
209
|
+
rpc ListObligations(ListObligationsRequest) returns (ListObligationsResponse) {
|
|
210
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
rpc GetObligation(GetObligationRequest) returns (GetObligationResponse) {
|
|
214
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
rpc GetObligationsByFQNs(GetObligationsByFQNsRequest) returns (GetObligationsByFQNsResponse) {
|
|
218
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
rpc CreateObligation(CreateObligationRequest) returns (CreateObligationResponse) {}
|
|
222
|
+
|
|
223
|
+
rpc UpdateObligation(UpdateObligationRequest) returns (UpdateObligationResponse) {}
|
|
224
|
+
|
|
225
|
+
rpc DeleteObligation(DeleteObligationRequest) returns (DeleteObligationResponse) {}
|
|
226
|
+
|
|
227
|
+
/*--------------------------------------*
|
|
228
|
+
* Value RPCs
|
|
229
|
+
*--------------------------------------*/
|
|
230
|
+
|
|
231
|
+
rpc GetObligationValue(GetObligationValueRequest) returns (GetObligationValueResponse) {
|
|
232
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
rpc GetObligationValuesByFQNs(GetObligationValuesByFQNsRequest) returns (GetObligationValuesByFQNsResponse) {
|
|
236
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
rpc CreateObligationValue(CreateObligationValueRequest) returns (CreateObligationValueResponse) {}
|
|
240
|
+
|
|
241
|
+
rpc UpdateObligationValue(UpdateObligationValueRequest) returns (UpdateObligationValueResponse) {}
|
|
242
|
+
|
|
243
|
+
rpc DeleteObligationValue(DeleteObligationValueRequest) returns (DeleteObligationValueResponse) {}
|
|
244
|
+
|
|
245
|
+
/*--------------------------------------*
|
|
246
|
+
* Trigger RPCs
|
|
247
|
+
*--------------------------------------*/
|
|
248
|
+
|
|
249
|
+
rpc AddObligationTrigger(AddObligationTriggerRequest) returns (AddObligationTriggerResponse) {}
|
|
250
|
+
|
|
251
|
+
rpc RemoveObligationTrigger(RemoveObligationTriggerRequest) returns (RemoveObligationTriggerResponse) {}
|
|
252
|
+
|
|
253
|
+
/*--------------------------------------*
|
|
254
|
+
* Fulfiller RPCs
|
|
255
|
+
*--------------------------------------*/
|
|
256
|
+
|
|
257
|
+
// rpc AddObligationFulfiller(AddObligationFulfillerRequest) returns (AddObligationFulfillerResponse) {}
|
|
258
|
+
|
|
259
|
+
// rpc RemoveObligationFulfiller(RemoveObligationFulfillerRequest) returns (RemoveObligationFulfillerResponse) {}
|
|
260
|
+
}
|
{otdf_python-0.4.4 → otdf_python-0.5.0}/otdf-python-proto/proto-files/policy/unsafe/unsafe.proto
RENAMED
|
@@ -167,14 +167,21 @@ message UnsafeDeleteAttributeValueResponse {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
// WARNING!!
|
|
170
|
+
// Deleting a key will make it so that ANY TDF that was encrypted with this key cannot be decrypted by the platform.
|
|
170
171
|
message UnsafeDeleteKasKeyRequest {
|
|
171
172
|
// Required
|
|
172
173
|
// UUID of the Key
|
|
173
174
|
string id = 1 [(buf.validate.field).string.uuid = true];
|
|
175
|
+
// Required
|
|
176
|
+
// The key id assigned to this key (Ex: "key-1")
|
|
177
|
+
string kid = 2 [(buf.validate.field).required = true];
|
|
178
|
+
// Required
|
|
179
|
+
// The kas uri for which this key belongs (Ex: "https://kas.example.com:8080")
|
|
180
|
+
string kas_uri = 3 [(buf.validate.field).required = true];
|
|
174
181
|
}
|
|
175
182
|
|
|
176
183
|
message UnsafeDeleteKasKeyResponse {
|
|
177
|
-
policy.
|
|
184
|
+
policy.KasKey key = 1;
|
|
178
185
|
}
|
|
179
186
|
|
|
180
187
|
///
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "otdf-python-proto"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "Generated protobuf files for OpenTDF Python SDK"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -8,9 +8,10 @@ authors = [
|
|
|
8
8
|
]
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"connect-python
|
|
11
|
+
"connect-python>=0.6.0",
|
|
12
12
|
"protobuf>=6.31.1",
|
|
13
13
|
"googleapis-common-protos>=1.66.0",
|
|
14
|
+
"protoc-gen-openapiv2>=0.0.1",
|
|
14
15
|
# Legacy gRPC support (may be removed in future versions)
|
|
15
16
|
"grpcio>=1.74.0",
|
|
16
17
|
"grpcio-tools>=1.74.0",
|
|
@@ -48,7 +48,7 @@ def check_dependencies() -> bool:
|
|
|
48
48
|
|
|
49
49
|
def copy_opentdf_proto_files(proto_gen_dir: Path, git_tag: str | None = None) -> bool:
|
|
50
50
|
"""Clone OpenTDF platform repository and copy all proto files."""
|
|
51
|
-
GIT_TAG = git_tag or "service/v0.
|
|
51
|
+
GIT_TAG = git_tag or "service/v0.8.0"
|
|
52
52
|
REPO_URL = "https://github.com/opentdf/platform.git"
|
|
53
53
|
|
|
54
54
|
temp_repo_dir = proto_gen_dir / "temp_platform_repo"
|
|
@@ -153,28 +153,33 @@ def run_buf_generate(proto_gen_dir: Path) -> bool:
|
|
|
153
153
|
connect_plugin_path = result.stdout.strip()
|
|
154
154
|
print(f"Using Connect plugin at: {connect_plugin_path}")
|
|
155
155
|
|
|
156
|
-
# Update buf.gen.yaml with the correct absolute path for the local plugin
|
|
156
|
+
# Update buf.gen.yaml with the correct absolute path for the local plugin,
|
|
157
|
+
# then restore the original content after buf generate runs.
|
|
157
158
|
buf_gen_path = proto_gen_dir / "buf.gen.yaml"
|
|
158
159
|
with buf_gen_path.open() as f:
|
|
159
|
-
|
|
160
|
+
original_content = f.read()
|
|
160
161
|
|
|
161
162
|
updated_content = re.sub(
|
|
162
163
|
r"- local:\s+\S*protoc-gen-connect[_-]python\S*",
|
|
163
164
|
lambda _: f"- local: {connect_plugin_path}",
|
|
164
|
-
|
|
165
|
+
original_content,
|
|
165
166
|
)
|
|
166
167
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
168
|
+
try:
|
|
169
|
+
with buf_gen_path.open("w") as f:
|
|
170
|
+
f.write(updated_content)
|
|
171
|
+
|
|
172
|
+
# Run buf generate
|
|
173
|
+
subprocess.run(
|
|
174
|
+
["buf", "generate"],
|
|
175
|
+
cwd=proto_gen_dir,
|
|
176
|
+
capture_output=True,
|
|
177
|
+
text=True,
|
|
178
|
+
check=True,
|
|
179
|
+
)
|
|
180
|
+
finally:
|
|
181
|
+
with buf_gen_path.open("w") as f:
|
|
182
|
+
f.write(original_content)
|
|
178
183
|
|
|
179
184
|
print("✓ Successfully generated protobuf and Connect RPC files")
|
|
180
185
|
return True
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""OpenTDF Python Protocol Buffers Package.
|
|
2
|
+
|
|
3
|
+
This package contains generated Python code from OpenTDF protocol buffer definitions.
|
|
4
|
+
It includes modules for authorization, common types, entities, policy management,
|
|
5
|
+
and other OpenTDF services.
|
|
6
|
+
"""
|
|
7
|
+
import sys
|
|
8
|
+
import types
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from importlib import metadata
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
__version__ = metadata.version("otdf-python-proto")
|
|
14
|
+
except metadata.PackageNotFoundError:
|
|
15
|
+
# package is not installed, e.g., in development
|
|
16
|
+
__version__ = "0.0.0"
|
|
17
|
+
|
|
18
|
+
# Marker attribute placed on stub modules created by _register_subpackage_aliases.
|
|
19
|
+
# Used to distinguish our stubs from pre-existing third-party packages so we never
|
|
20
|
+
# clobber the latter.
|
|
21
|
+
_STUB_ATTR = "_otdf_python_proto_stub"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _register_subpackage_aliases() -> None:
|
|
25
|
+
# connect-generated files use absolute top-level imports (e.g. `import kas.kas_pb2`).
|
|
26
|
+
# Register each subpackage as a top-level sys.modules alias so those imports resolve
|
|
27
|
+
# without mutating sys.path for the whole process.
|
|
28
|
+
#
|
|
29
|
+
# Called twice: before the explicit imports below (creates lightweight stubs so that
|
|
30
|
+
# load-time absolute imports inside connect files succeed) and after (upgrades stubs
|
|
31
|
+
# to the fully-initialised module objects).
|
|
32
|
+
pkg_dir = Path(__file__).parent
|
|
33
|
+
for child in pkg_dir.iterdir():
|
|
34
|
+
if not child.is_dir() or not (child / "__init__.py").exists() or child.name.startswith("_"):
|
|
35
|
+
continue
|
|
36
|
+
name = child.name
|
|
37
|
+
current = sys.modules.get(name)
|
|
38
|
+
# Never overwrite a pre-existing entry that we did not create.
|
|
39
|
+
if current is not None and not getattr(current, _STUB_ATTR, False):
|
|
40
|
+
continue
|
|
41
|
+
full_name = f"otdf_python_proto.{name}"
|
|
42
|
+
if full_name in sys.modules:
|
|
43
|
+
# Real module is loaded; point the alias at it.
|
|
44
|
+
sys.modules[name] = sys.modules[full_name]
|
|
45
|
+
else:
|
|
46
|
+
# Subpackage not yet imported; create a lightweight stub with __path__ set
|
|
47
|
+
# so sub-imports like `import authorization.authorization_pb2` can locate
|
|
48
|
+
# modules on disk without needing sys.path mutation.
|
|
49
|
+
stub = types.ModuleType(name)
|
|
50
|
+
stub.__path__ = [str(child)] # type: ignore[attr-defined]
|
|
51
|
+
stub.__package__ = name
|
|
52
|
+
stub.__file__ = str(child / "__init__.py")
|
|
53
|
+
setattr(stub, _STUB_ATTR, True)
|
|
54
|
+
sys.modules[name] = stub
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# First pass: create stubs so that connect-generated files can resolve absolute
|
|
58
|
+
# top-level imports (e.g. `import kas.kas_pb2`) at subpackage load time.
|
|
59
|
+
_register_subpackage_aliases()
|
|
60
|
+
|
|
61
|
+
# Import submodules to make them available.
|
|
62
|
+
# Note: authorization, entityresolution, wellknownconfiguration and policy subdirectories
|
|
63
|
+
# are imported lazily to avoid import errors from generated protobuf files.
|
|
64
|
+
from . import common
|
|
65
|
+
from . import entity
|
|
66
|
+
from . import kas
|
|
67
|
+
from . import legacy_grpc
|
|
68
|
+
from . import logger
|
|
69
|
+
from . import policy
|
|
70
|
+
|
|
71
|
+
# Second pass: upgrade stubs for the explicitly imported subpackages to the
|
|
72
|
+
# fully-initialised module objects.
|
|
73
|
+
_register_subpackage_aliases()
|
|
74
|
+
|
|
75
|
+
# Export main module categories
|
|
76
|
+
__all__ = [
|
|
77
|
+
"common",
|
|
78
|
+
"entity",
|
|
79
|
+
"kas",
|
|
80
|
+
"legacy_grpc",
|
|
81
|
+
"logger",
|
|
82
|
+
"policy",
|
|
83
|
+
]
|