Skip to content

Commit

Permalink
Fix X-Trino-Authorization-User typo
Browse files Browse the repository at this point in the history
There is no such header. Only `X-Trino-User` and `X-Trino-Original-User`
exist.
  • Loading branch information
findepi committed Nov 17, 2023
1 parent 4055fdf commit c1ad2ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ public void testResourceSecurityImpersonation()
server.getInstance(Key.get(PasswordAuthenticatorManager.class)).setAuthenticators(TestResourceSecurity::authenticate);
HttpServerInfo httpServerInfo = server.getInstance(Key.get(HttpServerInfo.class));

// Authenticated user TEST_USER_LOGIN impersonates impersonated-user by passing request header X-Trino-Authorization-User
// Authenticated user TEST_USER_LOGIN impersonates impersonated-user by passing request header X-Trino-User
Request request = new Request.Builder()
.url(getLocation(httpServerInfo.getHttpsUri(), "/protocol/identity"))
.addHeader("Authorization", Credentials.basic(TEST_USER_LOGIN, TEST_PASSWORD))
Expand Down
9 changes: 5 additions & 4 deletions docs/src/main/sphinx/develop/client-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@ subsequent requests to be consistent with the response headers received.
header in subsequent client requests.
* - `X-Trino-Set-Authorization-User`
- Instructs the client to set the session authorization user in the
`X-Trino-Authorization-User` request header in subsequent client requests.
`X-Trino-User` request header in subsequent client requests.
`X-Trino-Original-User` should also be set.
* - `X-Trino-Reset-Authorization-User`
- Instructs the client to remove `X-Trino-Authorization-User` request header
in subsequent client requests to reset the authorization user back to the
original user.
- Instructs the client to reset `X-Trino-User` request header to its original
value in subsequent client requests and remove `X-Trino-Original-User`
to reset the authorization user back to the original user.
* - `X-Trino-Set-Session`
- The value of the `X-Trino-Set-Session` response header is a string of the
form *property* = *value*. It instructs the client include session property
Expand Down

0 comments on commit c1ad2ef

Please sign in to comment.