Table of Contents

Search

  1. Preface
  2. Introduction to Dynamic Data Masking Administration
  3. Authentication
  4. Security
  5. Connection Management
  6. JDBC Client Configuration
  7. ODBC Client Configuration
  8. Configuration for MicroStrategy
  9. Access Control
  10. Logs
  11. High Availability
  12. Server Control
  13. Performance Tuning
  14. Troubleshooting
  15. Appendix A: Database Keywords

Administrator Guide

Administrator Guide

Configure Dynamic Data Masking to Capture MicroStrategy User Context

Configure Dynamic Data Masking to Capture MicroStrategy User Context

To configure Dynamic Data Masking to capture MicroStrategy user context, create a Java Action and place the Java Action as the first rule in the rule set.
  1. Create a Java Action with the following code.
    /* GetMicroStrategyApplicationUserName.java*/ import com.activebase.content.mask.ContentProcessor; import com.activebase.contentHandlers.statement.StatementContentHandler; import com.activebase.logging.TraceFacility; import com.activebase.rule.RuleContext; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public class GetMicroStrategyApplicationUserName { private static final String regexforApplicationUserName = "(.*)(MICROSTRATEGY_USERNAME\\s*=\\s*(.*?),)(.*)"; private static final String MicroStrategy_USER = "MICROSTRATEGY_USERNAME"; private static final int flags = Pattern.DOTALL | Pattern.MULTILINE | Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE; private static final Pattern patternforApplicationUserName = Pattern.compile(regexforApplicationUserName, flags); public static String execute(RuleContext ctx) { StatementContentHandler stmtContenthandler = null; if (ctx == null) { return null; } else { ContentProcessor contentProcessor = (ContentProcessor) ctx; stmtContenthandler = contentProcessor.getStatementContentHandler(); if (stmtContenthandler == null) { return null; } } String orginalStatement = stmtContenthandler.getStatement(); Matcher applicationUserNameMatcher = patternforApplicationUserName.matcher(orginalStatement); if (applicationUserNameMatcher.find()) { String microStrategyApplicationUserName = applicationUserNameMatcher.group(3); Map symbolTable = stmtContenthandler.getSymbolTable(); symbolTable.put(MicroStrategy_USER, microStrategyApplicationUserName.trim()); String newStatement = applicationUserNameMatcher.group(1) + " " + applicationUserNameMatcher.group(4); return newStatement; } return null; } }
  2. Compile the code and create a JAR file. For example,
    microStrategyAccelerator.jar
    .
  3. Configure the JAR file in a Java Action in Dynamic Data Masking.
  4. Place the Java Action as the first rule in the rule set.
    After configuring the Java Action, a symbol value for MICROSTRATEGY_USERNAME populates the MicroStrategy user name each time a report runs.
  5. Create masking rules based on the symbol MICROSTRATEGY_USERNAME.

0 COMMENTS

We’d like to hear from you!