[
https://issues.apache.org/jira/browse/KNOX-3600?focusedWorklogId=1056042&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056042
]
ASF GitHub Bot logged work on KNOX-3600:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Nov/26 23:18
Start Date: 19/Nov/26 23:18
Worklog Time Spent: 10m
Work Description: github-actions[bot] commented on PR #1531:
URL: https://github.com/apache/knox/pull/1531#issuecomment-7024958373
## Test Results
5 files 5 suites 1m 16s ⏱️
227 tests 226 ✅ 1 💤 0 ❌
271 runs 270 ✅ 1 💤 0 ❌
Results for commit a4dc0b3b.
[test-results]:data:application/gzip;base64,H4sIAL2D/2oC/03MSwrDIBSF4a0Exx34tnYzxSdIk1iMjkL33ltJTYb/d+DsKKY5bOgxiduEtpbqCN+KqSmvkEpCw1J/G6XqX8+tOddJnvRKbyAyIJo0A+ABoZRcDilt7Z+KHDEuFR5yPva+HPa+/rm8LKlCIMO9w5ZZe+fBax949F5aKZhhlGEipNWCC43R5wsepgNgBAEAAA==
Issue Time Tracking
-------------------
Worklog Id: (was: 1056042)
Time Spent: 20m (was: 10m)
> Prevent CLIENT_ID tokens from registering other clients
> -------------------------------------------------------
>
> Key: KNOX-3600
> URL: https://issues.apache.org/jira/browse/KNOX-3600
> Project: Apache Knox
> Issue Type: Improvement
> Components: KnoxIDF
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Critical
> Fix For: 3.1.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> *Problem*
> A registered client (a CLIENT_ID token with {{{}thirdPartyApp=true{}}})
> authenticates with its own client id as subject. Such a token can reach
> {{/knoxidf/api/v1/client/register}} this way: {{client_credentials}} at a
> server-managed topology, then a same-subject token exchange at a topology the
> registration topology trusts. The client then registers a new client owned by
> itself. That client gets its own {{knox.token.limit.per.user}} and can do the
> same, so the limit bounds nothing. Revoking the first client leaves all the
> clients it created working.
> *Fix*
> In {{{}RegistrationResource.registerClient{}}}, right after
> {{{}anonymousRegistrationDenied(){}}}: if the caller's subject is the id of a
> CLIENT_ID token, reject with {{access_denied}} and audit
> {{{}reason=client_caller_denied{}}}.
> * New KNOXIDF service param
> {{{}knoxidf.client.registration.client.callers.denied{}}}, default
> {{{}true{}}}. Setting {{false}} restores today's behaviour.
> * Check the raw subject ({{{}SubjectUtils.getPrimaryPrincipalName{}}}), not
> the effective principal. Identity-assertion mapping such as {{lowercase}}
> would hide a mixed-case user-supplied client id.
> * {{{}tokenStateService.getTokenMetadata(subject){}}}: reject if
> {{{}isClientId(){}}}. Unknown id: not a client.
> *Known limit*
> A deleted client's already-exchanged token passes until it expires, because
> its metadata is gone and it looks like a user.
> *Tests*
> * CLIENT_ID subject: rejected and audited. With the param set to
> {{{}false{}}}: registered.
> * User subject: registered.
> * Mixed-case client id under {{lowercase}} mapping: rejected.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)