#include <ExternalACL.h>
![Inheritance graph](classACLExternal__inherit__graph.png)
![Collaboration graph](classACLExternal__coll__graph.png)
Public Types | |
using | Pointer = RefCount< Node > |
Public Member Functions | |
ACLExternal (char const *) | |
~ACLExternal () override | |
const char * | typeString () const override |
void | parse () override |
parses node representation in squid.conf; dies on failures More... | |
int | match (ACLChecklist *checklist) override |
Matches the actual data in checklist against this Acl::Node. More... | |
bool | requiresAle () const override |
whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry More... | |
bool | requiresRequest () const override |
whether our (i.e. shallow) match() requires checklist to have a request More... | |
bool | isProxyAuth () const override |
SBufList | dump () const override |
bool | valid () const override |
bool | empty () const override |
void * | operator new (size_t) |
void | operator delete (void *) |
void | context (const SBuf &aName, const char *configuration) |
sets user-specified ACL name and squid.conf context More... | |
bool | matches (ACLChecklist *checklist) const |
void | parseFlags () |
configures Acl::Node options, throwing on configuration errors More... | |
int | cacheMatchAcl (dlink_list *cache, ACLChecklist *) |
virtual int | matchForCache (ACLChecklist *checklist) |
virtual void | prepareForUse () |
void | dumpWhole (const char *directiveName, std::ostream &) |
Static Public Member Functions | |
static void | ParseNamedAcl (ConfigParser &, NamedAcls *&) |
parses acl directive parts that follow directive name (i.e. "acl") More... | |
static void | Initialize () |
static Acl::Node * | FindByName (const SBuf &) |
A configured ACL with a given name or nil. More... | |
Public Attributes | |
SBuf | name |
char * | cfgline = nullptr |
Private Member Functions | |
MEMPROXY_CLASS (ACLExternal) | |
void | startLookup (ACLFilledChecklist *, external_acl_data *, bool inBackground) const |
Acl::Answer | aclMatchExternal (external_acl_data *, ACLFilledChecklist *) const |
char * | makeExternalAclKey (ACLFilledChecklist *, external_acl_data *) const |
virtual bool | requiresReply () const |
whether our (i.e. shallow) match() requires checklist to have a reply More... | |
virtual const Acl::Options & | options () |
virtual const Acl::Options & | lineOptions () |
Static Private Member Functions | |
static void | StartLookup (ACLFilledChecklist &, const Acl::Node &) |
static void | LookupDone (void *data, const ExternalACLEntryPointer &) |
Called when an async lookup returns. More... | |
static void | ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name) |
parses acl directive parts that follow aclname More... | |
Private Attributes | |
external_acl_data * | data |
const char * | class_ |
Detailed Description
Definition at line 20 of file ExternalACL.h.
Member Typedef Documentation
◆ Pointer
|
inherited |
Constructor & Destructor Documentation
◆ ACLExternal()
ACLExternal::ACLExternal | ( | char const * | theClass | ) |
Definition at line 1147 of file external_acl.cc.
◆ ~ACLExternal()
|
override |
Definition at line 560 of file external_acl.cc.
Member Function Documentation
◆ aclMatchExternal()
|
private |
Definition at line 593 of file external_acl.cc.
References ACCESS_DUNNO, AuthenticateAcl(), external_acl::cache, cbdataReferenceValid(), copyResultsFromEntry(), ExternalACLEntry::date, DBG_IMPORTANT, debugs, ExternalACLEntry::def, external_acl_data::def, ACLFilledChecklist::extacl_entry, external_acl_cache_touch(), external_acl_entry_expired(), external_acl_grace_expired(), external_acl_message, ACLChecklist::goAsync(), hash_lookup(), hash_link::key, ExternalACLEntry::log, makeExternalAclKey(), ExternalACLEntry::message, external_acl::name, ACLFilledChecklist::request, external_acl::require_auth, ExternalACLEntry::result, StartLookup(), startLookup(), ExternalACLEntry::tag, String::termedBuf(), external_acl::theHelper, and ExternalACLEntry::user.
Referenced by match().
◆ cacheMatchAcl()
|
inherited |
Definition at line 401 of file Acl.cc.
References acl_proxy_auth_match_cache::acl_data, dlink_node::data, debugs, dlinkAddTail(), dlink_list::head, acl_proxy_auth_match_cache::link, acl_proxy_auth_match_cache::matchrv, and dlink_node::next.
Referenced by ACLProxyAuth::matchProxyAuth().
◆ context()
|
inherited |
Definition at line 220 of file Acl.cc.
References safe_free, and xstrdup.
Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().
◆ dump()
|
overridevirtual |
Implements Acl::Node.
Definition at line 733 of file external_acl.cc.
References external_acl_data::arguments, data, external_acl_data::def, external_acl::name, wordlist::next, SBuf::Printf(), and SBuf::push_back().
◆ dumpWhole()
|
inherited |
◆ empty()
|
overridevirtual |
Implements Acl::Node.
Definition at line 555 of file external_acl.cc.
◆ FindByName()
Definition at line 159 of file Acl.cc.
References assert, Config, debugs, and SquidConfig::namedAcls.
Referenced by aclIsProxyAuth(), Acl::InnerNode::lineParse(), parse_ftp_epsv(), and TestACLMaxUserIP::testParseLine().
◆ Initialize()
|
staticinherited |
Definition at line 471 of file Acl.cc.
References Config, debugs, and SquidConfig::namedAcls.
Referenced by serverConnectionsOpen().
◆ isProxyAuth()
|
overridevirtual |
Reimplemented from Acl::Node.
Definition at line 1157 of file external_acl.cc.
References data, external_acl_data::def, and external_acl::require_auth.
◆ lineOptions()
|
inlineprivatevirtualinherited |
- Returns
- (linked) "line" Options supported by this Acl::Node
- See also
- Acl::Node::options()
Reimplemented in ACLProxyAuth, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< hier_code > >, and ACLExtUser.
Definition at line 102 of file Node.h.
References Acl::NoOptions().
◆ LookupDone()
|
staticprivate |
Definition at line 1140 of file external_acl.cc.
References data, ACLFilledChecklist::extacl_entry, Filled(), and ACLChecklist::resumeNonBlockingCheck().
Referenced by startLookup().
◆ makeExternalAclKey()
|
private |
Definition at line 765 of file external_acl.cc.
References ACLFilledChecklist::al, SBuf::append(), external_acl_data::arguments, Format::Format::assemble(), MemBuf::buf, MemBuf::clean(), external_acl_data::def, Format::Format::format, external_acl::format, MemBuf::init(), AccessLogEntry::lastAclData, AccessLogEntry::lastAclName, SBuf::length(), Format::LFT_EXT_ACL_DATA, Format::LFT_EXT_ACL_NAME, Format::LOG_QUOTE_URL, external_acl_data::name, wordlist::next, Format::Token::next, external_acl::quote, MemBuf::reset(), rfc1738_escape, MemBuf::size, and strwordquote().
Referenced by aclMatchExternal(), and startLookup().
◆ match()
|
overridevirtual |
Implements Acl::Node.
Definition at line 709 of file external_acl.cc.
References ACCESS_ALLOWED, ACCESS_AUTH_REQUIRED, ACCESS_DENIED, ACCESS_DUNNO, aclMatchExternal(), data, Filled(), ACLChecklist::keepMatching(), and ACLChecklist::markFinished().
◆ matches()
|
inherited |
Orchestrates matching checklist against the Acl::Node using match(), after checking preconditions and while providing debugging.
- Returns
- true if and only if there was a successful match. Updates the checklist state on match, async, and failure.
Definition at line 189 of file Acl.cc.
References ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), ACLChecklist::setLastCheckedName(), and ACLChecklist::verifyAle().
Referenced by ACLChecklist::matchAndFinish().
◆ matchForCache()
|
virtualinherited |
◆ MEMPROXY_CLASS()
|
private |
◆ operator delete()
|
inherited |
◆ operator new()
|
inherited |
◆ options()
|
inlineprivatevirtualinherited |
- Returns
- (linked) 'global' Options supported by this Acl::Node
Reimplemented in Acl::ServerNameCheck, Acl::DestinationDomainCheck, Acl::AnnotationCheck, ACLMaxUserIP, and ACLDestinationIP.
Definition at line 98 of file Node.h.
References Acl::NoOptions().
◆ parse()
|
overridevirtual |
Implements Acl::Node.
Definition at line 503 of file external_acl.cc.
References external_acl_data::arguments, data, external_acl_data::def, find_externalAclHelper(), Acl::Node::name, external_acl_data::name, self_destruct(), ConfigParser::strtokFile(), and wordlistAdd().
◆ parseFlags()
|
inherited |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
◆ ParseNamed()
|
staticprivateinherited |
Definition at line 253 of file Acl.cc.
References A, Assure, SBuf::cmp(), config_input_line, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ConfigParser::destruct(), fatalf(), HttpPortList, Acl::Make(), and ConfigParser::NextToken().
◆ ParseNamedAcl()
|
staticinherited |
Definition at line 229 of file Acl.cc.
References CallParser(), DBG_CRITICAL, debugs, ConfigParser::destruct(), RefCount< C >::Make(), and ConfigParser::NextToken().
Referenced by parse_acl(), and TestACLMaxUserIP::testParseLine().
◆ prepareForUse()
|
inlinevirtualinherited |
Reimplemented in Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::InnerNode, and ACLMaxConnection.
◆ requiresAle()
|
inlineoverridevirtual |
Reimplemented from Acl::Node.
Definition at line 32 of file ExternalACL.h.
◆ requiresReply()
|
privatevirtualinherited |
Reimplemented in ACLHTTPStatus, Acl::ReplyHeaderCheck< header >, and Acl::HttpRepHeaderCheck.
◆ requiresRequest()
|
inlineoverridevirtual |
Reimplemented from Acl::Node.
Definition at line 33 of file ExternalACL.h.
◆ StartLookup()
|
staticprivate |
Asks the helper (if needed) or returns the [cached] result (otherwise). Does not support "background" lookups. See also: ACLExternal::Start().
Definition at line 1009 of file external_acl.cc.
References startLookup().
Referenced by aclMatchExternal().
◆ startLookup()
|
private |
Definition at line 1018 of file external_acl.cc.
References Packable::appendf(), assert, MemBuf::buf, external_acl::cache_size, externalAclState::callback, externalAclState::callback_data, cbdataReference, MemBuf::clean(), debugs, external_acl_data::def, dlinkAdd(), externalAclHandleReply(), dlink_list::head, MemBuf::init(), externalAclState::key, externalAclState::list, LookupDone(), makeExternalAclKey(), external_acl::name, node::next, external_acl::queue, externalAclState::queue, and external_acl::theHelper.
Referenced by aclMatchExternal(), and StartLookup().
◆ typeString()
|
overridevirtual |
◆ valid()
|
overridevirtual |
Reimplemented from Acl::Node.
Definition at line 535 of file external_acl.cc.
References authenticateActiveSchemeCount(), authenticateSchemeCount(), data, DBG_CRITICAL, debugs, external_acl_data::def, and external_acl::require_auth.
Member Data Documentation
◆ cfgline
◆ class_
|
private |
Definition at line 50 of file ExternalACL.h.
Referenced by typeString(), and ~ACLExternal().
◆ data
|
private |
Definition at line 49 of file ExternalACL.h.
Referenced by dump(), isProxyAuth(), LookupDone(), match(), parse(), valid(), and ~ACLExternal().
◆ name
|
inherited |
Either aclname parameter from the explicitly configured acl directive or a label generated for an internal ACL tree node. All Node objects corresponding to one Squid configuration have unique names. See also: context() and FindByName().
Definition at line 81 of file Node.h.
Referenced by aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), ACLRandom::match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), Acl::NotNode::NotNode(), parse(), and ACLMaxConnection::prepareForUse().
The documentation for this class was generated from the following files:
- src/ExternalACL.h
- src/external_acl.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products