class AttributeInfo

An AttributeInfo consists mainly of an attribute, a value, and possibly a list of cas/issuers/authorities depending on its type.

Inheritance:


Public Methods

[more] AttributeInfo (const string& attribute = "NO_ATTRIBUTE", const string& value = "NO_VALUE")
Constructs a SYSTEM attribute/value pair.
[more] AttributeInfo (const string& attribute, const string& value, const vector<DistinguishedName>& cas)
Constructs an X509 attribute/value pair.
[more] AttributeInfo (bool isAkentiAttribute, const string& attribute, const string& value, const vector<AkentiPrincipal>& aps, const vector<Directory>& dirs = vector<Directory>(), const vector<string>& args = vector<string>())
Constructs an AKENTI/EXT_AUTH attribute/value pair.
[more]void operator= (const AttributeInfo& ai)
Assignement operator
[more]bool operator== (const AttributeInfo& ai) const
Returns true if this AttributeInfo is equal ai.
[more]bool hasType (Type type) const
Returns true if this AttributeInfo is of AttributeInfo::Type type>/i>
[more]bool hasAttribute (const string& attribute) const
Returns true if this AttributeInfo contains attribute
[more]bool hasValue (const string& value) const
Returns true if this AttributeInfo contains value
[more]bool hasCA (const DistinguishedName& ca) const
Returns true if this AttributeInfo's list of cas contains ca
[more]bool hasIssuer (const AkentiPrincipal& issuer) const
Returns true if this AttributeInfo's list of issuers contains issuer
[more]bool hasAuthority (const AkentiPrincipal& authority) const
Returns true if this AttributeInfo's list of authorities contains authority
[more]const string& getAttribute () const
Returns name of the attribute
[more]const string& getValue () const
Returns the value of the attribute
[more]Type getType () const
Returns the type
[more]const vector<DistinguishedName> & getCAS () const
Returns the cas.
[more]const vector<AkentiPrincipal> & getIssuers () const
Returns the issuers, aps.
[more]const vector<AkentiPrincipal> & getAuthorities () const
Returns the authorities, aps
[more]const vector<Directory> & getDirectories () const
Returns the directories dirs
[more]bool parseDirs (vector<URL>& urls) const
Returns true if all dirs parse correctly.
[more]const vector<string> & getArguments () const
Returns the arguments args.
[more]void writeObject (AkentiOutputStream& drain) const
Writes this object to the AkentiOutputStream.
[more]void readObject (AkentiInputStream& source)
Reads this object from an AkentiInputStream.
[more]void toXML (DOMElement* attrInfo) const
Populates the XML element attrInfo from this AttributeInfo
[more]void fromXML (const DOMElement* attrInfo)
Initializes this AttributeInfo from the XML element attrInfo
[more]string paramString () const
Used for debugging.

Public Members

[more]Type Type
Type constants.


Inherited from AkentiObject:


Documentation

An AttributeInfo consists mainly of an attribute, a value, and possibly a list of cas/issuers/authorities depending on its type.


Note that these attribute/value pairs can be resource-specific or user-specific.

 
  *
  * We have considered four types of attributes,
  *
  *  1) an X509 attribute.
  *
  *     This attribute/value pair puts a constraint on the 
  *     dn of a user accessing a resource.
  *
  *     Example: OU=LBL
  *      
  *     We ask for a non-empty list of the cas that we 
  *     are willing to accept.
  *
  *     For now the cas have to be the immediate cas of
  *     the user accessing the resource.
  *     
  *  2) an AKENTI attribute.
  *
  *     This is an Akenti Certificate based attribute. 
  *     An attribute certificate is fetched and used 
  *     to evaluate this attribute/value pair.
  *
  *     Example:  group=SOME_GROUP
  *
  *     We ask for a non-empty list of issuers
  *     that can issue such attribute certificates.
  *     
  *  3) an EXT_AUTH attribute.
  *
  *     This attribute/value pair is evaluated or attested
  *     by some authority. Akenti Engine may be configured
  *     to evaluate such attribute/value pairs.  
  *
  *     Example: time=10:00  and SomeTimeAuthority
  *
  *     We ask for a non-empty list of authorities that help 
  *     evaluate such attribute/value pairs.
  *       
  *  4) a SYSTEM attribute.
  *
  *     This is the simplest of all attributes. 
  *     Akenti Engine may be configured to evaluate such 
  *     such attribute/value pairs.
  *
  *     Example: DiscSpace=10 MB
  *
  * AttributeInfo {                                                                             
  *    Type type;                                                                               
  *    string name;  
  *    string value; 
  *    vector<DistinguishedName>     cas; // For X509
  *    vector<AkentiPrincipal>       aps; // For AKENTI and EXT_AUTH attribute certs issuers
  *    vector<Directory>            dirs; // For AKENTI  used to look up attribute certs  
  *                                             //     EXT_AUTH used to contact authoriies        
  *    vector<string>                 args; // For EXT_AUTH additional args passed to the authorities
  * } 
  *
  *
  * The writeObject output is: 
  *
  * For a SYSTEM attribute:   
  *     0 attribute value
  *
  * For an X509 attribute: 
  *     1 attribute value caCount ca+
  *
  * For an AKENTI attribute:   
  *     2 attribute value apCount ap+ dirCount dir*
  *
  * For an EXT_AUTH attribute:   
  *     3 attribute value apCount ap+ dirCount dir* argCount arg*
  *
  * Where + means one or more and * means 0 or more
  *
  * 

