Skip to content

Support for Custom Request Headers - #37

Open
Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:chore/authentication
Open

Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:chore/authentication

Conversation

@Sano7707

Copy link
Copy Markdown

Summary

This PR adds support for passing custom HTTP request headers (for example, Authorization tokens or custom user/session headers) to the Trino query client and schema providers.

Motivation

In authenticated or proxy-secured Trino environments, requests often require authentication tokens or identity-related headers. Previously, these headers could not be configured through the UI component, making it difficult to integrate with secured deployments.

This change enables host applications to provide custom headers through the main QueryEditor component. The supplied headers are propagated to:

  • Query execution requests
  • Schema and catalog discovery requests

When no custom headers are provided, the client maintains the existing behavior and falls back to the default header:

X-Trino-User: system

Example Usage

import { QueryEditor } from 'trino-query-ui';

function App() {
  return (
    <QueryEditor
      height={800}
      requestHeaders={{
        Authorization: 'Bearer your-jwt-token-here',
        'X-Trino-User': 'custom-user-context',
      }}
    />
  );
}

@cla-bot

cla-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@mosabua

mosabua commented Aug 18, 2026

Copy link
Copy Markdown
Member

Project is ready to cut releases again. Please update this PR and send a signed CLA.

@mosabua

mosabua commented Sep 3, 2026

Copy link
Copy Markdown
Member

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Sep 3, 2026
@cla-bot

cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@mosabua
mosabua requested a review from koszti September 3, 2026 17:24
@mosabua

mosabua commented Sep 3, 2026

Copy link
Copy Markdown
Member

We can look at merging this post 1.0.0 from #58

@koszti

koszti commented Sep 4, 2026

Copy link
Copy Markdown
Member

We need to address it with a more general solution that improves authentication support across both the Trino Web UI and external applications. I created #61 with proposed solution, so let’s use that as the reference point and wait for the generic fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants