public function preProcessConfiguration(array $configs): array
    {
        $newConfigs = $configs;
        $prependConfigs = [];
        foreach ($configs as $index => $config) {
            if (isset($config['system'])) {
                $prependConfigs[] = ['system' => $config['system']];
                unset($config['system']);
                $newConfigs[$index] = $config;
            }

            foreach (array_keys($config) as $configName) {
                if (!in_array($configName, self::SITEACCCESS_AWARE_SETTINGS, true)) {
                    unset($config[$configName]);
                }
            }

            $newConfigs[] = ['system' => ['default' => $config]];
        }

        return array_merge($prependConfigs, $newConfigs);
    }