|
iceberg-cpp
|
Produces authentication sessions for catalog and table requests. More...
#include <auth_manager.h>
Public Member Functions | |
| 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 SessionContext &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.
|
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.
| shared_client | HTTP client owned by the catalog and reused for auth calls. |
| properties | Catalog properties (client config + server defaults). |
Implemented in iceberg::rest::auth::NoopAuthManager, iceberg::rest::auth::BasicAuthManager, iceberg::rest::auth::OAuth2Manager, and iceberg::rest::auth::SigV4AuthManager.
|
inlinevirtual |
Release resources held by the manager.
Reimplemented in iceberg::rest::auth::SigV4AuthManager.
|
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).
| context | Session context (e.g., session ID, identity, credentials, properties). |
| parent | Catalog session to inherit from or return as-is. |
Reimplemented in iceberg::rest::auth::SigV4AuthManager.
|
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.
| init_client | HTTP client used for initialization requests. |
| properties | Client configuration supplied by the catalog. |
Reimplemented in iceberg::rest::auth::OAuth2Manager, and iceberg::rest::auth::SigV4AuthManager.
|
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.
| 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. |
Reimplemented in iceberg::rest::auth::SigV4AuthManager.