google_mesh_ca_certificate_provider_factory.h
Go to the documentation of this file.
1 //
2 //
3 // Copyright 2020 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_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
20 #define GRPC_CORE_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
21 
23 
24 #include <stdint.h>
25 
26 #include <string>
27 #include <vector>
28 
29 #include <grpc/grpc_security.h>
30 
35 #include "src/core/lib/json/json.h"
37 
38 namespace grpc_core {
39 
42  public:
44  public:
45  struct StsConfig {
55  };
56 
57  const char* name() const override;
58 
59  std::string ToString() const override;
60 
61  const std::string& endpoint() const { return endpoint_; }
62 
63  const StsConfig& sts_config() const { return sts_config_; }
64 
65  Duration timeout() const { return timeout_; }
66 
68 
70 
71  uint32_t key_size() const { return key_size_; }
72 
73  const std::string& location() const { return location_; }
74 
75  static RefCountedPtr<Config> Parse(const Json& config_json,
77 
78  private:
79  // Helpers for parsing the config
80  std::vector<grpc_error_handle> ParseJsonObjectStsService(
81  const Json::Object& sts_service);
82  std::vector<grpc_error_handle> ParseJsonObjectCallCredentials(
83  const Json::Object& call_credentials);
84  std::vector<grpc_error_handle> ParseJsonObjectGoogleGrpc(
85  const Json::Object& google_grpc);
86  std::vector<grpc_error_handle> ParseJsonObjectGrpcServices(
87  const Json::Object& grpc_service);
88  std::vector<grpc_error_handle> ParseJsonObjectServer(
89  const Json::Object& server);
90 
98  };
99 
100  const char* name() const override;
101 
103  CreateCertificateProviderConfig(const Json& config_json,
104  grpc_error_handle* error) override;
105 
108  // TODO(yashykt) : To be implemented
109  return nullptr;
110  }
111 };
112 
113 } // namespace grpc_core
114 
115 #endif // GRPC_CORE_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::renewal_grace_period
Duration renewal_grace_period() const
Definition: google_mesh_ca_certificate_provider_factory.h:69
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::location_
std::string location_
Definition: google_mesh_ca_certificate_provider_factory.h:97
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig
Definition: google_mesh_ca_certificate_provider_factory.h:45
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::GoogleMeshCaCertificateProviderFactory
Definition: google_mesh_ca_certificate_provider_factory.h:40
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::subject_token_path
std::string subject_token_path
Definition: google_mesh_ca_certificate_provider_factory.h:51
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectGrpcServices
std::vector< grpc_error_handle > ParseJsonObjectGrpcServices(const Json::Object &grpc_service)
Definition: google_mesh_ca_certificate_provider_factory.cc:135
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::token_exchange_service_uri
std::string token_exchange_service_uri
Definition: google_mesh_ca_certificate_provider_factory.h:46
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::timeout_
Duration timeout_
Definition: google_mesh_ca_certificate_provider_factory.h:93
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::endpoint_
std::string endpoint_
Definition: google_mesh_ca_certificate_provider_factory.h:91
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::certificate_lifetime_
Duration certificate_lifetime_
Definition: google_mesh_ca_certificate_provider_factory.h:94
grpc_security.h
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::subject_token_type
std::string subject_token_type
Definition: google_mesh_ca_certificate_provider_factory.h:52
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::renewal_grace_period_
Duration renewal_grace_period_
Definition: google_mesh_ca_certificate_provider_factory.h:95
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::key_size_
uint32_t key_size_
Definition: google_mesh_ca_certificate_provider_factory.h:96
grpc_core::GoogleMeshCaCertificateProviderFactory::name
const char * name() const override
Definition: google_mesh_ca_certificate_provider_factory.cc:248
grpc_core::GoogleMeshCaCertificateProviderFactory::CreateCertificateProvider
RefCountedPtr< grpc_tls_certificate_provider > CreateCertificateProvider(RefCountedPtr< CertificateProviderFactory::Config >) override
Definition: google_mesh_ca_certificate_provider_factory.h:106
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::certificate_lifetime
Duration certificate_lifetime() const
Definition: google_mesh_ca_certificate_provider_factory.h:67
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::actor_token_type
std::string actor_token_type
Definition: google_mesh_ca_certificate_provider_factory.h:54
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::requested_token_type
std::string requested_token_type
Definition: google_mesh_ca_certificate_provider_factory.h:50
grpc_tls_certificate_provider.h
grpc_core::RefCountedPtr
Definition: ref_counted_ptr.h:35
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectCallCredentials
std::vector< grpc_error_handle > ParseJsonObjectCallCredentials(const Json::Object &call_credentials)
Definition: google_mesh_ca_certificate_provider_factory.cc:87
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::Parse
static RefCountedPtr< Config > Parse(const Json &config_json, grpc_error_handle *error)
Definition: google_mesh_ca_certificate_provider_factory.cc:190
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectStsService
std::vector< grpc_error_handle > ParseJsonObjectStsService(const Json::Object &sts_service)
Definition: google_mesh_ca_certificate_provider_factory.cc:50
Json
JSON (JavaScript Object Notation).
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectServer
std::vector< grpc_error_handle > ParseJsonObjectServer(const Json::Object &server)
Definition: google_mesh_ca_certificate_provider_factory.cc:156
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::name
const char * name() const override
Definition: google_mesh_ca_certificate_provider_factory.cc:40
grpc_core::GoogleMeshCaCertificateProviderFactory::CreateCertificateProviderConfig
RefCountedPtr< CertificateProviderFactory::Config > CreateCertificateProviderConfig(const Json &config_json, grpc_error_handle *error) override
Definition: google_mesh_ca_certificate_provider_factory.cc:253
time.h
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ToString
std::string ToString() const override
Definition: google_mesh_ca_certificate_provider_factory.cc:44
error.h
json.h
stdint.h
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::key_size
uint32_t key_size() const
Definition: google_mesh_ca_certificate_provider_factory.h:71
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::audience
std::string audience
Definition: google_mesh_ca_certificate_provider_factory.h:48
grpc_core::Json::Object
std::map< std::string, Json > Object
Definition: src/core/lib/json/json.h:54
server
Definition: examples/python/async_streaming/server.py:1
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::endpoint
const std::string & endpoint() const
Definition: google_mesh_ca_certificate_provider_factory.h:61
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::resource
std::string resource
Definition: google_mesh_ca_certificate_provider_factory.h:47
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::sts_config_
StsConfig sts_config_
Definition: google_mesh_ca_certificate_provider_factory.h:92
grpc_core::CertificateProviderFactory::Config
Definition: certificate_provider_factory.h:40
certificate_provider_factory.h
ref_counted_ptr.h
grpc_core::GoogleMeshCaCertificateProviderFactory::Config
Definition: google_mesh_ca_certificate_provider_factory.h:43
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::location
const std::string & location() const
Definition: google_mesh_ca_certificate_provider_factory.h:73
grpc_core::CertificateProviderFactory
Definition: certificate_provider_factory.h:37
grpc_error
Definition: error_internal.h:42
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::sts_config
const StsConfig & sts_config() const
Definition: google_mesh_ca_certificate_provider_factory.h:63
grpc_core::Duration
Definition: src/core/lib/gprpp/time.h:122
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::scope
std::string scope
Definition: google_mesh_ca_certificate_provider_factory.h:49
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::StsConfig::actor_token_path
std::string actor_token_path
Definition: google_mesh_ca_certificate_provider_factory.h:53
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::timeout
Duration timeout() const
Definition: google_mesh_ca_certificate_provider_factory.h:65
port_platform.h
grpc_core::GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectGoogleGrpc
std::vector< grpc_error_handle > ParseJsonObjectGoogleGrpc(const Json::Object &google_grpc)
Definition: google_mesh_ca_certificate_provider_factory.cc:104


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:39