[
https://issues.apache.org/jira/browse/KNOX-3603?focusedWorklogId=1056322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056322
]
ASF GitHub Bot logged work on KNOX-3603:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Nov/26 20:42
Start Date: 20/Nov/26 20:42
Worklog Time Spent: 10m
Work Description: smolnar82 merged PR #1533:
URL: https://github.com/apache/knox/pull/1533
Issue Time Tracking
-------------------
Worklog Id: (was: 1056322)
Time Spent: 0.5h (was: 20m)
> 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: 0.5h
> 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)