Table of Contents

Search

  1. Preface
  2. Introduction to Dynamic Data Masking
  3. Rules
  4. Connection Rules
  5. Security Rules
  6. Security Rule Set Simulator
  7. Masking Functions
  8. XML Functions Reference
  9. Glossary

Java Matcher

Java Matcher

The Java matcher runs a Java class that returns a boolean value. If the returned value is true, the matcher returns a match. If the returned value is false, the matcher does not return a match.
The Java class must contain a public static method with the following signature:
public static boolean match(RuleContext ctx)
You must enter the correct class in the Class Path field of the Java matcher. The Rule Engine reads every rule in the rule set and returns an error if the class path is incorrect, even if the rule is disabled.
When an error occurs with the Java class, the Rule Engine does not apply the rule. Instead, the Rule Engine continues to the next rule. The Rule Engine logs a detailed error message in the following file:
<Dynamic Data Masking installation>\log\DDMError.txt
The Java matcher has the following parameters:
Class Path
Defines a list of jars that contain the Java matcher class and necessary libraries. Use semicolons to separate multiple jar files.
Class Name
Defines the fully qualified class name. The class may be built within a named package or an unnamed package. The class must include a method named
match
with the following signature:
public static boolean match(RuleContext ctx)
.
The
RuleContext
object contains data from the Rule Engine. The
RuleContext
object has one method,
public String getSymbol(String symbol);
, that returns the symbol value from the symbol name. Use this method to retrieve symbol values defined by a Symbol rule action. Specify the name of the symbol as an argument to the method.
You can also use the following predefined symbols:
RuleContext.USERNAME
Retrieves the Oracle user name.
RuleContext.OS_USER
Retrieves the operating system user on the client machine.
RuleContext.CLIENT_HOST
Retrieves the name of the client machine.
RuleContext.PROGRAM
Retrieves the program name on the client machine.
RuleContext.STATEMENT
Retrieves the statement being processed.
The Rule Engine runs the Java class with the JVM that Dynamic Data Masking uses. You can compile the Java matcher class with a JDK of the same major version or lower version of the JVM that Dynamic Data Masking uses.

0 COMMENTS

We’d like to hear from you!