The third article on the plug-in points will be based on Request data validators.
The relevant plugin point for my favorite plug-in will be : oracle.iam.request.plugins.RequestDataValidator
Often when submitting a request in APS , there can be number of rules, conditions that the user may have to abide by. This rules can be process related, it can also be very well defined in the target in DB layers, as well as validations in the APIs exposed.
OIM being middleware are not by default aware of all these rules, and it's important that we impose these rules exclusively, and it executes BEFORE an user submits a request.
This is where the request data validator comes in to the picture, this validator plug-ins needs to be registered against each Obj form using the plug-in registration utility. The plugin.xml will look like -
For the coding part of it , the basic approach will be -
1. creating a class which implements RequestDataValidator
2. overwriting the method "validate(RequestData reqData)" which throws a InvalidRequestDataException
3. finding out from the RequestData who are the Beneficaries are, and what the BeneficaryEntities are.
4. Hereafter , we can have two blocks to check the conditions , for both the operation provisioning / modifying -
Now, the METHOD_NAME_WHICH_VALIDATES_THE_CONDITION(benEntity, benUser) functionality is limited only to our imagination ;) and the business requirement in question.
A couple of examples can be -
Method for checking an eMail domain provided by the user in the form :
Method for checking if an User already has an account provided for the same application instance :
Thanks for reading !
The relevant plugin point for my favorite plug-in will be : oracle.iam.request.plugins.RequestDataValidator
Often when submitting a request in APS , there can be number of rules, conditions that the user may have to abide by. This rules can be process related, it can also be very well defined in the target in DB layers, as well as validations in the APIs exposed.
OIM being middleware are not by default aware of all these rules, and it's important that we impose these rules exclusively, and it executes BEFORE an user submits a request.
This is where the request data validator comes in to the picture, this validator plug-ins needs to be registered against each Obj form using the plug-in registration utility. The plugin.xml will look like -
For the coding part of it , the basic approach will be -
1. creating a class which implements RequestDataValidator
2. overwriting the method "validate(RequestData reqData)" which throws a InvalidRequestDataException
3. finding out from the RequestData who are the Beneficaries are, and what the BeneficaryEntities are.
4. Hereafter , we can have two blocks to check the conditions , for both the operation provisioning / modifying -
Now, the METHOD_NAME_WHICH_VALIDATES_THE_CONDITION(benEntity, benUser) functionality is limited only to our imagination ;) and the business requirement in question.
A couple of examples can be -
Method for checking an eMail domain provided by the user in the form :
Method for checking if an User already has an account provided for the same application instance :
Thanks for reading !
No comments:
Post a Comment