Commit Graph

293 Commits

Author SHA1 Message Date
Craig Tiller 897e4fe2ad Update copyrights 2015-12-22 15:03:40 -08:00
Craig Tiller 7536af02cf Eliminate gpr_ int types - and insist on C99 variants instead 2015-12-22 13:49:30 -08:00
Julien Boeuf ee9d78b960 Unit testing the peer from auth context functionality. 2015-12-18 09:50:34 -08:00
Julien Boeuf 1d9ac6612d Removing the peer from the SSL security connector.
- Missing unit tests.
2015-12-17 21:35:47 -08:00
Craig Tiller 620e965c1b clang-format after last weeks test-fest 2015-12-14 12:02:50 -08:00
Julien Boeuf 97e5147bd1 One more test for default google creds. 2015-12-10 15:06:45 -08:00
Julien Boeuf 331e3782af Testing cached google default creds. 2015-12-10 14:44:35 -08:00
Craig Tiller 88408c3b73 Fix Windows build
To do pollset work we need grpc to be initialized
2015-12-10 08:12:26 -08:00
Julien Boeuf 2408a1cd6a Testing GCE detection in google default credentials. 2015-12-09 22:34:57 -08:00
Craig Tiller 82e40dac84 Fix memory leak 2015-12-07 18:24:57 -08:00
Craig Tiller f9c8ce98cf Add test for grpc_get_well_known_google_credentials_file_path 2015-12-07 08:21:57 -08:00
Nicolas "Pixel" Noble f9c58f3bf7 Merge branch 'release-0_12'
Conflicts:
	src/core/security/credentials.c
	test/core/security/credentials_test.c
2015-12-01 22:40:44 +01:00
Julien Boeuf 3c957e60a3 Fixing implementations. 2015-11-18 21:33:58 -08:00
Craig Tiller b113649517 clang-format 2015-11-18 11:30:17 -08:00
Julien Boeuf b73cbc2709 Addressing comments.
The composite channel credentials creation does not change the passed-in
channel creds anymore.
2015-10-20 21:52:54 -07:00
Julien Boeuf 26bf71ce37 Fixing mem leak and compilation error in tsan. 2015-10-10 00:21:05 -07:00
Julien Boeuf 4e02e84062 Got the core test passing. 2015-10-09 22:49:42 -07:00
Craig Tiller 5c1ad056d2 Fix Windows compilation 2015-09-23 10:30:20 -07:00
Craig Tiller b8b1a462e5 Finish cleanup 2015-09-22 12:50:03 -07:00
Craig Tiller a82950e683 clang-format all core files 2015-09-22 12:33:20 -07:00
Craig Tiller 8af4c33718 Final patches for rename 2015-09-22 12:32:31 -07:00
Craig Tiller e7db29f8c7 Move argument passing to start of list 2015-09-22 10:55:42 -07:00
Craig Tiller f5768a6765 Rename init 2015-09-22 10:54:34 -07:00
Craig Tiller 098047b53a Rename run 2015-09-22 10:53:14 -07:00
Craig Tiller 9f7dc3a4e5 Move argument passing to start of list 2015-09-22 10:47:08 -07:00
Craig Tiller 1be70ccdb8 Move arguments to the start of lists 2015-09-22 10:45:28 -07:00
Craig Tiller 45724b35e4 indent pass to get logical source lines on one physical line 2015-09-22 10:42:19 -07:00
Craig Tiller d9ccbbf6b9 Rename call_list to closure_list 2015-09-22 09:30:00 -07:00
Craig Tiller 10ee2747a9 Merge github.com:grpc/grpc into we-are-one 2015-09-22 09:25:57 -07:00
Craig Tiller d9fdaf204c Fix tests 2015-09-22 08:31:23 -07:00
Craig Tiller ba496454b2 Fixes 2015-09-21 17:15:19 -07:00
Craig Tiller dfff1b8126 Call list progress 2015-09-21 14:39:57 -07:00
Craig Tiller d1bec03fa1 Call list progress 2015-09-18 17:29:00 -07:00
Craig Tiller 3cd6a5158d Getting stuff working 2015-09-16 16:15:47 -07:00
Craig Tiller 7d57ba138f Tests compile 2015-09-16 10:02:09 -07:00
Julien Boeuf fd2f7331fa Merge branch 'master' of github.com:grpc/grpc into core_creds_plugin 2015-09-15 15:20:26 -07:00
Julien Boeuf 4ffbf0d22c Adding tests for credentials plugin. 2015-09-14 23:08:51 -07:00
Craig Tiller 32ca48ce0b Core compiles with -Wsign-conversion 2015-09-10 11:47:15 -07:00
Craig Tiller 2b7b235549 Merge pull request #3255 from ctiller/we-should-build
Fix compilation
2015-09-04 07:40:31 -07:00
Craig Tiller 88589743f8 Fix compilation 2015-09-04 07:38:34 -07:00
Nicolas "Pixel" Noble a4d4b60fd8 Secure endpoint test should call grpc_init. 2015-09-04 00:38:52 +02:00
Craig Tiller 245bd8875b Merge github.com:grpc/grpc into second-coming 2015-08-31 15:59:13 -07:00
Craig Tiller b029859e58 Revert "Revert "Refactor Endpoint API"" 2015-08-27 07:38:01 -07:00
Craig Tiller 99d7b661be Revert "Refactor Endpoint API" 2015-08-27 07:36:12 -07:00
Julien Boeuf 510a920c75 Credentials cleanup:
- Removing service_accounts credentials. These credentials just have
  drawbacks compared to service_account_jwt_access credentials, notably
  in terms for security.
