You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "rukor2 (via GitHub)" <gi...@apache.org> on 2025/09/19 03:55:12 UTC

[I] Polaris CLI should support specifying the realm [polaris]

rukor2 opened a new issue, #2620:
URL: https://github.com/apache/polaris/issues/2620

   ### Is your feature request related to a problem? Please describe.
   
   This is useful if you have a non-default realm name. At the moment, it is impossible to use the CLI as it can either not generate a token or if you generate the token externally, you cant use it because it will complain that a Polaris-Realm header is not supplied.
   
   ### Describe the solution you'd like
   
   Allow for the CLI to support custom realms
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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@polaris.apache.org.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3334669889

   > No i did the version you referred me to earlier. I will try the latest. thanks again.
   
   Also, you probably need to update the existing profile, cause the profiles you saved before these changes do not contain realm+header config.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre closed issue #2620: Polaris CLI should support specifying the realm
URL: https://github.com/apache/polaris/issues/2620


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312412664

   I briefly checked the existing CLI doc  https://polaris.apache.org/in-dev/unreleased/command-line-interface/ 
   It seems there is no options to specify REALM really.
   
   I will try to help with that. As I understand Polaris CLI is written on python based on `click` framework so it should be hard.
   


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3318977684

   > [@rukor2](https://github.com/rukor2), [@dimas-b](https://github.com/dimas-b) could you check this version? [#2643](https://github.com/apache/polaris/pull/2643)
   
   Thanks, will do & report back.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3323169713

   @rukor2 Great to hear) My changes is on review/polishing stage. Probably it will be delivered this week.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312699082

   > I can't find any reference to REALM in API specs - https://polaris.apache.org/in-dev/unreleased/polaris-api-specs/ 🤷‍♂️
   > 
   > The [REALM](https://polaris.apache.org/in-dev/unreleased/realm/) documentation says - `a realm is resolved from request headers` but I can't find it in codebase 🤔
   > 
   > [@rukor2](https://github.com/rukor2) could you share an example how to use it in API calls?
   
   From the examples, I would do something like this to get access token for instance:
   
   `export ACCESS_TOKEN=$(curl -X POST \
     ${POLARIS_URL}/api/catalog/v1/oauth/tokens \
     -H 'Polaris-Realm:<realm name>' \
     -d "grant_type=client_credentials&client_id=$ROOT_CLIENT_ID&client_secret=$ROOT_CLIENT_SECRET&scope=PRINCIPAL_ROLE:ALL" \
     | jq -r '.access_token')`


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312660982

   `PRINCIPAL_ROLE:ALL` is fine for CLI to use for now, I think. We can make it user-settable later.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312591629

   Clients indicate the desired realm via a header, e.g. as in [obtain-token.sh](https://github.com/apache/polaris/blob/596239cdba8b18431aa9a0e5ec2f317fb8365b2b/getting-started/assets/polaris/obtain-token.sh#L28)


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3323867097

   > [@rukor2](https://github.com/rukor2) yes, they will do. I added saving realm+header feature to Profiles 👌.
   
   amazing! thank you very much.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312640134

   I see that token `scope` is hardcoded also
   
   https://github.com/apache/polaris/blob/596239cdba8b18431aa9a0e5ec2f317fb8365b2b/client/python/cli/polaris_cli.py#L130
   


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3316190968

   @rukor2, @dimas-b could you check this version? 
   https://github.com/apache/polaris/pull/2643
   


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312452876

   "should NOT be hard"? 😉 


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3323762040

   > [@rukor2](https://github.com/rukor2) Great to hear) My changes is on review/polishing stage. Probably it will be delivered this week.
   
   thank you. one quick question, will profiles incorporate 'realm' information? not a biggie, just wanted to know, thanks


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3334651427

   > Hey [@binarycat0](https://github.com/binarycat0) FYI: Noticed that the header in the profile didnt get passed on when i tried to create a namespace.
   > 
   > `polaris --profile <profile> namespaces create <id>--catalog <catalog>` Exception when communicating with the Polaris server. MissingOrInvalidRealm: Missing required realm header: Polaris-Realm
   > 
   > Even when --realm is specified, it still doesnt work
   
   Did you try the last version? I'm asking cause I pushed some cleanup commit yesterday. 


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3323861859

   @rukor2 yes, they will do. I added saving realm+header feature to Profiles 👌.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3322974955

   > [@rukor2](https://github.com/rukor2), [@dimas-b](https://github.com/dimas-b) could you check this version? [#2643](https://github.com/apache/polaris/pull/2643)
   
   I just tried it using the --realm argument and it worked nicely. Thanks.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3333513233

   Hey @binarycat0 FYI: Noticed that the header in the profile didnt get passed on when i tried to create a namespace.
   
   polaris --profile <profile> namespaces create <id>--catalog <catalog>
   Exception when communicating with the Polaris server. MissingOrInvalidRealm: Missing required realm header: Polaris-Realm
   


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312306244

   I added the "bug" label because Polaris Servers and  the admin tool support realms as a first-class concept, therefore the CLI should be able to interact with any realm that a Polaris Server has.


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312494921

   I checked closely and as I see it uses custom ArgumentParser instead of `click`, but anyway it should NOT be hard
   


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "binarycat0 (via GitHub)" <gi...@apache.org>.
binarycat0 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3312585706

   I can't find any reference to REALM in API specs - https://polaris.apache.org/in-dev/unreleased/polaris-api-specs/ 🤷‍♂️ 
   
   The [REALM](https://polaris.apache.org/in-dev/unreleased/realm/) documentation says - `a realm is resolved from request headers` but I can't find it in codebase 🤔 
   
   @rukor2 could you share an example how to use it in API calls?


-- 
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@polaris.apache.org

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


Re: [I] Polaris CLI should support specifying the realm [polaris]

Posted by "rukor2 (via GitHub)" <gi...@apache.org>.
rukor2 commented on issue #2620:
URL: https://github.com/apache/polaris/issues/2620#issuecomment-3334663436

   No i did the version you referred me to earlier. I will try the latest. thanks again.


-- 
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@polaris.apache.org

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