The Attribute Package

of the Transfer And Exchange Layer (txlayer)


Editor: T. Beiler (SRB), J.Brauckmann (SRB)
@version [CVS] @(#) $Id: index.html,v 1.1 1997/07/28 16:34:21 semper Exp $


Introduction

Attibutes are objects used to tag dedicated items to which a SEMPER service can be applied. In addition to its function with items, Attributes are used for tagging services. Attributes can be bundled in sets of attributes, AttributeSet.

At the moment, the following attributes are included in this package directly:

  • Anonymity
  • Authenticity
  • Confidentiality
  • Fairness
  • In addition, other layers may define their own attributes by implementing the interface Attribute.

    At the moment there are the following user attributes:

  • PaymentAttribute.
  • NonRepudiation
  • Attributes and services

    Four services use Attributes up to now: The seccomm block, the context service of the txlayer, the transfer service of the txlayer and the the exchange service of the txlayer

    The same attribute can have different meanings depending on the service being attributed. For example, confidentiality will modify the behavior of the secure communication and of TXContexts, but not the behaviour of TransferTransactions (see 235SR02).

    Attributes and items

    The attribute determines the service options of the service applied to the item. Such an item is called attributable. Technically, this means that the item has to implement the 'Attributable' interface. The Attributable interface provides methods for

  • standard set operations like insertion, deletion, membership tests, and iteration
  • retrieving attributes
  • testing of special restrictions of the item
  • Each attributable item keeps its attributes in an AttributeSet. When implementing the Attributable interface, the attributed item can make restrictions on the combination of the attributes in its wrapping methods by controlling the access to its attribute set.

    The Attributable interface is currently not used in the Transfer- and Exchangelayer.


    Classes and Interfaces

    Interface Attributable

    This Interface is easiest to use if the class implementing it has a variable AttributeSet to map the interface method through to it. The interface has methods

  • to add and delete Attributes from a set of attributes:  addAttribute(_), deleteAttribute(_).
  • to get the attribute set itself: getAttributeSet(); note that this is not a reference to the inside AttributeSet but a copy. This is neccessary for not to go round the influence of an item on the attributes it is tagged with.
  • to check wether the item would accept to add or to delete an attribute.
  • Interface Attribute

    This interface serves as a gathering concept for all the attributes.

    Class AttributeSet

    This is a set with the constraint that it only contains attributes.

    Class SecAttribute

    This is a Subclass of Attribute.

    Subclasses of SecAttribute

    The attributes are, at the moment, the following:

  • Class Anonymity
  • Class Authenticity
  • Class Confidentiality
  • Class Fairness

  • Examples

    To construct a set with the attributes 'Confidentiality' and 'Authenticity', there are several ways:

    1. AttributeSet aSet = new AttibuteSet();
    2. aSet.insert(new Confidentiality(A));
    3. aSet.insert(new Authenticity());

    All this can be done in one step:

    1. AttributeSet aSet = 
           new AttibuteSet(new Confidentiality(), new Authenticity());

    To insert more than six attributes at once there is an array to pack and to pass as one parameter to the constructor.

    An Attribute can be deleted from a set:

    1. AttributeSet aSet = new AttributeSet();
    2. Attribute a = new Authenticity();
    3. aSet.insert(a);
    4. aSet.delete(a);

    There is a method to get the elements of the set for examining them:

    Attributes[] aa = aSet.getArrayOfAttributes();
    for(int i=0; i < aa.length; i++) { aa[i].doSth(_); }

    Perhaps there will one day be an iterator for the Set class.

    Giving attributes to an attributable item works this way:

    Attributable x = new SomeAttributableClass(_);
    x.addAttribute(new Authenticity());
    x.addAttribute(new Fairness());

    If an Attributable denies to add an attribute an exception will be thrown. This will be implemented once later. Deleting an attribute works the in the same manner.