- Renaming Google specific credentials with a Google prefix for C and
  C++. This should be done as well for wrapped languages.
2015-08-25 21:51:07 -07:00
Julien Boeuf c17fecd224 Fixing tests. 2015-08-25 19:41:20 -07:00
Craig Tiller 11c3c68f9d Merge github.com:grpc/grpc into endpoints 2015-08-24 14:32:54 -07:00
Craig Tiller 592e7f2dd0 Refactor Endpoint API
- Allow reads to complete immediately
- Unify read/write signatures
- Simplify memory management to allow future optimization work
2015-08-21 10:45:48 -07:00
Craig Tiller 128f4a9cfe Merge github.com:grpc/grpc into y12kdm3 2015-08-18 12:51:05 -07:00
Craig Tiller d6c98df792 clang-format all source 2015-08-18 09:33:44 -07:00
Craig Tiller d067c263b2 Merge github.com:grpc/grpc into y12kdm3
Conflicts:
	src/core/security/google_default_credentials.c
	test/core/security/verify_jwt.c
2015-08-12 12:00:36 -07:00
Julien Boeuf c7176a80ab Fixing clock type. 2015-08-11 17:39:00 -07:00
Nicolas Noble c7989b6c9f Merge pull request #2788 from ctiller/kinetic-lopsided-poetry
Testing port server
2015-08-07 10:51:08 -07:00
Craig Tiller 038d26acd8 Update tools 2015-08-06 08:57:54 -07:00
Craig Tiller 4c06b820e0 Add a test of non-blocking API behavior
... also fix things that were broken :)
2015-08-06 08:41:31 -07:00
Julien Boeuf d3368e4192 Merge branch 'master' of github.com:grpc/grpc into server_creds_auth_md_processor 2015-08-05 21:29:42 -07:00
Craig Tiller 0700d8b118 Merge github.com:grpc/grpc into kinetic-lopsided-poetry 2015-08-05 15:28:41 -07:00
Craig Tiller f53d9c8d0d Testing port server
run_tests.py will start a server (if it's not running, or if the running
port server mismatches the 'current' one) that serves ports to use for
tests. The server is left running after run_tests.py finishes, so that
in environments such as Mac and Windows where tests run unshielded from
each other, we don't start jumping on already used ports.
2015-08-04 14:19:43 -07:00
Craig Tiller be043d9ce7 Merge branch 'auth_md_processor' of github.com:jboeuf/grpc into complain-with-both-passion-and-meaning 2015-07-31 08:51:11 -07:00
Craig Tiller 06aeac6470 Merge github.com:grpc/grpc into plucking-hell 2015-07-30 07:54:12 -07:00
Craig Tiller 5ddbb9d405 Allow specific pollers to be woken
Currently, if two threads call grpc_completion_queue_pluck on the same
completion queue for different tags, there is a 50% chance that we
deliver the completion wakeup to the wrong poller - forcing the correct
poller to wait until its polling times out before it can return an event
up to the application.

This change tweaks our polling interfaces so that we can indeed wake a
specific poller.

Nothing has been performance tuned yet. It's definitely sub-optimal in a
number of places. Wakeup file-descriptors should be recycled. We should
have a path that avoids calling poll() followed by epoll(). We can
probably live without it right at the second though.

This code will fail on Windows at least (I'll do that port when I'm in the office and have a Windows
machine).
2015-07-29 15:58:11 -07:00
yang-g c5eccd45f4 Fix clock type mismatch 2015-07-28 00:23:50 -07:00
Julien Boeuf fe4c3f4f14 Renaming jwt_credentials to service_account_jwt_access_credentials. 2015-07-22 16:20:13 -07:00
yang-g 5e7e55b957 Merge with head and resolve conflict 2015-07-17 22:15:12 -07:00
Julien Boeuf ea456fc2bf Server auth metadata processor.
- Right now it is a global function: would be better to have this per
  (secure) port.
- Changed the interface of the auth_context slightly to make it more
  friendly.
- Positive tests pass. Still need some work on error case (have a
  negative case as well).
