|
Squid Web Cache master
|
#include <ExternalACL.h>
Public Types | |
| using | Pointer = RefCount< Node > |
Public Member Functions | |
| ACLExternal (char const *) | |
| ~ACLExternal () override | |
| char const * | typeString () const override |
| void | parse () override |
| parses node representation in squid.conf; dies on failures | |
| int | match (ACLChecklist *checklist) override |
| Matches the actual data in checklist against this Acl::Node. | |
| bool | requiresAle () const override |
| whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry | |
| bool | requiresRequest () const override |
| whether our (i.e. shallow) match() requires checklist to have a request | |
| 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 | |
| bool | matches (ACLChecklist *checklist) const |
| void | parseFlags () |
| configures Acl::Node options, throwing on configuration errors | |
| 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") | |
| static void | Initialize () |
| static Acl::Node * | FindByName (const SBuf &) |
| A configured ACL with a given name or nil. | |
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 | |
| 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. | |
| static void | ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name) |
| parses acl directive parts that follow aclname | |
Private Attributes | |
| external_acl_data * | data |
| char const * | class_ |
Definition at line 20 of file ExternalACL.h.
|
inherited |
| ACLExternal::ACLExternal | ( | char const * | theClass | ) |
Definition at line 1146 of file external_acl.cc.
|
override |
Definition at line 559 of file external_acl.cc.
|
private |
Definition at line 592 of file external_acl.cc.
References ACCESS_DUNNO, AuthenticateAcl(), external_acl::cache, cbdataReferenceValid(), copyResultsFromEntry(), ExternalACLEntry::date, DBG_IMPORTANT, debugs, external_acl_data::def, ExternalACLEntry::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().
|
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().
|
inherited |
Definition at line 220 of file Acl.cc.
References safe_free, and xstrdup.
Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().
|
overridevirtual |
Implements Acl::Node.
Definition at line 732 of file external_acl.cc.
References external_acl_data::arguments, data, external_acl_data::def, external_acl::name, SBuf::Printf(), and SBuf::push_back().
|
inherited |
|
overridevirtual |
Implements Acl::Node.
Definition at line 554 of file external_acl.cc.
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().
|
staticinherited |
Definition at line 471 of file Acl.cc.
References Config, debugs, and SquidConfig::namedAcls.
Referenced by serverConnectionsOpen().
|
overridevirtual |
Reimplemented from Acl::Node.
Definition at line 1156 of file external_acl.cc.
References data, external_acl_data::def, and external_acl::require_auth.
|
inlineprivatevirtualinherited |
Reimplemented in ACLExtUser, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLTimeData >, and ACLProxyAuth.
Definition at line 102 of file Node.h.
References Acl::NoOptions().
|
staticprivate |
Definition at line 1139 of file external_acl.cc.
References data, ACLFilledChecklist::extacl_entry, Filled(), and ACLChecklist::resumeNonBlockingCheck().
Referenced by startLookup().
|
private |
Definition at line 764 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, external_acl::format, Format::Format::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, external_acl::quote, MemBuf::reset(), rfc1738_escape, MemBuf::size, and strwordquote().
Referenced by aclMatchExternal(), and startLookup().
|
overridevirtual |
Implements Acl::Node.
Definition at line 708 of file external_acl.cc.
References ACCESS_ALLOWED, ACCESS_AUTH_REQUIRED, ACCESS_DENIED, ACCESS_DUNNO, aclMatchExternal(), data, Filled(), ACLChecklist::keepMatching(), and ACLChecklist::markFinished().
|
inherited |
Orchestrates matching checklist against the Acl::Node using match(), after checking preconditions and while providing debugging.
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().
|
virtualinherited |
|
private |
|
inherited |
|
inherited |
|
inlineprivatevirtualinherited |
Reimplemented in Acl::DestinationDomainCheck, ACLDestinationIP, Acl::AnnotationCheck, Acl::ServerNameCheck, and ACLMaxUserIP.
Definition at line 98 of file Node.h.
References Acl::NoOptions().
|
overridevirtual |
Implements Acl::Node.
Definition at line 502 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().
|
inherited |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
|
staticprivateinherited |
Definition at line 253 of file Acl.cc.
References Assure, SBuf::cmp(), config_input_line, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ConfigParser::destruct(), fatalf(), HttpPortList, Acl::Make(), and ConfigParser::NextToken().
|
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().
|
inlinevirtualinherited |
Reimplemented in Acl::InnerNode, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, and Acl::ParameterizedNode< ACLTimeData >.
|
inlineoverridevirtual |
Reimplemented from Acl::Node.
Definition at line 32 of file ExternalACL.h.
|
privatevirtualinherited |
Reimplemented in Acl::HttpRepHeaderCheck, ACLHTTPStatus, and Acl::ReplyHeaderCheck< header >.
|
inlineoverridevirtual |
Reimplemented from Acl::Node.
Definition at line 33 of file ExternalACL.h.
|
staticprivate |
Asks the helper (if needed) or returns the [cached] result (otherwise). Does not support "background" lookups. See also: ACLExternal::Start().
Definition at line 1008 of file external_acl.cc.
References startLookup().
Referenced by aclMatchExternal().
|
private |
Definition at line 1017 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().
|
overridevirtual |
|
overridevirtual |
Reimplemented from Acl::Node.
Definition at line 534 of file external_acl.cc.
References authenticateActiveSchemeCount(), authenticateSchemeCount(), data, DBG_CRITICAL, debugs, external_acl_data::def, and external_acl::require_auth.
|
private |
Definition at line 50 of file ExternalACL.h.
Referenced by ~ACLExternal(), and typeString().
|
private |
Definition at line 49 of file ExternalACL.h.
Referenced by ~ACLExternal(), dump(), isProxyAuth(), LookupDone(), match(), parse(), and valid().
|
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 Acl::NotNode::NotNode(), aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), ACLRandom::match(), parse(), and ACLMaxConnection::prepareForUse().