iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::rest::auth::SigV4AuthManager Class Reference

An AuthManager that produces SigV4AuthSession instances. More...

#include <sigv4_auth_manager_internal.h>

Inheritance diagram for iceberg::rest::auth::SigV4AuthManager:
iceberg::rest::auth::AuthManager

Public Member Functions

 SigV4AuthManager (std::unique_ptr< AuthManager > delegate)
 
Result< std::shared_ptr< AuthSession > > InitSession (HttpClient &init_client, const std::unordered_map< std::string, std::string > &properties) override
 Create a short-lived session used to contact the configuration endpoint.
 
Result< std::shared_ptr< AuthSession > > CatalogSession (HttpClient &shared_client, const std::unordered_map< std::string, std::string > &properties) override
 Create the long-lived catalog session that acts as the parent session.
 
Result< std::shared_ptr< AuthSession > > ContextualSession (const SessionContext &context, std::shared_ptr< AuthSession > parent) override
 Create or reuse a session for a specific context.
 
Result< std::shared_ptr< AuthSession > > TableSession (const TableIdentifier &table, const std::unordered_map< std::string, std::string > &properties, std::shared_ptr< AuthSession > parent) override
 Create or reuse a session scoped to a single table/view.
 
Status Close () override
 Release resources held by the manager.
 

Detailed Description

An AuthManager that produces SigV4AuthSession instances.

Wraps a delegate AuthManager to handle double authentication (e.g., OAuth2 + SigV4).

Member Function Documentation

◆ CatalogSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::SigV4AuthManager::CatalogSession ( HttpClient shared_client,
const std::unordered_map< std::string, std::string > &  properties 
)
overridevirtual

Create the long-lived catalog session that acts as the parent session.

This session is used for all catalog-level operations (list namespaces, list tables, etc.) and serves as the parent session for contextual and table-specific sessions. It is owned by the catalog and reused throughout the catalog's lifetime.

Parameters
shared_clientHTTP client owned by the catalog and reused for auth calls.
propertiesCatalog properties (client config + server defaults).
Returns
Session for catalog operations or an error if authentication cannot be set up.

Implements iceberg::rest::auth::AuthManager.

◆ Close()

Status iceberg::rest::auth::SigV4AuthManager::Close ( )
overridevirtual

Release resources held by the manager.

Returns
Status of the close operation.

Reimplemented from iceberg::rest::auth::AuthManager.

◆ ContextualSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::SigV4AuthManager::ContextualSession ( const SessionContext context,
std::shared_ptr< AuthSession parent 
)
overridevirtual

Create or reuse a session for a specific context.

This method is used by SessionCatalog to create sessions for different contexts (e.g., different users or tenants).

Parameters
contextSession context (e.g., session ID, identity, credentials, properties).
parentCatalog session to inherit from or return as-is.
Returns
A context-specific session, or the parent session if no context-specific session is needed, or an error if session creation fails.

Reimplemented from iceberg::rest::auth::AuthManager.

◆ InitSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::SigV4AuthManager::InitSession ( HttpClient init_client,
const std::unordered_map< std::string, std::string > &  properties 
)
overridevirtual

Create a short-lived session used to contact the configuration endpoint.

This session is used only during catalog initialization to fetch server configuration and perform initial authentication. It is typically discarded after initialization.

Parameters
init_clientHTTP client used for initialization requests.
propertiesClient configuration supplied by the catalog.
Returns
Session for initialization or an error if credentials cannot be acquired.

Reimplemented from iceberg::rest::auth::AuthManager.

◆ TableSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::SigV4AuthManager::TableSession ( const TableIdentifier table,
const std::unordered_map< std::string, std::string > &  properties,
std::shared_ptr< AuthSession parent 
)
overridevirtual

Create or reuse a session scoped to a single table/view.

This method is called when loading a table that may have table-specific auth properties returned by the server.

Parameters
tableTarget table identifier.
propertiesTable-specific auth properties returned by the server.
parentCatalog or contextual session to inherit from or return as-is.
Returns
A table-specific session, or the parent session if no table-specific session is needed, or an error if session creation fails.

Reimplemented from iceberg::rest::auth::AuthManager.


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