- Fixing cpp auth context tests so that they use the shiny new C API.
2015-07-16 22:42:02 -07:00
yang-g 76fcaeeeb5 resolve comments 2015-07-13 23:46:06 -07:00
yang-g be5f059219 Add oauth2_auth_token test case in interop test 2015-07-13 11:11:50 -07:00
Craig Tiller 143e7bf0cf Introduce a clock type field onto gpr_timespec.
Use it to validate that arithmetic on time types makes even some vague
kind of sense.
2015-07-13 08:41:49 -07:00
Julien Boeuf 0b1b1a5999 Merge branch 'master' of github.com:grpc/grpc into flexible_default_creds 2015-07-10 08:35:04 -07:00
yang-g 3315a845ef Merge remote-tracking branch 'upstream/master' into security_context2 2015-07-09 12:32:48 -07:00
Julien Boeuf a6b9a891a0 Merge branch 'master' of github.com:grpc/grpc into oauth2_access_token 2015-07-08 20:40:13 -07:00
Julien Boeuf ea94e46b0d Merge branch 'master' of github.com:grpc/grpc into jwt_verifier 2015-07-08 16:24:31 -07:00
Julien Boeuf b037bb6488 Adding tests and fixing mem leak in default creds. 2015-07-08 14:58:14 -07:00
yang-g ab575d46f7 merge head and resolve conflict 2015-07-07 23:33:40 -07:00
Julien Boeuf 607359467f Merge branch 'master' of https://github.com/grpc/grpc into slice_to_cstring 2015-07-08 01:04:46 +02:00
yang-g 8068f86974 Add a unit test 2015-07-06 15:05:48 -07:00
Nicolas Noble 6ab0de15ea Merge pull request #2216 from jboeuf/unpadded_base64
Base64 decode improvements
2015-07-01 09:26:21 -07:00
Julien Boeuf 272814feea Merge branch 'master' of https://github.com/grpc/grpc into slice_to_cstring 2015-07-01 18:22:32 +02:00
Julien Boeuf 2805be1aa5 Adding support for raw access token credentials. 2015-07-01 02:47:18 -07:00
Craig Tiller 991edad25c SSL refcounting fixes
Handle the case where we recreate an auth context.

Add (opt-in) debugging for refcounts on auth contexts.
2015-06-30 11:40:41 -07:00
Julien Boeuf feca1bf06c Adding JWT verifier.
Still missing:
- Caching of the already checked JWTs (although it could be done at an
  upper layer).
- Caching of the jwks_uri to avoid 2 roundtrips for each verification.
2015-06-30 11:36:03 +02:00
Julien Boeuf c141772c61 Fixing this one as well. 2015-06-29 20:30:21 +02:00
Julien Boeuf 3e55b9fe62 Base64 decode improvements.
- Allow ablity to specify the length for decoding.
- Allow for non-padded encodings to be decoded properly.
2015-06-25 18:11:44 +02:00
Julien Boeuf 5b1fdc5c3d Merge branch 'master' of https://github.com/grpc/grpc into ssl_auth_context_fix 2015-06-22 16:47:01 +02:00
Craig Tiller 7552f0f958 Ensure tests are built during run_tests runs
The issue remains that we don't test our tools, but at least we test
that they compile.
2015-06-19 17:46:20 -07:00
Julien Boeuf a701ade70a Fixing ssl auth context. 2015-06-18 15:23:40 +02:00
Craig Tiller 9a57633233 clang-format affected files 2015-06-17 10:21:49 -07:00
Craig Tiller 2c42ef3eb3 Merge github.com:grpc/grpc into we-dont-need-no-backup 2015-06-05 07:09:56 -07:00
Masood Malekghassemi 701af6031f Expose gpr_asprintf and gpr_strdup 2015-06-03 15:24:24 -07:00
Craig Tiller 14556ecf8c Merge branch 'count-the-things' into we-dont-need-no-backup
Conflicts:
	Makefile
	src/core/iomgr/pollset_posix.c
	src/core/surface/call.c
	src/core/surface/channel.c
	src/core/surface/server.c
	src/python/src/grpc/_adapter/_low_test.py
	tools/doxygen/Doxyfile.core.internal
2015-06-01 20:31:27 -07:00
Craig Tiller 3d67c7cf45 Merge github.com:grpc/grpc into count-the-things
Conflicts:
	src/core/iomgr/fd_posix.h
	src/core/iomgr/iomgr.c
2015-06-01 20:10:13 -07:00
Craig Tiller 8e0b08a33d Merge branch 'count-the-things' into we-dont-need-no-backup 2015-06-01 17:04:17 -07:00
Nicolas "Pixel" Noble 8535263b94 Fixing tools compilation. 2015-06-02 02:01:51 +02:00
Craig Tiller fa275a97b9 Label all iomgr objects
This allows a list of them to be dumped to isolate where memory leaks
are occuring.
2015-06-01 13:55:54 -07:00
Craig Tiller 06bac34df0 Properly integrate credentials metadata delivery 2015-06-01 12:55:57 -07:00
Craig Tiller e5cacfa296 Merge branch 'you-complete-me' into we-dont-need-no-backup 2015-06-01 08:49:01 -07:00
David Garcia Quintas 7978a04d50 Removed non-ISO usage of __FUNCTION__.
Fixes #1843
2015-05-31 16:07:45 -07:00
Craig Tiller f29a6c107d Merge branch 'but-maybe-i-want-to-poll' into we-dont-need-no-backup
Conflicts:
	Makefile
	build.json
	src/core/security/credentials.c
	src/core/security/credentials.h
	src/core/surface/call.c
	test/core/end2end/tests/request_response_with_payload_and_call_creds.c
	tools/doxygen/Doxyfile.c++
	tools/doxygen/Doxyfile.core
