blob: 2fed7bcdf091e0f16a2b888a19ce2bb52dd0d8ac [file] [log] [blame]
#ifndef PRODUCTION_SUSHID_SAFEPOWER_AGENT_BMC_AUTH_H_
#define PRODUCTION_SUSHID_SAFEPOWER_AGENT_BMC_AUTH_H_
#include <grpcpp/grpcpp.h>
#include <string>
#include <string_view>
#include "grpcpp/security/server_credentials.h"
#include "grpcpp/security/tls_certificate_provider.h"
#include "grpcpp/security/tls_certificate_verifier.h"
#include "grpcpp/security/tls_credentials_options.h"
#include "grpcpp/ext/proto_server_reflection_plugin.h"
#include "grpcpp/health_check_service_interface.h"
namespace auth {
using ::grpc::experimental::AuthorizationPolicyProviderInterface;
constexpr absl::string_view kZatarCertFilePath
= "/var/volatile/prodid/server.pem";
constexpr absl::string_view kGpowerDCertAuthZPolicy
= "/var/google/authz_policies/gpowerd_authz_policy.json";
constexpr absl::string_view kTrustBundleFilePath
= "/var/google/trust_bundle/trust_bundle.pem";
absl::StatusOr<std::shared_ptr<grpc::ServerCredentials> > GetCredsInfo();
absl::StatusOr<std::shared_ptr<AuthorizationPolicyProviderInterface> >
GetAuthPolicy();
} // namespace auth
#endif // PRODUCTION_SUSHID_SAFEPOWER_AGENT_BMC_AUTH_H_