You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "adutra (via GitHub)" <gi...@apache.org> on 2025/08/14 09:40:23 UTC
[PR] Fix Keycloak getting-started example [polaris]
adutra opened a new pull request, #2349:
URL: https://github.com/apache/polaris/pull/2349
The `polaris-setup` container was erroneously including a non-existent scope when fetching a token from Keycloak.
<!--
Possible security vulnerabilities: STOP here and contact security@apache.org instead!
Please update the title of the PR with a meaningful message - do not leave it "empty" or "generated"
Please update this summary field:
The summary should cover these topics, if applicable:
* the motivation for the change
* a description of the status quo, for example the current behavior
* the desired behavior
* etc
PR checklist:
- Do a self-review of your code before opening a pull request
- Make sure that there's good test coverage for the changes included in this PR
- Run tests locally before pushing a PR (./gradlew check)
- Code should have comments where applicable. Particularly hard-to-understand
areas deserve good in-line documentation.
- Include changes and enhancements to the documentation (in site/content/in-dev/unreleased)
- For Work In Progress Pull Requests, please use the Draft PR feature.
Make sure to add the information BELOW this comment.
Everything in this comment will NOT be added to the PR description.
-->
--
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: [PR] Fix Keycloak getting-started example [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #2349:
URL: https://github.com/apache/polaris/pull/2349#discussion_r2276124521
##########
getting-started/keycloak/docker-compose.yml:
##########
@@ -67,13 +67,16 @@ services:
- CLIENT_SECRET=s3cr3t
volumes:
- ../assets/polaris/:/polaris
- entrypoint: |
- /bin/sh -c "apk add --no-cache jq && \
- chmod +x /polaris/create-catalog.sh && \
- token=$$(curl http://keycloak:8080/realms/iceberg/protocol/openid-connect/token --user client1:s3cr3t -d 'grant_type=client_credentials' -d 'scope=catalog' | jq -r .access_token) && \
- /polaris/create-catalog.sh realm-internal && \
- /polaris/create-catalog.sh realm-external $$token && \
- /polaris/create-catalog.sh realm-mixed $$token"
+ entrypoint: "/bin/sh"
+ command:
+ - "-c"
+ - >-
+ apk add --no-cache jq &&
+ chmod +x /polaris/create-catalog.sh &&
+ token=$$(curl http://keycloak:8080/realms/iceberg/protocol/openid-connect/token --user client1:s3cr3t -d 'grant_type=client_credentials' | jq -r .access_token) &&
Review Comment:
The only real difference is the removal of `-d 'scope=catalog'` – the rest is formatting.
--
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: [PR] Fix Keycloak getting-started example [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #2349:
URL: https://github.com/apache/polaris/pull/2349#issuecomment-3187810719
@singhpk234 would you mind having a look again? I don't know how this bug slipped through the cracks 😄
--
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: [PR] Fix Keycloak getting-started example [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #2349:
URL: https://github.com/apache/polaris/pull/2349#issuecomment-3188338628
> Not sure how this got missed, i did get a 200 from keycloak, and do remeber we discussed removing the scopes.
> for my understanding how does the error shows up ?
The create-catalog.sh script fails to create the catalog.
What I think happened is that at some point I removed the `catalog` scope from Keycloak config (since it was unused), but I already had a Keycloak container created, so when I started the container again, it started with the old config, and it worked.
--
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: [PR] Fix Keycloak getting-started example [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra merged PR #2349:
URL: https://github.com/apache/polaris/pull/2349
--
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