2015-05-30 11:11:05 -07:00
Julien Boeuf 3824209a49 Merge branch 'master' of github.com:grpc/grpc into server_auth_context 2015-05-29 22:00:44 -07:00
Julien Boeuf 75c9b6f495 Removing mdctx from the credentials. 2015-05-29 13:12:12 -07:00
Julien Boeuf 83b029726b Addressing comments. 2015-05-20 22:50:34 -07:00
Julien Boeuf 84d964a8df API for auth context and server-side secure transport only impl.
Still TODO:
- a way to plug a metadata processing (somewhat elsewhere but did not
  one to overload this already large PR).
- plug-in the auth context on the client side.
- Better end to end testing.
2015-05-20 07:48:48 +02:00
Craig Tiller 9d9735f7d9 Port endpoint tests to pollsets 2015-05-13 10:46:01 -07:00
Nicolas Noble 2e3639302a Making the gRPC C tests building under Windows. 2015-05-09 08:25:26 +02:00
Julien Boeuf 7d1d9ca7fa Refactoring of core security to remove the factories.
- Renamed security_context -> security_connector.
- Credentials are now responsible for creating their own connectors.
2015-04-17 23:41:46 -07:00
Julien Boeuf 28d75d9349 Adding option to add a null terminator when loading a file.
- This will take care of a potential issue with default credentials
  where the slice pointer is casted as const char * for APIs that need a
  null terminated string.
2015-04-15 15:56:38 -07:00
Julien Boeuf 9835cf0234 Adding refresh token credentials.
- The google default credentials now work with the cloud SDK.
- Verified end to end with print_default_credentials and fetch_oauth2
  tools.
2015-03-09 16:56:44 -07:00
Julien Boeuf 3371cdf918 Fixing !strcmp in the tests. 2015-03-09 10:32:19 -07:00
Julien Boeuf 75516068fa Adding refresh token parsing
This is the first step for refresh token credentials.
2015-03-09 10:20:40 -07:00
Ronnie Sahlberg 2ad8d21158 strcmp: change all !str[n]cmp to str[n]cmp == 0
Change all !str[n]cmp to be str[n]cmp == 0 consistently across the codebase.

Issue #231

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-03-07 08:39:22 -08:00
Craig Tiller 8ad8a41a84 Introduce slowdown factor for unit test deadlines
Dramatically lowers (eliminates maybe?) false negatives from ?SAN runs.
2015-02-25 08:36:40 -08:00
Julien Boeuf c66f2a816e Addressing iniitial feedback.
- Renaming default credentials -> google default credentials.
- Various other things in cpp:
  - Adding Cpp wrapping for JWT Tokens.
  - Renaming ComposeCredentials -> CompositeCredentials.
2015-02-23 13:00:36 -08:00
Julien Boeuf cd9b1c850d Added support for default credentials.
- Tested with new tool (print_default_creds_token) on:
  - workstation for env var and well known place.
  - GCE for compute engine default creds.
- I'd prefer the grpc_default_credentials_create() API to remain
  synchronous even though there may be an async call for gce detection
  on which we block.
2015-02-21 21:57:42 -08:00
Julien Boeuf 25380de72d Adding tool for generating JWTs on the command line. 2015-02-19 19:17:32 -08:00
Julien Boeuf f47a5cb93d Implementing JWT credentials (a.k.a JWT ID Tokens).
- Not tested end to end yet
2015-02-19 17:29:41 -08:00
Julien Boeuf 90bd7c4c4d Fixing sprintf and a few other things. 2015-02-18 18:53:18 -08:00
Craig Tiller 9be83eec1d Fix use-after-free.
Transport and channel have different lifetimes, but share a metadata
context.

Make the metadata context ref counted, and have transport take a ref.
2015-02-18 14:16:15 -08:00
Craig Tiller 190d360def Add missing new-lines at end of file 2015-02-18 09:23:38 -08:00
Craig Tiller 0605995e55 Update copyright to 2015 2015-02-18 08:34:56 -08:00
Nicolas "Pixel" Noble 213ed91850 Re-enabling errors on warning, disabling unused parameter warning, and fixing all subsequent errors. 2015-01-30 02:11:35 +01:00
Nicolas Noble 9574132019 Merge branch 'master' of github.com:google/grpc into json
Conflicts:
	Makefile
	build.json
	vsprojects/vs2013/grpc.vcxproj
	vsprojects/vs2013/grpc.vcxproj.filters
	vsprojects/vs2013/grpc_unsecure.vcxproj
	vsprojects/vs2013/grpc_unsecure.vcxproj.filters
