Cybersecurity
DevOps Cloud
IT Operations Cloud
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.novell.com/resource/service">
<soapenv:Header/>
<soapenv:Body>
<ser:createResourceRequest>
<!--Optional:-->
<ser:resource>
<ser:active>?</ser:active>
<ser:allowOverride>?</ser:allowOverride>
<ser:allowedMulty>?</ser:allowedMulty>
<ser:description>?</ser:description>
<ser:entitlementRef>
<!--Zero or more repetitions:-->
<ser:nrfentitlementref>
<ser:entitlementCorrelationId>?</ser:entitlementCorrelationId>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:entitlementParameters>?</ser:entitlementParameters>
<ser:src>?</ser:src>
</ser:nrfentitlementref>
</ser:entitlementRef>
<ser:entityKey>?</ser:entityKey>
<ser:grantApprovers>
<!--Zero or more repetitions:-->
<ser:approver>
<ser:approverDN>?</ser:approverDN>
<ser:sequence>?</ser:sequence>
</ser:approver>
</ser:grantApprovers>
<ser:grantQuorum>?</ser:grantQuorum>
<ser:grantRequestDef>?</ser:grantRequestDef>
<ser:name>?</ser:name>
<ser:owners>
<!--Zero or more repetitions:-->
<ser:dnstring>
<ser:dn>?</ser:dn>
</ser:dnstring>
</ser:owners>
<ser:parameters>
<!--Zero or more repetitions:-->
<ser:resourceparameter>
<ser:codemapKey>?</ser:codemapKey>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:hiddenFlag>?</ser:hiddenFlag>
<ser:key>?</ser:key>
<ser:paramLabel>?</ser:paramLabel>
<ser:staticFlag>?</ser:staticFlag>
<ser:type>?</ser:type>
<ser:value>?</ser:value>
<ser:valueLabel>?</ser:valueLabel>
</ser:resourceparameter>
</ser:parameters>
<ser:resourceCategoryKeys>
<!--Zero or more repetitions:-->
<ser:categorykey>
<ser:categoryKey>?</ser:categoryKey>
</ser:categorykey>
</ser:resourceCategoryKeys>
<ser:revokeApprovers>
<!--Zero or more repetitions:-->
<ser:approver>
<ser:approverDN>?</ser:approverDN>
<ser:sequence>?</ser:sequence>
</ser:approver>
</ser:revokeApprovers>
<ser:revokeQuorum>?</ser:revokeQuorum>
<ser:revokeRequestDef>?</ser:revokeRequestDef>
</ser:resource>
</ser:createResourceRequest>
</soapenv:Body>
</soapenv:Envelope>
### Function: createRole
# Usage:
# createRole $username $password $rbpm_url $output_file $rolename $description $rolelevel $category $correlation_id
# if the $correlation_id is omitted, will call createRoleRequest, otherwise will call createRoleAidRequest
# if the category is omitted with use the value "default"
# Order of parameters is important, it is not possible to use the correlation_id and skip category
#
createRole()
{
USAGE="Function Usage:
createRole username password rbpm_url output_file rolename description rolelevel category correlation_id
if the correlation_id is omitted, will call createRoleRequest, otherwise will call createRoleAidRequest
if the category is omitted with use the value "default"
Order of parameters is important, it is not possible to provide a correlation_id and skip category at the same time
rbpm_url should be in the format:
protocol://server:port/servicename
for example:
https://rbpm.lab.novell.com:8543/IDMProv";
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
dbgparams=$#
dbgparam=1
while [ "$dbgparam" -le "$dbgparams" ]
do
echo -n "Parameter "
echo -n \$$dbgparam
echo -n " = "
eval echo \$$dbgparam
(( dbgparam ))
done
fi
# Initial Parameters check
if | -z "$2" || -z "$3" || -z "$4" || -z "$5" || -z "$6" || -z "$7"
then
echo "$USAGE"
return 1
fi
if -z "$8"
then
CAT=default
else
CAT="$8"
fi
if -z "$9"
then
NOCID=true
else
NOCID=false
CID="$9"
fi
if "X$2" = "X-W"
then
read -sp "Please enter the password for user $1: " SENHA
echo
else
SENHA=$2
fi
# Setup for the SOAP call
URL="${3}/role/service"
if "$NOCID" = "true"
then
ACTION="SOAPAction: 'http://www.novell.com/role/service/createRole'"
SOAPCALL=createRoleRequest
else
ACTION="SOAPAction: 'http://www.novell.com/role/service/createRoleAid'"
SOAPCALL=createRoleAidRequest
fi
CTYPE='Content-Type: text/xml;charset=UTF-8'
# Build SOAP XML envelope and call to be issued
POST="<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ser='http://www.novell.com/role/service'>\
<soapenv:Header/>\
<soapenv:Body>\
<ser:${SOAPCALL}>\
<ser:role>\
<ser:approvers/>\
<ser:container/>\
<ser:description>${6}</ser:description>\
<ser:entityKey/>\
<ser:name>${5}</ser:name>\
<ser:owners/>\
<ser:quorum/>\
<ser:requestDef/>\
<ser:revokeRequestDef/>\
<ser:roleCategoryKeys>\
<ser:categorykey>\
<ser:categoryKey>${CAT}</ser:categoryKey>\
</ser:categorykey>\
</ser:roleCategoryKeys>\
<ser:roleLevel>${7}</ser:roleLevel>\
<ser:systemRole>false</ser:systemRole>\
</ser:role>"
if "$NOCID" = "false"
then
POST="${POST}<ser:correlationId>${CID}</ser:correlationId>"
fi
POST="${POST}</ser:${SOAPCALL}>\
</soapenv:Body>\
</soapenv:Envelope>"
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
echo
echo POST data:
echo $POST
echo
fi
# Issue the request
curl $_CURL_OPTIONS -k -u "$1:$SENHA" -H "$CTYPE" -H "$ACTION" -d "$POST" "$URL" -o "$4"
}
### Function: createResource
# Usage:
# createResource $username $password $rbpm_url $output_file $resourcename $description $allowoverride $allowedMulty $entitlementDN $entitlementParam $category $correlation_id
# if the $correlation_id is omitted, will call createresourceRequest, otherwise will call createresourceAidRequest
# allowoverride is a boolean (true/false)
# allowedMulty is a boolean (true/false)
# entitlementDN should be in LDAP format
# entitlementParam should be in JSON format if your entitlement is idm4, and a string if it is a legacy entitlement.
#
createResource()
{
createResource username password rbpm_url output_file resourcename description allowoverride allowedMulty entitlementDN entitlementParam category correlation_id
if the correlation_id is omitted, will call createresourceRequest, otherwise will call createresourceAidRequest
allowoverride is a boolean (true/false)
allowedMulty is a boolean (true/false)
entitlementDN should be in LDAP format
entitlementParam should be in JSON format if your entitlement is idm4, and a string if it is a legacy entitlement.
https://rbpm.lab.novell.com:8543/IDMProv";
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
# Initial Parameters check
if | -z "$2" || -z "$3" || -z "$4" || -z "$5" || -z "$6" || -z "$7"
then
echo "$USAGE"
return 1
fi
# Initial Parameters check
if | -z "$2" || -z "$3" || -z "$4" || -z "$5" || -z "$6" || -z "$7" || -z "$8" || -z "$9" || -z "$10" || -z "$11"
then
echo "$USAGE"
return 1
fi
if -z "$8"
then
CAT=default
else
CAT="$8"
fi
if -z "$9"
then
NOCID=true
else
NOCID=false
CID="$9"
fi
if -z "$10"
then
CAT=default
else
CAT="$10"
fi
if -z "$11"
then
NOCID=true
else
NOCID=false
CID="$11"
fi
# Setup for the SOAP call
URL="${3}/role/service"
# Setup for the SOAP call
URL="${3}/resource/service"
if "$NOCID" = "true"
then
ACTION="SOAPAction: 'http://www.novell.com/role/service/createRole'"
SOAPCALL=createRoleRequest
else
ACTION="SOAPAction: 'http://www.novell.com/role/service/createRoleAid'"
SOAPCALL=createRoleAidRequest
fi
if "$NOCID" = "true"
then
ACTION="SOAPAction: 'http://www.novell.com/resource/service/createResource'"
SOAPCALL=createResourceRequest
else
ACTION="SOAPAction: 'http://www.novell.com/resource/service/createResourceAid'"
SOAPCALL=createResourceAidRequest
fi
CTYPE='Content-Type: text/xml;charset=UTF-8'
# Build SOAP XML envelope and call to be issued
POST="<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ser='http://www.novell.com/role/service'>\
<soapenv:Header/>\
<soapenv:Body>\
<ser:${SOAPCALL}>\
<ser:role>\
<ser:approvers/>\
<ser:container/>\
<ser:description>${6}</ser:description>\
<ser:entityKey/>\
<ser:name>${5}</ser:name>\
<ser:owners/>\
<ser:quorum/>\
<ser:requestDef/>\
<ser:revokeRequestDef/>\
<ser:roleCategoryKeys>\
<ser:categorykey>\
<ser:categoryKey>${CAT}</ser:categoryKey>\
</ser:categorykey>\
</ser:roleCategoryKeys>\
<ser:roleLevel>${7}</ser:roleLevel>\
<ser:systemRole>false</ser:systemRole>\
</ser:role>"
if "$NOCID" = "false"
then
POST="${POST}<ser:correlationId>${CID}</ser:correlationId>"
fi
POST="${POST}</ser:${SOAPCALL}>\
</soapenv:Body>\
</soapenv:Envelope>"
# Build SOAP XML envelope and call to be issued
POST="<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ser='http://www.novell.com/resource/service'>\
<soapenv:Header/>\
<soapenv:Body>\
<ser:${SOAPCALL}>\
<ser:resource>\
<ser:active>true</ser:active>\
<ser:allowOverride>${7}</ser:allowOverride>\
<ser:allowedMulty>${8}<ser:allowedMulty>\
<ser:description>${6}</ser:description>\
<ser:entitlementRef>\
<ser:nrfentitlementref>\
<ser:entitlementCorrelationId/>\
<ser:entitlementDn>${9}</ser:entitlementDn>\
<ser:entitlementParameters>${10}</ser:entitlementParameters>\
<ser:src>UA</ser:src>\
</ser:nrfentitlementref>\
</ser:entitlementRef>\
<ser:entityKey></ser:entityKey>\
<ser:grantApprovers/>\
<ser:grantQuorum></ser:grantQuorum>\
<ser:grantRequestDef></ser:grantRequestDef>\
<ser:name>${5}</ser:name>\
<ser:owners/>\
<ser:parameters/>\
<ser:resourceCategoryKeys>\
<ser:categorykey>\
<ser:categoryKey>${11}</ser:categoryKey>\
</ser:categorykey>\
</ser:resourceCategoryKeys>\
<ser:revokeApprovers/>\
<ser:revokeQuorum/>\
<ser:revokeRequestDef/>\
</ser:resource>"
if "$NOCID" = "false"
then
POST="${POST}<ser:correlationId>${CID}</ser:correlationId>"
fi
POST="${POST}</ser:${SOAPCALL}>\
</soapenv:Body>\
</soapenv:Envelope>"
<ser:src>UA</ser:src>
<ser:owners/>\
<ser:owners>
<!--Zero or more repetitions:-->
<ser:dnstring>
<ser:dn>?</ser:dn>
</ser:dnstring>
</ser:owners>
<ser:entitlementRef>
<!--Zero or more repetitions:-->
<ser:nrfentitlementref>
<ser:entitlementCorrelationId>?</ser:entitlementCorrelationId>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:entitlementParameters>?</ser:entitlementParameters>
<ser:src>?</ser:src>
</ser:nrfentitlementref>
</ser:entitlementRef>
<ser:parameters>
<!--Zero or more repetitions:-->
<ser:resourceparameter>
<ser:codemapKey>?</ser:codemapKey>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:hiddenFlag>?</ser:hiddenFlag>
<ser:key>?</ser:key>
<ser:paramLabel>?</ser:paramLabel>
<ser:staticFlag>?</ser:staticFlag>
<ser:type>?</ser:type>
<ser:value>?</ser:value>
<ser:valueLabel>?</ser:valueLabel>
</ser:resourceparameter>
</ser:parameters>
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
echo
echo POST data:
echo $POST
echo
fi
### Function: createResource
# Usage:
# createResource $username $password $rbpm_url $output_file $resourcename $description $allowoverride $allowMulty $entitlementDN $entitlementParam $category $correlation_id
# if the $correlation_id is omitted, will call createresourceRequest, otherwise will call createresourceAidRequest
# allowoverride is a boolean (true/false)
# allowMulty is a boolean (true/false)
# Order of parameters is important, it is not possible to use the correlation_id and skip category
#
createResource()
{
USAGE="Function Usage:
createResource username password rbpm_url output_file resourcename description allowoverride allowMulty entitlementDN entitlementParam category correlation_id
if the correlation_id is omitted, will call createresourceRequest, otherwise will call createresourceAidRequest
allowoverride is a boolean (true/false)
allowMulty is a boolean (true/false)
Order of parameters is important, it is not possible to provide a correlation_id and skip category at the same time
rbpm_url should be in the format:
protocol://server:port/servicename
for example:
https://rbpm.lab.novell.com:8543/IDMProv";
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
dbgparams=$#
dbgparam=1
while [ "$dbgparam" -le "$dbgparams" ]
do
echo -n "Parameter "
echo -n \$$dbgparam
echo -n " = "
eval echo \$$dbgparam
(( dbgparam ))
done
fi
# Initial Parameters check
if | -z "$2" || -z "$3" || -z "$4" || -z "$5" || -z "$6" || -z "$7" || -z "$8" || -z "$9" || -z "$10" || -z "$11"
then
echo "$USAGE"
return 1
fi
#if -z "$8"
#then
# CAT=default
#else
# CAT="$8"
#fi
if -z "$11"
then
NOCID=true
else
NOCID=false
CID="$11"
fi
if "X$2" = "X-W"
then
read -sp "Please enter the password for user $1: " SENHA
echo
else
SENHA=$2
fi
# Setup for the SOAP call
URL="${3}/resource/service"
if "$NOCID" = "true"
then
ACTION="SOAPAction: 'http://www.novell.com/resource/service/createResource'"
SOAPCALL=createResourceRequest
else
ACTION="SOAPAction: 'http://www.novell.com/resource/service/createResourceAid'"
SOAPCALL=createResourceAidRequest
fi
CTYPE='Content-Type: text/xml;charset=UTF-8'
# Build SOAP XML envelope and call to be issued
POST="<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ser='http://www.novell.com/resource/service'>\
<soapenv:Header/>\
<soapenv:Body>\
<ser:${SOAPCALL}>\
<ser:resource>\
<ser:active>true</ser:active>\
<ser:allowOverride>${7}</ser:allowOverride>\
<ser:allowedMulty>${8}<ser:allowedMulty>\
<ser:description>${6}</ser:description>\
<ser:entitlementRef>\
<ser:nrfentitlementref>\
<ser:entitlementCorrelationId/>\
<ser:entitlementDn>${9}</ser:entitlementDn>\
<ser:entitlementParameters>${10}</ser:entitlementParameters>\
<ser:src>UA</ser:src>\
</ser:nrfentitlementref>\
</ser:entitlementRef>\
<ser:entityKey></ser:entityKey>\
<ser:grantApprovers/>\
<ser:grantQuorum></ser:grantQuorum>\
<ser:grantRequestDef></ser:grantRequestDef>\
<ser:name>${5}</ser:name>\
<ser:owners/>\
<ser:parameters/>\
<ser:resourceCategoryKeys>\
<ser:categorykey>\
<ser:categoryKey>${11}</ser:categoryKey>\
</ser:categorykey>\
</ser:resourceCategoryKeys>\
<ser:revokeApprovers/>\
<ser:revokeQuorum/>\
<ser:revokeRequestDef/>\
</ser:resource>"
if "$NOCID" = "false"
then
POST="${POST}<ser:correlationId>${CID}</ser:correlationId>"
fi
POST="${POST}</ser:${SOAPCALL}>\
</soapenv:Body>\
</soapenv:Envelope>"
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
echo
echo POST data:
echo $POST
echo
fi
# Issue the request
curl $_CURL_OPTIONS -k -u "$1:$SENHA" -H "$CTYPE" -H "$ACTION" -d "$POST" "$URL" -o "$4"
}