Ejemplo n.º 1
0
class DummyPDP(BasePDP):
    implements(PolicyDecisionPointInterface)

    def __init__(self):
        self.pdp = CharonPDP(DummyAuthzClient())

    def _decide(self, request):
        httpHeader = request.META

        #checks if a attribute 'DUMMY_MODE' is in the headers
        if 'DUMMY_MODE' in httpHeader:
            logger.info("Security Test: 'DUMMY_MODE' parameter in HTTP header")
            return self.pdp._decide(request)
        else:
            return (True, 'No authorisation testing')
Ejemplo n.º 2
0
class DummyPDP(BasePDP):
    implements(PolicyDecisionPointInterface)

    def __init__(self):
        self.pdp = CharonPDP(DummyAuthzClient())

    def _decide(self, request):
        httpHeader = request.META

        #checks if a attribute 'DUMMY_MODE' is in the headers
        if 'DUMMY_MODE' in httpHeader:
            logger.info("Security Test: 'DUMMY_MODE' parameter in HTTP header")
            return self.pdp._decide(request)
        else :
            return (True, 'No authorisation testing')
Ejemplo n.º 3
0
 def __init__(self):
     self.pdp = CharonPDP(DummyAuthzClient())
Ejemplo n.º 4
0
 def __init__(self):
     self.pdp = CharonPDP(DummyAuthzClient())