Namespaces | Functions | Variables
grpc_authorization_policy_provider.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h"
#include <stdint.h>
#include <utility>
#include "absl/memory/memory.h"
#include <grpc/grpc_security.h>
#include <grpc/impl/codegen/gpr_types.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/security/authorization/grpc_authorization_engine.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_refcount.h"
Include dependency graph for grpc_authorization_policy_provider.cc:

Go to the source code of this file.

Namespaces

 grpc_core
 

Functions

grpc_authorization_policy_providergrpc_authorization_policy_provider_file_watcher_create (const char *authz_policy_path, unsigned int refresh_interval_sec, grpc_status_code *code, const char **error_details)
 
void grpc_authorization_policy_provider_release (grpc_authorization_policy_provider *provider)
 
grpc_authorization_policy_providergrpc_authorization_policy_provider_static_data_create (const char *authz_policy, grpc_status_code *code, const char **error_details)
 

Variables

TraceFlag grpc_core::grpc_authz_trace
 

Function Documentation

◆ grpc_authorization_policy_provider_file_watcher_create()

grpc_authorization_policy_provider* grpc_authorization_policy_provider_file_watcher_create ( const char *  authz_policy_path,
unsigned int  refresh_interval_sec,
grpc_status_code code,
const char **  error_details 
)

EXPERIMENTAL - Subject to change. Creates a grpc_authorization_policy_provider by watching for gRPC authorization policy changes in filesystem.

  • authz_policy is the file path of gRPC authorization policy.
  • refresh_interval_sec is the amount of time the internal thread would wait before checking for file updates.
  • code is the error status code on failure. On success, it equals GRPC_STATUS_OK.
  • error_details contains details about the error if any. If the initialization is successful, it will be null. Caller must use gpr_free to destroy this string.

Definition at line 207 of file grpc_authorization_policy_provider.cc.

◆ grpc_authorization_policy_provider_release()

void grpc_authorization_policy_provider_release ( grpc_authorization_policy_provider provider)

EXPERIMENTAL - Subject to change. Releases grpc_authorization_policy_provider object. The creator of grpc_authorization_policy_provider is responsible for its release.

Definition at line 222 of file grpc_authorization_policy_provider.cc.

◆ grpc_authorization_policy_provider_static_data_create()

grpc_authorization_policy_provider* grpc_authorization_policy_provider_static_data_create ( const char *  authz_policy,
grpc_status_code code,
const char **  error_details 
)

EXPERIMENTAL - Subject to change. Creates a grpc_authorization_policy_provider using gRPC authorization policy from static string.

  • authz_policy is the input gRPC authorization policy.
  • code is the error status code on failure. On success, it equals GRPC_STATUS_OK.
  • error_details contains details about the error if any. If the initialization is successful, it will be null. Caller must use gpr_free to destroy this string.

Definition at line 191 of file grpc_authorization_policy_provider.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:16