aws_external_account_credentials.h
Go to the documentation of this file.
1 //
2 // Copyright 2020 gRPC authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
18 #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
19 
21 
22 #include <functional>
23 #include <memory>
24 #include <string>
25 #include <vector>
26 
34 
35 namespace grpc_core {
36 
38  public:
40  Options options, std::vector<std::string> scopes,
42 
44  std::vector<std::string> scopes,
46 
47  private:
51 
52  void RetrieveRegion();
53  static void OnRetrieveRegion(void* arg, grpc_error_handle error);
55 
59 
60  void RetrieveRoleName();
61  static void OnRetrieveRoleName(void* arg, grpc_error_handle error);
63 
64  void RetrieveSigningKeys();
67 
68  void BuildSubjectToken();
69  void FinishRetrieveSubjectToken(std::string subject_token,
71 
73 
76 
77  // Fields of credential source
82 
83  // Information required by request signer
90 
91  std::unique_ptr<AwsRequestSigner> signer_;
93 
96 };
97 
98 } // namespace grpc_core
99 
100 #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
grpc_core::AwsExternalAccountCredentials::RetrieveRoleName
void RetrieveRoleName()
Definition: aws_external_account_credentials.cc:305
grpc_core::AwsExternalAccountCredentials::http_request_
OrphanablePtr< HttpRequest > http_request_
Definition: aws_external_account_credentials.h:75
orphanable.h
grpc_core::AwsExternalAccountCredentials::signer_
std::unique_ptr< AwsRequestSigner > signer_
Definition: aws_external_account_credentials.h:91
grpc_core::AwsExternalAccountCredentials::ctx_
HTTPRequestContext * ctx_
Definition: aws_external_account_credentials.h:94
grpc_core::AwsExternalAccountCredentials::region_url_
std::string region_url_
Definition: aws_external_account_credentials.h:78
ctx
Definition: benchmark-async.c:30
grpc_core::AwsExternalAccountCredentials::RetrieveSubjectToken
void RetrieveSubjectToken(HTTPRequestContext *ctx, const Options &options, std::function< void(std::string, grpc_error_handle)> cb) override
Definition: aws_external_account_credentials.cc:150
grpc_core
Definition: call_metric_recorder.h:31
options
double_dict options[]
Definition: capstone_test.c:55
benchmark.request
request
Definition: benchmark.py:77
grpc_core::ExternalAccountCredentials::HTTPRequestContext
Definition: external_account_credentials.h:74
grpc_core::AwsExternalAccountCredentials::OnRetrieveImdsV2SessionTokenInternal
void OnRetrieveImdsV2SessionTokenInternal(grpc_error_handle error)
Definition: aws_external_account_credentials.cc:210
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_core::ExternalAccountCredentials
Definition: external_account_credentials.h:45
grpc_core::AwsExternalAccountCredentials::RetrieveImdsV2SessionToken
void RetrieveImdsV2SessionToken()
Definition: aws_external_account_credentials.cc:171
grpc_core::AwsExternalAccountCredentials::OnRetrieveRegion
static void OnRetrieveRegion(void *arg, grpc_error_handle error)
Definition: aws_external_account_credentials.cc:281
grpc_core::AwsExternalAccountCredentials::OnRetrieveRoleNameInternal
void OnRetrieveRoleNameInternal(grpc_error_handle error)
Definition: aws_external_account_credentials.cc:342
grpc_core::AwsExternalAccountCredentials::RetrieveSigningKeys
void RetrieveSigningKeys()
Definition: aws_external_account_credentials.cc:352
aws_request_signer.h
grpc_core::AwsExternalAccountCredentials::Create
static RefCountedPtr< AwsExternalAccountCredentials > Create(Options options, std::vector< std::string > scopes, grpc_error_handle *error)
Definition: aws_external_account_credentials.cc:80
grpc_core::AwsExternalAccountCredentials::audience_
std::string audience_
Definition: aws_external_account_credentials.h:74
grpc_core::AwsExternalAccountCredentials::RetrieveRegion
void RetrieveRegion()
Definition: aws_external_account_credentials.cc:239
external_account_credentials.h
grpc_core::AwsExternalAccountCredentials::regional_cred_verification_url_
std::string regional_cred_verification_url_
Definition: aws_external_account_credentials.h:80
grpc_core::RefCountedPtr
Definition: ref_counted_ptr.h:35
grpc_core::AwsExternalAccountCredentials::url_
std::string url_
Definition: aws_external_account_credentials.h:79
grpc_core::AwsExternalAccountCredentials::OnRetrieveRoleName
static void OnRetrieveRoleName(void *arg, grpc_error_handle error)
Definition: aws_external_account_credentials.cc:335
httpcli.h
grpc_core::AwsExternalAccountCredentials
Definition: aws_external_account_credentials.h:37
arg
Definition: cmdline.cc:40
grpc_core::AwsExternalAccountCredentials::OnRetrieveSigningKeysInternal
void OnRetrieveSigningKeysInternal(grpc_error_handle error)
Definition: aws_external_account_credentials.cc:408
grpc_core::AwsExternalAccountCredentials::FinishRetrieveSubjectToken
void FinishRetrieveSubjectToken(std::string subject_token, grpc_error_handle error)
Definition: aws_external_account_credentials.cc:503
error.h
grpc_core::AwsExternalAccountCredentials::OnRetrieveRegionInternal
void OnRetrieveRegionInternal(grpc_error_handle error)
Definition: aws_external_account_credentials.cc:288
grpc_core::AwsExternalAccountCredentials::imdsv2_session_token_
std::string imdsv2_session_token_
Definition: aws_external_account_credentials.h:89
grpc_core::AwsExternalAccountCredentials::OnRetrieveImdsV2SessionToken
static void OnRetrieveImdsV2SessionToken(void *arg, grpc_error_handle error)
Definition: aws_external_account_credentials.cc:203
parser.h
grpc_core::AwsExternalAccountCredentials::imdsv2_session_token_url_
std::string imdsv2_session_token_url_
Definition: aws_external_account_credentials.h:81
grpc_core::AwsExternalAccountCredentials::token_
std::string token_
Definition: aws_external_account_credentials.h:88
grpc_core::AwsExternalAccountCredentials::cb_
std::function< void(std::string, grpc_error_handle)> cb_
Definition: aws_external_account_credentials.h:95
grpc_core::AwsExternalAccountCredentials::AwsExternalAccountCredentials
AwsExternalAccountCredentials(Options options, std::vector< std::string > scopes, grpc_error_handle *error)
Definition: aws_external_account_credentials.cc:92
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:64
grpc_core::AwsExternalAccountCredentials::BuildSubjectToken
void BuildSubjectToken()
Definition: aws_external_account_credentials.cc:457
ref_counted_ptr.h
grpc_core::AwsExternalAccountCredentials::secret_access_key_
std::string secret_access_key_
Definition: aws_external_account_credentials.h:87
grpc_core::AwsExternalAccountCredentials::OnRetrieveSigningKeys
static void OnRetrieveSigningKeys(void *arg, grpc_error_handle error)
Definition: aws_external_account_credentials.cc:401
grpc_core::AwsExternalAccountCredentials::role_name_
std::string role_name_
Definition: aws_external_account_credentials.h:85
grpc_core::AwsExternalAccountCredentials::AddMetadataRequestHeaders
void AddMetadataRequestHeaders(grpc_http_request *request)
Definition: aws_external_account_credentials.cc:225
grpc_core::AwsExternalAccountCredentials::cred_verification_url_
std::string cred_verification_url_
Definition: aws_external_account_credentials.h:92
grpc_error
Definition: error_internal.h:42
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
grpc_core::AwsExternalAccountCredentials::access_key_id_
std::string access_key_id_
Definition: aws_external_account_credentials.h:86
grpc_core::AwsExternalAccountCredentials::region_
std::string region_
Definition: aws_external_account_credentials.h:84
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351
grpc_core::ExternalAccountCredentials::Options
Definition: external_account_credentials.h:49
grpc_http_request
Definition: src/core/lib/http/parser.h:69
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:35