Public Member Functions | |
AccessControlPolicyMarker (ContentName profileName) | |
AccessControlPolicyMarker (ContentName profileName, ArrayList< ParameterizedName > parameterizedNames, KeyValueSet parameters) | |
void | addParameterizedName (ParameterizedName name) |
ContentName | profileName () |
ArrayList< ParameterizedName > | parameterizedNames () |
KeyValueSet | parameters () |
boolean | emptyParameters () |
void | decode (XMLDecoder decoder) throws ContentDecodingException |
Decode this object as the top-level item in a new XML document, reading it from a network buffer. | |
void | encode (XMLEncoder encoder) throws ContentEncodingException |
Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement. | |
boolean | validate () |
Make sure all of the necessary fields are filled in prior to attempting to encode. | |
long | getElementLabel () |
Allow the encoder/decoder to retrieve the top-level element name programmatically. | |
Static Public Member Functions | |
static void | create (ContentName name, SaveType saveType, CCNHandle handle) throws IOException |
Set up a part of the namespace to be under access control. | |
static AccessControlManager | create (ContentName name, ContentName profileName, ArrayList< ParameterizedName > parameterizedNames, KeyValueSet parameters, SaveType saveType, CCNHandle handle) throws IOException, InvalidKeyException |
Set up a part of the namespace to be under access control. | |
Package Attributes | |
ProfileName | _profileName |
ArrayList< ParameterizedName > | _parameterizedNames = new ArrayList<ParameterizedName>() |
KeyValueSet | _parameters |
Classes | |
class | ProfileName |
class | AccessControlPolicyMarkerObject |
(Questions of how to authenticate these markers is up to the policy and namespace; they are signed as regular CCNx data and authentication policies can be based on signer information.)
This class specifies a policy marker used to indicat that a given namespace is under access control, and to specify what access control scheme should be used to protect and retrieve data in that namespace (questions of whether organizing access control by namespace are left to future work). This object contains a small amount of data -- the access control profile used for the namespace (a string, used to index into a map of classes implementing that policy string), a set of ParameterizedName, defining mappings from strings to names within this namespace of interest to a given access control scheme (e.g. a prefix where access control groups might be defined, etc), and then a KeyValueSet of other, arbitrary parameters, for use by an access control scheme to store additional policy information that it requires.
static void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.create | ( | ContentName | name, | |
SaveType | saveType, | |||
CCNHandle | handle | |||
) | throws IOException [static] |
Set up a part of the namespace to be under access control.
This method writes the root block to a repository. Type-specific initialization (e.g. writing ACLs) needs to be handled by the appropriate subclass.
name | The top of the namespace to be under access control |
IOException | ||
ConfigurationException |
static AccessControlManager org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.create | ( | ContentName | name, | |
ContentName | profileName, | |||
ArrayList< ParameterizedName > | parameterizedNames, | |||
KeyValueSet | parameters, | |||
SaveType | saveType, | |||
CCNHandle | handle | |||
) | throws IOException, InvalidKeyException [static] |
Set up a part of the namespace to be under access control.
This method writes the root block to a repository. This needs to be generic, and can't know about particular access control types. It will make and initialize an access control manager of the appropriate type for this namespace, load it into the search path, and hand it back. Type-specific initialization must be done by the caller.
name | The top of the namespace to be under access control | |
parameterizedNames | ||
parameters | ||
saveType | ||
handle |
IOException | ||
ConfigurationException |
void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.decode | ( | XMLDecoder | decoder | ) | throws ContentDecodingException [virtual] |
Decode this object as the top-level item in a new XML document, reading it from a network buffer.
Reads document start and end. Assumes default encoding.
buf | input stream to read from |
ContentDecodingException | if there is an error decoding the content Decode this object as the top-level item in a new XML document, reading it from a network buffer. Reads document start and end. |
buf | input stream to read from | |
codec | the codec to use; must be recognized by XMLCodecFactory |
ContentDecodingException | if there is an error decoding the content |
decoder | the decoder being used; encapsulates state including the codec being used as well as the input source and current offset |
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.encode | ( | XMLEncoder | encoder | ) | throws ContentEncodingException [virtual] |
Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement.
Writes just the object itself, higher-level processes have handled start and end document if need be. Allows object to be written using the same code whether it is a top-level element written alone, or nested inside another element.
encoder | the encoder being used; encapsulates state including the codec being used as well as the output destination and current offset |
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
boolean org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.validate | ( | ) | [virtual] |
Make sure all of the necessary fields are filled in prior to attempting to encode.
All implementations of encode(XMLEncoder) should call this for their classes prior to encoding.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
long org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.getElementLabel | ( | ) | [virtual] |
Allow the encoder/decoder to retrieve the top-level element name programmatically.
This allows subclasses to rename elements without changing their encoder/decoders.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.