# Permission List Comparison

> Compares component authorizations, signon windows, web libraries, service operations, component interfaces, process groups, and query access groups across two permission lists.

---

Site [llms.txt](/llms.txt)

---

<div class="alert alert-primary border shadow-sm mb-4 psl-prospect-cta" role="note">
  <div class="d-flex flex-column flex-lg-row align-items-lg-center justify-content-between gap-3">
    <div>
      <strong>New to psLens?</strong> This page documents one specific report. To see how it runs in the product, what
      the output looks like, and how teams use it in practice, start with a live walkthrough.
    </div>
    <div class="d-flex flex-wrap gap-2">
      <a class="btn btn-sm btn-primary" href="/contact/">Book a Demo</a>
      <a class="btn btn-sm btn-outline-primary" href="/docs/reports/">Browse Reports</a>
    </div>
  </div>
</div><div id="pslens-context-panel" class="card border-info mb-4 d-none">
  <div class="card-header bg-light text-info py-2 fw-bold d-flex align-items-center border-bottom border-info-subtle">
    <i class="bi bi-info-circle-fill me-2"></i>
    <span>Tailored Operational Context</span>
  </div>
  <div class="card-body p-0">
    <ul class="list-group list-group-flush">
      <li id="row-db" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Target Database:</strong>
        <span id="ctx-db" class="badge bg-secondary font-monospace">&mdash;</span>
      </li>
      <li id="row-type" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Context Type:</strong>
        <span id="ctx-type" class="badge bg-light text-dark border font-monospace text-uppercase">&mdash;</span>
      </li>
      <li id="row-severity" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong id="label-severity">Alert Severity:</strong>
        <span id="ctx-severity" class="badge">&mdash;</span>
      </li>
      <li id="row-time" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Triggered Time:</strong>
        <span id="ctx-time" class="text-muted small">&mdash;</span>
      </li>
      <li id="row-details" class="list-group-item py-2 d-none">
        <strong id="label-details" class="d-block mb-1">Firing Context:</strong>
        <code id="ctx-details" class="d-block p-2 bg-light border rounded small"
          style="white-space: pre-wrap; word-break: break-all;">&mdash;</code>
      </li>
      <li id="row-sql" class="list-group-item py-2 d-none">
        <div class="d-flex justify-content-between align-items-center mb-1">
          <strong id="label-sql">Contextual SQL:</strong>
          <button id="btn-copy-sql" type="button" class="btn btn-sm btn-outline-secondary py-0 px-2 small">
            <i class="bi bi-clipboard me-1"></i>Copy SQL
          </button>
        </div>
        <pre class="mb-0 p-2 bg-light border rounded small"><code id="ctx-sql" style="white-space: pre-wrap; word-break: break-word;">&mdash;</code></pre>
      </li>
    </ul>
  </div>
</div>

<script>
  (function () {
    const params = new URLSearchParams(window.location.search);
    const metadata = params.get('metadata');
    if (!metadata) return;

    try {
      
      const base64 = metadata.replace(/-/g, '+').replace(/_/g, '/');
      const jsonStr = decodeURIComponent(escape(window.atob(base64)));
      const data = JSON.parse(jsonStr);

      if (data) {
        let hasData = false;

        if (data.db) {
          document.getElementById('ctx-db').textContent = data.db;
          document.getElementById('row-db').classList.remove('d-none');
          hasData = true;
        }

        if (data.type) {
          document.getElementById('ctx-type').textContent = data.type;
          document.getElementById('row-type').classList.remove('d-none');
          if (data.type === 'health') {
            document.getElementById('label-severity').textContent = 'Health Status:';
          }
          hasData = true;
        }

        if (data.severity) {
          const severityBadge = document.getElementById('ctx-severity');
          const severity = data.severity.toLowerCase();
          severityBadge.textContent = severity.toUpperCase();
          if (severity === 'critical') {
            severityBadge.className = 'badge bg-danger';
          } else if (severity === 'warning' || severity === 'degraded') {
            severityBadge.className = 'badge bg-warning text-dark';
          } else if (severity === 'healthy') {
            severityBadge.className = 'badge bg-success';
          } else if (severity === 'disabled') {
            severityBadge.className = 'badge bg-secondary';
          } else {
            severityBadge.className = 'badge bg-info';
          }
          document.getElementById('row-severity').classList.remove('d-none');
          hasData = true;
        }

        if (data.t) {
          const date = new Date(data.t * 1000);
          document.getElementById('ctx-time').textContent = date.toLocaleString();
          document.getElementById('row-time').classList.remove('d-none');
          hasData = true;
        }

        if (data.details) {
          document.getElementById('ctx-details').textContent = data.details;

          
          const labelDetails = document.getElementById('label-details');
          if (data.type === 'object') {
            labelDetails.textContent = 'Object Metadata Details:';
          } else if (data.type === 'report') {
            labelDetails.textContent = 'Report Description:';
          } else if (data.type === 'health') {
            labelDetails.textContent = 'Gauge Breakdown:';
          } else {
            labelDetails.textContent = 'Firing Context:';
          }

          document.getElementById('row-details').classList.remove('d-none');
          hasData = true;
        }

        if (data.sql) {
          document.getElementById('ctx-sql').textContent = data.sql;
          document.getElementById('row-sql').classList.remove('d-none');
          const copyBtn = document.getElementById('btn-copy-sql');
          if (copyBtn && navigator.clipboard) {
            copyBtn.addEventListener('click', function () {
              navigator.clipboard.writeText(data.sql).then(function () {
                copyBtn.innerHTML = '<i class="bi bi-check2 me-1"></i>Copied';
                setTimeout(function () {
                  copyBtn.innerHTML = '<i class="bi bi-clipboard me-1"></i>Copy SQL';
                }, 2000);
              });
            });
          }
          hasData = true;
        }

        if (hasData) {
          document.getElementById('pslens-context-panel').classList.remove('d-none');
        }
      }
    } catch (e) {
      console.error('Failed to parse operational context metadata:', e);
    }
  })();
