Package flumotion :: Package component :: Package bouncers :: Module multibouncer :: Class MultiBouncer
[hide private]

Class MultiBouncer

source code

             object --+            
                      |            
common.common.InitMixin --+        
                          |        
extern.log.log.Loggable --+        
                          |        
    component.BaseComponent --+    
                              |    
              component.Bouncer --+
                                  |
                                 MultiBouncer
Known Subclasses:

Nested Classes [hide private]

Inherited from component.Bouncer: componentMediumClass

Instance Methods [hide private]
 
init(self)
A subclass should do as little as possible in its init method.
source code
 
do_setup(self)
Subclasses can implement me to set up the component before it is started.
source code
 
check_algorithms(self, algorithms) source code
 
do_authenticate(self, keycard)
Must be overridden by subclasses.
source code
 
on_keycardRemoved(self, keycard)
Override to cleanup sub-class specific data related to keycards.
source code
 
algorithm_expire_keycard_ids(self, keycard_ids, name) source code

Inherited from component.Bouncer: addKeycard, authenticate, do_expireKeycards, do_stop, do_validate, expireAllKeycards, expireKeycardId, expireKeycardIds, generateKeycardId, getDomain, getEnabled, hasKeycard, keepAlive, on_disabled, on_enabled, on_keycardAdded, removeKeycard, removeKeycardId, setDomain, setEnabled, typeAllowed

Inherited from component.BaseComponent: __init__, __provides__, addMessage, adminCallRemote, checkPropertyType, check_properties, do_check, fixRenamedProperties, getMood, getName, getWorkerName, modifyProperty, observerAppend, observerRemove, removeMessage, setMedium, setMood, setShutdownHook, setWorkerName, setup, setup_completed, stop, waitForHappy, warnDeprecatedProperties

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  logCategory = 'multibouncer'
Implementors can provide a category to log their messages under.
tuple of flumotion.common.keycards.Keycard class objects keycardClasses = keycards.KeycardHTTPGetArguments, keycards.Ke...
tuple of all classes of keycards this bouncer can authenticate, in order of preference

Inherited from component.Bouncer: KEYCARD_EXPIRE_INTERVAL

Inherited from component.BaseComponent: __implemented__

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name, uiState

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 

A subclass should do as little as possible in its init method. In particular, it should not try to access resources.

Failures during init are marshalled back to the manager through the worker's remote_create method, since there is no component state proxied to the manager yet at the time of init.

Overrides: component.BaseComponent.init
(inherited documentation)

do_setup(self)

source code 

Subclasses can implement me to set up the component before it is started. It should set up the component, possibly opening files and resources. Non-programming errors should not be raised, but returned as a failing deferred.

The return value may be a deferred.

Overrides: component.BaseComponent.do_setup
(inherited documentation)

do_authenticate(self, keycard)

source code 

Must be overridden by subclasses.

Authenticate the given keycard. Return the keycard with state AUTHENTICATED to authenticate, with state REQUESTING to continue the authentication process, or REFUSED to deny the keycard or a deferred which should have the same eventual value.

FIXME: Currently, a return value of 'None' is treated as rejecting the keycard. This is unintuitive.

FIXME: in fact, for authentication sessions like challenge/response, returning a keycard with state REFUSED instead of None will not work properly and may enter in an asynchronous infinit loop.

Overrides: component.Bouncer.do_authenticate
(inherited documentation)

on_keycardRemoved(self, keycard)

source code 

Override to cleanup sub-class specific data related to keycards. Called when the base bouncer has cleanup his references to a keycard.

Overrides: component.Bouncer.on_keycardRemoved
(inherited documentation)

Class Variable Details [hide private]

keycardClasses

tuple of all classes of keycards this bouncer can authenticate, in order of preference
Type:
tuple of flumotion.common.keycards.Keycard class objects
Value:
keycards.KeycardHTTPGetArguments, keycards.KeycardGeneric, keycards.Ke\
ycardUACPCC, keycards.KeycardUACPP, keycards.KeycardToken