authzrule create

Creates an authorization rule.

Requires authentication (administrator ID and password) to use.

authzrule create rule_id rule_text [-desc description] [-failreason fail_reason]

We can attach an authorization rule to a protected object. To authorize access to the protected object, the user credential and application context attributes are compared against the rule. Quotation marks within an authorization rule must be escaped using the backward slash (\) character.

Options

rule_text
Rule policy used to evaluate the rule in XSL format. The rule must be enclosed in double quotation mark (") character. If the rule specifies a double quotation mark as part of the rule text, precede the double quotation mark with a backward slash (\) character. Doing so instructs the system to ignore the double quotation mark.

Return codes

Example

When providing rule text with the pdadmin utility, enclose the rule text in double quotation marks ("). Double quotation marks embedded within the rule text must be escaped with a backward slash (\) so they are ignored by the pdadmin utility. The XSL processor treats single and double quotation marks equally for defining text strings. They can be used interchangeably, but they must always be paired appropriately. For example:
pdadmin sec_master> authzrule create testrule1
"<xsl:if test='some_piece_of_ADI =\"any string\"'>!TRUE!</xsl:if>"

See also

authzrule delete

Parent topic: pdadmin commands