slim-bindings 0.4.0__tar.gz → 0.4.1__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.
Potentially problematic release.
This version of slim-bindings might be problematic. Click here for more details.
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/Cargo.lock +70 -70
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/Cargo.toml +3 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/PKG-INFO +1 -1
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/builder.rs +2 -2
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/jwt.rs +25 -12
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/jwt_middleware.rs +3 -3
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/shared_secret.rs +18 -12
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/traits.rs +13 -5
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/Cargo.toml +3 -1
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/client.rs +366 -115
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/errors.rs +2 -0
- slim_bindings-0.4.1/core/config/src/grpc/proxy.rs +242 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc.rs +1 -0
- slim_bindings-0.4.1/core/config/src/tls/common.rs +862 -0
- slim_bindings-0.4.1/core/controller/proto/v1/controller.proto +165 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/api/gen/controller.proto.v1.rs +78 -1
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/config.rs +3 -3
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/service.rs +116 -6
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/message_processing.rs +50 -2
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/messages/utils.rs +10 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/tests/data_path_test.rs +1 -1
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/src/identity_provider.rs +2 -9
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/app.rs +61 -37
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/channel_endpoint.rs +38 -10
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/fire_and_forget.rs +13 -8
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/interceptor.rs +3 -5
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/lib.rs +21 -24
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/session.rs +19 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/pyproject.toml +5 -13
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/CHANGELOG.md +13 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/Cargo.toml +1 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/Taskfile.yml +26 -3
- slim_bindings-0.4.1/python-bindings/examples/CHANGELOG.md +27 -0
- slim_bindings-0.4.1/python-bindings/examples/Dockerfile +93 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1/python-bindings}/slim_bindings/__init__.py +16 -4
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/slim_bindings/_slim_bindings.pyi +6 -1
- slim_bindings-0.4.1/python-bindings/slima2a/README.md +52 -0
- slim_bindings-0.4.1/python-bindings/slima2a/Taskfile.yaml +11 -0
- slim_bindings-0.4.1/python-bindings/slima2a/buf.gen.yaml +22 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/README.md +19 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/__init__.py +0 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/client.py +184 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/echo_agent.py +3 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/echo_agent_executor.py +43 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/echo_agent/server.py +93 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/README.md +55 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/__init__.py +0 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/agent.py +88 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/agent_executor.py +54 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/client.py +107 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/config.json +8 -0
- slim_bindings-0.4.1/python-bindings/slima2a/examples/travel_planner_agent/server.py +68 -0
- slim_bindings-0.4.1/python-bindings/slima2a/pyproject.toml +33 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/__init__.py +0 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/client_transport.py +202 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/handler.py +370 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/py.typed +0 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/types/__init__.py +0 -0
- slim_bindings-0.4.1/python-bindings/slima2a/slima2a/types/a2a_pb2_srpc.py +189 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/pyidentity.rs +23 -6
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/pyservice.rs +18 -5
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/pysession.rs +15 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/utils.rs +18 -0
- slim_bindings-0.4.1/python-bindings/srpc/README.md +5 -0
- slim_bindings-0.4.1/python-bindings/srpc/pyproject.toml +43 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/__init__.py +29 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/channel.py +364 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/common.py +200 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/context.py +32 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/buf.gen.yaml +21 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/client.py +60 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/example.proto +20 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/server.py +102 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/types/example_pb2.py +41 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/types/example_pb2.pyi +21 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/examples/simple/types/example_pb2_srpc.py +98 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/py.typed +0 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/rpc.py +90 -0
- slim_bindings-0.4.1/python-bindings/srpc/srpc/server.py +242 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_fire_forget.py +11 -2
- slim_bindings-0.4.1/python-bindings/uv.lock +1651 -0
- {slim_bindings-0.4.0/python-bindings → slim_bindings-0.4.1}/slim_bindings/__init__.py +16 -4
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/slim_bindings/_slim_bindings.pyi +6 -1
- slim_bindings-0.4.0/core/config/src/tls/common.rs +0 -367
- slim_bindings-0.4.0/core/controller/proto/v1/controller.proto +0 -94
- slim_bindings-0.4.0/python-bindings/examples/Dockerfile +0 -50
- slim_bindings-0.4.0/python-bindings/uv.lock +0 -423
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/file_watcher.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/resolver.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/auth/src/testutils.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/build.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/proto/hello.proto +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/auth/basic.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/auth/bearer.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/auth/jwt.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/auth.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/component/configuration.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/component/id.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/component.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/compression.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/headers_middleware.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/helloworld.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/schema/client-config.schema.json +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/schema/generate_schema.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/grpc/server.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/opaque.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/provider/env.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/provider/file.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/provider/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/provider.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/testutils/helloworld.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/testutils/tower_service.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/testutils.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/tls/client.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/tls/server.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/src/tls.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/grpc/ca.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/grpc/server.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/grpc/server.key +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec256-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec256-wrong.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec256.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec384-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec384-wrong.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/ec384.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/eddsa-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/eddsa-wrong.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/eddsa.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/rsa-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/rsa-wrong.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/jwt/rsa.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/testfile +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/ca-1.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/ca-2.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/ca-bad.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/client-1.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/client-1.key +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/client-2.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/client-2.key +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/server-1.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/server-1.key +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/server-2.crt +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/testdata/tls/server-2.key +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/tests/e2e.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/config/tests/tls.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/build.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/api/proto.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/api.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/controller/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/benches/pool_benchmark.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/build.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/proto/v1/pubsub.proto +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/api/gen/pubsub.proto.v1.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/api/proto.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/api.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/connection.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/forwarder.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/messages/encoder.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/messages.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables/connection_table.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables/pool.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables/remote_subscription_table.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables/subscription_table.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/datapath/src/tables.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/src/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/mls/src/mls.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/errors.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/interceptor_mls.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/moderator_task.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/producer_buffer.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/receiver_buffer.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/streaming.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/testutils.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/timer.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/service/src/transmitter.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/signal/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/signal/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/signal/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/signal/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/tracing/CHANGELOG.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/tracing/Cargo.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/tracing/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/tracing/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/core/tracing/src/utils.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/BUILD.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/README.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/WINDOWS.md +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/build.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/pyproject.toml +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/__init__.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/common.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/fire_and_forget.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/pubsub.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/request_reply.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/examples/src/slim_bindings_examples/slim.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/bin/stub_gen.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/build_info.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/src/lib.rs +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/common.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/conftest.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_bindings.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_identity.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_pubsub.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_request_reply.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/test_streaming.py +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/ec256-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/ec256.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/ec384-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/ec384.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/eddsa-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/eddsa.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/rsa-public.pem +0 -0
- {slim_bindings-0.4.0 → slim_bindings-0.4.1}/python-bindings/tests/testdata/rsa.pem +0 -0
|
@@ -17,6 +17,16 @@ version = "2.0.1"
|
|
|
17
17
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
18
|
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
19
19
|
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "agntcy-protoc-srpc-plugin"
|
|
22
|
+
version = "0.1.0"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"anyhow",
|
|
25
|
+
"heck 0.5.0",
|
|
26
|
+
"prost 0.14.1",
|
|
27
|
+
"prost-types 0.14.1",
|
|
28
|
+
]
|
|
29
|
+
|
|
20
30
|
[[package]]
|
|
21
31
|
name = "agntcy-slim"
|
|
22
32
|
version = "0.4.0"
|
|
@@ -94,6 +104,7 @@ name = "agntcy-slim-config"
|
|
|
94
104
|
version = "0.2.0"
|
|
95
105
|
dependencies = [
|
|
96
106
|
"agntcy-slim-auth",
|
|
107
|
+
"base64 0.22.1",
|
|
97
108
|
"drain",
|
|
98
109
|
"duration-str",
|
|
99
110
|
"futures",
|
|
@@ -102,8 +113,9 @@ dependencies = [
|
|
|
102
113
|
"hyper-util",
|
|
103
114
|
"lazy_static",
|
|
104
115
|
"parking_lot",
|
|
105
|
-
"prost",
|
|
116
|
+
"prost 0.13.5",
|
|
106
117
|
"protoc-bin-vendored",
|
|
118
|
+
"rand 0.9.1",
|
|
107
119
|
"regex",
|
|
108
120
|
"rustls",
|
|
109
121
|
"rustls-native-certs",
|
|
@@ -137,7 +149,7 @@ dependencies = [
|
|
|
137
149
|
"drain",
|
|
138
150
|
"h2 0.4.10",
|
|
139
151
|
"parking_lot",
|
|
140
|
-
"prost",
|
|
152
|
+
"prost 0.13.5",
|
|
141
153
|
"protoc-bin-vendored",
|
|
142
154
|
"serde",
|
|
143
155
|
"serde_json",
|
|
@@ -166,7 +178,7 @@ dependencies = [
|
|
|
166
178
|
"h2 0.4.10",
|
|
167
179
|
"opentelemetry",
|
|
168
180
|
"parking_lot",
|
|
169
|
-
"prost",
|
|
181
|
+
"prost 0.13.5",
|
|
170
182
|
"protoc-bin-vendored",
|
|
171
183
|
"rand 0.9.1",
|
|
172
184
|
"thiserror 2.0.12",
|
|
@@ -2114,11 +2126,11 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
|
|
|
2114
2126
|
|
|
2115
2127
|
[[package]]
|
|
2116
2128
|
name = "matchers"
|
|
2117
|
-
version = "0.
|
|
2129
|
+
version = "0.2.0"
|
|
2118
2130
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2119
|
-
checksum = "
|
|
2131
|
+
checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
|
|
2120
2132
|
dependencies = [
|
|
2121
|
-
"regex-automata
|
|
2133
|
+
"regex-automata",
|
|
2122
2134
|
]
|
|
2123
2135
|
|
|
2124
2136
|
[[package]]
|
|
@@ -2380,12 +2392,11 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
|
|
|
2380
2392
|
|
|
2381
2393
|
[[package]]
|
|
2382
2394
|
name = "nu-ansi-term"
|
|
2383
|
-
version = "0.
|
|
2395
|
+
version = "0.50.1"
|
|
2384
2396
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2385
|
-
checksum = "
|
|
2397
|
+
checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"
|
|
2386
2398
|
dependencies = [
|
|
2387
|
-
"
|
|
2388
|
-
"winapi",
|
|
2399
|
+
"windows-sys 0.52.0",
|
|
2389
2400
|
]
|
|
2390
2401
|
|
|
2391
2402
|
[[package]]
|
|
@@ -2540,7 +2551,7 @@ dependencies = [
|
|
|
2540
2551
|
"opentelemetry-http",
|
|
2541
2552
|
"opentelemetry-proto",
|
|
2542
2553
|
"opentelemetry_sdk",
|
|
2543
|
-
"prost",
|
|
2554
|
+
"prost 0.13.5",
|
|
2544
2555
|
"reqwest",
|
|
2545
2556
|
"thiserror 2.0.12",
|
|
2546
2557
|
"tokio",
|
|
@@ -2556,7 +2567,7 @@ checksum = "8c40da242381435e18570d5b9d50aca2a4f4f4d8e146231adb4e7768023309b3"
|
|
|
2556
2567
|
dependencies = [
|
|
2557
2568
|
"opentelemetry",
|
|
2558
2569
|
"opentelemetry_sdk",
|
|
2559
|
-
"prost",
|
|
2570
|
+
"prost 0.13.5",
|
|
2560
2571
|
"tonic 0.12.3",
|
|
2561
2572
|
]
|
|
2562
2573
|
|
|
@@ -2604,12 +2615,6 @@ version = "0.2.0"
|
|
|
2604
2615
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2605
2616
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
|
2606
2617
|
|
|
2607
|
-
[[package]]
|
|
2608
|
-
name = "overload"
|
|
2609
|
-
version = "0.1.1"
|
|
2610
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2611
|
-
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
|
2612
|
-
|
|
2613
2618
|
[[package]]
|
|
2614
2619
|
name = "parking"
|
|
2615
2620
|
version = "2.2.1"
|
|
@@ -2842,7 +2847,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
2842
2847
|
checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5"
|
|
2843
2848
|
dependencies = [
|
|
2844
2849
|
"bytes",
|
|
2845
|
-
"prost-derive",
|
|
2850
|
+
"prost-derive 0.13.5",
|
|
2851
|
+
]
|
|
2852
|
+
|
|
2853
|
+
[[package]]
|
|
2854
|
+
name = "prost"
|
|
2855
|
+
version = "0.14.1"
|
|
2856
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2857
|
+
checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d"
|
|
2858
|
+
dependencies = [
|
|
2859
|
+
"bytes",
|
|
2860
|
+
"prost-derive 0.14.1",
|
|
2846
2861
|
]
|
|
2847
2862
|
|
|
2848
2863
|
[[package]]
|
|
@@ -2858,8 +2873,8 @@ dependencies = [
|
|
|
2858
2873
|
"once_cell",
|
|
2859
2874
|
"petgraph",
|
|
2860
2875
|
"prettyplease 0.2.34",
|
|
2861
|
-
"prost",
|
|
2862
|
-
"prost-types",
|
|
2876
|
+
"prost 0.13.5",
|
|
2877
|
+
"prost-types 0.13.5",
|
|
2863
2878
|
"regex",
|
|
2864
2879
|
"syn 2.0.103",
|
|
2865
2880
|
"tempfile",
|
|
@@ -2878,13 +2893,35 @@ dependencies = [
|
|
|
2878
2893
|
"syn 2.0.103",
|
|
2879
2894
|
]
|
|
2880
2895
|
|
|
2896
|
+
[[package]]
|
|
2897
|
+
name = "prost-derive"
|
|
2898
|
+
version = "0.14.1"
|
|
2899
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2900
|
+
checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425"
|
|
2901
|
+
dependencies = [
|
|
2902
|
+
"anyhow",
|
|
2903
|
+
"itertools 0.14.0",
|
|
2904
|
+
"proc-macro2",
|
|
2905
|
+
"quote",
|
|
2906
|
+
"syn 2.0.103",
|
|
2907
|
+
]
|
|
2908
|
+
|
|
2881
2909
|
[[package]]
|
|
2882
2910
|
name = "prost-types"
|
|
2883
2911
|
version = "0.13.5"
|
|
2884
2912
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2885
2913
|
checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16"
|
|
2886
2914
|
dependencies = [
|
|
2887
|
-
"prost",
|
|
2915
|
+
"prost 0.13.5",
|
|
2916
|
+
]
|
|
2917
|
+
|
|
2918
|
+
[[package]]
|
|
2919
|
+
name = "prost-types"
|
|
2920
|
+
version = "0.14.1"
|
|
2921
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2922
|
+
checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72"
|
|
2923
|
+
dependencies = [
|
|
2924
|
+
"prost 0.14.1",
|
|
2888
2925
|
]
|
|
2889
2926
|
|
|
2890
2927
|
[[package]]
|
|
@@ -3240,17 +3277,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
|
|
3240
3277
|
dependencies = [
|
|
3241
3278
|
"aho-corasick",
|
|
3242
3279
|
"memchr",
|
|
3243
|
-
"regex-automata
|
|
3244
|
-
"regex-syntax
|
|
3245
|
-
]
|
|
3246
|
-
|
|
3247
|
-
[[package]]
|
|
3248
|
-
name = "regex-automata"
|
|
3249
|
-
version = "0.1.10"
|
|
3250
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3251
|
-
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
3252
|
-
dependencies = [
|
|
3253
|
-
"regex-syntax 0.6.29",
|
|
3280
|
+
"regex-automata",
|
|
3281
|
+
"regex-syntax",
|
|
3254
3282
|
]
|
|
3255
3283
|
|
|
3256
3284
|
[[package]]
|
|
@@ -3261,15 +3289,9 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
|
|
3261
3289
|
dependencies = [
|
|
3262
3290
|
"aho-corasick",
|
|
3263
3291
|
"memchr",
|
|
3264
|
-
"regex-syntax
|
|
3292
|
+
"regex-syntax",
|
|
3265
3293
|
]
|
|
3266
3294
|
|
|
3267
|
-
[[package]]
|
|
3268
|
-
name = "regex-syntax"
|
|
3269
|
-
version = "0.6.29"
|
|
3270
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3271
|
-
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
|
3272
|
-
|
|
3273
3295
|
[[package]]
|
|
3274
3296
|
name = "regex-syntax"
|
|
3275
3297
|
version = "0.8.5"
|
|
@@ -3747,9 +3769,9 @@ dependencies = [
|
|
|
3747
3769
|
|
|
3748
3770
|
[[package]]
|
|
3749
3771
|
name = "slab"
|
|
3750
|
-
version = "0.4.
|
|
3772
|
+
version = "0.4.11"
|
|
3751
3773
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3752
|
-
checksum = "
|
|
3774
|
+
checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
|
|
3753
3775
|
|
|
3754
3776
|
[[package]]
|
|
3755
3777
|
name = "slim-examples"
|
|
@@ -4167,7 +4189,7 @@ dependencies = [
|
|
|
4167
4189
|
"hyper-util",
|
|
4168
4190
|
"percent-encoding",
|
|
4169
4191
|
"pin-project",
|
|
4170
|
-
"prost",
|
|
4192
|
+
"prost 0.13.5",
|
|
4171
4193
|
"tokio",
|
|
4172
4194
|
"tokio-stream",
|
|
4173
4195
|
"tower 0.4.13",
|
|
@@ -4195,7 +4217,7 @@ dependencies = [
|
|
|
4195
4217
|
"hyper-util",
|
|
4196
4218
|
"percent-encoding",
|
|
4197
4219
|
"pin-project",
|
|
4198
|
-
"prost",
|
|
4220
|
+
"prost 0.13.5",
|
|
4199
4221
|
"socket2",
|
|
4200
4222
|
"tokio",
|
|
4201
4223
|
"tokio-stream",
|
|
@@ -4214,7 +4236,7 @@ dependencies = [
|
|
|
4214
4236
|
"prettyplease 0.2.34",
|
|
4215
4237
|
"proc-macro2",
|
|
4216
4238
|
"prost-build",
|
|
4217
|
-
"prost-types",
|
|
4239
|
+
"prost-types 0.13.5",
|
|
4218
4240
|
"quote",
|
|
4219
4241
|
"syn 2.0.103",
|
|
4220
4242
|
]
|
|
@@ -4370,14 +4392,14 @@ dependencies = [
|
|
|
4370
4392
|
|
|
4371
4393
|
[[package]]
|
|
4372
4394
|
name = "tracing-subscriber"
|
|
4373
|
-
version = "0.3.
|
|
4395
|
+
version = "0.3.20"
|
|
4374
4396
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4375
|
-
checksum = "
|
|
4397
|
+
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
|
|
4376
4398
|
dependencies = [
|
|
4377
4399
|
"matchers",
|
|
4378
4400
|
"nu-ansi-term",
|
|
4379
4401
|
"once_cell",
|
|
4380
|
-
"regex",
|
|
4402
|
+
"regex-automata",
|
|
4381
4403
|
"sharded-slab",
|
|
4382
4404
|
"smallvec",
|
|
4383
4405
|
"thread_local",
|
|
@@ -4687,22 +4709,6 @@ dependencies = [
|
|
|
4687
4709
|
"rustix 0.38.44",
|
|
4688
4710
|
]
|
|
4689
4711
|
|
|
4690
|
-
[[package]]
|
|
4691
|
-
name = "winapi"
|
|
4692
|
-
version = "0.3.9"
|
|
4693
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4694
|
-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
4695
|
-
dependencies = [
|
|
4696
|
-
"winapi-i686-pc-windows-gnu",
|
|
4697
|
-
"winapi-x86_64-pc-windows-gnu",
|
|
4698
|
-
]
|
|
4699
|
-
|
|
4700
|
-
[[package]]
|
|
4701
|
-
name = "winapi-i686-pc-windows-gnu"
|
|
4702
|
-
version = "0.4.0"
|
|
4703
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4704
|
-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
4705
|
-
|
|
4706
4712
|
[[package]]
|
|
4707
4713
|
name = "winapi-util"
|
|
4708
4714
|
version = "0.1.9"
|
|
@@ -4712,12 +4718,6 @@ dependencies = [
|
|
|
4712
4718
|
"windows-sys 0.59.0",
|
|
4713
4719
|
]
|
|
4714
4720
|
|
|
4715
|
-
[[package]]
|
|
4716
|
-
name = "winapi-x86_64-pc-windows-gnu"
|
|
4717
|
-
version = "0.4.0"
|
|
4718
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4719
|
-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
4720
|
-
|
|
4721
4721
|
[[package]]
|
|
4722
4722
|
name = "windows-core"
|
|
4723
4723
|
version = "0.61.2"
|
|
@@ -10,6 +10,7 @@ default-members = [
|
|
|
10
10
|
"core/service",
|
|
11
11
|
"core/signal",
|
|
12
12
|
"core/tracing",
|
|
13
|
+
"srpc-compiler",
|
|
13
14
|
"examples",
|
|
14
15
|
"testing",
|
|
15
16
|
]
|
|
@@ -30,6 +31,8 @@ agntcy-slim-service = { path = "core/service", version = "0.5.0" }
|
|
|
30
31
|
agntcy-slim-signal = { path = "core/signal", version = "0.1.3" }
|
|
31
32
|
agntcy-slim-tracing = { path = "core/tracing", version = "0.2.2" }
|
|
32
33
|
|
|
34
|
+
anyhow = "1.0.98"
|
|
35
|
+
|
|
33
36
|
async-trait = "0.1.88"
|
|
34
37
|
aws-lc-rs = "1.13.1"
|
|
35
38
|
base64 = "0.22"
|
|
@@ -654,7 +654,7 @@ mod tests {
|
|
|
654
654
|
|
|
655
655
|
let claims = signer.create_claims();
|
|
656
656
|
let token = signer.sign(&claims).unwrap();
|
|
657
|
-
let verified: crate::traits::StandardClaims = verifier.
|
|
657
|
+
let verified: crate::traits::StandardClaims = verifier.get_claims(&token).await.unwrap();
|
|
658
658
|
|
|
659
659
|
assert_eq!(verified.iss.unwrap(), "test-issuer");
|
|
660
660
|
assert_eq!(verified.aud.unwrap(), &["test-audience"]);
|
|
@@ -710,7 +710,7 @@ mod tests {
|
|
|
710
710
|
};
|
|
711
711
|
|
|
712
712
|
let token = signer.sign(&custom_claims).unwrap();
|
|
713
|
-
let verified: CustomClaims = verifier.
|
|
713
|
+
let verified: CustomClaims = verifier.get_claims(&token).await.unwrap();
|
|
714
714
|
|
|
715
715
|
assert_eq!(verified, custom_claims);
|
|
716
716
|
}
|
|
@@ -540,14 +540,26 @@ impl TokenProvider for StaticTokenProvider {
|
|
|
540
540
|
|
|
541
541
|
#[async_trait]
|
|
542
542
|
impl Verifier for VerifierJwt {
|
|
543
|
-
async fn verify
|
|
543
|
+
async fn verify(&self, token: impl Into<String> + Send) -> Result<(), AuthError> {
|
|
544
|
+
// Just verify the token is valid, don't extract claims
|
|
545
|
+
self.verify_claims::<StandardClaims>(token)
|
|
546
|
+
.await
|
|
547
|
+
.map(|_| ())
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
fn try_verify(&self, token: impl Into<String>) -> Result<(), AuthError> {
|
|
551
|
+
// Just verify the token is valid, don't extract claims
|
|
552
|
+
self.try_verify_claims::<StandardClaims>(token).map(|_| ())
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
async fn get_claims<Claims>(&self, token: impl Into<String> + Send) -> Result<Claims, AuthError>
|
|
544
556
|
where
|
|
545
557
|
Claims: serde::de::DeserializeOwned + Send,
|
|
546
558
|
{
|
|
547
559
|
self.verify_claims(token).await
|
|
548
560
|
}
|
|
549
561
|
|
|
550
|
-
fn
|
|
562
|
+
fn try_get_claims<Claims>(&self, token: impl Into<String>) -> Result<Claims, AuthError>
|
|
551
563
|
where
|
|
552
564
|
Claims: serde::de::DeserializeOwned + Send,
|
|
553
565
|
{
|
|
@@ -710,7 +722,7 @@ mod tests {
|
|
|
710
722
|
let claims = signer.create_claims();
|
|
711
723
|
let token = signer.sign(&claims).unwrap();
|
|
712
724
|
|
|
713
|
-
let verified_claims: StandardClaims = jwt.
|
|
725
|
+
let verified_claims: StandardClaims = jwt.get_claims(token.clone()).await.unwrap();
|
|
714
726
|
|
|
715
727
|
assert_eq!(verified_claims.iss.unwrap(), "test-issuer");
|
|
716
728
|
assert_eq!(verified_claims.aud.unwrap(), &["test-audience"]);
|
|
@@ -739,7 +751,7 @@ mod tests {
|
|
|
739
751
|
let claims = signer.create_claims();
|
|
740
752
|
let token = signer.sign(&claims).unwrap();
|
|
741
753
|
|
|
742
|
-
let verified_claims: StandardClaims = jwt.
|
|
754
|
+
let verified_claims: StandardClaims = jwt.get_claims(token.clone()).await.unwrap();
|
|
743
755
|
|
|
744
756
|
assert_eq!(verified_claims.iss.unwrap(), "test-issuer");
|
|
745
757
|
assert_eq!(verified_claims.aud.unwrap(), &["test-audience"]);
|
|
@@ -777,7 +789,7 @@ mod tests {
|
|
|
777
789
|
let claims = signer.create_claims();
|
|
778
790
|
let token = signer.sign_claims(&claims).unwrap();
|
|
779
791
|
|
|
780
|
-
let verified_claims: StandardClaims = verifier.
|
|
792
|
+
let verified_claims: StandardClaims = verifier.get_claims(token.clone()).await.unwrap();
|
|
781
793
|
|
|
782
794
|
assert_eq!(verified_claims.iss.unwrap(), "test-issuer");
|
|
783
795
|
assert_eq!(verified_claims.aud.unwrap(), ["test-audience"]);
|
|
@@ -786,7 +798,7 @@ mod tests {
|
|
|
786
798
|
// Try to verify with an invalid token
|
|
787
799
|
let invalid_token = "invalid.token.string";
|
|
788
800
|
let result: Result<StandardClaims, AuthError> =
|
|
789
|
-
verifier.
|
|
801
|
+
verifier.get_claims(invalid_token.to_string()).await;
|
|
790
802
|
assert!(
|
|
791
803
|
result.is_err(),
|
|
792
804
|
"Expected verification to fail for invalid token"
|
|
@@ -804,7 +816,8 @@ mod tests {
|
|
|
804
816
|
})
|
|
805
817
|
.build()
|
|
806
818
|
.unwrap();
|
|
807
|
-
let wrong_result: Result<StandardClaims, AuthError> =
|
|
819
|
+
let wrong_result: Result<StandardClaims, AuthError> =
|
|
820
|
+
wrong_verifier.get_claims(token).await;
|
|
808
821
|
assert!(
|
|
809
822
|
wrong_result.is_err(),
|
|
810
823
|
"Expected verification to fail with wrong key"
|
|
@@ -854,7 +867,7 @@ mod tests {
|
|
|
854
867
|
claims.custom_claims = custom_claims;
|
|
855
868
|
let token = signer.sign_claims(&claims).unwrap();
|
|
856
869
|
|
|
857
|
-
let verified_claims: StandardClaims = verifier.
|
|
870
|
+
let verified_claims: StandardClaims = verifier.get_claims(token).await.unwrap();
|
|
858
871
|
|
|
859
872
|
assert_eq!(verified_claims.custom_claims.get("role").unwrap(), "admin");
|
|
860
873
|
assert_eq!(
|
|
@@ -897,7 +910,7 @@ mod tests {
|
|
|
897
910
|
|
|
898
911
|
// Sign and verify the token
|
|
899
912
|
let token = signer.sign_claims(&signer.create_claims()).unwrap();
|
|
900
|
-
let claims: StandardClaims = verifier.
|
|
913
|
+
let claims: StandardClaims = verifier.get_claims(token).await.unwrap();
|
|
901
914
|
|
|
902
915
|
// Validate the claims
|
|
903
916
|
assert_eq!(claims.iss.unwrap(), mock_server.uri());
|
|
@@ -982,14 +995,14 @@ mod tests {
|
|
|
982
995
|
let token = signer.sign_claims(&claims).unwrap();
|
|
983
996
|
|
|
984
997
|
// First verification
|
|
985
|
-
let first_result: StandardClaims = verifier.
|
|
998
|
+
let first_result: StandardClaims = verifier.try_get_claims(token.clone()).unwrap();
|
|
986
999
|
|
|
987
1000
|
// Alter the decoding_key to simulate a situation where signature verification would fail
|
|
988
1001
|
// if attempted again. Since we're using the cache, it should still work.
|
|
989
1002
|
verifier.decoding_key = None;
|
|
990
1003
|
|
|
991
1004
|
// Second verification with the same token - should use the cache
|
|
992
|
-
let second_result: StandardClaims = verifier.
|
|
1005
|
+
let second_result: StandardClaims = verifier.try_get_claims(token.clone()).unwrap();
|
|
993
1006
|
|
|
994
1007
|
// Both results should be the same
|
|
995
1008
|
assert_eq!(first_result.iss, second_result.iss);
|
|
@@ -1010,7 +1023,7 @@ mod tests {
|
|
|
1010
1023
|
let token2 = signer.sign_claims(&claims2).unwrap();
|
|
1011
1024
|
|
|
1012
1025
|
// Verify the new token - should fail because we removed the decoding_key
|
|
1013
|
-
let result = verifier.
|
|
1026
|
+
let result = verifier.try_get_claims::<StandardClaims>(token2);
|
|
1014
1027
|
assert!(
|
|
1015
1028
|
result.is_err(),
|
|
1016
1029
|
"Should have failed due to missing decoding key"
|
|
@@ -274,7 +274,7 @@ where
|
|
|
274
274
|
let bearer_token = bearer.token().to_string();
|
|
275
275
|
|
|
276
276
|
// Let's first try to perform the verification without cloning the verifier
|
|
277
|
-
match self.verifier.
|
|
277
|
+
match self.verifier.try_get_claims::<Claim>(&bearer_token) {
|
|
278
278
|
Ok(claims) => {
|
|
279
279
|
// Store claims in request extensions
|
|
280
280
|
req.extensions_mut().insert(claims);
|
|
@@ -294,7 +294,7 @@ where
|
|
|
294
294
|
request: req,
|
|
295
295
|
verifier_future: Box::pin(async move {
|
|
296
296
|
// Perform the verification asynchronously
|
|
297
|
-
verifier.
|
|
297
|
+
verifier.get_claims::<Claim>(&bearer_token).await
|
|
298
298
|
}),
|
|
299
299
|
service: inner,
|
|
300
300
|
_phantom: self._phantom,
|
|
@@ -702,7 +702,7 @@ mod tests {
|
|
|
702
702
|
);
|
|
703
703
|
|
|
704
704
|
let ret_claims = verifier
|
|
705
|
-
.
|
|
705
|
+
.try_get_claims::<StandardClaims>(&token)
|
|
706
706
|
.expect("Failed to verify token");
|
|
707
707
|
|
|
708
708
|
// Check the claims are as expected
|
|
@@ -50,20 +50,11 @@ impl TokenProvider for SharedSecret {
|
|
|
50
50
|
|
|
51
51
|
#[async_trait::async_trait]
|
|
52
52
|
impl Verifier for SharedSecret {
|
|
53
|
-
async fn verify
|
|
54
|
-
where
|
|
55
|
-
Claims: serde::de::DeserializeOwned + Send,
|
|
56
|
-
{
|
|
53
|
+
async fn verify(&self, token: impl Into<String> + Send) -> Result<(), AuthError> {
|
|
57
54
|
self.try_verify(token)
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
fn try_verify<
|
|
61
|
-
&self,
|
|
62
|
-
token: impl Into<String>,
|
|
63
|
-
) -> Result<Claims, crate::errors::AuthError>
|
|
64
|
-
where
|
|
65
|
-
Claims: serde::de::DeserializeOwned + Send,
|
|
66
|
-
{
|
|
57
|
+
fn try_verify(&self, token: impl Into<String>) -> Result<(), AuthError> {
|
|
67
58
|
let token = token.into();
|
|
68
59
|
|
|
69
60
|
// Split the token into shared_secret and id
|
|
@@ -73,11 +64,26 @@ impl Verifier for SharedSecret {
|
|
|
73
64
|
}
|
|
74
65
|
|
|
75
66
|
if parts[0] == self.shared_secret {
|
|
76
|
-
Ok(
|
|
67
|
+
Ok(())
|
|
77
68
|
} else {
|
|
78
69
|
Err(AuthError::TokenInvalid(
|
|
79
70
|
"shared secret mismatch".to_string(),
|
|
80
71
|
))
|
|
81
72
|
}
|
|
82
73
|
}
|
|
74
|
+
|
|
75
|
+
async fn get_claims<Claims>(&self, token: impl Into<String> + Send) -> Result<Claims, AuthError>
|
|
76
|
+
where
|
|
77
|
+
Claims: serde::de::DeserializeOwned + Send,
|
|
78
|
+
{
|
|
79
|
+
self.try_get_claims(token)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
fn try_get_claims<Claims>(&self, token: impl Into<String>) -> Result<Claims, AuthError>
|
|
83
|
+
where
|
|
84
|
+
Claims: serde::de::DeserializeOwned + Send,
|
|
85
|
+
{
|
|
86
|
+
self.try_verify(token.into())?;
|
|
87
|
+
Ok(serde_json::from_str(r#"{"exp":0}"#).unwrap())
|
|
88
|
+
}
|
|
83
89
|
}
|
|
@@ -66,16 +66,24 @@ impl StandardClaims {
|
|
|
66
66
|
/// Trait for verifying JWT tokens
|
|
67
67
|
#[async_trait]
|
|
68
68
|
pub trait Verifier {
|
|
69
|
-
/// Verifies the
|
|
70
|
-
|
|
69
|
+
/// Verifies the token.
|
|
70
|
+
async fn verify(&self, token: impl Into<String> + Send) -> Result<(), AuthError>;
|
|
71
|
+
|
|
72
|
+
/// Try to verify the token without async context.
|
|
73
|
+
fn try_verify(&self, token: impl Into<String>) -> Result<(), AuthError>;
|
|
74
|
+
|
|
75
|
+
/// Gets the claims from the token after verification.
|
|
71
76
|
/// The `Claims` type parameter represents the expected structure of the JWT claims.
|
|
72
|
-
async fn
|
|
77
|
+
async fn get_claims<Claims>(
|
|
78
|
+
&self,
|
|
79
|
+
token: impl Into<String> + Send,
|
|
80
|
+
) -> Result<Claims, AuthError>
|
|
73
81
|
where
|
|
74
82
|
Claims: DeserializeOwned + Send;
|
|
75
83
|
|
|
76
|
-
/// Try to
|
|
84
|
+
/// Try to get claims from the token without async context.
|
|
77
85
|
/// If an async operation is needed, an error is returned.
|
|
78
|
-
fn
|
|
86
|
+
fn try_get_claims<Claims>(&self, token: impl Into<String>) -> Result<Claims, AuthError>
|
|
79
87
|
where
|
|
80
88
|
Claims: DeserializeOwned + Send;
|
|
81
89
|
}
|
|
@@ -15,12 +15,13 @@ path = "src/grpc/schema/generate_schema.rs"
|
|
|
15
15
|
|
|
16
16
|
[dependencies]
|
|
17
17
|
agntcy-slim-auth.workspace = true
|
|
18
|
+
base64 = { workspace = true }
|
|
18
19
|
drain = { workspace = true }
|
|
19
20
|
duration-str = { workspace = true }
|
|
20
21
|
futures = { workspace = true }
|
|
21
22
|
http = { workspace = true }
|
|
22
23
|
hyper-rustls = { workspace = true }
|
|
23
|
-
hyper-util = { workspace = true }
|
|
24
|
+
hyper-util = { workspace = true, features = ["client-proxy-system"] }
|
|
24
25
|
lazy_static = { workspace = true }
|
|
25
26
|
parking_lot = { workspace = true }
|
|
26
27
|
prost = { workspace = true }
|
|
@@ -48,5 +49,6 @@ protoc-bin-vendored = { workspace = true }
|
|
|
48
49
|
tonic-build = { workspace = true }
|
|
49
50
|
|
|
50
51
|
[dev-dependencies]
|
|
52
|
+
rand = { workspace = true }
|
|
51
53
|
serde_json = { workspace = true }
|
|
52
54
|
tracing-test = { workspace = true }
|