[improve] Split clientAppId() usage for better client request log.#18166
Closed
lifepuzzlefun wants to merge 1 commit intoapache:masterfrom
Closed
[improve] Split clientAppId() usage for better client request log.#18166lifepuzzlefun wants to merge 1 commit intoapache:masterfrom
lifepuzzlefun wants to merge 1 commit intoapache:masterfrom
Conversation
But when authentication is disabled. clientAppId always return null which makes it is difficult for problem tracing. This patch split caller for log tracing and for client role retrieve.
Technoboy-
reviewed
Oct 24, 2022
| "clientRole=" + httpRequest.getAttribute(AuthenticationFilter.AuthenticatedRoleAttributeName); | ||
| } | ||
|
|
||
| public String clientRole() { |
Contributor
There was a problem hiding this comment.
It's better to change here, only changing the implementation of clientAppId. Then no need to replace the clientRole somewhere.
Contributor
Author
There was a problem hiding this comment.
thinks for review. i tried before. but after analysis the code, some code path use clientAppId to get authorization clientRole, direct change origin clientAppId may introduce other bug. sorry for change too much code but i think may be we can find a way to better make the change simle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18165
Motivation
Current request log use clientAppId for tracing client info.
But when authentication is disabled. clientAppId always return null which makes it is difficult for problem tracing.
This patch split caller for log tracing and for client role retrieve.
Modifications
the following usage are change from
clientAppId()toclientRole()FunctionBaseSchemasResourceBaseTenantsBaseFunctionsWorkerTopicsBaseVerifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-complete