oType Type
Type constants.

Values of Type are:

"SYSTEM",
"X509",
"AKENTI",
"EXT_AUTH"

o AttributeInfo(const string& attribute = "NO_ATTRIBUTE", const string& value = "NO_VALUE")
Constructs a SYSTEM attribute/value pair.

o AttributeInfo(const string& attribute, const string& value, const vector<DistinguishedName>& cas)
Constructs an X509 attribute/value pair.

Parameters:
attribute - string name of the attribute
value - string value of the attribute
cas - vector a list of acceptable cas
See Also:
DistinguishedName

o AttributeInfo(bool isAkentiAttribute, const string& attribute, const string& value, const vector<AkentiPrincipal>& aps, const vector<Directory>& dirs = vector<Directory>(), const vector<string>& args = vector<string>())
Constructs an AKENTI/EXT_AUTH attribute/value pair.

Parameters:
isAkentiAttribute - name of this attribute
attribute - name of this attribute
value - value of this attribute
auths - a list of stakeholders/authorities
dirs - a list of directories
args - a list of arguments
See Also:
AkentiPrincipal

ovoid operator=(const AttributeInfo& ai)
Assignement operator

obool operator==(const AttributeInfo& ai) const
Returns true if this AttributeInfo is equal ai.

Note here we only compare the types, the attributes and the values. The attribute comparison is not case sensitive.

obool hasType(Type type) const
Returns true if this AttributeInfo is of AttributeInfo::Type type>/i>

obool hasAttribute(const string& attribute) const
Returns true if this AttributeInfo contains attribute

obool hasValue(const string& value) const
Returns true if this AttributeInfo contains value

obool hasCA(const DistinguishedName& ca) const
Returns true if this AttributeInfo's list of cas contains ca

obool hasIssuer(const AkentiPrincipal& issuer) const
Returns true if this AttributeInfo's list of issuers contains issuer

obool hasAuthority(const AkentiPrincipal& authority) const
Returns true if this AttributeInfo's list of authorities contains authority

oconst string& getAttribute() const
Returns name of the attribute

oconst string& getValue() const
Returns the value of the attribute

oType getType() const
Returns the type

oconst vector<DistinguishedName> & getCAS() const
Returns the cas.

Throws:
Error if this is not an X509 attribute

oconst vector<AkentiPrincipal> & getIssuers() const
Returns the issuers, aps.

Throws:
Error if this is not an Akenti attribute

oconst vector<AkentiPrincipal> & getAuthorities() const
Returns the authorities, aps

Throws:
Error if this is not an EXT_AUTH attribute
Returns:
the issuers of this attribute

oconst vector<Directory> & getDirectories() const
Returns the directories dirs

Throws:
Error if this is not an AKENTI or EXT_AUTH attribute

obool parseDirs(vector<URL>& urls) const
Returns true if all dirs parse correctly.

Parameters:
urls - out parameter

oconst vector<string> & getArguments() const
Returns the arguments args.

Throws:
Error if this is not an EXT_AUTH attribute

ovoid writeObject(AkentiOutputStream& drain) const
Writes this object to the AkentiOutputStream.

Parameters:
drain - AkentiOutputStream used to write this object
See Also:
AkentiOutputStream

ovoid readObject(AkentiInputStream& source)
Reads this object from an AkentiInputStream.

Parameters:
source - An AkentiInputStream
See Also:
AkentiInputStream

ovoid toXML(DOMElement* attrInfo) const
Populates the XML element attrInfo from this AttributeInfo

ovoid fromXML(const DOMElement* attrInfo)
Initializes this AttributeInfo from the XML element attrInfo

ostring paramString() const
Used for debugging.

Returns:
a string representation of this attribute


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01
See Also:
AkentiObject
AkentiPrincipal
Directory
DistinguishedName

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.