namespace Akenti class AttributeInfo : public AkentiObject

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

Inheritance:


Public Classes

TypeType
Type constants

Public Methods

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

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

Type Type
Type constants. Values of Type are:
"SYSTEM",
"X509",
"AKENTI",
"EXT_AUTH"

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

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

AttributeInfo(bool isAkentiAttribute, const string& attribute, const string& value, const vector<AkentiPrincipal>& aps, const vector<Directory>& dirs = vector<Directory>(), const vector& args = vector())
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

void operator=(const AttributeInfo& ai)
Assignement operator

bool 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.

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

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

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

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

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

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

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

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

Type getType() const
Returns the type

const vector <DistinguishedName> & getCAS() const
Returns the cas.
Throws:
Error if this is not an X509 attribute

const vector <AkentiPrincipal> & getIssuers() const
Returns the issuers, aps.
Throws:
Error if this is not an Akenti attribute

const vector <AkentiPrincipal> & getAuthorities() const
Returns the authorities, aps
Throws:
Error if this is not an EXT_AUTH attribute
Returns:
the issuers of this attribute

const vector <Directory> & getDirectories() const
Returns the directories dirs
Throws:
Error if this is not an AKENTI or EXT_AUTH attribute

bool parseDirs(vector<URL>& urls) const
Returns true if all dirs parse correctly.
Parameters:
urls - out parameter

const vector & getArguments() const
Returns the arguments args.
Throws:
Error if this is not an EXT_AUTH attribute

void writeObject(AkentiOutputStream& drain) const
Writes this object to the AkentiOutputStream.
Parameters:
drain - AkentiOutputStream used to write this object
See Also:
AkentiOutputStream

void readObject(AkentiInputStream& source)
Reads this object from an AkentiInputStream.
Parameters:
source - An AkentiInputStream
See Also:
AkentiInputStream

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

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

string 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 hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de