--- /dev/null
+#!/usr/bin/python
+
+import logging
+import yaml
+
+
+
+class Settings:
+ def __init__(self, path='config/settings.yaml'):
+ with open(path) as invfd:
+ self._settings = yaml.load(invfd.read())
+
+
+ def use_method(self, method, san, settings):
+ authmethods = self._settings['authorization']
+
+ for thismethod, data in authmethods.items():
+ for host in data['hosts']:
+ if not san.endswith(host):
+ continue
+
+ return thismethod == method
+
+ if '*' in authmethods[method]['hosts']:
+ return True
+
+ return False
+
+