Produces authentication sessions for catalog and table requests.
More...
#include <auth_manager.h>
|
| virtual Result< std::shared_ptr< AuthSession > > | InitSession (HttpClient &init_client, const std::unordered_map< std::string, std::string > &properties) |
| | Create a short-lived session used to contact the configuration endpoint.
|
| |
| virtual Result< std::shared_ptr< AuthSession > > | CatalogSession (HttpClient &shared_client, const std::unordered_map< std::string, std::string > &properties)=0 |
| | Create the long-lived catalog session that acts as the parent session.
|
| |
| virtual Result< std::shared_ptr< AuthSession > > | ContextualSession (const std::unordered_map< std::string, std::string > &context, std::shared_ptr< AuthSession > parent) |
| | Create or reuse a session for a specific context.
|
| |
| virtual Result< std::shared_ptr< AuthSession > > | TableSession (const TableIdentifier &table, const std::unordered_map< std::string, std::string > &properties, std::shared_ptr< AuthSession > parent) |
| | Create or reuse a session scoped to a single table/view.
|
| |
| virtual Status | Close () |
| | Release resources held by the manager.
|
| |
Produces authentication sessions for catalog and table requests.
◆ CatalogSession()
| virtual Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::AuthManager::CatalogSession |
( |
HttpClient & |
shared_client, |
|
|
const std::unordered_map< std::string, std::string > & |
properties |
|
) |
| |
|
pure virtual |
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_client | HTTP client owned by the catalog and reused for auth calls. |
| properties | Catalog properties (client config + server defaults). |
- Returns
- Session for catalog operations or an error if authentication cannot be set up.
Implemented in iceberg::rest::auth::NoopAuthManager, iceberg::rest::auth::BasicAuthManager, and iceberg::rest::auth::OAuth2Manager.
◆ Close()
| virtual Status iceberg::rest::auth::AuthManager::Close |
( |
| ) |
|
|
inlinevirtual |
Release resources held by the manager.
- Returns
- Status of the close operation.
◆ ContextualSession()
| Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::AuthManager::ContextualSession |
( |
const std::unordered_map< std::string, std::string > & |
context, |
|
|
std::shared_ptr< AuthSession > |
parent |
|
) |
| |
|
virtual |
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
-
| context | Context properties (e.g., user credentials, tenant info). |
| parent | Catalog 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.
◆ InitSession()
| Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::AuthManager::InitSession |
( |
HttpClient & |
init_client, |
|
|
const std::unordered_map< std::string, std::string > & |
properties |
|
) |
| |
|
virtual |
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_client | HTTP client used for initialization requests. |
| properties | Client configuration supplied by the catalog. |
- Returns
- Session for initialization or an error if credentials cannot be acquired.
Reimplemented in iceberg::rest::auth::OAuth2Manager.
◆ TableSession()
| Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::AuthManager::TableSession |
( |
const TableIdentifier & |
table, |
|
|
const std::unordered_map< std::string, std::string > & |
properties, |
|
|
std::shared_ptr< AuthSession > |
parent |
|
) |
| |
|
virtual |
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
-
| table | Target table identifier. |
| properties | Table-specific auth properties returned by the server. |
| parent | Catalog 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.
The documentation for this class was generated from the following files:
- iceberg/catalog/rest/auth/auth_manager.h
- iceberg/catalog/rest/auth/auth_manager.cc