Scope by Security Principal

Scoping by security principal is useful when querying for scan data specific to a given set of owners or trustees.

This example selects all files for a given server owned by a specific AD user, limited to 100 entries.

Copy
Example (SQL Server)
SELECT TOP(100) *
FROM srs.current_fs_scandata_ad
WHERE owner_domain = 'AD'
  AND owner_name = 'user1';
Copy
Example (PostgreSQL)
SELECT *
FROM srs.current_fs_scandata_ad
WHERE owner_domain = 'DB'
  AND owner_name = 'test1'
LIMIT 100;

This next example selects all folders where a user is a direct trustee (not inherited) for NTFS folders, limited to 100 entries.

Copy
Example (SQL Server)
SELECT TOP(100) *
FROM srs.current_ntfs_aces
WHERE trustee_domain = 'DB'
  AND trustee_name = 'test1'
  AND ace_flags & 16 <> 16;
Copy
Example (PostgreSQL)
SELECT *
FROM srs.current_ntfs_aces
WHERE trustee_domain = 'DB'
  AND trustee_name = 'test1'
  AND ace_flags & 16 <> 16
LIMIT 100;