Get started with DDM on an OpenEdge Authentication Gateway-enabled database
- Last Updated: July 30, 2026
- 7 minute read
- OpenEdge
- Version 13.0
- Documentation
This topic explains how to configure Dynamic Data Masking (DDM) on a database that is already
enabled for OpenEdge Authentication Gateway (OEAG). It is a companion to Get
started with DDM, adapted to reflect the differences that arise when user
authentication is delegated to OEAG rather than managed in the
_User table of the database.
Before you begin
- An understanding of how to set up OEAG, adding users, and configuring named domains on the
Security Token Service (STS).
For more details, see OpenEdge Authentication Gateway Tutorial.
- A working OEAG instance with STS reachable at a known URL. For example:
https://yourgatewayhostname:portNote: The default port is 8443, but if you specified a different port during the installation, be sure to make that change. - Two user accounts configured on the OEAG side that can be authenticated by the STS. This
tutorial uses the OEAG
propertiesauthentication provider, so bothAdminUserandGeneralUserexample users are added tousers.propertieson the STS. For example,
Verify both users can authenticate through the STS by running the following commands:... AdminUser=AdminPass123,ROLE_PSCUser,enabled GeneralUser=GeneralPass123,ROLE_PSCUser,enabledproenv> stsclientutil -url https://yourgatewayhostname:port -cmd authenticate -user AdminUser@OEDomain -password AdminPass123 -nohostverifyproenv> stsclientutil -url https://yourgatewayhostname:port -cmd authenticate -user GeneralUser@OEDomain -password GeneralPass123 -nohostverify - The sample
mysports22database with the Authentication Gateway enabled:
For more information, see PROUTIL ENABLEAUTHGATEWAY qualifier.proenv> proutil mysports22 -C enableauthgateway - Ensure that a domain record exists in the target database. For example, if you are using
the
OEDomaindomain, a corresponding domain record must be configured inmysports22. For creating and managing domains, navigate to Admin > Security > Domain Maintenance > Domains in the Data Administration tool. In a DDM-protected database, only the domain configuration is required. User accounts do not need to exist in the database because OEAG handles user authentication. AdminUser@OEDomainregistered as a security administrator on the target database. Because OEAG does not maintain database-level user records, you must add the fully-qualified identity, and not simply the username, by connecting to the target database as an existing security administrator, navigate to Admin > Security > Security Administrators in the Data Administration tool, and addAdminUser@OEDomain.Note: Specify the name in the fully qualifieduser@domainformat and ensure that it matches the identity authenticated by OEAG. For example, AdminUser@OEDomain, not simplyAdminUser.
Key differences from the base Get started with DDM topic
| Base Get started with DDM | OEAG-enabled variant |
|---|---|
Users are created through
oDAS:CreateUser("AdminUser", ...) in a
_User record |
No _User records are created. Users exist
only in the OEAG identity store. |
DDM role grants use
oDAS:GetUser("AdminUser"):Name. The grantee
is fetched from the _User record. |
The grantee is set directly to the fully-qualified
user There is no |
Enable, configure, and activate DDM in an OEAG-enabled database
- Copy the existing sample database to a new database. For example, copy the
Sports2020database into themysports22database.proenv>procopy $DLC/sports2020 mysports22 - Enable DDM for
mysports22.proenv>proutil mysports22 -C enableddmAfter you enable the database for DDM:Note: Enable the DDM feature before configuring and using it to check if the database is licensed for DDM.- Clients earlier than OpenEdge 12.8 that are not aware of the DDM setup may not be able to open or connect to the database.
- Activate DDM to configure it because DDM is inactive, by default.
For more information, see PROUTIL ENABLEDDM qualifier.
- Start the database server for
mysports22.proenv>proserve mysports22 -H localhost -S 5000 - Verify that both
AdminUser@OEDomainandGeneralUser@OEDomainusers can authenticate through the STS:proenv> stsclientutil -url https://yourgatewayhostname:8443 -cmd authenticate -user AdminUser@OEDomain -password AdminPass123 -nohostverifyproenv> stsclientutil -url https://yourgatewayhostname:8443 -cmd authenticate -user GeneralUser@OEDomain -password GeneralPass123 -nohostverifyBoth calls should return this output:Authentication succeededNote: OpenEdge provides different ways to integrate with various user account systems, such as the built-in_oslocalauthentication system for using Operating System (OS) local accounts, external user accounts accessed by an ABL authentication callback, and the OpenEdge Authentication Gateway. For more information, see Assert user identity. -
To determine user privileges for accessing the masked data, create a new role for database users (user-to-role mapping).
The following example code creates the
PAYROLLrole, which regulates the privileges granted to users for data unmasking:USING OpenEdge.DataAdmin.*. VAR DataAdminService oDAS. VAR IRole oRole. VAR LOGICAL lResult. ASSIGN oDAS = NEW DataAdminService(LDBNAME("DICTDB")). oRole = oDAS:NewRole("Payroll"). oRole:Description = "Admin User Role". // This role is used for Dynamic Data Masking oRole:IsDDM = true. lResult = oDAS:CreateRole(oRole). MESSAGE "Added Payroll Role". DELETE OBJECT oDAS.- Save the example code as addRole.p.
- Run addRole.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 addRole.p
- Create an authorization tag and associate it with the role you created in
Step 4. An authorization tag establishes the connection between the
user-defined DDM roles and the fields of a table to which a mask is to be
applied.
The following example code associates the
#DDM_SEE_ContactInfoauthorization tag with thePAYROLLrole:USING OpenEdge.DataAdmin.*. VAR DataAdminService service. VAR IAuthTag oTag. VAR LOGICAL lReturn. ASSIGN service = new DataAdminService (LDBNAME("DICTDB")). oTag = service:NewAuthTag("#DDM_SEE_ContactInfo"). oTag:RoleName = service:GetRole("Payroll"):Name. oTag:description = "Can see contact info". lRETURN = service:CreateAuthTag(oTag). MESSAGE "Added Payroll to #DDM_SEE_ContactInfo". QUIT.- Save the example code as setAuthTagRole.p.
-
Run setAuthTagRole.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 setAuthTagRole.p
- Grant user-defined roles to authorized users.
The following example code grants the
PAYROLLrole toAdminUser:USING OpenEdge.DataAdmin.*. VAR DataAdminService oDAS. VAR IGrantedRole oRole. VAR LOGICAL lResult = FALSE. ASSIGN oDAS = NEW DataAdminService(LDBNAME("DICTDB")). oRole = oDAS:NewGrantedRole(). oRole:Role = oDAS:GetRole("Payroll"). IF VALID-OBJECT(oRole:Role) THEN DO: // Grantee is the Client-Principal user returned by OEAG. // If the OEAG domain is set, use "AdminUser@<domain-name>". oRole:Grantee = "AdminUser@OEDomain". oRole:CanGrant = FALSE. // Cannot grant to others. // Granting the Payroll role to AdminUser lResult = oDAS:CreateGrantedRole(oRole). END. - Add a mask to the field to specify what a user sees if they are not
authorized to view the unmasked data. The types of masks available are:
default, literal, partial, and null.
- Default mask—To configure the default mask (prefix
D:), the following example code uses thesetDDMConfig()method and the#DDM_SEE_ContactInfoauthorization tag for thestatefield of theCustomertable.USING OpenEdge.DataAdmin.DataAdminService FROM PROPATH. DEFINE VARIABLE service AS DataAdminService NO-UNDO. DEFINE VARIABLE lResult AS LOGICAL NO-UNDO. service = NEW DataAdminService(LDBNAME("DICTDB")). lResult = service:setDDMConfig("customer","state","D:","#DDM_SEE_ContactInfo"). MESSAGE "Added Default mask". QUIT.- Save the example code as addDefaultMask.p.
-
Run addDefaultMask.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 addDefaultMask.p
- Literal mask—To configure the literal mask (prefix
L:), the following example code uses thesetDDMConfig()method and the#DDM_SEE_ContactInfoauthorization tag for thecityfield of theCustomertable.USING OpenEdge.DataAdmin.DataAdminService FROM PROPATH. DEFINE VARIABLE service AS DataAdminService NO-UNDO. DEFINE VARIABLE lResult AS LOGICAL NO-UNDO. service = NEW DataAdminService(LDBNAME("DICTDB")). lResult = service:setDDMConfig("customer","city","L:MASKED","#DDM_SEE_ContactInfo"). MESSAGE "Added Literal mask". QUIT.- Save the example code as addLiteralMask.p.
-
Run addLiteralMask.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 addLiteralMask.p
- Partial mask—To configure the partial mask (prefix
P:), the following example code uses thesetDDMConfig()method and the#DDM_SEE_ContactInfoauthorization tag for thephonefield of theCustomertable.USING OpenEdge.DataAdmin.DataAdminService FROM PROPATH. DEFINE VARIABLE service AS DataAdminService NO-UNDO. DEFINE VARIABLE lResult AS LOGICAL NO-UNDO. service = NEW DataAdminService(LDBNAME("DICTDB")). lResult = service:setDDMConfig("customer","phone","P:0,X,4","#DDM_SEE_ContactInfo"). MESSAGE "Added Partial mask". QUIT.-
Save the example code as addPartialMask.p.
- Run addPartialMask.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 addPartialMask.p
-
- Null mask—To configure the null mask (prefix
N:), the following example code uses thesetDDMConfig()method and the#DDM_SEE_ContactInfoauthorization tag for theaddressfield of theCustomertable.USING OpenEdge.DataAdmin.DataAdminService FROM PROPATH. DEFINE VARIABLE service AS DataAdminService NO-UNDO. DEFINE VARIABLE lResult AS LOGICAL NO-UNDO. service = NEW DataAdminService(LDBNAME("DICTDB")). lResult = service:setDDMConfig("customer","address","N:","#DDM_SEE_ContactInfo"). MESSAGE "Added Null mask". QUIT.-
Save the example code as addNullMask.p.
-
Run addNullMask.p.
proenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 addNullMask.p
-
- Default mask—To configure the default mask (prefix
- To initiate the application of masks on the designated fields, activate
DDM:
proenv>proutil mysports22 -C activateddmACTIVATEDDMensures that the DDM policies you set up are honored. All connected clients must comply with the policies and mask configurations that have been set up.For more information, see PROUTIL ACTIVATEDDM qualifier.
-
View data from the
Customertable.-
Save the following example code as findFirstCustomer.p. This code displays the first row of the
Customertable, which includes theCustnum,Name,Address,State,City,Postalcode, andPhonefields.FIND FIRST Customer. DISPLAY custnum name address state city postalcode phone WITH 1 columns. PAUSE 60. QUIT. - Run
findFirstCustomer.pasAdminUser.
Output forproenv>mpro mysports22 -U AdminUser@OEDomain -P AdminPass123 findFirstCustomer.pAdminUser@OEDomain:Cust Num: 3000 Name: Lift Tours Address: 276 North Drive State: MA City: Burlington Postal Code: 01730 Phone: (617) 450-0086AdminUsercan access and view unmasked data in the DDM-configured fields. - RunOutput for
findFirstCustomer.pasGeneralUser.proenv>mpro mysports22 -U GeneralUser@OEDomain -P GeneralPass123 findFirstCustomer.pGeneralUser@OEDomain:Cust Num: 3000 Name: Lift Tours Address: ? State: XX City: MASKED Postal Code: 01730 Phone: XXXXXXXXXX0086GeneralUserviews masked data in the DDM-configured fields.
-
-
For more information about how to deactivate or disable DDM, see PROUTIL DEACTIVATEDDM qualifier and PROUTIL DISABLEDDM qualifier.
- The
IDataAdminServiceinterface provides a set of methods that enable the execution of CRUD operations pertaining to DDM. These methods are utilized for managing:- User-defined roles
- Users
- Role grants or user-to-role mapping
- Authorization tags
- Setting or unsetting the mask and authorization tag for any field in a table
IDataAdminServicemethods, see IDataAdminService interface.