Repository navigation
Fix Kerberos Authentication failing requests without cookies and excludedPaths config. - #5596
Conversation
KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client.
|
|
||
| String path = ((HttpServletRequest) request).getRequestURI(); | ||
| if (isExcluded(path)) { | ||
| // For excluded paths that does NOT need to be authenticated. |
There was a problem hiding this comment.
If there's an authorizer configured + the Kerberos authenticator, this won't be enough to skip security checks on a request (the authorizer would check what permissions the "anonymous" user would have and deny the request unless the user has configured appropriate permissions for the "anonymous" user)
To support excludedPaths, there's a similar concept with "unsecured paths" in the various service initialization files (e.g., UNSECURED_PATHS in CoordinatorJettyServerInitializer), one option could be to extend that to allow user-specified whitelist entries (i.e., make excludedPaths a general concept applied across all authenticators, and remove excludedPaths as a Kerberos-specific config).
I think excludedPaths makes more sense as a system-wide property than an authenticator-specific property, I'll suggest taking this out of this PR and one of us could do follow-on PR to make it a general config.
There was a problem hiding this comment.
@jon-wei: sure, we can make it a general config.
Will raise a separate PR for that.
|
👍 after CI |
|
👍 |
…udedPaths config. (apache#5596) * Fix Kerberos Authentication failing requests without cookies. KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client. * Fix excluded path config behavior * spelling correction * Revert "spelling correction" This reverts commit fb754b4. * Revert "Fix excluded path config behavior" This reverts commit 3901047.
…udedPaths config. (#5596) (#5621) * Fix Kerberos Authentication failing requests without cookies. KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client. * Fix excluded path config behavior * spelling correction * Revert "spelling correction" This reverts commit fb754b4. * Revert "Fix excluded path config behavior" This reverts commit 3901047.
…udedPaths config. (apache#5596) (apache#5621) * Fix Kerberos Authentication failing requests without cookies. KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client. * Fix excluded path config behavior * spelling correction * Revert "spelling correction" This reverts commit fb754b4. * Revert "Fix excluded path config behavior" This reverts commit 3901047.
…udedPaths config. (apache#5596) * Fix Kerberos Authentication failing requests without cookies. KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client. * Fix excluded path config behavior * spelling correction * Revert "spelling correction" This reverts commit fb754b4. * Revert "Fix excluded path config behavior" This reverts commit 3901047.
…udedPaths config. (apache#5596) * Fix Kerberos Authentication failing requests without cookies. KerberosAuthenticator was failing `First` request from the clients. After authentication we were setting the cookie properly but not setting the the authenticated flag in the request. This PR fixed that. Additional Fixes - * Removing of Unused SpnegoFilterConfig - replaced by KerberosAuthenticator * Unused internalClientKeytab and principal from KerberosAuthenticator * Fix docs accordingly and add docs for configuring an escalated client. * Fix excluded path config behavior * spelling correction * Revert "spelling correction" This reverts commit fb754b4. * Revert "Fix excluded path config behavior" This reverts commit 3901047.
KerberosAuthenticator was failing
Firstrequest from the clients.After authentication we were setting the cookie properly but not
setting the the authenticated flag in the request. This PR fixes that.
Additional Fixes -
KerberosAuthenticator
client.
Reproducing the Issue -