You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "smaheshwar-pltr (via GitHub)" <gi...@apache.org> on 2025/02/19 15:27:53 UTC

[I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

smaheshwar-pltr opened a new issue, #1684:
URL: https://github.com/apache/iceberg-python/issues/1684

   When a `RESTCatalog` is constructed, `_fetch_config` immediately "merges" catalog properties with the REST server's response to `get_config`, updating `self.properties` accordingly.
   
   https://github.com/apache/iceberg-python/blob/efc8b5ac0f16717f776e034ecf9a9e9bdabd8424/pyiceberg/catalog/rest.py#L265
   
   `RESTCatalog#auth_url`, invoked after construction of the `RESTCatalog`, then uses those "merged" properties to get the `auth_url`:
   
   https://github.com/apache/iceberg-python/blob/efc8b5ac0f16717f776e034ecf9a9e9bdabd8424/pyiceberg/catalog/rest.py#L330-L331
   
   If I've understood correctly, this means PyIceberg users can instead get the auth URI from the server-returned configs instead of having to configure it themselves.
   
   On the other hand, Iceberg's Java side [sets](https://github.com/apache/iceberg/blob/fad0c1e6c68fbc7e48b5b17c02ed9c26a2693afb/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L245-L246) `oauth2ServerUri` *before* the config is fetched [here](https://github.com/apache/iceberg/blob/fad0c1e6c68fbc7e48b5b17c02ed9c26a2693afb/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L257-L260) so it doesn't allow the above. To note that it [uses the `fetchToken` response to fetch the config](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L252-L257C42).
   
   Actually not sure which behaviour is better/correct here - just flagging that they're different and feels weird that REST servers can provide this URI for PyIceberg but not on the Java-side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

Posted by "geruh (via GitHub)" <gi...@apache.org>.
geruh commented on issue #1684:
URL: https://github.com/apache/iceberg-python/issues/1684#issuecomment-2670114117

   Yeah, this definitely seems like an inconsistency in behavior between Python and Java, as PyIceberg allows the server to override the user's OAuth2 URL before initialization, whereas Java enforces that the client explicitly sets it.
   
   It's probably best to align with Java, given that they’ve been working on this for a while per this [doc](https://docs.google.com/document/d/1Xi5MRk8WdBWFC3N_eSmVcrLhk3yu5nJ9x_wC0ec6kVQ/edit?tab=t.0#heading=h.2xju2266i6df). 
   
   However, to your point yeah it is a bit weird I still think it’s a good question to raise for the Java side. While they are enforcing that the client must configure this property, it can be useful for the **server** to enforce the latest url with the config endpoint. Although this only works if the config endpoint is a discovery api meaning no auth just conf.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1684:
URL: https://github.com/apache/iceberg-python/issues/1684#issuecomment-3644362253

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1684: PyIceberg permits OAuth URI in REST config but Iceberg Java does not
URL: https://github.com/apache/iceberg-python/issues/1684


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

Posted by "smaheshwar-pltr (via GitHub)" <gi...@apache.org>.
smaheshwar-pltr commented on issue #1684:
URL: https://github.com/apache/iceberg-python/issues/1684#issuecomment-2814587549

   Update: the Java codepath has changed on `main` with the `AuthManager` changes, and it looks like PyIceberg will follow suit (https://github.com/apache/iceberg-python/issues/1876) so this specific difference may soon go away!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg permits OAuth URI in REST config but Iceberg Java does not [iceberg-python]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1684:
URL: https://github.com/apache/iceberg-python/issues/1684#issuecomment-3587566541

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org