org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory Class Reference

This structure is used for representing both node keys and group (private) keys. More...

List of all members.

Public Member Functions

 PrincipalKeyDirectory (GroupAccessControlManager manager, ContentName directoryName, CCNHandle handle) throws IOException
 Directory name should be versioned, else we pull the latest version; start enumeration.
 PrincipalKeyDirectory (GroupAccessControlManager manager, ContentName directoryName, boolean enumerate, CCNHandle handle) throws IOException
 Directory name should be versioned, else we pull the latest version.
HashMap< String, PrincipalInfogetCopyOfPrincipals () throws ContentNotReadyException
 Return a copy to avoid synchronization problems.
WrappedKeyObject addWrappedKeyBlock (Key secretKeyToWrap, ContentName publicKeyName, PublicKey publicKey) throws ContentEncodingException, IOException, InvalidKeyException, VersionMissingException
 Store an additional link object pointing to the wrapped key object in the KeyDirectory.

Protected Member Functions

void processNewChild (byte[] wkChildName)
 Called each time new data comes in, gets to parse it and load processed arrays.
void addPrincipal (byte[] wkChildName)
 Adds a principal name.
KeyDirectory factory (ContentName name) throws IOException
WrappedKeyObject getWrappedKeyForPrincipal (String principalName) throws ContentNotReadyException, ContentDecodingException, IOException
 Returns the wrapped key object corresponding to a specified principal.
ContentName getWrappedKeyNameForPrincipal (PrincipalInfo pi)
 Returns the wrapped key name for a specified principal.
ContentName getWrappedKeyNameForPrincipal (ContentName principalPublicKeyName) throws VersionMissingException, ContentEncodingException
 Returns the wrapped key name for a principal specified by the name of its public key.
Key findUnwrappedKey (byte[] expectedKeyID) throws IOException, ContentNotReadyException, InvalidKeyException, ContentDecodingException, NoSuchAlgorithmException
Key unwrapKeyViaKnownGroupMembership () throws InvalidKeyException, ContentDecodingException, IOException, NoSuchAlgorithmException
Key unwrapKeyViaNotKnownGroupMembership () throws InvalidKeyException, ContentDecodingException, IOException, NoSuchAlgorithmException
Key unwrapKeyForPrincipal (String principal, Key unwrappingKey) throws InvalidKeyException, ContentNotReadyException, ContentDecodingException, ContentGoneException, IOException, NoSuchAlgorithmException
 Unwrap the key wrapped under a specified principal, with a specified unwrapping key.

Package Attributes

GroupAccessControlManager _manager
HashMap< String, PrincipalInfo_principals = new HashMap<String, PrincipalInfo>()
 Maps the friendly names of principals (typically groups) to their information.
final ReadWriteLock _principalsLock = new ReentrantReadWriteLock()

Detailed Description

This structure is used for representing both node keys and group (private) keys.

We encapsulate functionality to walk such a directory and find our target key here.

We store links providing additional information about how to retrieve this key -- e.g. a link from a given group or principal name to a key ID-named block, in case a group member does not know an earlier version of their group public key. Or links to keys this key supercedes or precedes.


Constructor & Destructor Documentation

org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.PrincipalKeyDirectory ( GroupAccessControlManager  manager,
ContentName  directoryName,
CCNHandle  handle 
) throws IOException

Directory name should be versioned, else we pull the latest version; start enumeration.

Parameters:
manager the access control manager.
directoryName the root of the KeyDirectory.
handle 
Exceptions:
IOException 
org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.PrincipalKeyDirectory ( GroupAccessControlManager  manager,
ContentName  directoryName,
boolean  enumerate,
CCNHandle  handle 
) throws IOException

Directory name should be versioned, else we pull the latest version.

Parameters:
manager the access control manager - must not be null
directoryName the root of the KeyDirectory.
handle 
Exceptions:
IOException 

Member Function Documentation

void org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.addPrincipal ( byte[]  wkChildName  )  [protected]

Adds a principal name.

Parameters:
wkChildName the principal name
WrappedKeyObject org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.addWrappedKeyBlock ( Key  secretKeyToWrap,
ContentName  publicKeyName,
PublicKey  publicKey 
) throws ContentEncodingException, IOException, InvalidKeyException, VersionMissingException

Store an additional link object pointing to the wrapped key object in the KeyDirectory.

The link object is named with the Principal's name to allow searching the KeyDirectory by Principal name rather than KeyID.

Reimplemented from org.ccnx.ccn.io.content.KeyDirectory.

HashMap<String, PrincipalInfo> org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.getCopyOfPrincipals (  )  throws ContentNotReadyException

Return a copy to avoid synchronization problems.

Exceptions:
ContentNotReadyException 
WrappedKeyObject org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.getWrappedKeyForPrincipal ( String  principalName  )  throws ContentNotReadyException, ContentDecodingException, IOException [protected]

Returns the wrapped key object corresponding to a specified principal.

Parameters:
principalName the principal.
Returns:
the corresponding wrapped key object.
Exceptions:
IOException 
ContentNotReadyException 
ContentDecodingException 
ContentName org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.getWrappedKeyNameForPrincipal ( ContentName  principalPublicKeyName  )  throws VersionMissingException, ContentEncodingException [protected]

Returns the wrapped key name for a principal specified by the name of its public key.

Parameters:
principalPublicKeyName the name of the public key of the principal.
Returns:
the corresponding wrapped key name.
Exceptions:
VersionMissingException 
ContentEncodingException 
ContentName org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.getWrappedKeyNameForPrincipal ( PrincipalInfo  pi  )  [protected]

Returns the wrapped key name for a specified principal.

Parameters:
isGroup whether the principal is a group.
principalName the name of the principal.
principalVersion the version of the principal.
Returns:
the corresponding wrapped key name.
Key org.ccnx.ccn.profiles.security.access.group.PrincipalKeyDirectory.unwrapKeyForPrincipal ( String  principal,
Key  unwrappingKey 
) throws InvalidKeyException, ContentNotReadyException, ContentDecodingException, ContentGoneException, IOException, NoSuchAlgorithmException [protected]

Unwrap the key wrapped under a specified principal, with a specified unwrapping key.

Parameters:
principal 
unwrappingKey 
Returns:
Exceptions:
ContentGoneException 
ContentNotReadyException 
ContentDecodingException 
InvalidKeyException 
IOException 
NoSuchAlgorithmException 

The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:49 2011 for Content-Centric Networking in Java by  doxygen 1.6.3