René's URL Explorer Experiment


Title: The use of JWT in Trino offline store failes · Issue #6760 · feast-dev/feast · GitHub

Open Graph Title: The use of JWT in Trino offline store failes · Issue #6760 · feast-dev/feast

X Title: The use of JWT in Trino offline store failes · Issue #6760 · feast-dev/feast

Description: Expected Behavior The call of def run_get_historical below should be able to reach trino. Current Behavior Unable to use a jwt token to authenticate against trino. Steps to reproduce Offline store like: offline_store: type: trino ... use...

Open Graph Description: Expected Behavior The call of def run_get_historical below should be able to reach trino. Current Behavior Unable to use a jwt token to authenticate against trino. Steps to reproduce Offline store ...

X Description: Expected Behavior The call of def run_get_historical below should be able to reach trino. Current Behavior Unable to use a jwt token to authenticate against trino. Steps to reproduce Offline store ...

Opengraph URL: https://github.com/feast-dev/feast/issues/6760

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The use of JWT in Trino offline store failes","articleBody":"## Expected Behavior \n\nThe call of def run_get_historical below should be able to reach trino.\n\n\n## Current Behavior\n\nUnable to use a jwt token to authenticate against trino.\n\n## Steps to reproduce\nOffline store like:\n\n```\noffline_store:\n    type: trino\n...\n    user: xyz\n    # Enables authentication in Trino connections, pick the one you need\n    auth:\n        type: jwt\n        config:\n            token: ${TRINO_JWT_TOKEN}\n\n```\nSetting the variable like with an inhouse keycloak instance:\n\n```\nexport TRINO_JWT_TOKEN=$(curl --location 'https://foo.bar/' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'username=\u003cUSER_NAME>' \\\n  --data-urlencode 'password=\u003cPASSWORD>' | jq -r '.access_token')\n```\n\nRunning a historical query\n\n```\ndef run_get_historical(a_date):\n    import pandas as pd\n    entity_df = pd.DataFrame(\n        {\n            \"schadennr\": [\"123\", \"456\"],\n            \"event_timestamp\": [a_date, a_date],\n        }\n    )\n    feature_df = store.get_historical_features(\n        entity_df=entity_df,\n        features=store.get_feature_service(\"train_service\")\n    ).to_df()\n    print(feature_df.head(3).drop(columns=[\"schadennr\"]))\n\n    # a_date: Optional[Union[str, datetime]] = None\n\ndef main() -> int:\n    an_optional_date_string = sys.argv[1] if len(sys.argv) > 1 else None\n    if an_optional_date_string is None:\n        a_date = datetime.now()\n        print(a_date)\n    elif isinstance(an_optional_date_string, str):\n        a_date = datetime.strptime(an_optional_date_string, \"%Y-%m-%d\")\n        print(a_date)\n    else:\n        raise ValueError(\"Invalid date format. Please provide a date string in 'YYYY-MM-DD' format.\")\n    run_get_historical(a_date)\n    return 0\n\nif __name__ == \"__main__\":\n    raise SystemExit(main())\n\n```\n\nFails with:\n\n```\n$ python run_feast_offline_query.py\n2026-08-19 16:01:27.655863\nTraceback (most recent call last):\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/trino_project/feature_repo/run_feast_offline_query.py\", line 48, in \u003cmodule>\n    raise SystemExit(main())\n                     ^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/trino_project/feature_repo/run_feast_offline_query.py\", line 44, in main\n    run_get_historical(a_date)\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/trino_project/feature_repo/run_feast_offline_query.py\", line 26, in run_get_historical\n    feature_df = store.get_historical_features(\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/feature_store.py\", line 2025, in get_historical_features\n    job = provider.get_historical_features(\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/passthrough_provider.py\", line 481, in get_historical_features\n    job = self.offline_store.get_historical_features(\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/contrib/trino_offline_store/trino.py\", line 371, in get_historical_features\n    entity_schema = _upload_entity_df_and_get_entity_schema(\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/contrib/trino_offline_store/trino.py\", line 515, in _upload_entity_df_and_get_entity_schema\n    upload_pandas_dataframe_to_trino(\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/contrib/trino_offline_store/connectors/upload.py\", line 180, in upload_pandas_dataframe_to_trino\n    client.execute_query(\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/contrib/trino_offline_store/trino_queries.py\", line 87, in execute_query\n    return query.execute()\n           ^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/contrib/trino_offline_store/trino_queries.py\", line 105, in execute\n    self._cursor.execute(operation=self.query_text)\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/dbapi.py\", line 642, in execute\n    self._iterator = iter(self._query.execute())\n                          ^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/client.py\", line 952, in execute\n    response = self._request.post(self._query, additional_http_headers)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/client.py\", line 681, in post\n    http_response = self._post(\n                    ^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/client.py\", line 1107, in decorated\n    raise error\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/client.py\", line 1089, in decorated\n    result = func(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/requests/sessions.py\", line 712, in post\n    return self.request(\"POST\", url, data=data, json=json, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/requests/sessions.py\", line 635, in request\n    prep = self.prepare_request(req)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/requests/sessions.py\", line 541, in prepare_request\n    p.prepare(\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/requests/models.py\", line 443, in prepare\n    self.prepare_auth(auth, url)\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/requests/models.py\", line 689, in prepare_auth\n    r = auth_handler(self)\n        ^^^^^^^^^^^^^^^^^^\n  File \"/home/xyz/bitbucket-repos/dat/xyz_feast/.venv/lib/python3.11/site-packages/trino/auth.py\", line 257, in __call__\n    r.headers[\"Authorization\"] = \"Bearer \" + self.token\n                                 ~~~~~~~~~~^~~~~~~~~~~~\nTypeError: can only concatenate str (not \"SecretStr\") to str\n```\n\n### Specifications\n\n- Version: feast 0.65.0\n- Platform: RHEL 9.8 (Plow), 5.14.0-687.17.1.el9_8.x86_64\n- Subsystem: \n\n## Possible Solution\n\nWhen patching the code like:\n\n```\n_original_init = trino.auth.JWTAuthentication.__init__\n\n\ndef _patched_init(self, token):\n    if hasattr(token, \"get_secret_value\"):\n        token = token.get_secret_value()\n    _original_init(self, str(token))\n\n\ntrino.auth.JWTAuthentication.__init__ = _patched_init\n```\n\nbefore our code runs, ensures that the call to trino succeeds.\n\nSomehow the token gets packed into a SecretStr but when the python code wants to use the token, it expects it to be a simple string.","author":{"url":"https://github.com/kow-butterfly","@type":"Person","name":"kow-butterfly"},"datePublished":"2026-08-19T14:28:01Z","url":"https://github.com/feast-dev/feast/issues/6760"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b8f3fdfa-f301-a9f7-f2d8-175c444ecd45
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE1EE:1B2C16:1001BC0:15BE471:6AFE9817
html-safe-nonce5c00de3a6d2a40e5a7a022294998bdb56577d95f44978e80c9742259fa4b5a71
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUVFOjFCMkMxNjoxMDAxQkMwOjE1QkU0NzE6NkFGRTk4MTciLCJ2aXNpdG9yX2lkIjoiNjg5MTcyOTE4NjY1ODg4MzYwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbb9524c1611ab97989eb176061d587e41eaaa4886ccaa738f82740c9848ace2f
hovercard-subject-tagissue:5193743607
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/6760/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b5a08d64c60f0d7d241cd0a1a482589eaa0ec219a7758028ce0f7f23308168c/feast-dev/feast/issues/6760
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b5a08d64c60f0d7d241cd0a1a482589eaa0ec219a7758028ce0f7f23308168c/feast-dev/feast/issues/6760
og:image:altExpected Behavior The call of def run_get_historical below should be able to reach trino. Current Behavior Unable to use a jwt token to authenticate against trino. Steps to reproduce Offline store ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekow-butterfly
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/6760#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6760
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6760
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/6760
Reloadhttps://github.com/feast-dev/feast/issues/6760
Reloadhttps://github.com/feast-dev/feast/issues/6760
feast-devhttps://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Codehttps://github.com/feast-dev/feast
Issues223 (223)https://github.com/feast-dev/feast/issues
Pull requests143 (143)https://github.com/feast-dev/feast/pulls
Discussionshttps://github.com/feast-dev/feast/discussions
Actionshttps://github.com/feast-dev/feast/actions
Security and quality1 (1)https://github.com/feast-dev/feast/security
Insightshttps://github.com/feast-dev/feast/insights
https://github.com/feast-dev/feast
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6760
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6760
#6771https://github.com/feast-dev/feast/pull/6771
The use of JWT in Trino offline store faileshttps://github.com/feast-dev/feast/issues/6760#top
#6771https://github.com/feast-dev/feast/pull/6771
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com/kow-butterfly
kow-butterflyhttps://github.com/kow-butterfly
on Aug 19, 2026https://github.com/feast-dev/feast/issues/6760#issue-5193743607
kow-butterflyhttps://github.com/kow-butterfly
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
on Aug 19, 2026https://github.com/feast-dev/feast/issues/6760#event-29688014508
ntkatholehttps://github.com/ntkathole
completedhttps://github.com/feast-dev/feast/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#6771https://github.com/feast-dev/feast/pull/6771
on Sep 15, 2026https://github.com/feast-dev/feast/issues/6760#event-31159229612
Sign up for freehttps://github.com/signup?return_to=https://github.com/feast-dev/feast/issues/6760
Sign in to commenthttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6760
kind/bughttps://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/p2https://github.com/feast-dev/feast/issues?q=state%3Aopen%20label%3A%22priority%2Fp2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.