create_qr_condition

This command creates a query rewrite condition.

This API is available in Guardium V10.1.4 and later.

REST API syntax

This API is available as a REST service with the POST method. Call this API as follows:
POST https://[Guardium hostname or IP address]:8443/restAPI/qr_condition

GuardAPI syntax

create_qr_condition parameter=value

Parameters

Parameter Value type Description
conditionName String Required. The unique name of this query rewrite condition.
definitionName String Required. The query rewrite definition that is associated with this condition.
depth Integer Integer that specifies the depth of the parsed SQL that this condition applies to (1 and higher). The default -1 means that the query rewrite condition applies to any matching SQL at any depth.
isForAllRuleObjects Boolean Use this parameter to associate this condition with objects in a policy access rule. The default is false, which means neither option impacts any rule triggering behavior. Valid values:
  • 0: False. the query condition is specified using the objects that are defined in this condition.
  • 1: True. The specified condition applies to all objects in the access rule’s Object field or Object group for a fired rule.
isForAllRuleVerbs Boolean Use this parameter to associate this condition with objects in a policy access rule. The default is false, which means neither option impacts any rule triggering behavior. Valid values:
  • 0: False. The query condition is specified using the verbs that are defined in this condition.
  • 1: True. The specified condition applies to all verbs in the access rule’s Verb field or Verb group for a fired rule.
isObjectRegex Boolean Indicates that the specified object is specified by using a regular expression. Default is false. Valid values:
  • 0: False
  • 1: True
isVerbRegex Boolean Indicates that the specified verb is specified by using a regular expression. Default is false. Valid values:
  • 0: False
  • 1: True
object String An object (table, view). The default * means all objects. This can also be specified as a regular expression, in which case set the isVerbRegex to True.
order Integer Specifies the order in which to assemble multiple related query rewrite conditions for complex SQL. Default is 1.
verb String A verb (select, insert, update, delete). The default * means all verbs.

Examples

To create a query rewrite condition with the definition name "case 15" and condition name qr cond15_3, the verb SELECT, valiid for any object, parsed down 2 levels:

grdapi create_qr_condition definitionName="case 15" conditionName="qr cond15_3" verb=select object=* depth=2