Hey Sung, Thanks for bringing this up. We've touched on this a few times in the past and I think we do want to discuss deprecating this behavior, but it is worth revisiting the original intent behind its usage.
There's some confusion around auth schemes here because everyone tends to think of this token in relationship to OAuth, but that's really not the case. This token is intended to be an access token provided by the catalog for the table. While it may share similarities with an OAuth token, they are not the same thing. The token was intended to allow the catalog to mint a scoped API token that could hold additional information about the original access and make operations more efficient, but to my knowledge, no one uses it that way. There are some endpoints, like remote signing, that have very high request rates, which is why optimizing checks can be beneficial. At this point, I believe all catalog implementations that support OAuth, rely on it for all API access and don't leverage this feature, so I think we're ok with deprecating it unless someone feels it's worth preserving. -Dan On Fri, Nov 27, 2026 at 9:29 AM Sung Yun via dev <[email protected]> wrote: > Hi folks, > > At the catalog community sync on 2026-11-25, we discussed the credential > keys that a REST catalog server can return in the config of LoadTableResult > and LoadViewResult. Attendees were in support of deprecating them in the > spec, so I'd like to start the discussion here on the mailing list. > > Today the spec lets this config carry a bearer token under the `token` > key, or a token under an RFC 8693 token type key [1]. In the Java client, > the legacy OAuth2Manager uses `token` for the table's requests and > exchanges a token type key with the caller's session as the actor [2]. The > OAuth2 auth manager v2 (#18756) does not support either. > > I have two concerns. First, this keeps the catalog in the business of > issuing tokens. One of the reasons we deprecated /v1/oauth/tokens in 1.6.0 > was that it pushed catalog operators into running an authorization service > [3], and table config is another token channel on the same API. > > Second, it gives each client a third source of credentials with no rule > for which one wins. RESTSessionCatalog asks the AuthManager for a catalog > session, a contextual session and a table session [4], and each AuthManager > decides how they rank, so whether a table token takes effect depends on > which AuthManager the client runs. An engine that decides which credentials > apply to which user already reasons about the catalog session and the > SessionContext credentials; a table credential means it would also have to > inspect the config of every LoadTableResult. > > I've opened a PR with the spec change [5], where we can work out the exact > wording. > > Two questions: > 1. Does anyone know of a server that returns these keys today? > 2. Is the community supportive of deprecating these keys? > > Thanks, > Sung > > [1] > https://github.com/apache/iceberg/blob/1c99ae9b5262b757fa4c8afe5650cabe59a352d6/open-api/rest-catalog-open-api.yaml#L1102-L1105 > [2] > https://github.com/apache/iceberg/blob/1c99ae9b5262b757fa4c8afe5650cabe59a352d6/core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Manager.java#L150-L158 > [3] https://lists.apache.org/thread/twk84xx7v0xy5q5tfd9x5torgr82vv50 > [4] > https://github.com/apache/iceberg/blob/1c99ae9b5262b757fa4c8afe5650cabe59a352d6/core/src/main/java/org/apache/iceberg/rest/auth/AuthManager.java#L50-L111 > [5] https://github.com/apache/iceberg/pull/19165 >
