Asylo
Public Member Functions | Static Public Member Functions | List of all members
asylo::EnclaveAuthContext Class Reference

Encapsulates the authentication properties of an EKEP-based gRPC connection. More...

#include <enclave_auth_context.h>

Public Member Functions

RecordProtocol GetRecordProtocol () const
 Gets the secure transport record-protocol used for securing frames over the connection. More...
 
bool HasEnclaveIdentity (const EnclaveIdentityDescription &description) const
 Indicates whether the authenticated peer has an identity matching description. More...
 
StatusOr< const EnclaveIdentity * > FindEnclaveIdentity (const EnclaveIdentityDescription &description) const
 Finds and returns a peer identity matching description, if one exists. More...
 

Static Public Member Functions

static StatusOr< EnclaveAuthContextCreateFromServerContext (const ::grpc::ServerContext &server_context)
 Constructs an EnclaveAuthContext using the authentication properties from server_context. More...
 
static StatusOr< EnclaveAuthContextCreateFromAuthContext (const ::grpc::AuthContext &auth_context)
 Creates an EnclaveAuthContext from the authentication properties in auth_context. More...
 

Detailed Description

Encapsulates the authentication properties of an EKEP-based gRPC connection.

The authentication properties in an EnclaveAuthContext object include the secure transport protocol and the peer's enclave identities.

Member Function Documentation

◆ CreateFromAuthContext()

static StatusOr<EnclaveAuthContext> asylo::EnclaveAuthContext::CreateFromAuthContext ( const ::grpc::AuthContext &  auth_context)
static

Creates an EnclaveAuthContext from the authentication properties in auth_context.

Parameters
auth_contextAn authentication context.

◆ CreateFromServerContext()

static StatusOr<EnclaveAuthContext> asylo::EnclaveAuthContext::CreateFromServerContext ( const ::grpc::ServerContext &  server_context)
static

Constructs an EnclaveAuthContext using the authentication properties from server_context.

The resulting EnclaveAuthContext contains the authentication properties on the server-side of the connection.

Parameters
server_contextThe server's authentication context.

◆ FindEnclaveIdentity()

StatusOr<const EnclaveIdentity *> asylo::EnclaveAuthContext::FindEnclaveIdentity ( const EnclaveIdentityDescription &  description) const

Finds and returns a peer identity matching description, if one exists.

Parameters
descriptionA description of an identity to find.
Returns
A pointer to the identity on success, and a StatusOr with a GoogleError::NOT_FOUND Status on failure.

◆ GetRecordProtocol()

RecordProtocol asylo::EnclaveAuthContext::GetRecordProtocol ( ) const

Gets the secure transport record-protocol used for securing frames over the connection.

Returns
The secure transport record-protocol.

◆ HasEnclaveIdentity()

bool asylo::EnclaveAuthContext::HasEnclaveIdentity ( const EnclaveIdentityDescription &  description) const

Indicates whether the authenticated peer has an identity matching description.

Parameters
descriptionA description of the identity.
Returns
True if the peer has the specified identity.

The documentation for this class was generated from the following file: