Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
grpc_core::Rbac::Principal Struct Reference

#include <rbac_policy.h>

Public Types

enum  RuleType {
  RuleType::kAnd, RuleType::kOr, RuleType::kNot, RuleType::kAny,
  RuleType::kPrincipalName, RuleType::kSourceIp, RuleType::kDirectRemoteIp, RuleType::kRemoteIp,
  RuleType::kHeader, RuleType::kPath, RuleType::kMetadata
}
 

Public Member Functions

Principaloperator= (Principal &&other) noexcept
 
 Principal ()=default
 
 Principal (Principal &&other) noexcept
 
std::string ToString () const
 

Static Public Member Functions

static Principal MakeAndPrincipal (std::vector< std::unique_ptr< Principal >> principals)
 
static Principal MakeAnyPrincipal ()
 
static Principal MakeAuthenticatedPrincipal (absl::optional< StringMatcher > string_matcher)
 
static Principal MakeDirectRemoteIpPrincipal (CidrRange ip)
 
static Principal MakeHeaderPrincipal (HeaderMatcher header_matcher)
 
static Principal MakeMetadataPrincipal (bool invert)
 
static Principal MakeNotPrincipal (Principal principal)
 
static Principal MakeOrPrincipal (std::vector< std::unique_ptr< Principal >> principals)
 
static Principal MakePathPrincipal (StringMatcher string_matcher)
 
static Principal MakeRemoteIpPrincipal (CidrRange ip)
 
static Principal MakeSourceIpPrincipal (CidrRange ip)
 

Public Attributes

HeaderMatcher header_matcher
 
bool invert = false
 
CidrRange ip
 
std::vector< std::unique_ptr< Principal > > principals
 
absl::optional< StringMatcherstring_matcher
 
RuleType type = RuleType::kAnd
 

Detailed Description

Definition at line 102 of file rbac_policy.h.

Member Enumeration Documentation

◆ RuleType

Enumerator
kAnd 
kOr 
kNot 
kAny 
kPrincipalName 
kSourceIp 
kDirectRemoteIp 
kRemoteIp 
kHeader 
kPath 
kMetadata 

Definition at line 103 of file rbac_policy.h.

Constructor & Destructor Documentation

◆ Principal() [1/2]

grpc_core::Rbac::Principal::Principal ( )
default

◆ Principal() [2/2]

grpc_core::Rbac::Principal::Principal ( Rbac::Principal &&  other)
noexcept

Definition at line 337 of file rbac_policy.cc.

Member Function Documentation

◆ MakeAndPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeAndPrincipal ( std::vector< std::unique_ptr< Principal >>  principals)
static

Definition at line 255 of file rbac_policy.cc.

◆ MakeAnyPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeAnyPrincipal ( )
static

Definition at line 279 of file rbac_policy.cc.

◆ MakeAuthenticatedPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeAuthenticatedPrincipal ( absl::optional< StringMatcher string_matcher)
static

Definition at line 285 of file rbac_policy.cc.

◆ MakeDirectRemoteIpPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeDirectRemoteIpPrincipal ( CidrRange  ip)
static

Definition at line 300 of file rbac_policy.cc.

◆ MakeHeaderPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeHeaderPrincipal ( HeaderMatcher  header_matcher)
static

Definition at line 314 of file rbac_policy.cc.

◆ MakeMetadataPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeMetadataPrincipal ( bool  invert)
static

Definition at line 330 of file rbac_policy.cc.

◆ MakeNotPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeNotPrincipal ( Principal  principal)
static

Definition at line 271 of file rbac_policy.cc.

◆ MakeOrPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeOrPrincipal ( std::vector< std::unique_ptr< Principal >>  principals)
static

Definition at line 263 of file rbac_policy.cc.

◆ MakePathPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakePathPrincipal ( StringMatcher  string_matcher)
static

Definition at line 322 of file rbac_policy.cc.

◆ MakeRemoteIpPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeRemoteIpPrincipal ( CidrRange  ip)
static

Definition at line 307 of file rbac_policy.cc.

◆ MakeSourceIpPrincipal()

Rbac::Principal grpc_core::Rbac::Principal::MakeSourceIpPrincipal ( CidrRange  ip)
static

Definition at line 293 of file rbac_policy.cc.

◆ operator=()

Rbac::Principal & grpc_core::Rbac::Principal::operator= ( Rbac::Principal &&  other)
noexcept

Definition at line 359 of file rbac_policy.cc.

◆ ToString()

std::string grpc_core::Rbac::Principal::ToString ( ) const

Definition at line 383 of file rbac_policy.cc.

Member Data Documentation

◆ header_matcher

HeaderMatcher grpc_core::Rbac::Principal::header_matcher

Definition at line 141 of file rbac_policy.h.

◆ invert

bool grpc_core::Rbac::Principal::invert = false

Definition at line 148 of file rbac_policy.h.

◆ ip

CidrRange grpc_core::Rbac::Principal::ip

Definition at line 143 of file rbac_policy.h.

◆ principals

std::vector<std::unique_ptr<Principal> > grpc_core::Rbac::Principal::principals

Definition at line 146 of file rbac_policy.h.

◆ string_matcher

absl::optional<StringMatcher> grpc_core::Rbac::Principal::string_matcher

Definition at line 142 of file rbac_policy.h.

◆ type

RuleType grpc_core::Rbac::Principal::type = RuleType::kAnd

Definition at line 140 of file rbac_policy.h.


The documentation for this struct was generated from the following files:


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