Commit Graph

36 Commits

Author SHA1 Message Date
Craig Tiller 339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Craig Tiller 66a137f1d7 [sanity] Restore it (#38869)
Closes #38869

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38869 from ctiller:nubbins 972d734cdf45a4786de53c51b2ce8cf97a3d38ff
PiperOrigin-RevId: 731570368
2025-02-26 21:26:56 -08:00
Craig Tiller 07188632f4 Tiny formatting cleanups for portability
PiperOrigin-RevId: 731512282
2025-02-26 17:22:27 -08:00
Mark D. Roth 076d5076c6 [reorg] move security base APIs and credential code to new locations (#38825)
This includes the following moves from src/core/lib/security:
- certificate_provider/* → src/core/credentials/transport/tls/
- context/* → split between src/core/call/security_context* and src/core/transport/auth_context*
- credentials/
  - composite/ → split between src/core/credentials/call/composite/ and src/core/credentials/transport/composite/
  - alts, google_default, insecure, local, ssl, tls, xds → src/core/credentials/transport/
  - fake/ → split between test/core/test_util/test_call_creds* and src/core/credentials/transport/fake
  - external, iam, jwt, oauth2, plugin, token_fetcher → src/core/credentials/call/
  - call_creds_utils.* → src/core/credentials/call/
  - channel_creds_registry* → src/core/credentials/transport/
  - credentials.* → split between src/core/credentials/call/call_credentials.* and src/core/credentials/transport/transport_credentials.*
- security_connector/
  - alts, fake, insecure, local, ssl, tls → src/core/credentials/transport/
  - security_connector* → src/core/credentials/transport/
  - ssl_utils*, load_system_roots* → src/core/credentials/transport/tls/
- transport/ → src/core/filter/auth/
- util/* → src/core/credentials/call/

The only thing left in src/core/lib/security is the authz code, which I will move in a separate PR.

I have also moved the tests from test/core/security into a similar structure.  Some specific notes:
- I have removed print_google_default_creds_token.cc, since it does not appear in any build file and appears to be completely unused.
- I moved secure_endpoint_test.cc to test/core/handshaker, to match where the implementation lives in the tree.

Closes #38825

PiperOrigin-RevId: 731487339
2025-02-26 16:01:37 -08:00
Craig Tiller dbb5164ac7 [clang-format] Remove custom clang-format rules for include ordering (#37820)
Closes #37820

PiperOrigin-RevId: 682352913
2024-10-04 09:44:20 -07:00
Yijie Ma f99b8b5bc4 Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Craig Tiller ea389c00c2 Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Soheil Hassas Yeganeh 9decf48632 Move security credentials, connectors, and auth context to C++
This is to use `grpc_core::RefCount` to improve performnace.
This commit also replaces explicit C vtables, with C++ vtable
with its own compile time assertions and performance benefits.
It also makes use of `RefCountedPtr` wherever possible.
2018-12-13 10:38:12 -05:00
Vijay Pai c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
Craig Tiller 4ac2b8e585 Enable clang-tidy as a sanity check, fix up all known failures 2017-11-10 14:14:17 -08:00
Yash Tibrewal 39aed1ae8b Remove unnecessary extern Cs 2017-10-25 17:04:35 -07:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Julien Boeuf 8ca294e417 Refactoring the core security code.
As opposed to a flat directory, we now have the following structure:

- security
  -context
  - credentials
    - composite
    - fake
    - google_default
    - iam
    - jwt
    - oauth2
    - plugin
    - ssl
  - transport
  - util

We have not refactored the test code yet but this PR is already large
enough...
2016-05-04 15:51:28 -07:00
Craig Tiller 6169d5f7b0 Update copyrights 2016-03-31 07:46:18 -07:00
Craig Tiller 9533d042d4 Fix includes 2016-03-25 17:11:06 -07:00
Craig Tiller 2e1903638e Fix copyrights 2016-03-25 14:33:26 -07:00
Craig Tiller f40df23eeb Auto-changes 2016-03-25 13:38:14 -07:00
Julien Boeuf 5be92a316d Shuffling headers around. 2015-08-28 16:28:18 -07:00
Julien Boeuf 68ff03a952 Fixing AuthContext tests. 2015-08-28 14:21:24 -07:00
Julien Boeuf 459faf3821 Merge branch 'master' of github.com:grpc/grpc into cpp_auth_md_processor 2015-08-27 16:07:46 -07:00
Julien Boeuf 5b3516e2c5 Merge branch 'master' of github.com:grpc/grpc into cpp_auth_md_processor 2015-08-26 11:19:10 -07:00
yang-g d090fe1379 auth context api change for string_ref 2015-08-25 16:53:07 -07:00
yang-g 9e2f90cd06 headers reorg 2015-08-21 15:35:03 -07:00
Craig Tiller d6c98df792 clang-format all source 2015-08-18 09:33:44 -07:00
Julien Boeuf c2274e7069 Adding C++ auth metadata processor.
- We always do the processing asynchronously but maintain a synchronous
  API for the implementor of the processor.
- there are a lot of string copies right now. Having a StringPiece
  object in grpc++ would really help with that (as we would use it for
  C++ metadata).
- Please review the API carefully and if you're happy with it, I'll
  proceed with tests.
2015-08-13 17:25:52 -07:00
Julien Boeuf 54b5018dd8 Fixing cpp tests. 2015-08-05 21:40:49 -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
Vijay Pai e66165dead Remove iterator-based test altogether 2015-07-21 21:11:38 +00:00
Vijay Pai c4af224970 Remove one range-based for and do appropriate static casts on nullptr 2015-07-21 18:44:20 +00: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 7ef7232dd9 split iterator into its own file 2015-07-16 21:00:51 -07:00
yang-g 14b3684dee Remove const_iterator typedef and add a range based loop test 2015-07-15 13:20:23 -07:00
yang-g 811536efce auth context iterator 2015-07-15 00:55:30 -07:00
Craig Tiller d0955f36dc Compile fix for Mac 2015-07-10 07:52:37 -07:00
yang-g f9e8e59b1c Resolve comments 2015-07-09 12:32:15 -07:00
yang-g 8068f86974 Add a unit test 2015-07-06 15:05:48 -07:00