2015-01-27 19:14:11 -08:00
Nicolas Noble 8c2be9bbff Addressing latest comments. 2015-01-28 01:11:24 +01:00
Yang Gao 3ed874c861 sync up with master 2015-01-27 11:39:14 -08:00
Nicolas Noble f66ccc44d7 Merge branch 'master' of github.com:google/grpc into json 2015-01-26 17:03:08 -08:00
Nicolas Noble e04455a7ff Addressing comments. 2015-01-26 17:02:45 -08:00
Nicolas Noble fee065c1c7 Merge branch 'master' of github.com:google/grpc into json
Conflicts:
	src/core/security/credentials.c
2015-01-26 11:41:12 -08:00
Yang Gao 5fd0d29dfe run clang-format 2015-01-26 00:19:48 -08:00
Craig Tiller 82df7446ae Remove use of sprintf 2015-01-23 15:06:44 -08:00
Craig Tiller 485d77628d Move string.h to internal code 2015-01-23 12:54:05 -08:00
Nicolas Noble 614c2bf99b Replacing cJSON with our own code instead. 2015-01-22 15:32:02 -08:00
Julien Boeuf 8fbcc4391e Changing the SSL (Server) Credentials API.
- Changed the unsigned char * + size to NULL terminated strings which
  makes sense for the PEM format. I may change TSI later (but the impact
  will hopefully be much more limited).
- Added a way to pass multiple key/cert pairs to servers which is needed
  when hosting more than one domain.
- Removed the C++ SSL credentials tests as we are going to have an
  option to not specify the roots which will then be derived from the
  environment (well-known platform dependent locations and/or
  environment variable).
- Fixed the php build which is the only one added in the run_test.py.
  This change will certainly break node, python and ruby.
2015-01-20 22:18:15 -08:00
Julien Boeuf b222b4d978 Changing size type in Transport Security (TSI) from uint32_t to size_t:
Will remove grpc impedance mismatch.
2015-01-15 22:47:49 -08:00
Craig Tiller 32946d37e0 () --> (void) 2015-01-15 11:37:30 -08:00
ctiller 58393c20bc Remove libevent.
Fixed any exposed bugs across the stack.

Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them.

Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway.

Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent.