</script>

## Permission List Comparison Report

**Report ID:** `security-compare-permlists`
**Category:** Security

Permission List Comparison diffs two PeopleSoft permission lists (`PSCLASSDEFN`) across databases or within the same database across signon windows, component authorizations, web libraries, service operations, component interfaces, process groups, and query access groups.

## Parameters

|  Parameter  | Required |      Default       |                               Description                               |
| ----------- | -------- | ------------------ | ----------------------------------------------------------------------- |
| `classID1`  | Yes      | —                  | Source permission list (`CLASSID`), trimmed and converted to uppercase. |
| `target_db` | No       | Source database    | Target database name configured in psLens.                              |
| `classID2`  | No       | Same as `classID1` | Target permission list (`CLASSID`), trimmed and converted to uppercase. |

Comparing a permission list against itself in the same database returns an error. Before fetching authorization tables, psLens checks `PSCLASSDEFN` in both databases and stops with an error if either permission list does not exist.

## Tables Queried

|      Table      |                              Purpose                              |
| --------------- | ----------------------------------------------------------------- |
| `PSCLASSDEFN`   | Permission list definition and existence verification             |
| `PSAUTHITEM`    | Component, page, web library, and PeopleTools authorizations      |
| `PSMENUITEM`    | Menu and component enrichment joined with `PSAUTHITEM`            |
| `PSMENUDEFN`    | Subquery filter separating menu items from special authorizations |
| `PSAUTHSIGNON`  | Authorized signon days and start/end time windows                 |
| `PSAUTHWS`      | Service operation authorizations                                  |
| `PSAUTHBUSCOMP` | Component interface and method authorizations                     |
| `PSAUTHAS`      | Application service authorizations included in summary counts     |
| `PSAUTHPRCS`    | Process group authorizations                                      |
| `SCRTY_ACC_GRP` | Query tree and security access group permissions                  |
| `SCRTY_QUERY`   | Query security profile metadata                                   |

If any secondary authorization table is not whitelisted in SWS in either database, the report still runs and prints a **Partial Data Notice** warning naming the unwhitelisted table and database.

## Report Output

Each comparison produces a Markdown document containing only the sections that have data:

- **Header Link**: Direct link back to `/permissionlists/compare` in psLens with both databases and permission lists preselected.
- **Summary**: Counts for Total Compared Items, Identical / Matching, Differences, Only in Source, and Only in Target, followed by any Partial Data Notice.
- **Signon Times & Windows**: Day-of-week signon windows from `PSAUTHSIGNON`.
- **Components & Pages**: Component, menu, page/item, authorized actions, display-only indicator, and diff status (`MATCH`, `DIFFERENT_ACTIONS`, `ONLY_SOURCE`, `ONLY_TARGET`).
- **Web Libraries & Tools**: Special authorizations outside standard menus (`WEBLIB_*` and PeopleTools items).
- **Service Operations**: Operation names and action masks from `PSAUTHWS`.
- **Component Interfaces**: Component interface names, methods, and action masks from `PSAUTHBUSCOMP`.
- **Process Groups**: Authorized process groups from `PSAUTHPRCS`.
- **Query Trees & Access Groups**: Tree names, access groups, and `ACCESSIBLE` values from `SCRTY_ACC_GRP`.

## How to Run

- **From Reports**: Open **Reports > Run Report** and select **Permission List Comparison** under **Security Audits**. Choose the source database, enter `classID1` (plus optional `target_db` and `classID2`), and click **Run Now** or **Schedule**.
- **From Compare Permission Lists**: Open **Security > Compare Permission Lists** (`/permissionlists/compare`) to run an interactive comparison and save the result to Report History. See [Permission Lists](/docs/security/permission-lists/).
