> Source: [sk128212](https://support.checkpoint.com/results/sk/sk128212)

# sk128212 - Identity Awareness Nested Groups Improved Capabilities

| Property | Value |
|----------|-------|
| Solution ID | sk128212 |
| Date Created | 2018-05-30 |
| Last Modified | 2026-11-22 |
| Technical Level | General |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20, R81.10 (EOS), R81 (EOS) |
| OS | Gaia |

## Symptoms

- * The Expert mode command "`top -H`" command shows high CPU usage by "`CpAuth Manager`".

* Users are not assigned to correct Access Roles during high traffic load.

## Cause

Inefficient nested groups setting is configured on the PDP Security Gateways.

## Solution

**Improved Nested Groups query methods** can reduce the Security Gateway CPU load and network utilization in certain Active Directory configuration scenarios.

|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| The below commands should be run on PDP Security Gateways that calculate access roles. In a cluster, the commands must be run on each cluster member. |

To get the current state, connect to the command line on the PDP Security Gateway and run:

`pdp nested_groups status`

**Available nested-groups states:**

* **Recursive query (State 1 - default):**

  The PDP Security Gateway queries each user to find out its group memberships and then queries each of these group recursively until it determines the nested groups (see [sk66561](https://support.checkpoint.com/results/sk/sk66561) and [sk92782](https://support.checkpoint.com/results/sk/sk92782)).

  To set this state:
  * On a Security Gateway / ClusterXL:

    1. Connect to the command line on the PDP Security Gateway / each ClusterXL Member.
    2. Log in.
    3. If this is the Traditional VSX mode, go to the context of the applicable Virtual System:
       * If the shell is Gaia Clish:  
         `set virtual-system <ID>`
       * If the shell is the Expert mode:  
         `vsenv <ID>`
    4. Run:  
       `pdp nested_groups __set_state 1`
  * On an ElasticXL / Maestro Security Group:

    1. Connect to the command line on the PDP Security Group.
    2. Log in to Gaia gClish.
    3. If this is the Traditional VSX mode / VSNext mode, go to the context of the applicable Virtual System / Virtual Gateway:  
       `set virtual-system <ID>`
    4. Run:  
       `pdp nested_groups __set_state 1`
* **Per-user method from any branch in the forest (State 2):**

  Relevant only for [sk134292](https://support.checkpoint.com/results/sk/sk134292).
* **Per-user method (State 4 optimization):**

  **Important:** This nested-groups state is available in R81.10 Take 93, and all higher versions.

  One LDAP query is sent. The response includes all groups for a given user, including nesting levels. This type can work over *all LDAP ports (389/636/3268/3269).*
  * Prerequisites:

    * In SmartConsole \> LDAP Account Unit object \> "Object Management" tab \> the list of branches shows only one branch.

    * A maximum of 300 Active Directory groups is selected in Access Roles.

    * Several Domain Controllers **with the same top priority** are configured in the LDAP Account Unit (for better load balancing).

  * To set this state:

    **Warning** - Schedule a full maintenance window. This procedure requires a reboot.
    * On a Security Gateway / ClusterXL:

      1. Connect to the command line on the PDP Security Gateway / **each** ClusterXL Member.
      2. Log in to the Expert mode.
      3. If this is the Traditional VSX mode, go to the context of the applicable Virtual System:  
         `vsenv <ID>`
      4. Back up the current file:  
         `cp -v $CPDIR/tmp/.CPprofile.sh{,_BKP}`
      5. Edit the current file:  
         `vi $CPDIR/tmp/.CPprofile.sh`
      6. Add this line:  
         `export ldap_max_group_keys=1000000`
      7. Make sure this line does NOT appear in the file:  
         `export LDAP_SID=1`
      8. Save the changes in the file and exit Vi editor.
      9. **Reboot** the Security Gateway / each ClusterXL Member.
      10. Connect to the command line on the PDP Security Gateway / **each** ClusterXL Member.
      11. Log in.
      12. If this is the Traditional VSX mode, go to the context of the applicable Virtual System:
          * If the shell is Gaia Clish:  
            `set virtual-system <ID>`
          * If the shell is the Expert mode:  
            `vsenv <ID>`
      13. Run:  
          `pdp nested_groups __set_state 4`
    * On an ElasticXL / Maestro Security Group:

      1. Connect to the command line on the PDP Security Group.
      2. Log in to the Expert mode.
      3. If this is the Traditional VSX mode / VSNext mode, go to the context of the applicable Virtual System / Virtual Gateway:  
         `vsenv <ID>`
      4. Back up the current file:  
         `g_all cp -v $CPDIR/tmp/.CPprofile.sh{,_BKP}`
      5. Edit the current file:  
         `vi $CPDIR/tmp/.CPprofile.sh`
      6. Add this line:  
         `export LDAP_SID=1`
      7. Save the changes in the file and exit Vi editor.
      8. Copy the modified file to all Security Group Members:  
         `asg2blades $CPDIR/tmp/.CPprofile.sh`
      9. **Reboot** all Security Group Members:  
         `reboot -b all`
      10. Connect to the command line on the PDP Security Group.
      11. Log in to Gaia gClish.
      12. If this is the Traditional VSX mode / VSNext mode, go to the context of the applicable Virtual System / Virtual Gateway:  
          `set virtual-system <ID>`
      13. Run:  
          `pdp nested_groups __set_state 4`
* **Query with the 'tokenGroups' method (State 5):**

  **Important** - This nested-groups state is available in R81.20 and all higher versions.

  One query per-user method. This query matches to groups from domains in the forest. It can bring unlimited number of groups.

  This query retrieves the "tokenGroups" attribute of the user object - a computed attribute that contains the list of SIDs of the user's nested groups.
  * Prerequisites:

    * If there are any Active Directory "Distribution groups" selected in access roles, they should be converted to "Security Groups" on the Active Directory side.

      [Contact Check Point Support](https://www.checkpoint.com/support-services/contact-support/) to get a script that can help identify "Distribution groups" selected in access roles.
    * All Active Directory users, machines and groups selected in access roles should have their SID stored in the Security Management database.

      If the Security Management server was previously upgraded from an earlier version, contact support to get a script that can help identify missing SIDs in the Security Management database. If missing SIDs are found, refer to [sk181946](https://support.checkpoint.com/results/sk/sk181946).
    * Active Directory Primary group membership will be recognized by the security gateway. This might lead to behavior change.

      [Contact Check Point Support](https://www.checkpoint.com/support-services/contact-support/) to get a script that can help identify Primary Groups that are selected in access roles.
    * A Global Catalog Domain Controller should exist on the Active Directory side. Nevertheless, any Domain Controller with port 389/636 should be used in the LDAP Account Unit.

    * Several Domain Controllers with the **same top priority** are configured in the LDAP account unit (for better load balancing).

  * To set this state:

    **Warning** - Schedule a full maintenance window. This procedure requires a reboot.
    * On a Security Gateway / ClusterXL:

      1. Connect to the command line on the PDP Security Gateway / **each** ClusterXL Member.
      2. Log in to the Expert mode.
      3. If this is the Traditional VSX mode, go to the context of the applicable Virtual System:  
         `vsenv <ID>`
      4. Back up the current file:  
         `cp -v $CPDIR/tmp/.CPprofile.sh{,_BKP}`
      5. Edit the current file:  
         `vi $CPDIR/tmp/.CPprofile.sh`
      6. Add this line:  
         `export LDAP_SID=1`
      7. Save the changes in the file and exit Vi editor.
      8. **Reboot** the Security Gateway / each ClusterXL Member.
      9. Connect to the command line on the PDP Security Gateway / **each** ClusterXL Member.
      10. Log in.
      11. If this is the Traditional VSX mode, go to the context of the applicable Virtual System:
          * If the shell is Gaia Clish:  
            `set virtual-system <ID>`
          * If the shell is the Expert mode:  
            `vsenv <ID>`
      12. Run:  
          `pdp nested_groups __set_state 5`
    * On an ElasticXL / Maestro Security Group:

      1. Connect to the command line on the PDP Security Group.
      2. Log in to the Expert mode.
      3. If this is the Traditional VSX mode / VSNext mode, go to the context of the applicable Virtual System / Virtual Gateway:  
         `vsenv <ID>`
      4. Back up the current file:  
         `g_all cp -v $CPDIR/tmp/.CPprofile.sh{,_BKP}`
      5. Edit the current file:  
         `vi $CPDIR/tmp/.CPprofile.sh`
      6. Add this line:  
         `export LDAP_SID=1`
      7. Save the changes in the file and exit Vi editor.
      8. Copy the modified file to all Security Group Members:  
         `asg2blades $CPDIR/tmp/.CPprofile.sh`
      9. **Reboot** all Security Group Members:  
         `reboot -b all`
      10. Connect to the command line on the PDP Security Group.
      11. Log in to Gaia gClish.
      12. If this is the Traditional VSX mode / VSNext mode, go to the context of the applicable Virtual System / Virtual Gateway:  
          `set virtual-system <ID>`
      13. Run:  
          `pdp nested_groups __set_state 5`

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
