[
https://issues.apache.org/jira/browse/KNOX-2966?focusedWorklogId=884275&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-884275
]
ASF GitHub Bot logged work on KNOX-2966:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Oct/23 11:07
Start Date: 10/Oct/23 11:07
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #802:
URL: https://github.com/apache/knox/pull/802
## What changes were proposed in this pull request?
Better logging experience in KnoxSSO Cookie management.
## How was this patch tested?
Deployed Knox, logged in to the Knox Home page and checked logs:
```
2023-10-10 13:03:51,102 f268dade-b9ba-425d-b0d6-d3e97d6b9243 INFO
knox.gateway (CookieUtils.java:getCookiesForName(46)) - Unable to find cookie
with name: hadoop-jwt
...
2023-10-10 13:04:01,683 d4e582d3-8b08-46cd-8540-60315b08a819 DEBUG
service.knoxsso (WebSSOResource.java:addJWTHadoopCookie(402)) - Adding the
following JWT token as a cookie: eyJraW...VHcD2Q
2023-10-10 13:04:01,684 d4e582d3-8b08-46cd-8540-60315b08a819 INFO
service.knoxsso (WebSSOResource.java:addJWTHadoopCookie(428)) - JWT cookie
eyJraW...VHcD2Q successfully added.
```
Issue Time Tracking
-------------------
Worklog Id: (was: 884275)
Remaining Estimate: 0h
Time Spent: 10m
> Improve hadoop-jwt cookie logging
> ---------------------------------
>
> Key: KNOX-2966
> URL: https://issues.apache.org/jira/browse/KNOX-2966
> Project: Apache Knox
> Issue Type: Improvement
> Components: KnoxSSO
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 2.1.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, the following log messages are displayed when the {{hadoop-jwt}}
> cookie is added to the response during the KnoxSSO flow:
> - DEBUG: {{Adding the following JWT token as a cookie: $ENTIRE_JWT}}
> - INFO: JWT cookie successfully added.
> - ERROR: {{Unable to add cookie to response. $ERROR_MSG: $ERROR_STACK}}
> Possible improvements:
> - use {{org.apache.knox.gateway.util.Tokens.getTokenDisplayText(String)}} to
> mask the entire JWT in the {{DEBUG}} message above
> - add the masked JWT info in the {{INFO}} message so that we'll have a better
> understanding of when a certain SSO cookie was issued/added in the response.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)