Ignore:
Timestamp:
29/09/08 16:05:29 (12 years ago)
Author:
pjkersha
Message:

Working unit tests for WSGI based Attribute Authority.

  • Altered so that all Attribute Config is picked up from the Paste ini file. Separate cfg or xml based config file is still supported.

TODO:

  • Simplify unit test config for client.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/attributeauthority.py

    r4233 r4245  
    2828class AttributeAuthorityWS(_AttAuthorityService): 
    2929 
    30     def __init__(self): 
     30    def __init__(self, **kw): 
    3131         
    3232        # Stop in debugger at beginning of SOAP stub if environment variable  
     
    3737                pdb.set_trace() 
    3838          
    39         # Initialize Attribute Authority class - property file will be 
     39        # Initialise Attribute Authority class - property file will be 
    4040        # picked up from default location under $NDG_DIR directory 
    41         self.aa = AttAuthority() 
     41        self.aa = AttAuthority(**kw) 
    4242 
    4343 
     
    5757        # Derive designated holder cert differently according to whether 
    5858        # a signed message is expected from the client - NB, this is dependent 
    59         # on WS-Security properties having been set 
    60         if self.aa.has_key('WS-Security'): 
     59        # on whether a reference to the signature filter was set in the  
     60        # environment 
     61        signatureFilter = \ 
     62            self.referencedWSGIFilters.get('wsseSignatureVerificationFilter01') 
     63        if signatureFilter is not None: 
    6164            # Get certificate corresponding to private key that signed the 
    6265            # message - i.e. the user's proxy 
    63             signatureFilter = \ 
    64                 self.referencedWSGIFilters['wsseSignatureVerificationFilter01'] 
    6566            holderCert = signatureFilter.signatureHandler.verifyingCert 
    6667        else: 
Note: See TracChangeset for help on using the changeset viewer.