edu.nyu.cs.pdsg.drbac
Class RoleMaster

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

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

See Also:
Serialized Form

Field Summary
private  java.security.PrivateKey privateKey
           
 Role signerRole
           
 
Constructor Summary
RoleMaster(Role _signerRole, java.security.PrivateKey _privateKey)
          Standard Initializer
RoleMaster(java.lang.String name, java.security.KeyPair keyPair, DiscoveryTag searchTag)
          Standard Initializer
 
Method Summary
 Delegation delegate(Role subject, Role object, AttributeSet withs)
          Generate and sign a delegation
 Delegation delegate(Role subject, Role object, AttributeSet withs, long valid, long invalid)
          Generate and sign a delegation
 byte[] sign(byte[] data)
          Use this role's private key to sign a byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

signerRole

public final Role signerRole

privateKey

private java.security.PrivateKey privateKey
Constructor Detail

RoleMaster

public RoleMaster(java.lang.String name,
                  java.security.KeyPair keyPair,
                  DiscoveryTag searchTag)
Standard Initializer

Parameters:
name - the name of the role in question
keyPair - the keys belonging to the role in question
searchTag - information about this role's home server

RoleMaster

public RoleMaster(Role _signerRole,
                  java.security.PrivateKey _privateKey)
Standard Initializer

Parameters:
_signerRole - the identity this RoleMaster controls
_privateKey - the key of this RoleMaster
Method Detail

delegate

public Delegation delegate(Role subject,
                           Role object,
                           AttributeSet withs)
                    throws java.security.SignatureException,
                           java.security.InvalidKeyException
Generate and sign a delegation

Parameters:
subject - the delegation's subject
object - the delegation's object
withs - the delegations attributes
Throws:
java.security.SignatureException - thrown if there is a problem signing
java.security.InvalidKeyException - thrown if the RoleMaster's key is invalid

delegate

public Delegation delegate(Role subject,
                           Role object,
                           AttributeSet withs,
                           long valid,
                           long invalid)
                    throws java.security.SignatureException,
                           java.security.InvalidKeyException
Generate and sign a delegation

Parameters:
subject - the delegation's subject
object - the delegation's object
withs - the delegations attributes
Throws:
java.security.SignatureException - thrown if there is a problem signing
java.security.InvalidKeyException - thrown if the RoleMaster's key is invalid

sign

public byte[] sign(byte[] data)
            throws java.security.SignatureException,
                   java.security.InvalidKeyException
Use this role's private key to sign a byte array

Parameters:
data - the data to sign
Returns:
the signature data
Throws:
java.security.SignatureException - thrown if there is a problem signing
java.security.InvalidKeyException - thrown if the RoleMaster's key is invalid


Copyright (c) 2002-2003 New York University RLAB