edu.nyu.cs.pdsg.drbac
Class Delegation

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.Delegation
All Implemented Interfaces:
java.io.Serializable

public class Delegation
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
protected  class Delegation.DelegInvalidator
           
protected  class Delegation.DelegValidator
           
 
Field Summary
 AttributeSet attributeSet
           
private  DelegationCallback callback
           
static int id
           
 long invalidAt
           
 Role object
           
private  byte[] signature
           
 Role signer
           
 Role subject
           
 long validAt
           
 
Constructor Summary
protected Delegation(Role _subject, Role _object, AttributeSet _attributes, Role _signer)
          Instantiate a Delegation.
protected Delegation(Role _subject, Role _object, AttributeSet _attributes, Role _signer, long _validAt, long _invalidAt)
          Instantiate a Delegation.
 
Method Summary
 java.util.ArrayList assignRoles()
          Get the roles needed to assign this delegation
 byte[] checksum()
          Generate a checksum of data contained within
 java.net.InetAddress getHomeIP()
           
 int getHomePort()
           
 int getId()
           
protected  void invalidate(DelegationWrapper delegWrapper)
           
 boolean isThirdParty()
          DUMMY FUNCTION -- implement me
 void setCallback(DelegationCallback _callback)
          Deprecated
 void setId(int id)
          temp dummy method.
protected  void setUpInvalidator(DelegationWrapper delegWrapper)
           
protected  void setUpValidator(DelegationXML delegXML)
           
 void sign(byte[] _signature)
          Sign this delegation (based on checksum()).
protected  byte[] signature()
           
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 java.lang.String toTestString()
           
 java.lang.String toTitleString()
           
protected  void validate(DelegationXML delegXML)
           
 boolean verify()
          verify the validity of this delegation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributeSet

public final AttributeSet attributeSet

subject

public final Role subject

object

public final Role object

signer

public final Role signer

validAt

public final long validAt

invalidAt

public final long invalidAt

signature

private byte[] signature

callback

private DelegationCallback callback

id

public static int id
Constructor Detail

Delegation

protected Delegation(Role _subject,
                     Role _object,
                     AttributeSet _attributes,
                     Role _signer)
Instantiate a Delegation. Outside use deprecated. Use RoleMaster.delegate() instead

Parameters:
_subject - The recipient of the rights
_object - The source of the rights
_attributes - The attribute modifiers of this delegation
_signer - The giver of the rights

Delegation

protected Delegation(Role _subject,
                     Role _object,
                     AttributeSet _attributes,
                     Role _signer,
                     long _validAt,
                     long _invalidAt)
Instantiate a Delegation. Outside use deprecated. Use RoleMaster.delegate() instead

Parameters:
_subject - The recipient of the rights
_object - The source of the rights
_attributes - The attribute modifiers of this delegation
_signer - The giver of the rights
_validAt - The time the credential becomes valid (or -1 to state -inf)
_invalidAt - The time the credential becomes invalid (or -1 to state inf)
Method Detail

setId

public void setId(int id)
temp dummy method. Sets an id that can be referenced by remote wallets to tell them which delegation they're subscribing to. Will be changed when we decide how we want to encode and identify delegations.


setCallback

public void setCallback(DelegationCallback _callback)
Deprecated


checksum

public byte[] checksum()
Generate a checksum of data contained within

Returns:
the checksum

toString

public java.lang.String toString()
Returns:
a human readable representation of this delegation

toShortString

public java.lang.String toShortString()
Returns:
a short human readable representation of this delegation

toTitleString

public java.lang.String toTitleString()
Returns:
a human readable representation of this delegation suitable for use in a title

toTestString

public java.lang.String toTestString()
Returns:
the entire contents of the delegation in string form

sign

public void sign(byte[] _signature)
Sign this delegation (based on checksum()). A delegation must be signed to be valid

Parameters:
_signature - the signature to apply to this delegation

signature

protected byte[] signature()

assignRoles

public java.util.ArrayList assignRoles()
Get the roles needed to assign this delegation

Returns:
all of the roles that the issuer must need in order to assign this delegation

getHomeIP

public java.net.InetAddress getHomeIP()
Returns:
the address of the delegation's home server

getHomePort

public int getHomePort()
Returns:
the port of the delegation's home server

getId

public int getId()
Returns:
the id of the delegation

isThirdParty

public boolean isThirdParty()
DUMMY FUNCTION -- implement me


verify

public boolean verify()
verify the validity of this delegation

Returns:
true if this delegation is valid

invalidate

protected void invalidate(DelegationWrapper delegWrapper)

validate

protected void validate(DelegationXML delegXML)

setUpInvalidator

protected void setUpInvalidator(DelegationWrapper delegWrapper)

setUpValidator

protected void setUpValidator(DelegationXML delegXML)


Copyright (c) 2002-2003 New York University RLAB