* Expose experimental binder transport API
New headers are added
`grpcpp/create_channel_binder.h `: interfaces for creating client
channel
`grpcpp/security/binder_credentials.h`: interfaces for binder server
credentials
`grpcpp/security/binder_security_policy.h`: interfaces for binder
security policy, which is used by both server and client. Individual
security policies are merged into this single header.
Users can now depend on the `grpc++_binder` target to use the headers
listed above.
* Regenerate projects
This commit
1. Implements the security policies that does not require JNI. This
includes a security policy that always allow connection and a security
policy that allows connection when remote UID is the same us local UID.
2. Add security policy as an argument in our interfaces. Old interfaces
are temporarily preserved so compilation will not suddenly break when we
import the code to internal repo.
3. Pumping the security policy from the public interfaces to the code
that handles SETUP_TRANSPORT transaction.
4. Abort the transport setup when the security policy is not satisfied.
Since meaningful tests will require to be run in real Android
environment, we will implement it later. For now, this change is
manually tested with example APKs.
For security policies that need to invoke Java to check authorization,
we will implement them in later.
Add `grpc::BinderServerCredentials()` and other related functionalities for the server to listen to binder transactions through a phony "binder port".
The APIs are temporarily placed in internal headers until the corresponding gRFC is merged.
Also try use the API in example apk to make sure the binder transport
code and the rest of gRPC compiles with the Android toolchain
We will properly expose our interface later.
This is the import of part of our binder transport implementation from
internal repository.
This "Wire Format" part implements the protocol described at
https://github.com/grpc/proposal/blob/master/L73-java-binderchannel/wireformat.md
This part of the code does not interact with gRPC transport layer. We
will import other components in the next few pull requests.
The code is well-tested in the repository we are importing from. Due to
the difficulty of setting up the tests properly (cannot automatically
import them by script), we will import them after we have finished
importing other codes.
For now we confirm that the code builds via
`bazel build //src/core/ext/transport/binder/wire_format:all`
and some local testing with actual Android tool chain.
Generated by running protoc --objc_out=. --objcrpc_out=. *.proto in this directory.
Generates separate files until GeneratorContext::OpenForInsert/Append works.
A temporary podspec for the proto3 runtime is being used, pending the official.
-) Compiling the proto plugin using the HOSTCC compiler.
-) Set up proper rules to invoke the plugin from protoc.
-) Few various renaming hacks to fully get out of [].
Change on 2014/12/12 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82000361
Fixes how module names for messages with package prefixes are rendered.
- detected while prototyping with beefcake
- fixed on the internal beefcake fork here
[]
This change replicates that fix for the official code generator.
TODO: add a test; what's normal done to test features like this the proto
codebase? Add another test.proto/golden file?
Change on 2014/12/11 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81916292
To build client in Git-on-[]:
# regenerate Makefile
net/grpc/tools/buildgen/generate_projects.sh
# generate .pb.h and .pb.cc
protoc --cpp_out=. --grpc_out=. --plugin=protoc-gen-grpc=[]-bin/net/grpc/compiler/cpp_plugin net/grpc/cpp/test/interop/test.proto net/grpc/cpp/test/interop/empty.proto net/grpc/cpp/test/interop/messages.proto
# Complile and link
net/grpc/tools/build_grpc_dev.sh bins/interop_client
To test against GFE/ESF:
# bring up server
[] build net/grpc/testing/interop:server_components_env
[]-bin/net/grpc/testing/interop/server_components_env --manual --rpc_port=25000
# start client
/tmp/grpc-codebase/bins/interop_client --enable_ssl=true --server_port="server ssl port listening port"
To test [] build against GFE/ESF:
[] run net/grpc/cpp:interop_client -- --enable_ssl=true --server_port="server ssl port listening port"
Change on 2014/12/10 by chenw <chenw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81821921