Skip to content

Commit

Permalink
Update client-request-filter.rst
Browse files Browse the repository at this point in the history
Applied some rephrasing.
  • Loading branch information
SthuthiGhosh9400 authored Jan 6, 2025
1 parent 6f693de commit 02dba34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions presto-docs/src/main/sphinx/develop/client-request-filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Client Request Filter
======================

Presto allows operators to customize the headers used by the Presto runtime to process queries. Some example use cases include customized authentication workflows, or enriching query attributes such as the query source. This can be achieved using the Client Request Filter plugin, which allows control over header customization during query execution.
Presto allows operators to customize the headers used to process queries. Some example use cases include customized authentication workflows, or enriching query attributes such as the query source. Use the Client Request Filter plugin to control header customization during query execution.

Implementation
--------------
Expand All @@ -17,6 +17,10 @@ The implementation of ``ClientRequestFilterFactory`` must be wrapped as a plugin

After installing a plugin that implements ``ClientRequestFilterFactory`` on the coordinator, the ``AuthenticationFilter`` class passes the ``principal`` object to the request filter, which returns the header values as a map.

Presto uses the request filter to determine whether a header is present in the blocklist. The blocklist includes headers such as ``X-Presto-Transaction-Id``, ``X-Presto-Started-Transaction-Id``, ``X-Presto-Clear-Transaction-Id``, and ``X-Presto-Trace-Token``, which are not allowed to be overridden. For a complete list of headers that may be overridden, please refer to the `Java source`_ (note that the blocklist headers are also listed there, but they are not eligible for overriding).
Presto uses the request filter to determine whether a header is present in the blocklist. The blocklist includes headers such as ``X-Presto-Transaction-Id``, ``X-Presto-Started-Transaction-Id``, ``X-Presto-Clear-Transaction-Id``, and ``X-Presto-Trace-Token``, which are not allowed to be overridden.

For a complete list of headers, see the `Java source`_.

Note: The `Java source`_ includes these blocklist headers that are not eligible for overriding. The other headers not mentioned here can be overridden.

.. _Java source: https://github.com/prestodb/presto/blob/master/presto-client/src/main/java/com/facebook/presto/client/PrestoHeaders.java

0 comments on commit 02dba34

Please sign in to comment.