Things that need attention still:
- adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not
use this for multipolling once platform specific implementations are added.
- we rely on the backup poller too often - especially for SSL handshakes and for client
connection establishment we should have a better mechanism ([] []
- Linux needs to use epoll for multiple fds, FreeBSD variants (including
Darwin) need to use kqueue. ([] []
- Linux needs to use eventfd for poll kicking. ([]
	Change on 2015/01/07 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83461069
2015-01-09 17:27:32 -08:00
ctiller e4b409364e Add a --forever flag, to continuously run tests as things change.
Change on 2015/01/07 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83451760
2015-01-09 17:23:18 -08:00
ctiller 1a277ecd93 Remove libevent.
Fixed any exposed bugs across the stack.

Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them.

Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway.

Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent.

Things that need attention still:
- adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not
use this for multipolling once platform specific implementations are added.
- we rely on the backup poller too often - especially for SSL handshakes and for client
connection establishment we should have a better mechanism ([] []
- Linux needs to use epoll for multiple fds, FreeBSD variants (including
Darwin) need to use kqueue. ([] []
- Linux needs to use eventfd for poll kicking. ([]
	Change on 2015/01/07 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83461069
2015-01-08 13:01:56 -08:00
jboeuf 1a809c0ebb Adding support for service account credentials.
- Tested end to end with a JSON key I generated for my account using the
fetch_oauth2 binary.
- The same fetch_oauth2 binary can get a token from the GCE metadata service on a VM in cloud.
	Change on 2014/12/19 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82548689
2014-12-29 17:03:04 -08:00
ctiller 336bf21127 Fix opensource build test.
It's a string of unit tests, so size should actually be small. Setting timeout
to long means we have 15 minutes to test everything, which should fit for now.

Also fixes a compile error.

Once this goes in, TAP should start running our tests again.
	Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82395309
2014-12-19 13:13:37 -08:00
ctiller 2bbb6c4311 Remove endpoint/ directories.
Fold endpoint interface into iomgr, move secure_endpoint into security/.
This will make it easier for endpoint to rely on some iomgr defined types (like
pollset).
	Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82338036
2014-12-17 15:49:42 -08:00
jboeuf ab4f91458b Adding JWT generation and signing code for service accounts credentials.
Change on 2014/12/16 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82279249
2014-12-16 17:26:10 -08:00
jboeuf befd26501a Adding base utils for JWT service account workflow. OpenSSL base64 decoding is
a disaster and does not support url_safe which we need for the JWT.
	Change on 2014/12/12 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82020601
2014-12-12 16:36:06 -08:00
nnoble 0c475f0ad7 Updating moe_db.txt with the latest equivalence since the ruby import changed the exported structure.
Change on 2014/12/01 by nnoble <nnoble@google.com>
-------------
new [] file for grpc testing.
	Change on 2014/12/02 by donnadionne <donnadionne@google.com>
-------------
Fix unfinished calls in thread_stress_test.

Previously we had an early return if we cancelled a stream part way through a
message. Correct this, so that half close and full close signals are propagated
up the stack correctly so that higher level state machines can see the
termination.
	Change on 2014/12/02 by ctiller <ctiller@google.com>
-------------
Remove dependency on internal C code.
	Change on 2014/12/02 by ctiller <ctiller@google.com>
-------------
Turn off the flaky bit from thread_stress_test.
	Change on 2014/12/02 by ctiller <ctiller@google.com>
-------------
Add test cases of empty request/response, request streaming, response streaming, and half duplex streaming.

Bring up the GFE/ESF for mannual test:
[] build java/com/google/net/[]/testing/integration/hexa:server_components_env
[]-bin/java/com/google/net/[]/testing/integration/hexa/server_components_env --manual --rpc_port=25000 --use_autobahn
	Change on 2014/12/02 by chenw <chenw@google.com>
-------------
Make echo/server.c and fling/server.c shutdown cleanly on SIGINT, and update
the relevant tests to exercise this mechanism.

Now "[] coverage" and the memory leak detector are able to see into the
server processes.
	Change on 2014/12/02 by pmarks <pmarks@google.com>
-------------
Allow the # of channels to be configurable in this performance test. The threads will use the channels in statically-defined round-robin order (not based on when RPCs complete on any channel). The interesting cases are #channels=1 or #channels=#threads (we previously only had the latter case)
	Change on 2014/12/02 by vpai <vpai@google.com>
-------------
Fixed a typo and reworded a comment.
	Change on 2014/12/02 by gnezdo <gnezdo@google.com>
-------------
Require the grpc_call in this ClientContext to be NULL before allowing set_call to be invoked. Otherwise, it's an indication of a leak somewhere.
	Change on 2014/12/02 by vpai <vpai@google.com>
-------------
Correctly return status other than ok and add a test for it.
	Change on 2014/12/02 by yangg <yangg@google.com>
-------------
Better C++ guards for grpc_security.h
	Change on 2014/12/02 by nnoble <nnoble@google.com>
-------------
Use nullptr instead of NULL for consistency.
	Change on 2014/12/02 by vpai <vpai@google.com>
-------------
Updates the ruby gRPC service class to require the serialization method to be
a static method

- this brings it inline with the proto3 ruby API
- it adds a monkey patch to allow existing proto (beefcake) to continue working.
	Change on 2014/12/02 by temiola <temiola@google.com>
-------------
Adding a buildable unit to the blue print file.

Added the buildable unit as its name will be usesd as tap project id.

This test will fail right away in tap until tests are actually added.
	Change on 2014/12/02 by donnadionne <donnadionne@google.com>
-------------
Move interop ESF C++ server from Java to grpc directory.

Tests passed:
[] test javatests/com/google/net/[]/testing/integration/hexa/...
[] test net/grpc/testing/interop/esf_server/...
	Change on 2014/12/02 by chenw <chenw@google.com>
-------------
Return a lame channel as opposed to NULL when secure channel creation fails.

- Looks like we're going to need something similar server-side.
- I changed the prototype of the lame client channel factory to take an
explicit void as I think this is better practice in C. Let me know if you
disagree and I will revert these changes.
	Change on 2014/12/02 by jboeuf <jboeuf@google.com>
-------------
Putting ALPN support where it belongs.
	Change on 2014/12/02 by jboeuf <jboeuf@google.com>
-------------
GOAWAY send path.

Sends a GOAWAY frame when shutting down.
This is not read and understood yet.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
Adds support for secure channels and servers.

- wraps new C apis (credentials, server_credentials) and Server#add_secure_http_port
- adds tests to ensure credentials and server credentials can be created
- updates client_server_spec to run the client_server wrapper layer end-to-end tests using a secure channel
	Change on 2014/12/03 by temiola <temiola@google.com>
-------------
Fix existing issues regarding out of order events.

At the client side, using pluck as the client_metadata_read can happen anytime after invoke.

At the server side, allow halfclose_ok and rpc_end to come in reverse order.
	Change on 2014/12/03 by yangg <yangg@google.com>
-------------
Don't track coverage of tests.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
Change UnaryCall to conform standard test requirement of LargeUnaryCall.
	Change on 2014/12/03 by yangg <yangg@google.com>
-------------
updating alpn version to h2-15 ensure all interop are on the same version and working.

Java and go are not ready for h2-16 yet.
	Change on 2014/12/03 by donnadionne <donnadionne@google.com>
-------------
Add config to bring echo server in [].

This is used to test production GFE as its bckend.
	Change on 2014/12/03 by chenw <chenw@google.com>
-------------
In preparation for fixing shutdown race issues, change em to take ownership of
the file descriptor. Add an API to grpc_tcp to take an already created
grpc_em_fd object, and change tcp_client to use that API.

This is needed because otherwise an em user's close() of the file descriptor
may race with libevent internals. That's not an issue yet because destroy()
frees the events inline, but that can't be done safely if there is a concurrent
poller.
	Change on 2014/12/03 by klempner <klempner@google.com>
-------------
Fixing TAP opensource build

We don't want to compile and run C++ tests in the C target.
	Change on 2014/12/03 by nnoble <nnoble@google.com>
-------------
Move and separate interop tests by languages.

Small fixes to the test runner.

Improving logging.
	Change on 2014/12/03 by donnadionne <donnadionne@google.com>
-------------
Fixing the opensource build:

-) The C/C++ split wasn't done up to the 'dep' target level
-) The alpn.c file was missing from build.json
	Change on 2014/12/03 by nnoble <nnoble@google.com>
-------------
Adding blue print files after projects exist
	Change on 2014/12/03 by donnadionne <donnadionne@google.com>
-------------
Refactor StreamContext using the new completion_queue_pluck API.

The dedicated the poller thread has been removed.
This CL keeps the current behavior to make it short. There is one following to
make it usable for both client and server.

The tags for pluck is based on the address of this StreamContext object for potential debug use.

The Read/Write and Wait cannot be called concurrently now and this might need to be fixed.
	Change on 2014/12/03 by yangg <yangg@google.com>
-------------
Binary encoding utilities.

Support base64 encoding, HPACK static huffman encoding, and doing both at once.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
Enforce Makefile regeneration in presubmits.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
Make CloseSend() send a real zero-length control message to indicate EOS.
	Change on 2014/12/03 by zhaoq <zhaoq@google.com>
-------------
Prefer to create dualstack sockets for TCP clients and servers, with automatic
fallback for environments where IPV6_V6ONLY can't be turned off.
	Change on 2014/12/03 by pmarks <pmarks@google.com>
-------------
Add opensource path to build targets.

Ensure that MOE is going to run.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
Add PingPong test case. Delete FullDuplex test case. The latter is not specified for client in

https://docs.google.com/document/d/1dwrPpIu5EqiKVsquZfoOqTj7vP8fa1i49gornJo50Qw/edit#
	Change on 2014/12/03 by chenw <chenw@google.com>
-------------
Make generate_projects.sh check out the generated targets.
	Change on 2014/12/03 by ctiller <ctiller@google.com>
-------------
rspec cleanup

- stops declaring specs within the GRPC module
- splits Bidi streaming specs into a separate test suite

adding tests in the GRPC module was a mistake, it pollutes the module and can
affect other tests that run later by the test runner

the bidi tests are currently flaky, having them run in their own test suite
allows having two separate continuous builds (once ruby gRPC is on GitHub),
one that includes bidi where we tolerate flakiness, and another that does not,
where there should be no flakiness at all
	Change on 2014/12/03 by temiola <temiola@google.com>
-------------
Adding support for composite and IAM credentials.

- For now, we don't do any checks on credentials compatibility in the
composite credentials. Maybe we'll add that later.
- Refactored the end to end security tests so that we always use the public API
(except for the fake security context which is not exposed).
	Change on 2014/12/03 by jboeuf <jboeuf@google.com>
-------------
Make GPR library buildable in Visual Studio 2013.
	Change on 2014/12/04 by jtattermusch <jtattermusch@google.com>
-------------
Adds codegen for ruby

This is being added now that ruby's proto and grpc apis are defined and stable
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Prevent NewStream() from sending negative or 0 timeout.
	Change on 2014/12/04 by zhaoq <zhaoq@google.com>
-------------
Add a grpc_sockaddr_to_string() function, and use it when logging bind
failures.  Also improve const-correctness in some earlier code.

I'm not certain whether inet_ntop() will need any platform-specific
implementations, but for now the compiler offers no complaints.

Demo:
$ []-bin/net/grpc/c/echo_server 1.2.3.4:80
... tcp_server.c:139] bind addr=[::ffff:1.2.3.4]:80: Permission denied
	Change on 2014/12/04 by pmarks <pmarks@google.com>
-------------
Refactoring - moves c wrapped classes to a submodule Google::RPC::Core

- this allows for an explicit rule when reading through gRPC ruby code for telling
when an object is pure ruby or wrapped C
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Fixes the bidi_call

[]
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Fixing dev build when activating surface traces.
	Change on 2014/12/04 by nnoble <nnoble@google.com>
-------------
Updates the tests to reflect that fact that some Credentials compose works.
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Making the generate_project_test actually do something.
	Change on 2014/12/04 by nnoble <nnoble@google.com>
-------------
Rename "esf_server" to "[]4_server". Delete "test_sever" from Java directory.
	Change on 2014/12/04 by chenw <chenw@google.com>
-------------
Added PHP client interop tests. Tested large_unary against the C++ server.
	Change on 2014/12/04 by mlumish <mlumish@google.com>
-------------
Refactor grpc_create_dualstack_socket() by pulling the setsockopt into its own
function.  This separates the magic test flag from the real fallback logic.
	Change on 2014/12/04 by pmarks <pmarks@google.com>
-------------
Fixes the type of the constant used for test cert hostname
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Disabling these tests as they're causing flakiness.
	Change on 2014/12/04 by ctiller <ctiller@google.com>
-------------
Change intptr --> uintptr.

Handles the case where a void* turns into a negative number, which then gets
hashed into a negative bucket and segfaults.
	Change on 2014/12/04 by ctiller <ctiller@google.com>
-------------
Add a test fixture to force parsers to handle one byte at a time.

This should expand coverage and hopefully prevent errors at some point (it
seems to pass out of the box for now though).
	Change on 2014/12/04 by ctiller <ctiller@google.com>
-------------
The code generator isn't +x.
	Change on 2014/12/04 by ctiller <ctiller@google.com>
-------------
Updates math_client and math_server to allow construction using crednetials

By:
- Extending rpc_server constructor so that it takes a credentials keyword param
- Extending client_stub constructor so that it takes a credentials keyword param
	Change on 2014/12/04 by temiola <temiola@google.com>
-------------
Format output a little more nicely.

Print each line of output separately - previously logging.info was truncating this at some maximum length, and logs were getting lost.
	Change on 2014/12/04 by ctiller <ctiller@google.com>
-------------
Up timeout for this test.

Under TSAN, if we process one byte at a time, this timeout can be reached - and I think this is the cause of the following flake:
[]
	Change on 2014/12/05 by ctiller <ctiller@google.com>
-------------
Adding more error logging for ssl.
	Change on 2014/12/05 by jboeuf <jboeuf@google.com>
-------------
Read path for goaway.

Still need to add hooks to deprecate a channel on the client side when goaway
is received.
	Change on 2014/12/05 by ctiller <ctiller@google.com>
-------------
Separate accept() into server_accept() and server_end_of_initial_metadata().

This allows servers to initiate reads before finishing writing metadata.
	Change on 2014/12/05 by ctiller <ctiller@google.com>
-------------
Fix for breakage 11512317 - adding missing test files.
	Change on 2014/12/05 by nnoble <nnoble@google.com>
-------------
grpc c++ server side streaming support.

This is based on [] There is a lot of room to clean up the internal implementation which may require refactoring of CompletionQueue. The current cl serves as a working implementation with the missing interfaces.

The sample generated files are included and will be removed before submitting.
	Change on 2014/12/05 by yangg <yangg@google.com>
-------------
Changed to the latest timeout format again (search "grpc-timeout" in [] for the spec).
	Change on 2014/12/05 by zhaoq <zhaoq@google.com>
-------------
Fixing opensource build.
	Change on 2014/12/05 by nnoble <nnoble@google.com>
-------------
Making absolutely sure we can do the moe export by adding a sh_test for it.
	Change on 2014/12/05 by nnoble <nnoble@google.com>
-------------
Change :scheme psuedo-header from "grpc" to "http" or "https".
	Change on 2014/12/05 by zhaoq <zhaoq@google.com>
-------------
Add server credential wrapping for c++ server. It only wraps ssl and []2 for now.

The ServerCredentials class and the factory class are in a similar fashion as
client side wrapping. The difference is the factory method returns shared_ptr
instead of unique_ptr as the server builder needs to keep a reference to it for
actually creating the server later.

The integration will happen in a following cl.
	Change on 2014/12/05 by yangg <yangg@google.com>
-------------
Fixed bugs in new_grpc_docker_builder.sh
	Change on 2014/12/05 by mlumish <mlumish@google.com>
-------------
In secure endpoint, hold a refcount for the life of a write callback if the
write does not complete immediately.
	Change on 2014/12/05 by klempner <klempner@google.com>
-------------
Add migration support to MOE and have TAP verify it doesn't break.

Migration support allows mirroring commits from [] into the git repo, instead of just a dump of the current source.
	Change on 2014/12/05 by ejona <ejona@google.com>
-------------
Change initial window size to 65535 according http2 draft 15.
	Change on 2014/12/05 by zhaoq <zhaoq@google.com>
-------------
Re-enable the flaky cases in dualstack_socket_test, with additional logging to
help track down the problem if it surfaces again.

This also seems like a good opportunity to make grpc_socket_utils a separate
library, as it's not really specific to TCP.

Example output:
logspam: [], 26570) resolved 2 addrs in 37ms:
logspam:   [0] [::1]:26570
logspam:   [1] 127.0.0.1:26570
	Change on 2014/12/05 by pmarks <pmarks@google.com>
-------------
Opensource build fixes.

-) A function that has a return type should actually return something.
-) Don't pass unsigned chars to strlen and strncmp.
	Change on 2014/12/05 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81458281
2014-12-05 16:00:44 -08:00
Nicolas Noble b7ebd3b8c6 Initial import. 2014-11-26 16:33:03 -08:00