Search Results cs_sr_security_context




Overview

The APPS.CS_SR_SECURITY_CONTEXT package is a lightweight PL/SQL utility within the Oracle E-Business Suite Service (CS) module. It is owned by the APPS schema and is classified in the ETRM repository as an "OTHER" API, indicating that it is an internal helper rather than a formally published public interface. Its single documented responsibility is to establish the security context under which service request (SR) data is subsequently queried or processed. In Oracle EBS, Service Request records are subject to organization- and responsibility-based access rules enforced through Multi-Org and function security. This package provides the procedural entry point that sets a specific security attribute into the database session so that downstream queries honour the intended row-level filtering.

The package was first shipped in the 11.5.x release stream, as reflected in its header revision (115.0, dated 2003/08/19). The same source is carried forward into 12.1.1 and 12.2.2 without functional change, meaning behaviour is identical in both online patching and non-online patching environments.

Key Procedures and Functions

The ETRM metadata documents exactly one callable unit:

  • SET_SR_SECURITY_CONTEXT — a procedure that establishes the Service Request security context for the current database session. It accepts a named context attribute and a numeric attribute value, and applies that pairing as the active security setting. By calling this procedure, a caller declares which organisational or security-attribute value should govern access to SR data for the remainder of the session, or until the context is reset. Because the package is declared AUTHID CURRENT_USER, execution privileges are evaluated against the invoking schema rather than the definer, so any custom code that calls it must itself hold the necessary privileges on the underlying session-management facility.

No functions or additional procedures are documented. Callers requiring more granular control must work through the session context directly.

Tables Accessed

The package does not read or write any application tables. Its only documented dependency is DBMS_SESSION, the Oracle-supplied built-in package used to manipulate session state. The reference is made through an APPS synonym. In practice, the procedure uses this built-in to set a session-level context value — the mechanism by which the SR security attribute is made visible to the views and queries that enforce service request access control. Because no CS base tables are referenced, the package carries no data-manipulation risk and no concurrency or locking implications of its own.

Usage Notes

The package is a supporting routine that is referenced by five other packages in the APPS schema, which is where its principal use lies: higher-level Service Request APIs invoke it to prime the security context before performing their own queries or updates. It is not normally invoked directly by end users through a form or concurrent program; the surrounding Service module code handles that automatically as part of its standard execution path.

Custom developers working with Oracle Service may call SET_SR_SECURITY_CONTEXT when writing bespoke SR queries, reports, or concurrent programs that must respect the same organisation and security filtering applied by the standard application. The typical pattern is to invoke the procedure once at the start of processing, passing the desired attribute name and numeric value, and then run the SR logic against the established context. Because the setting persists for the lifetime of the session, care should be taken in pooled connections or long-running sessions to reset or re-establish the context appropriately, so that one request's security scope does not leak into another's. Given its minimal surface area and its dependency solely on DBMS_SESSION, the package is stable and safe to use across both 12.1.1 and 12.2.2, though any dependency on internal context naming conventions should be validated during upgrades.