[
https://issues.apache.org/jira/browse/KNOX-3591?focusedWorklogId=1055666&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1055666
]
ASF GitHub Bot logged work on KNOX-3591:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Nov/26 13:19
Start Date: 18/Nov/26 13:19
Worklog Time Spent: 10m
Work Description: smolnar82 merged PR #1525:
URL: https://github.com/apache/knox/pull/1525
Issue Time Tracking
-------------------
Worklog Id: (was: 1055666)
Time Spent: 0.5h (was: 20m)
> Make the KnoxIDF resources @Singleton
> -------------------------------------
>
> Key: KNOX-3591
> URL: https://issues.apache.org/jira/browse/KNOX-3591
> Project: Apache Knox
> Issue Type: Bug
> Components: KnoxIDF
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 3.1.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{jakarta.inject.Singleton}} is not {{{}@Inherited{}}}, so the KnoxIDF
> subclasses of the singleton knoxtoken resources are created per request and
> run {{init()}} on every call. On the token endpoint, that means an uncached
> gateway keystore load under a file lock ({{{}setupPublicCertPEM{}}}) and
> duplicate {{setupTokenStateService}} log lines on each request. It caps RFC
> 8693 token exchange at about 105 req/s locally with 20 threads locally on my
> Mac.
> Fix: add {{@Singleton}} to all KnoxIDF resources except
> {{{}RegistrationResource{}}}. That one keeps per-request state
> ({{{}redirectUris{}}}, {{{}allowedScopes{}}}) on the instance, so it stays
> {{{}@RequestScoped{}}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)