|
Oracle Application Server Certificate Authority Java API Reference 10g (9.0.4) B12079-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMESAll Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface that needs to be implemented by custom plugins. The class that implements this interface should be placed in a jar file under the directory ORACLE_HOME/oca/policy. The class that implements the OCACustomPolicyPluin plugin interface needs to be specified as the class name when adding the custom plugin in the Configuration Management pages. Please refer to the Administrator's guide for more details about a custom plugin.
The following is an example of how a custom plugin could be implemented:
public class validCountryPolicy implements OCACustomPolicyPlugin
{
//Implementing the enforce method that handles the functionality checked by this plugin.
public boolean enforce(OCAPolicyRequest policyRequest)
{
String pluginname="validCountryPolicy";
boolean pluginResult = true;
if (policyRequest.getCountry() != "US")
{
if (!checkIfValidCountry(policyRequest.getCountry()))
{
pluginResult = false;
//Setting error for this plugin into OCAPolicyResult. This error reflects in the error rendered to the user.
policyRequest.setError(pluginName, OCMPolicyConstants.POLICY_ERROR, "Invalid country selected in DN.");
}
}
return pluginResult;
}
private boolean checkIfValidCountry(String countrySelected)
{
if (countrySelected.equals("XX"))
return false;
return true;
}
}
If the above example is registered as a custom plugin that should be applied to certificate requests during enrollment, then this rule is applied to each enrollment request made to the certificate authority. The above plugin fails if the DN in the certificate request contains XX as the country.
Method Summary | |
boolean | enforce(oracle.security.oca.policy.OCAPolicyRequest policyRequest) The enforce method will be implemented by all custom plugins. |
Method Detail |
public boolean enforce(oracle.security.oca.policy.OCAPolicyRequest policyRequest)
|
Oracle Application Server Certificate Authority Java API Reference 10g (9.0.4) B12079-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMESAll Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |