docs: private Map<String, RoleSet> updateMapsForAccessId(String appName, String accessId, String realmName) {
          RoleSet computedRoles = RoleSet.EMPTY_ROLESET;
          Set<String> rolesForSubject = new HashSet<String>();
  
          AuthzInfo authzInfo = resourceToAuthzInfoMap.get(appName);
          AuthzTableContainer maps = authzInfo.authzTableContainer;
  
          for (SecurityRole role : authzInfo.securityRoles) {
              String roleName = role.getName();
  
              if (AccessIdUtil.isUserAccessId(accessId)) {
                  Iterator<User> users = role.getUsers().iterator();
                  while (users.hasNext()) {
                      User user = users.next();
                      String userNameFromRole = user.getName();
                      String accessIdFromRole = user.getAccessId();
                      if (accessIdFromRole == null || accessIdFromRole.isEmpty()) {
                          accessIdFromRole = maps.userToAccessIdMap.get(userNameFromRole);
                          if (accessIdFromRole == null) {
                              accessIdFromRole = updateMissingUserAccessId(maps, user, userNameFromRole);
                          }
                      } else if (!AccessIdUtil.isUserAccessId(accessIdFromRole)) {
                          accessIdFromRole = getCompleteAccessId(accessId, accessIdFromRole, AccessIdUtil.TYPE_USER, realmName);
                          maps.userToAccessIdMap.put(userNameFromRole, accessIdFromRole);
                      }
  
                      if (isMatch(accessId, accessIdFromRole)) {
                          rolesForSubject.add(roleName);
                      }
                  }
              } else if (AccessIdUtil.isGroupAccessId(accessId)) {
                  Iterator<Group> groups = role.getGroups().iterator();
                  while (groups.hasNext()) {
                      Group group = groups.next();
                      String groupNameFromRole = group.getName();
                      String accessIdFromRole = group.getAccessId();
                      if (accessIdFromRole == null || accessIdFromRole.isEmpty()) {
                          accessIdFromRole = maps.groupToAccessIdMap.get(groupNameFromRole);
                          if (accessIdFromRole == null) {
                              accessIdFromRole = updateMissingGroupAccessId(maps, group, groupNameFromRole);
                          }
                      } else if (!AccessIdUtil.isGroupAccessId(accessIdFromRole)) {
                          accessIdFromRole = getCompleteAccessId(accessId, accessIdFromRole, AccessIdUtil.TYPE_GROUP, realmName);
                          maps.groupToAccessIdMap.put(groupNameFromRole, accessIdFromRole);
                      }
  
                      if (isMatch(accessId, accessIdFromRole)) {
                          rolesForSubject.add(roleName);
                      }
                  }
              }
          }
  
          if (!rolesForSubject.isEmpty()) {
              computedRoles = new RoleSet(rolesForSubject);
          }
  
          maps.accessIdToRolesMap.put(accessId, computedRoles);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Added the following subject to role mapping for application: " + appName + ".",
                       accessId, computedRoles);
          }
  
          return maps.accessIdToRolesMap;
      }