Support sub-states of authentication to be sent as results from ACLs.
This allows future work to resolve issues around cases such as expired
but known credentials being used in fast category access controls.
The new authentication states are:
ACCESS_AUTH_OK
- equivalent to ACCESS_ALLOWED
ACCESS_AUTH_REQUIRED
- Missing Credentials. Used to be ACCESS_REQ_PROXY_AUTH
ACCESS_AUTH_EXPIRED_OK
- Expired now. Were Okay.
ACCESS_AUTH_EXPIRED_BAD
- Expired now. Were Failed.
Also converts cases of ACCESS_REQ_PROXY_AUTH to the new name.
As yet no attempt is made to alter auth or access control logics to use
the new states.
/// \ingroup ACLAPI
typedef enum {
+ // Authorization ACL result states
ACCESS_DENIED,
ACCESS_ALLOWED,
ACCESS_DUNNO,
- ACCESS_REQ_PROXY_AUTH
+
+ // Authentication ACL result states
+ ACCESS_AUTH_OK = ACCESS_ALLOWED,
+ ACCESS_AUTH_REQUIRED, // Missing Credentials
+ ACCESS_AUTH_EXPIRED_OK, // Expired now. Were Okay.
+ ACCESS_AUTH_EXPIRED_BAD // Expired now. Were Failed.
} allow_t;
/// \ingroup ACLAPI
debugs(93, 8, HERE << "callback answer=" << answer);
AccessCheck *ac = (AccessCheck*)data;
- /** \todo AYJ 2008-06-12: If answer == ACCESS_REQ_PROXY_AUTH
+ /** \todo AYJ 2008-06-12: If answer == ACCESS_AUTH_REQUIRED
* we should be kicking off an authentication before continuing
* with this request. see bug 2400 for details.
*/
* The request is denied.
*/
debugs(28, 6, "ACLChecklist::checkForAsync: requiring Proxy Auth header.");
- checklist->currentAnswer(ACCESS_REQ_PROXY_AUTH);
+ checklist->currentAnswer(ACCESS_AUTH_REQUIRED);
checklist->changeState (ACLChecklist::NullState::Instance());
checklist->markFinished();
}
if (answer != ACCESS_ALLOWED) {
/* Send an error */
- int require_auth = (answer == ACCESS_REQ_PROXY_AUTH || aclIsProxyAuth(AclMatchedName));
+ int require_auth = (answer == ACCESS_AUTH_REQUIRED || aclIsProxyAuth(AclMatchedName));
debugs(85, 5, "Access Denied: " << http->uri);
debugs(85, 5, "AclMatchedName = " << (AclMatchedName ? AclMatchedName : "<null>"));
#if USE_AUTH
* the clientCreateStoreEntry() call just below. Pedro Ribeiro
* <pribeiro@isel.pt>
*/
- page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName, answer != ACCESS_REQ_PROXY_AUTH);
+ page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclMatchedName, answer != ACCESS_AUTH_REQUIRED);
http->logType = LOG_TCP_DENIED;