9#ifndef SQUID_SRC_ACL_CHECKLIST_H
10#define SQUID_SRC_ACL_CHECKLIST_H
void ACLCB(Acl::Answer, void *)
ACL checklist callback.
Position of a child node within an Acl::Node tree.
bool operator==(const Breadcrumb &b) const
Breadcrumb(const Acl::InnerNode *aParent, Acl::Nodes::const_iterator aPos)
RefCount< const Acl::InnerNode > parent
intermediate node in the ACL tree
bool operator!=(const Breadcrumb &b) const
Acl::Nodes::const_iterator position
child position inside parent
void markFinished(const Acl::Answer &newAnswer, const char *reason)
void completeNonBlocking()
void banAction(const Acl::Answer &action)
add action to the list of banned actions
std::vector< Acl::Answer > bannedActions_
the list of actions which must ignored during acl checks
virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const =0
assigns uninitialized adapted_request and url ALE components
Breadcrumb matchLoc_
location of the node running matches() now
void resumeNonBlockingCheck()
void preCheck(const char *what)
prepare for checking ACLs; called once per check
Acl::Answer const & fastCheck()
bool asyncCaller_
whether the caller supports async/slow ACLs
void(ACLFilledChecklist &, const Acl::Node &) AsyncStarter
a function that initiates asynchronous ACL checks; see goAsync()
bool keepMatching() const
Whether we should continue to match tree nodes or stop/pause.
NodeMatchingResult
possible outcomes when trying to match a single ACL node in a list
void nonBlockingCheck(ACLCB *callback, void *callback_data)
bool finished() const
whether markFinished() was called
bool occupied_
whether a check (fast or non-blocking) is in progress
bool goAsync(AsyncStarter, const Acl::Node &)
void changeAcl(const acl_access *)
change the current ACL list
Acl::TreePointer swapAcl(const acl_access *)
change the current ACL list
bool matchChild(const Acl::InnerNode *parent, Acl::Nodes::const_iterator pos)
std::stack< Breadcrumb > matchPath
suspended (due to an async lookup) matches() in the ACL tree
bool prepNonBlocking()
common parts of nonBlockingCheck() and resumeNonBlockingCheck()
bool bannedAction(const Acl::Answer &action) const
whether the action is banned or not
Acl::TreePointer accessList
void matchAndFinish()
performs (or resumes) an ACL tree match and, if successful, sets the action
unsigned asyncLoopDepth_
how many times the current async state has resumed
virtual bool hasReply() const =0
void setLastCheckedName(const SBuf &name)
remember the name of the last ACL being evaluated
bool asyncInProgress() const
async call has been started and has not finished (or failed) yet
virtual void verifyAle() const =0
warns if there are uninitialized ALE components and fills them
virtual bool hasAle() const =0
Breadcrumb asyncLoc_
currentNode_ that called goAsync()
virtual bool hasRequest() const =0
void calcImplicitAnswer()
void checkCallback(const char *abortReason)
const Acl::Answer & currentAnswer() const
std::optional< SBuf > lastCheckedName_
the name of the last evaluated ACL (if any ACLs were evaluated)
An intermediate Acl::Node tree node. Manages a collection of child tree nodes.