[
https://issues.apache.org/jira/browse/KNOX-3603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148357#comment-18148357
]
ASF subversion and git services commented on KNOX-3603:
-------------------------------------------------------
Commit 48c3fe176f500ada6940a16e24b1feabf2be76fd in knox's branch
refs/heads/master from Sandor Molnar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=48c3fe176 ]
KNOX-3603: Refuse delegated tokens at the KnoxIDF client token endpoints (#1533)
> 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)