auth_filters.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H
20 #define GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H
21 
23 
24 #include "absl/status/statusor.h"
25 
26 #include <grpc/grpc_security.h>
28 
38 
40 
41 namespace grpc_core {
42 
43 // Handles calling out to credentials to fill in metadata per call.
44 class ClientAuthFilter final : public ChannelFilter {
45  public:
47 
50 
51  // Construct a promise for one call.
53  CallArgs call_args, NextPromiseFactory next_promise_factory) override;
54 
55  private:
59 
61  CallArgs call_args);
62 
63  // Contains refs to security connector and auth context.
65 };
66 
67 } // namespace grpc_core
68 
69 // Exposed for testing purposes only.
70 // Check if the channel's security level is higher or equal to
71 // that of call credentials to make a decision whether the transfer
72 // of call credentials should be allowed or not.
74  grpc_security_level call_cred_level);
75 
76 #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */
grpc_call_credentials::GetRequestMetadataArgs
Definition: src/core/lib/security/credentials/credentials.h:196
channel_fwd.h
grpc_core::ClientAuthFilter::args_
grpc_call_credentials::GetRequestMetadataArgs args_
Definition: auth_filters.h:64
grpc_core
Definition: call_metric_recorder.h:31
promise_based_filter.h
grpc_core::ClientAuthFilter::ClientAuthFilter
ClientAuthFilter(RefCountedPtr< grpc_channel_security_connector > security_connector, RefCountedPtr< grpc_auth_context > auth_context)
Definition: client_auth_filter.cc:105
grpc_core::ClientAuthFilter::GetCallCredsMetadata
ArenaPromise< absl::StatusOr< CallArgs > > GetCallCredsMetadata(CallArgs call_args)
Definition: client_auth_filter.cc:110
grpc_security.h
credentials.h
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::NextPromiseFactory
std::function< ArenaPromise< ServerMetadataHandle >(CallArgs)> NextPromiseFactory
Definition: transport.h:165
grpc_core::RefCountedPtr< grpc_channel_security_connector >
channel_stack.h
grpc_core::ClientAuthFilter::Create
static absl::StatusOr< ClientAuthFilter > Create(ChannelArgs args, ChannelFilter::Args)
Definition: client_auth_filter.cc:195
grpc_server_auth_filter
const grpc_channel_filter grpc_server_auth_filter
Definition: server_auth_filter.cc:347
security_connector.h
arena_promise.h
grpc_core::CallArgs
Definition: transport.h:159
grpc_channel_filter
Definition: channel_stack.h:111
grpc_core::ClientAuthFilter::MakeCallPromise
ArenaPromise< ServerMetadataHandle > MakeCallPromise(CallArgs call_args, NextPromiseFactory next_promise_factory) override
Definition: client_auth_filter.cc:170
grpc_core::ChannelFilter
Definition: promise_based_filter.h:62
grpc_core::ClientAuthFilter::kFilter
static const grpc_channel_filter kFilter
Definition: auth_filters.h:46
grpc_security_level
grpc_security_level
Definition: grpc_security_constants.h:131
grpc_core::ArenaPromise
Definition: arena_promise.h:152
grpc_core::ClientAuthFilter
Definition: auth_filters.h:44
grpc_check_security_level
bool grpc_check_security_level(grpc_security_level channel_level, grpc_security_level call_cred_level)
Definition: client_auth_filter.cc:98
grpc_security_constants.h
grpc_core::ChannelArgs
Definition: channel_args.h:111
ref_counted_ptr.h
transport.h
channel_args.h
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
grpc_core::ChannelFilter::Args
Definition: promise_based_filter.h:64
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:45