in src/qpid/acl/AclValidator.cpp [435:534]
void AclValidator::registerProperties(
const std::string& source,
const std::string& description,
Action action,
ObjectType object,
const std::string& properties) {
if (!allowedProperties[action][object].get()) {
boost::shared_ptr<std::set<Property> > t1(new std::set<Property>());
allowedProperties[action][object] = t1;
boost::shared_ptr<std::vector<AclData::Rule> > t2(new std::vector<AclData::Rule>());
allowedSpecProperties[action][object] = t2;
}
std::vector<std::string> props = split(properties, " ");
AclData::specPropertyMap spm;
for (size_t i=0; i<props.size(); i++) {
Property prop = AclHelper::getProperty(props[i]);
allowedProperties[action][object]->insert(prop);
// Given that the broker will be calling with this property,
// determine what user rule settings are allowed.
switch (prop) {
// Cases where broker and Acl file share property name and meaning
case PROP_NAME:
spm[SPECPROP_NAME]="";
break;
case PROP_DURABLE:
spm[SPECPROP_DURABLE]="";
break;
case PROP_OWNER:
spm[SPECPROP_OWNER]="";
break;
case PROP_ROUTINGKEY:
spm[SPECPROP_ROUTINGKEY]="";
break;
case PROP_AUTODELETE:
spm[SPECPROP_AUTODELETE]="";
break;
case PROP_EXCLUSIVE:
spm[SPECPROP_EXCLUSIVE]="";
break;
case PROP_TYPE:
spm[SPECPROP_TYPE]="";
break;
case PROP_ALTERNATE:
spm[SPECPROP_ALTERNATE]="";
break;
case PROP_QUEUENAME:
spm[SPECPROP_QUEUENAME]="";
break;
case PROP_EXCHANGENAME:
spm[SPECPROP_EXCHANGENAME]="";
break;
case PROP_SCHEMAPACKAGE:
spm[SPECPROP_SCHEMAPACKAGE]="";
break;
case PROP_SCHEMACLASS:
spm[SPECPROP_SCHEMACLASS]="";
break;
case PROP_POLICYTYPE:
spm[SPECPROP_POLICYTYPE]="";
break;
case PROP_PAGING:
spm[SPECPROP_PAGING]="";
break;
case PROP_HOST:
spm[SPECPROP_HOST]="";
break;
// Cases where broker supplies a property but Acl has upper/lower limit for it
case PROP_MAXPAGES:
spm[SPECPROP_MAXPAGESLOWERLIMIT]="";
spm[SPECPROP_MAXPAGESUPPERLIMIT]="";
break;
case PROP_MAXPAGEFACTOR:
spm[SPECPROP_MAXPAGEFACTORLOWERLIMIT]="";
spm[SPECPROP_MAXPAGEFACTORUPPERLIMIT]="";
break;
case PROP_MAXQUEUESIZE:
spm[SPECPROP_MAXQUEUESIZELOWERLIMIT]="";
spm[SPECPROP_MAXQUEUESIZEUPPERLIMIT]="";
break;
case PROP_MAXQUEUECOUNT:
spm[SPECPROP_MAXQUEUECOUNTLOWERLIMIT]="";
spm[SPECPROP_MAXQUEUECOUNTUPPERLIMIT]="";
break;
case PROP_MAXFILESIZE:
spm[SPECPROP_MAXFILESIZELOWERLIMIT]="";
spm[SPECPROP_MAXFILESIZEUPPERLIMIT]="";
break;
case PROP_MAXFILECOUNT:
spm[SPECPROP_MAXFILECOUNTLOWERLIMIT]="";
spm[SPECPROP_MAXFILECOUNTUPPERLIMIT]="";
break;
default:
throw Exception( "acl::RegisterProperties no case for property: " +
AclHelper::getPropertyStr(prop) );
}
}
AclData::Rule someProps(propertyIndex, acl::ALLOW, spm, source, description);
propertyIndex++;
allowedSpecProperties[action][object]->push_back(someProps);
}