3434namespace iceberg ::rest::auth {
3535
3636// / \brief Produces authentication sessions for catalog and table requests.
37+ // /
38+ // / AuthManager is responsible for creating authentication sessions at different scopes:
39+ // / - InitSession: Short-lived session for catalog initialization (optional)
40+ // / - CatalogSession: Long-lived session for catalog-level operations (required)
41+ // / - TableSession: Optional table-specific session or reuse of catalog session
42+ // /
43+ // / Implementations are registered via AuthManagers::Register() and loaded by auth type.
3744class ICEBERG_REST_EXPORT AuthManager {
3845 public:
3946 virtual ~AuthManager () = default ;
4047
4148 // / \brief Create a short-lived session used to contact the configuration endpoint.
4249 // /
50+ // / This session is used only during catalog initialization to fetch server
51+ // / configuration and perform initial authentication. It is typically discarded after
52+ // / initialization.
53+ // /
4354 // / \param init_client HTTP client used for initialization requests.
4455 // / \param properties Client configuration supplied by the catalog.
4556 // / \return Session for initialization or an error if credentials cannot be acquired.
@@ -49,6 +60,10 @@ class ICEBERG_REST_EXPORT AuthManager {
4960
5061 // / \brief Create the long-lived catalog session that acts as the parent session.
5162 // /
63+ // / This session is used for all catalog-level operations (list namespaces, list tables,
64+ // / etc.) and serves as the parent session for table-specific operations. It is owned
65+ // / by the catalog and reused throughout the catalog's lifetime.
66+ // /
5267 // / \param shared_client HTTP client owned by the catalog and reused for auth calls.
5368 // / \param properties Catalog properties (client config + server defaults).
5469 // / \return Session for catalog operations or an error if authentication cannot be set
@@ -64,8 +79,8 @@ class ICEBERG_REST_EXPORT AuthManager {
6479 // /
6580 // / \param table Target table identifier.
6681 // / \param properties Table-specific auth properties returned by the server.
67- // / \param parent Catalog session to read information from.
68- // / \return A new session for the table, nullptr to reuse parent, or an error.
82+ // / \param parent Catalog session to inherit from or extract information from.
83+ // / \return A new session for the table, nullptr to reuse parent session , or an error.
6984 virtual Result<std::unique_ptr<AuthSession>> TableSession (
7085 const TableIdentifier& table,
7186 const std::unordered_map<std::string, std::string>& properties,
0 commit comments