Changeset 7365


Ignore:
Timestamp:
25/08/10 16:41:20 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 2: XACML-Security Integration

  • added identifier URN constants
Location:
TI12-security/trunk/ndg_xacml/ndg/xacml/core
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/__init__.py

    r7099 r7365  
    152152        """ 
    153153        return self.__matches 
     154     
     155     
     156XACML_1_0_PREFIX = "urn:oasis:names:tc:xacml:1.0:" 
     157 
     158class Identifiers(object): 
     159    """XACML Identifiers""" 
     160    class Subject(object): 
     161        """XAMCL Subject Identifiers""" 
     162        AUTHN_LOCALITY_DNS_NAME = XACML_1_0_PREFIX + \ 
     163            "subject:authn-locality:dns-name" 
     164        AUTHN_LOCALITY_IP_ADDRESS = XACML_1_0_PREFIX + \ 
     165            "subject:authn-locality:ip-address" 
     166        AUTHN_METHOD = XACML_1_0_PREFIX + "subject:authentication-method" 
     167        AUTHN_TIME = XACML_1_0_PREFIX + "subject:authentication-time" 
     168        KEY_INFO = XACML_1_0_PREFIX + "subject:key-info" 
     169        REQUEST_TIME = XACML_1_0_PREFIX + "subject:request-time" 
     170        SESSION_START_TIME = XACML_1_0_PREFIX + "subject:session-start-time" 
     171        SUBJECT_ID = XACML_1_0_PREFIX + "subject:subject-id" 
     172        SUBJECT_ID_QUALIFIER = XACML_1_0_PREFIX + "subject:subject-id-qualifier" 
     173         
     174    class SubjectCategory(object): 
     175        """XACML Subject Category Identifiers""" 
     176        ACCESS_SUBJECT = XACML_1_0_PREFIX + "subject-category:access-subject" 
     177        CODEBASE = XACML_1_0_PREFIX + "subject-category:codebase" 
     178        INTERMEDIARY_SUBJECT = XACML_1_0_PREFIX + \ 
     179            "subject-category:intermediary-subject" 
     180        RECIPIENT_SUBJECT = XACML_1_0_PREFIX + \ 
     181            "subject-category:recipient-subject" 
     182        REQUESTING_MACHINE = XACML_1_0_PREFIX + \ 
     183            "subject-category:requesting-machine" 
     184         
     185    class Resource(object): 
     186        """XACML Resource Identifiers""" 
     187        RESOURCE_LOCATION = XACML_1_0_PREFIX + "resource:resource-location" 
     188        RESOURCE_ID = XACML_1_0_PREFIX + "resource:resource-id" 
     189        SIMPLE_FILE_NAME = XACML_1_0_PREFIX + "resource:simple-file-name" 
     190         
     191    class Action(object): 
     192        """XACML Action Identifiers""" 
     193        ACTION_ID = XACML_1_0_PREFIX + "action:action-id" 
     194        IMPLIED_ACTION = XACML_1_0_PREFIX + "action:implied-action" 
     195      
     196    class Environment(object): 
     197        """XACML Environment Identifiers""" 
     198        CURRENT_TIME = XACML_1_0_PREFIX + "environment:current-time" 
     199        CURRENT_DATE = XACML_1_0_PREFIX + "environment:current-date" 
     200        CURRENT_DATETIME = XACML_1_0_PREFIX + "environment:current-dateTime" 
     201 
     202 
     203 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/action.py

    r7100 r7365  
    2626    MATCH_TYPE = ActionMatch 
    2727    ELEMENT_LOCAL_NAME = 'Action' 
    28      
     28    ID = "urn:oasis:names:tc:xacml:1.0:action:action-id" 
    2929    __slots__ = () 
    3030     
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/apply.py

    r7351 r7365  
    191191        """  
    192192         
    193         # Marshall inputs 
     193        # Marshal inputs 
    194194        funcInputs = [None]*len(self.expressions) 
    195195 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/attributedesignator.py

    r7351 r7365  
    200200                                           for attrVal in attributeValues  
    201201                                           if attrVal not in attributeValueBag] 
     202                    else: 
     203                        filtAttributeValues = attributeValues 
    202204                         
    203205                    attributeValueBag.extend(filtAttributeValues) 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/environment.py

    r7100 r7365  
    2525    MATCH_TYPE = EnvironmentMatch 
    2626    ELEMENT_LOCAL_NAME = 'Environment' 
    27      
     27    CURRENT_DATE_URI = "urn:oasis:names:tc:xacml:1.0:environment:current-date" 
    2828    __slots__ = () 
    2929     
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/resource.py

    r7100 r7365  
    2525    MATCH_TYPE = ResourceMatch 
    2626    ELEMENT_LOCAL_NAME = 'Resource' 
    27      
     27    ID = "urn:oasis:names:tc:xacml:1.0:resource:resource-id" 
    2828    __slots__ = () 
    2929     
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/rule.py

    r7351 r7365  
    393393            return decision 
    394394         
    395         except Exception: 
     395        except Exception, e: 
    396396            log.error('Error occurred evaluating rule %r, returning ' 
    397397                      'Indeterminate result to caller: %s', 
  • TI12-security/trunk/ndg_xacml/ndg/xacml/core/subject.py

    r7108 r7365  
    2525    MATCH_TYPE = SubjectMatch 
    2626    ELEMENT_LOCAL_NAME = 'Subject' 
    27      
     27    ID = "urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
    2828    __slots__ = () 
    2929     
Note: See TracChangeset for help on using the changeset viewer.