Ensuring the right people see the right data and can perform the right actions — from menu-level access to row-level data filtering.
Security Architecture Overview
Oracle RMS implements security at two distinct levels:
Both layers work together. A user might have functional access to the Purchase Order screen (they can open it), but data-level security restricts them to seeing only POs for Department 1000 (their assigned department).
Functional Security (Roles & Privileges)
Functional security in RMS is based on a Role → Privilege → Screen model:
The Hierarchy
USER (john.doe)
│
├── ROLE: BUYER
│ ├── PRIV: PO_CREATE → Can create Purchase Orders
│ ├── PRIV: PO_APPROVE → Can approve POs up to $50,000
│ ├── PRIV: ITEM_VIEW → Can view item details
│ └── PRIV: ITEM_EDIT → Can modify item attributes
│
└── ROLE: REPORTING
├── PRIV: REPORT_INVENTORY → Can run inventory reports
└── PRIV: REPORT_SALES → Can run sales reports
Privilege Types
- Menu Access: Controls which menu items/screens the user can see in the navigation
- Function Access: Controls which actions within a screen are available (Create, Edit, Delete, Approve)
- Value Threshold: Controls limits (e.g., PO approval limit of $50,000 vs $500,000)
- Report Access: Controls which reports the user can execute
Data-Level Security
Data-level security restricts which rows a user can see based on their organizational assignments. This is implemented through security filters applied to every query.
Security Dimensions
| Dimension | Example | Effect |
|---|---|---|
| Department | User assigned to Dept 1000, 2000 | User only sees items, POs, and inventory in those departments |
| Location | User assigned to District "Northeast" | User only sees stores and warehouses in the Northeast district |
| Supplier | User assigned to Supplier Group "Apparel" | User only sees suppliers in the Apparel group |
How It Works Internally
When a user queries the Item Master screen, RMS does NOT simply run SELECT * FROM ITEM_MASTER. Instead, it adds a security filter:
This filtering happens transparently. The user never knows they are seeing a restricted dataset — they simply don't see data outside their assigned scope.
Key Security Tables
| Column | Type | Description |
|---|---|---|
SEC_USERPK | User Master | Master user table. Contains user_id, user_name, password hash (for non-LDAP), status (Active/Inactive), default language, and last login timestamp. |
SEC_ROLEPK | Role Definitions | Defines roles in the system. Contains role_id, role_name, and description. Examples: BUYER, ALLOCATOR, INVENTORY_ANALYST, ADMIN. |
SEC_USER_ROLE | User-Role Assignment | Maps users to roles. A user can have multiple roles. Contains user_id, role_id, and effective date range. |
SEC_PRIVPK | Privilege Definitions | Defines individual privileges. Contains priv_id, priv_name, priv_type (MENU, FUNCTION, REPORT), and the associated screen/action. |
SEC_ROLE_PRIV | Role-Privilege Assignment | Maps privileges to roles. Contains role_id and priv_id. This is where you control what each role can do. |
SEC_USER_LOC | Location Security | Assigns users to specific locations or location hierarchies. Contains user_id, loc (store/warehouse number), and loc_type. |
SEC_USER_DEPT | Department Security | Assigns users to specific departments. Contains user_id and dept. A buyer assigned to dept 1000 can only manage items in that department. |
User & Role Setup Process
Creating a New User
Role Template Examples
| Role | Menu Access | Data Scope |
|---|---|---|
| BUYER | Items, POs, Suppliers, Cost | Assigned departments only |
| ALLOCATOR | Allocation, Transfers, Inventory | Assigned departments + warehouses |
| INVENTORY_ANALYST | Inventory, Stock Counts, Adjustments | Assigned locations only |
| PRICE_ANALYST | Pricing, Promotions, Clearance | Assigned departments only |
| STORE_MANAGER | Transfers, Receiving, Stock Counts | Assigned store only |
| ADMIN | All screens | All data |
VPD (Virtual Private Database) Policies
In more advanced RMS deployments, data-level security is enforced using Oracle Virtual Private Database (VPD) — a database-level security feature that automatically appends WHERE clauses to every query.
How VPD Works
- A VPD policy function is attached to a table (e.g., ITEM_MASTER)
- Every time ANY query runs against that table, Oracle automatically calls the policy function
- The policy function returns a WHERE clause predicate based on the current user's security profile
- Oracle appends this predicate to the query before execution
-- VPD Policy Function Example
CREATE OR REPLACE FUNCTION fn_item_security (
p_schema IN VARCHAR2,
p_object IN VARCHAR2
) RETURN VARCHAR2 IS
l_predicate VARCHAR2(4000);
BEGIN
-- Get the current user's department assignments
l_predicate := 'dept IN (SELECT dept FROM sec_user_dept ' ||
'WHERE user_id = SYS_CONTEXT(''USERENV'', ''CLIENT_IDENTIFIER''))';
RETURN l_predicate;
END;
/
-- Attach the policy to ITEM_MASTER
BEGIN
DBMS_RLS.ADD_POLICY(
object_schema => 'RMS13',
object_name => 'ITEM_MASTER',
policy_name => 'ITEM_DEPT_SECURITY',
function_schema => 'RMS13',
policy_function => 'FN_ITEM_SECURITY',
statement_types => 'SELECT,UPDATE,DELETE'
);
END;
/
VPD is Invisible
The beauty of VPD is that it is completely transparent to the application. Developers write normal SQL without any security filters. The database silently restricts the rows returned based on the user's profile. This prevents developers from accidentally bypassing security by forgetting to add WHERE clause filters.
LDAP / Active Directory Integration
Enterprise RMS deployments integrate with corporate LDAP or Active Directory for authentication:
- User logs into RMS with their corporate credentials
- RMS authenticates against the LDAP server (via the WebLogic LDAP authenticator)
- RMS maps the LDAP user to the SEC_USER table (user_id must match LDAP uid)
- RMS loads the user's roles from SEC_USER_ROLE
- RMS applies data security based on SEC_USER_DEPT and SEC_USER_LOC
This eliminates the need for RMS-specific passwords and enables Single Sign-On (SSO) across the enterprise application suite.
Security in the Cloud (v19+)
In the cloud (MFCS), the security model adds additional layers:
- Oracle Identity Cloud Service (IDCS): Replaces LDAP as the identity provider. All user authentication goes through IDCS with support for SSO, MFA (Multi-Factor Authentication), and social login.
- Application Roles: Managed through IDCS role assignments rather than direct SEC_USER_ROLE inserts
- Network Security: All communication is encrypted (TLS 1.2+). VPN or FastConnect required for integration with on-premise systems.
- API Authentication: REST API access requires OAuth2 tokens with scoped permissions
Security Best Practices
Important Gotchas
- !Never grant a user the ADMIN role in production unless absolutely necessary. Admin users bypass data-level security and can see/modify all data across all departments and locations.
- !Review SEC_USER_ROLE assignments quarterly. Employees who change departments or roles often retain their old security assignments, violating the principle of least privilege.
- !VPD policies have performance implications. The policy function is called for every query against the protected table. Ensure the function is optimized (indexed lookups, no expensive joins) and the result is cached in the session context.
- !When testing security, always test with a non-admin account. Admin users bypass all security filters, so bugs in security configuration are invisible when testing as admin.
- !LDAP integration failures are common during initial setup. The most frequent issue is a mismatch between the LDAP uid and the SEC_USER.user_id. Ensure they match exactly (case-sensitive).
Key Takeaways
- RMS security operates at two levels: Functional Security (what you can DO) and Data-Level Security (what you can SEE).
- The SEC_USER → SEC_USER_ROLE → SEC_ROLE_PRIV chain controls which screens and actions each user can access.
- SEC_USER_DEPT and SEC_USER_LOC tables restrict data visibility by department and location hierarchy.
- VPD (Virtual Private Database) policies enforce row-level security transparently at the database level — developers don't need to add security filters to queries.
- Enterprise deployments integrate with LDAP/Active Directory for authentication; cloud deployments use Oracle Identity Cloud Service (IDCS).
- Always follow the principle of least privilege — grant users the minimum roles and data access required for their job function.


