-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token Invalid in CubeJS Server after token renew #31019
Labels
dotCMS : Analytics
Data and Analytics Umbrella
QA : Passed Internal
Release : 25.01.15
Team : Falcon
Type : Defect
Comments
freddyDOTCMS
added
Type : Defect
Team : Falcon
dotCMS : Analytics
Data and Analytics Umbrella
labels
Dec 27, 2024
victoralfaro-dotcms
added a commit
that referenced
this issue
Jan 8, 2025
…and adding fallback to dotCMS 'ANALYTICS_ACCESSTOKEN_TTL' config value, removing 'Bearer' prefix from Authorization header since CubeJS does not like it and finally setting 'CUBEJS_JWT_ISSUER' env-var at analytics infrastructure docker-compose to 'http://host.docker.internal:61111/realms/dotcms' since most of the times this is run inside a Dcoker container
victoralfaro-dotcms
moved this from Next 1-3 Sprints
to In Progress
in dotCMS - Product Planning
Jan 8, 2025
victoralfaro-dotcms
moved this from In Progress
to In Review
in dotCMS - Product Planning
Jan 8, 2025
victoralfaro-dotcms
added a commit
that referenced
this issue
Jan 8, 2025
…and adding fallback to dotCMS 'ANALYTICS_ACCESSTOKEN_TTL' config value, removing 'Bearer' prefix from Authorization header since CubeJS does not like it and finally setting 'CUBEJS_JWT_ISSUER' env-var at analytics infrastructure docker-compose to 'http://host.docker.internal:61111/realms/dotcms' since most of the times this is run inside a Dcoker container
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 8, 2025
Several fixes to several causes: - Using JWT `expiresIn` field to determine if token is expired and adding fallback to dotCMS `ANALYTICS_ACCESSTOKEN_TTL` config value - Removing `Bearer` prefix from Authorization header since CubeJS does not like it (or end up ignoring it) - Finally setting `CUBEJS_JWT_ISSUER` env-var at analytics infrastructure docker-compose to 'http://host.docker.internal:61111/realms/dotcms' since most of the times this is run inside a Docker container.
INTERNAL QA: PASSED ✅
We can run CubeJS queries without issues now. The token is now getting renewed as expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dotCMS : Analytics
Data and Analytics Umbrella
QA : Passed Internal
Release : 25.01.15
Team : Falcon
Type : Defect
Parent Issue
No response
Problem Statement
When the token expires and is renewed, the Cube.js server returns an 'Invalid Token' error when you attempt to execute a query.
Steps to Reproduce
Use localhost as domain if you are not using docker
POST
url: {dotcms server}/api/v1/analytics/content/_query
body:
You are going to got a 200 HTT COde and the result of this query
You are going to got 500 Http error and the follow message
If you check the Cubejs Server console you see the follow error
Acceptance Criteria
After the token expired it must be renew automatically and you should be able to execute any query in the CubeJS Server
dotCMS Version
latest
Proposed Objective
Core Features
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: