[
https://issues.apache.org/jira/browse/KNOX-3187?focusedWorklogId=982406&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-982406
]
ASF GitHub Bot logged work on KNOX-3187:
----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Sep/25 11:36
Start Date: 09/Sep/25 11:36
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #1082:
URL: https://github.com/apache/knox/pull/1082
## What changes were proposed in this pull request?
From now on, when users want to see Token Management or Token Generation
pages without a pre-configured `knox.token.hash.key` gateway-level alias, they
are shown with the following pop-up windows:
<img width="1721" height="595" alt="image"
src="https://github.com/user-attachments/assets/d2ca2c47-fdb8-485d-b811-7f98bac336e7"
/>
<img width="1699" height="652" alt="image"
src="https://github.com/user-attachments/assets/62fbf831-52e8-46b2-a660-585a6559b4a8"
/>
I also disabled the control-buttons on the Token Management page in that
case, because it makes no sense to navigate to the Token Generation page or
fetch tokens.
This wasn't necessary on the Token Generation page, because the `Generate
Token` button is already disabled when this happens.
## How was this patch tested?
Manually tested with and without the `knox.token.hash.key` alias in the
`__gateway` credential store. All worked as expected:
- without it, the above pop-up windows were displayed
- with proper configuration I could generate.manage tokens
Issue Time Tracking
-------------------
Worklog Id: (was: 982406)
Remaining Estimate: 0h
Time Spent: 10m
> Better indicator of missing knox.token.hash.key on Token
> Management/Generation UIs
> ----------------------------------------------------------------------------------
>
> Key: KNOX-3187
> URL: https://issues.apache.org/jira/browse/KNOX-3187
> Project: Apache Knox
> Issue Type: Improvement
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Blocker
> Fix For: 2.1.0
>
> Attachments: image-2025-09-09-08-41-30-504.png,
> image-2025-09-09-08-42-19-091.png
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As of now, when there is no `knox.token.hash.key` alias stored in the
> gateway-level credential store and one hits the Token Management or Token
> Generation UI, the following pop-up windows are shown:
> !image-2025-09-09-08-41-30-504.png|height=200!
> !image-2025-09-09-08-42-19-091.png|height=200!
> The only way to find out what causes this issue is to check the logs, where
> the root cause is clearly indicated:
> {code}
> Caused by: org.glassfish.hk2.api.MultiException: A MultiException has 2
> exceptions. They are:
> 1. org.apache.knox.gateway.services.ServiceLifecycleException: Missing
> knox.token.hash.key alias from Gateway's credential store
> 2. java.lang.IllegalStateException: Unable to perform operation: post
> construct on org.apache.knox.gateway.service.knoxtoken.TokenResourceV2
> {code}
> To avoid this, we need to improve the error message within the popup window
> to tell the users they need this key before they can use the token management
> feature.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)