BASH functions to perform SOAP calls to RBPM

2 Likes
over 6 years ago

Shell script with a set of bash functions that build the SOAP requests to perform common tasks using RBPM 4.5 role SOAP endpoints. To use download the script from https://www.netiq.com/communities/cool-solutions/wp-content/uploads/sites/2/2015/05/rbpm_soap_role.sh_.gz, gunzip it then source rbpm_soap_role.sh it in a command terminal or other script and call the functions with the parameters. All functions provide a basic usage message if called without parameters.

Sample usage:

labuser@lab01:~/1_code/soap_bash> . rbpm_soap_role.sh
labuser@lab01:~/1_code/soap_bash> getRoleCategories "rbpmidm" "BoringPassword" "http://10.123.12.246:8180/IDMProv" "results.txt"
labuser@lab01:~/1_code/soap_bash> cat results.txt
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><SOAP-ENV:Body><ns1:getRoleCategoriesResponse xmlns="http://www.novell.com/role/service" xmlns:ns1="http://www.novell.com/role/service"><result><category><categoryKey>aon</categoryKey><categoryLabel>aon</categoryLabel></category><category><categoryKey>system</categoryKey><categoryLabel>System Roles</categoryLabel></category><category><categoryKey>default</categoryKey><categoryLabel>Default</categoryLabel></category></result></ns1:getRoleCategoriesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
labuser@lab01:~/1_code/soap_bash>
labuser@lab01:~/1_code/soap_bash>getRoleCategories

Function Usage:
getRoleCategories username password rbpm_url output_file
rbpm_url should be in the format:
protocol://server:port/servicename
for example:
https://rbpm.lab.novell.com:8543/IDMProv
labuser@lab01:~/1_code/soap_bash>


The script implements the following functions:

rbpm_soap_role_getVersion
rbpm_soap_role_connectiontest
createResourceAssociations
createRole
deleteResourceAssociations
getAssignedIdentities
getConfigPropertyRequest
getConfigurationRequest
getContainerRequest
getExceptionsListRequest
getGroupRequest
getIdentitiesinViolation
getIdentityRoleConflictsRequest
getResourceAssociation
getResourceAssociations
getRole
getRoleAssignmentRequestStatus
getRoleAssignmentRequestStatusByDN
getRoleAssignmentRequestStatusByIdentityType
getRoleAssignmentTypeInfo
getRoleCategories
getRoleConflicts
getRoleLevels
getRoleLocalizedStrings
getRolesInfo
getRolesInfoByCategory
getRolesInfoByLevel
getTargetSourceConflicts
getUser
getVersion
isUserInRole
removeRoles
requestRolesAssignment
setRoleLocalizedStrings

Tags:

Labels:

Collateral
How To-Best Practice
Comment List
Anonymous
  • I have written a series of articles explaining how to extend this very very useful and cool tool.  You can read about them here:

     

    /cyberres/idm/w/identity_mgr_tips/3238/adding-new-functions-to-the-ua-bash-extension---part-1
    /cyberres/idm/w/identity_mgr_tips/3716/adding-new-functions-to-the-ua-bash-extension---part-2
    /cyberres/idm/w/identity_mgr_tips/4456/adding-new-functions-to-the-ua-bash-extension-part-3
    /cyberres/idm/w/identity_mgr_tips/4583/enhancing-the-ua-bash-extension-for-createrole
    /cyberres/idm/w/identity_mgr_tips/4238/enhancing-the-ua-bash-extension-for-the-provisioning-endpoint---terminate---part-1
    /cyberres/idm/w/identity_mgr_tips/3231/enhancing-the-ua-bash-extension-for-resources
    /cyberres/idm/w/identity_mgr_tips/4832/enhancing-the-ua-bash-extension-for-modifyresource

  • Fernando, I have some additions to this script. Do you have it somewhere I could submit updates towards?
Related Discussions
Recommended