Commit Graph

213 Commits

Author SHA1 Message Date
Tanvi Jagtap 03e91b6811 [Gpr_To_Absl_Logging] Move function to test header form log.h (#36860)
[Gpr_To_Absl_Logging] Move function to test header form log.h
This is not really needed in log.h

Closes #36860

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36860 from tanvi-jagtap:move_function_to_test_header e6494bd06f
PiperOrigin-RevId: 642080756
2024-06-10 17:52:44 -07:00
Tanvi Jagtap 1dbfd4c9f2 [grpc][Gpr_To_Absl_Logging] Deleting multiple instances of gpr_set_log_function (#36833)
Deleting multiple instances of gpr_set_log_function .
This function will be deleted soon.
https://github.com/grpc/proposal/pull/425

Closes #36833

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36833 from tanvi-jagtap:remove_gpr_log_partial_code 17517efee4
PiperOrigin-RevId: 641268299
2024-06-07 09:14:44 -07:00
AJ Heller 1a8b22f2de [build] Restrict visibility for creating core credentials types. (#36216)
Closes #36216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36216 from drfloob:conceal-core-cred-creation a44a299273
PiperOrigin-RevId: 625425746
2024-04-17 01:21:29 +00:00
Mark D. Roth 574b0572f1 [client channel] remove grpc_channel_num_external_connectivity_watchers() (#35840)
Implements gRFC L113 (https://github.com/grpc/proposal/pull/417).

Closes #35840

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35840 from markdroth:client_channel_remove_num_external_watchers 334670c13c
PiperOrigin-RevId: 606766495
2024-02-13 15:31:33 -08:00
Luwei Ge dd12460018 [tls] Add set min/max TLS version APIs to TLS credentials APIs. (#34861)
Address #28382. This is a recreation of #31368 except e2e tests are not handled here (yet).

Closes #34861

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34861 from rockspore:tls_version f9a1215ac1
PiperOrigin-RevId: 589847110
2023-12-11 09:27:44 -08:00
Matthew Stevenson 07985907f2
[tls] Fix ownership bugs in TlsCredentialsOptions and grpc_tls_credentials_options. (#34758)
Currently it is very easy to use the `TlsCredentialsOptions` in such a
way that it produces a memory leak. For example, the code block
```
{
  TlsCredentialsOptions options;
}
```
produces a memory leak. This PR fixes up the ownership bugs in this
class and its `grpc_tls_credentials_options`, the C-core analogue.
2023-10-27 08:09:04 -07:00
Matthew Stevenson 278978d6f0
[tls] Remove use of SSL_CTX_set_client_CA_list for TLS server credentials. (#33558)
This PR does the following: for the TLS server credentials, stops
calling `SSL_CTX_set_client_CA_list` by default in
`ssl_transport_security.cc`, and gives users a knob to re-enable calling
this API.

## What does the `SSL_CTX_set_client_CA_list` API do?

When this API is called, a gRPC TLS server sends the following data in
the ServerHello: for each certificate in the server's trust bundle, the
CA name in the certificate.

This API does not change the set of certificates trusted by the server
in any way. Rather, it is just providing a hint to the client about what
client certificate should be sent to the server.

## Why are we removing the use of `SSL_CTX_set_client_CA_list` by
default for the TLS server credentials?

Removing the use of this API by default has 2 benefits:
1. Calling this API makes gRPC TLS unusable for servers with a
sufficiently large trust bundle. Indeed, if the server trust bundle is
too large, then the server will always fail to build the ServerHello.
2. Calling this API is introducing a huge amount of overhead (1000s of
bytes) to each ServerHello, so removing this feature will improve
connection establishment latency for all users of the TLS server
credentials.
2023-06-29 09:48:15 -07:00
Craig Tiller 67f364e23e
[cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Cheng-Yu Chung 0d3fcb41ea
Revert "Move google_default channel_credentials out of `include/grpc/grpc_security.h` (#31786)" (#31822)
This reverts commit 3d59abc94e.
2022-12-06 11:39:43 -08:00
Cheng-Yu Chung 3d59abc94e
Move google_default channel_credentials out of `include/grpc/grpc_security.h` (#31786) 2022-12-06 10:59:57 +08:00
Cheng-Yu Chung dba82c9be6
Remove `include/grpc/impl/codegen/log.h` (#31775)
* Remove `include/grpc/impl/codegen/log.h`

* Automated change: Fix sanity tests
2022-12-05 20:51:35 +08:00
Cheng-Yu Chung 3d68bb735a
Remove `include/grpc/impl/codegen/byte_buffer.h` (#31674) 2022-11-17 15:50:03 -05:00
Craig Tiller 93fdc99756
[init] Remove grpc_register_plugin (#30929)
* [init] Remove grpc_register_plugin

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-23 22:08:01 -07:00
yihuaz b458db9246
Eliminate gRPC insecure build (#25586)
* force submit

* fix test error

* remove is_client from local tsi and its callsites

* fix too_many_pings_test

* add missing dep
2022-02-10 11:17:18 -08:00
Craig Tiller 74a2cb6e2b
Revert "Revert "Reland slice changes (#28601)" (#28615)" (#28624)
* Revert "Revert "Reland slice changes (#28601)" (#28615)"

This reverts commit 939bbfc336.

* Change random seed back to nanoseconds
2022-01-20 12:47:33 -08:00
Craig Tiller 939bbfc336
Revert "Reland slice changes (#28601)" (#28615)
This reverts commit b33e0d40af.
2022-01-19 09:40:19 -08:00
Vignesh Babu aeea02fab8
TLS Session Keys export for GRPC C++ (#26812)
* Adding TLS Key export logic to core and c++ wrappers

* Adding and end2end cpp tls key export test and updating broken test due to interface changes

* regenerate projects

* updating tls key export core logic with addition of APIs to grpc_security.h

* undoing changes to tls_security_connector_test

* regenerate projects

* changing the logging format enum name as per GRFC comments

* regenerate projects

* removing some commented code

* updating changes as per review comments

* adding GRPCAPI annotations to functions defined in grpc_security.h

* regenerate projects

* fixed some code styling issues

* removing grpc_security.h include from tls_credentials_options.h

* updating files as per review comments

* minor fixes

* moving some code around

* removing key log format from tls session key log config and converting it to a simple string

* regenerate projects

* fixing mistakes in recent merge with master

* regenerate projects

* regenerate projects

* fixing some distrib and snity errors

* fixing formatting errors

* fixing more sanity checks and raising supported openssl versions to 1.1.1

* updating min supported openssl version to 1.1.1

* updating min supported openssl version in tls_key_export_test

* updating test to fix incorrect vector initialization

* updating as per latest comments

* fixing sanity checks

* addressing review comments

* fixing sanity checks

* fixed c++ comment style

* Automated change: Fix sanity tests

* fixing review comments

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-01-18 14:44:55 -08:00
Craig Tiller b33e0d40af
Reland slice changes (#28601)
* Revert "Revert "Eliminate slice interning (#28363)" (#28598)"

This reverts commit 03bf699600.

* fix?
2022-01-18 09:29:49 -08:00
Jan Tattermusch 03bf699600
Revert "Eliminate slice interning (#28363)" (#28598)
This reverts commit 6703186b7a.
2022-01-18 15:44:18 +01:00
Craig Tiller 6703186b7a
Eliminate slice interning (#28363)
Eliminate slice interning, and structures in slices to support it.
Reduces grpc_slice_refcount from 40 bytes (+ a required 8 bytes elsewhere) to 16 bytes.
Removes a pointer dereference for every slice ref/unref.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-01-17 20:25:45 -08:00
krestofur 7759632a2d
Add CRL checking to gRPC Core (#28418) 2022-01-05 14:28:19 -08:00
Vignesh Babu 24778bf8ea
Revert "Enable CRL checking in gRPC core (#26287)" (#28416)
This reverts commit 7d8c9ae890.
2021-12-23 13:20:31 -08:00
krestofur 7d8c9ae890
Enable CRL checking in gRPC core (#26287)
* enable crl checking in gRPC C core
2021-12-22 13:24:20 -08:00
ZhenLian 2e14f6fa70
Support Custom Post-handshake Verification in TlsCredentials (#25631)
* custom verification refactoring - post-handshake verification
2021-11-10 13:45:52 -08:00
Ashitha Santhosh a1db97be90
Revert "Revert "Revert "Revert "File watcher authorization policy provider implementation"" (#27605)" (#27644)" (#27645)
This reverts commit b8e01f73a0.
2021-10-08 15:52:13 -07:00
AJ Heller b8e01f73a0
Revert "Revert "Revert "File watcher authorization policy provider implementation"" (#27605)" (#27644)
This reverts commit 5912aedb2b.
2021-10-07 16:45:30 -07:00
Ashitha Santhosh 5912aedb2b
Revert "Revert "File watcher authorization policy provider implementation"" (#27605)
* Revert "Revert "File watcher authorization policy provider implementation (#26779)" (#27591)"

This reverts commit a1ad74f7af.

* Remove license comment
2021-10-07 09:54:23 -07:00
Craig Tiller a1ad74f7af
Revert "File watcher authorization policy provider implementation (#26779)" (#27591)
This reverts commit 310accd077.
2021-10-05 09:12:08 -07:00
Ashitha Santhosh 310accd077
File watcher authorization policy provider implementation (#26779)
* File watcher authorization policy provider implementation
2021-10-04 14:22:45 -07:00
Alisha Nanda 0a502d8f2e
Fix race between Read and ServerContext::IsCancelled in Sync API (#27056)
* Fix OOM issues in qps tests

* Add more verbose logging.

* Fix clang error

* Fix race between IsCancelled and Read

* Fix build errors from using bool in C code
2021-09-15 12:29:02 -07:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
Lidi Zheng 1040fbdb9f
Re-introduce "CSDS Implementation" (#25762)
* Revert "Revert "CSDS Implementation (#25038)" (#25745)"

This reverts commit 98fd4e1e36.

* Add xDS special Bazel build rules

* Add 2 todos to remove the added rules
2021-03-22 13:14:19 -07:00
Lidi Zheng 98fd4e1e36
Revert "CSDS Implementation (#25038)" (#25745)
This reverts commit 27de24a38e.
2021-03-17 13:38:47 -07:00
Lidi Zheng 27de24a38e
CSDS Implementation (#25038)
* Implement the xDS Config Dump as CSDS in Core

* Revemp the logic of caching and constructing the CSDS response
* Unref created error
* Fix the clang tidy complains
* Resolve comments about symbol preload and Json ctor
* Improve readability
* Merge with new ADS logic && support latest CSDS
  * Refactor the version/client_status logic
  * Add support for error_state
  * Add support for does_not_exist
  * Add node information
* Fix the ProtoBuf segfault
* More test cases
* Refactor to use bytes as cache instead of JSON

* Apply clang_tidy's suggestion

* Resolve reviewer's requests

* Tiny stylish fixes && make sanity test happy

* WIP: still working on the matchers

* Update a bunch of matchers

* Improve readability a bit

* Resolve reviewer's suggestions

* Resolve reviewer's comments

* Make Unpack fail fast
2021-03-16 18:17:37 -07:00
Chuan Ren 06cc42eb85 Add support of implicit and explicit flows for external account creds 2021-01-05 13:20:42 -08:00
Yash Tibrewal 4105d2ce20 XdsServerBuilder, config fetching per resolved address and delaying bind/listen till fetch is complete 2020-12-16 12:15:52 -08:00
Yash Tibrewal 096b2324e1 Experimental API for XdsServerCredentials 2020-12-01 12:47:52 -08:00
ZhenLian d74e43da95 Add File Watcher Certificate Provider API 2020-11-19 13:36:13 -08:00
ZhenLian 518ed1303c Add Credential Loading From Static Providers For TLS Credentials 2020-10-22 13:55:31 -07:00
Yash Tibrewal 48ec53971a gRPC Core API to create Xds channel credentials 2020-10-05 14:52:08 -07:00
Yash Tibrewal 4a03ce5a14 Remove grpc_channel_ping from surface API 2020-08-20 17:07:04 -07:00
Richard Belleville 0ef84e4306 Regenerate projects 2020-07-13 19:36:54 +00:00
Alexander Polcyn b88c0a22c7 Fix use-after-free in ruby call creds 2020-06-26 13:26:54 -07:00
Akshay Kumar db11b94f25 FullChainExperimental-01-200103 2020-01-03 22:37:18 -08:00
Esun Kim 81df105ac8 Deprecate gpr_get/set_allocation_functions 2019-11-04 19:47:33 -08:00
Yihua Zhang ae863630d5 Add spiffe client-side credential reload 2019-08-12 14:12:13 -07:00
Julien Boeuf 189c2c8c30 Adding support for STS Token Exchange Creds in core:
- IETF specification is available here:
https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16
2019-06-26 12:48:05 -07:00
Yihua Zhang a887f35a9b add a new struct - grpc_ssl_verify_peer_options and an API - grpc_ssl_credentials_create_ex. 2019-05-30 16:00:50 -07:00
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
Soheil Hassas Yeganeh c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing." 2019-03-05 14:01:01 -05:00