summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Core.py
diff options
context:
space:
mode:
authorMatt Schwager <schwag09@gmail.com>2012-10-15 12:34:07 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-12 08:35:32 -0500
commite8a5500535cb7c23ef3d687304033e50e80dbd3f (patch)
treee612938dde26bb1ea50a9d241cf519c247f30205 /src/lib/Bcfg2/Server/Core.py
parent2ad656a8b9fe4fd364dff3a4f6e419699438c714 (diff)
downloadbcfg2-e8a5500535cb7c23ef3d687304033e50e80dbd3f.tar.gz
bcfg2-e8a5500535cb7c23ef3d687304033e50e80dbd3f.tar.bz2
bcfg2-e8a5500535cb7c23ef3d687304033e50e80dbd3f.zip
IP based ACLs working for CherryPy Server. Still need to implement BuiltinServer and test.
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r--src/lib/Bcfg2/Server/Core.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 90349ddf9..9ca540127 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -1072,6 +1072,13 @@ class BaseCore(object):
return self.metadata.AuthenticateConnection(acert, user, password,
address)
+ def check_acls(self, client):
+ """ Check if client IP is in list of accepted IPs """
+ try:
+ return client in self.plugins['Acl'].config.ips
+ except KeyError:
+ return True
+
@exposed
def GetDecisionList(self, address, mode):
""" Get the decision list for the client with :func:`GetDecisions`.