1 PACKAGE dbms_macols AS
2
3 -- Audit action codes
4 G_MAC_OLS_INIT_AUDIT_CODE CONSTANT PLS_INTEGER := 10009;
5
6 /**
7 * Initializes MACOLS and sets the user's session label. This method should
8 * be called during the Login trigger processing, after MACSEC init_session
9 * has completed. This method should only be called if OLS is installed -
10 * see dbms_macutl.is_ols_installed. At a high level, the processing performs
11 * the following:
12 *
13 * for each OLS policy + merge algorithm
14 * determine the user's OLS label for the session;
15 * for each labeled factor loop
16 * compute the label of the factor based on the policy algorithm;
17 * end loop;
18 * merge the factor labels together using the policy algorithm to compute
19 * the maximum possible label for the user's session (MACOLS label);
20 * if the user's OLS label dominates the MAXOLS label then
21 * merge the labels using the algorithm to compute the user's new session label;
22 * end if;
23 * cache the factor labels, MACOLS label, and session labels in the user's context
24 * set the user's session label for the policy;
25 * end loop;
26 */
27 PROCEDURE init_session;
28
29 -- Methods below are exposed temporarily for debugging
30 /**
31 * Determines the lowest sensitivity level for a policy.
32 *
33 * @param p_mac_policy_id Id of policy from mac_policy$ table
34 * @return Label of lowest sensitivity
35 */
36 FUNCTION min_policy_label_of(p_mac_policy_id IN NUMBER) RETURN VARCHAR2;
37
38 /**
39 * Computes the label of a factor for the specified policy
40 *
41 * @param p_mac_policy_id Id of policy from mac_policy$ table
42 * @return Label of factor
43 */
44 FUNCTION label_of(p_mac_policy_id IN NUMBER,
45 p_factor_id IN NUMBER) RETURN VARCHAR2;
46
47 /**
48 * Create the contexts used to cache MACOLS labels. One context is
49 * created to cache the labels for each Factor, and another is
50 * create to cache session related label values (see dbms_macutl).
51 *
52 * @param p_policy_name OLS Policy Name
53 *
54 */
55 PROCEDURE create_macols_contexts(p_policy_name IN VARCHAR2);
56
57 /**
58 * Drop the contexts used to cache MACOLS labels.
59 *
60 * @param p_policy_name OLS Policy Name
61 *
62 */
63 PROCEDURE drop_macols_contexts(p_policy_name IN VARCHAR2);
64
65 /**
66 /**
67 * Sets a value in a MACOLS context
68 *
69 * @param p_policy_name OLS Policy Name
70 * @param p_context_type Context name (see dbms_macutl for helpful constants)
71 * @param p_label Label value
72 */
73 PROCEDURE update_policy_label_context(p_policy_name IN VARCHAR2,
74 p_context_type IN VARCHAR2,
75 p_label IN VARCHAR2);
76
77 END;