[
https://issues.apache.org/jira/browse/KNOX-3603?focusedWorklogId=1056249&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056249
]
ASF GitHub Bot logged work on KNOX-3603:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Nov/26 15:42
Start Date: 20/Nov/26 15:42
Worklog Time Spent: 10m
Work Description: github-actions[bot] commented on PR #1533:
URL: https://github.com/apache/knox/pull/1533#issuecomment-7043743968
## Test Results
5 files 5 suites 1m 17s ⏱️
229 tests 228 ✅ 1 💤 0 ❌
294 runs 293 ✅ 1 💤 0 ❌
Results for commit 7630ce66.
[test-results]:data:application/gzip;base64,H4sIAFBqAGsC/03MSw6DIBSF4a0Yxh0Ayqubaej1kpCqNDxGpnsvJRYd/t9Jzk6cXzCR+yBuA0nF5x5ziTb7sNVUqnZd8m/j3PzrkQpAI33Sy78rsQ7O+qUC7YAxhnhILFv7NNMR/dKMXc7H1pfD1tc/COvqcw2i5EgBpZyU0FZTp9GApmhRAHuqWTFgzHLDyecL4KgnaQQBAAA=
Issue Time Tracking
-------------------
Worklog Id: (was: 1056249)
Time Spent: 20m (was: 10m)
> KnoxIDF: Refuse delegated tokens at client revocation and enable/disable
> ------------------------------------------------------------------------
>
> Key: KNOX-3603
> URL: https://issues.apache.org/jira/browse/KNOX-3603
> Project: Apache Knox
> Issue Type: Improvement
> Components: KnoxIDF
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 3.1.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> *Problem*
> KNOX-3600 refuses a delegated token (an {{ActorChainPrincipal}} on the
> subject, from an {{act}} claim) at {{{}/knoxidf/api/v1/client/register{}}}.
> The other client endpoints {{RegistrationResource}} inherits from
> {{TokenResource}} have no such check: {{{}revoke{}}}, {{{}revokeTokens{}}},
> {{{}enable{}}}, {{{}enableTokens{}}}, {{disable,}} {{{}disableTokens and
> getUserTokens{}}}. They act when the caller's effective principal is the
> token's user or creator, and accept a bare token id. So whoever holds a
> user's delegated token ({{{}sub{}}} = user, {{act}} = itself) can revoke or
> disable any of that user's tokens whose ids it knows, on any topology that
> serves these paths and trusts the issuer of the delegated token.
> *Fix*
> In {{{}RegistrationResource{}}}, override those six methods: if
> {{{}delegatedCallerDenied(){}}}, reject with {{access_denied}} and audit
> {{{}reason=delegated_caller_denied{}}}, as {{registerClient}} does.
> * Reuse {{knoxidf.client.registration.delegated.callers.denied}} (default
> {{{}true{}}}): one switch decides whether delegated tokens may manage clients.
> * Only the actor chain is checked, as in KNOX-3600. Callers without one
> (Shiro/LDAP, passcodes, non-delegated JWTs) are unaffected.
> *Tests*
> * Delegated subject: each of the six methods is rejected and audited, and
> the token's state is unchanged.
> * With the param set to {{{}false{}}}: a delegated subject can revoke and
> disable.
> * Non-delegated subject: revokes and disables its own token.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)