Traverses the config and adds master keys and regional clients as needed.
336801
def _process_config(self):
        """"""
        self._user_agent_adding_config = botocore.config.Config(user_agent_extra=USER_AGENT_SUFFIX)

        if self.config.region_names:
            self.add_regional_clients_from_list(self.config.region_names)
            self.default_region = self.config.region_names[0]
        else:
            self.default_region = self.config.botocore_session.get_config_variable("region")
            if self.default_region is not None:
                self.add_regional_client(self.default_region)

        if self.config.key_ids:
            self.add_master_keys_from_list(self.config.key_ids)
557995
function MasterNode(io, config, pass) {
  EventEmitter.call(this);
  this.connected = [];  // array of connected clients.
  this.disconnected = []; // an array of disconnected and removed clients.
  this.disconnecting = [];  //array of disconnecting clients (didn't reconnect within 10sec)
  this.io = io;
  this.config = config;
  this.config.password = crux.util.sha2(pass);
  this.__loadDump();
  this.bind();
}
192702
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, CLASS_INFO_CLASS_NAME_KEY);
        keyArea.addKeyField(CLASS_INFO_CLASS_NAME, Constants.ASCENDING);
        keyArea.addKeyField(CLASS_FIELD_SEQUENCE, Constants.ASCENDING);
        keyArea.addKeyField(CLASS_FIELD_NAME, Constants.ASCENDING);
    }
691091
def add_master( *args )
      args.map do |key|
        key = to_key(key)
        @masters << key unless @masters.include? key
        key
      end
    end
1079193
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, RESOURCE_ID_KEY);
        keyArea.addKeyField(RESOURCE_ID, Constants.ASCENDING);
        keyArea.addKeyField(LANGUAGE, Constants.ASCENDING);
        keyArea.addKeyField(LOCALE, Constants.ASCENDING);
        keyArea.addKeyField(KEY_VALUE, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, CODE_KEY);
        keyArea.addKeyField(RESOURCE_ID, Constants.ASCENDING);
        keyArea.addKeyField(CODE, Constants.ASCENDING);
        keyArea.addKeyField(LANGUAGE, Constants.ASCENDING);
        keyArea.addKeyField(LOCALE, Constants.ASCENDING);
        keyArea.addKeyField(KEY_VALUE, Constants.ASCENDING);
    }
392280
def prepare(self):
        '''
        
        '''
        super(Master, self).prepare()

        try:
            if self.config['verify_env']:
                v_dirs = [
                        self.config['pki_dir'],
                        os.path.join(self.config['pki_dir'], 'minions'),
                        os.path.join(self.config['pki_dir'], 'minions_pre'),
                        os.path.join(self.config['pki_dir'], 'minions_denied'),
                        os.path.join(self.config['pki_dir'],
                                     'minions_autosign'),
                        os.path.join(self.config['pki_dir'],
                                     'minions_rejected'),
                        self.config['cachedir'],
                        os.path.join(self.config['cachedir'], 'jobs'),
                        os.path.join(self.config['cachedir'], 'proc'),
                        self.config['sock_dir'],
                        self.config['token_dir'],
                        self.config['syndic_dir'],
                        self.config['sqlite_queue_dir'],
                    ]
                verify_env(
                    v_dirs,
                    self.config['user'],
                    permissive=self.config['permissive_pki_access'],
                    root_dir=self.config['root_dir'],
                    pki_dir=self.config['pki_dir'],
                )
                # Clear out syndics from cachedir
                for syndic_file in os.listdir(self.config['syndic_dir']):
                    os.remove(os.path.join(self.config['syndic_dir'], syndic_file))
        except OSError as error:
            self.environment_failure(error)

        self.setup_logfile_logger()
        verify_log(self.config)
        self.action_log_info('Setting up')

        # TODO: AIO core is separate from transport
        if not verify_socket(self.config['interface'],
                             self.config['publish_port'],
                             self.config['ret_port']):
            self.shutdown(4, 'The ports are not available to bind')
        self.config['interface'] = ip_bracket(self.config['interface'])
        migrations.migrate_paths(self.config)

        # Late import so logging works correctly
        import salt.master
        self.master = salt.master.Master(self.config)

        self.daemonize_if_required()
        self.set_pidfile()
        salt.utils.process.notify_systemd()
776194
def add_key(pub):
    """"""
    global _server_keys
    key = rsa.PublicKey.load_pkcs1(pub)
    _server_keys[_compute_fingerprint(key)] = key
1271695
def _add_discovery_config(self):
    
    lookup_key = (discovery_service.DiscoveryService.API_CONFIG['name'],
                  discovery_service.DiscoveryService.API_CONFIG['version'])
    self._configs[lookup_key] = discovery_service.DiscoveryService.API_CONFIG
56000
private void addProperties(ReplicationInternal replicationInternal) {
        for (ReplicationField key : properties.keySet()) {
            Object value = properties.get(key);
            switch (key) {
                case FILTER_NAME:
                    replicationInternal.setFilter((String) value);
                    break;
                case FILTER_PARAMS:
                    replicationInternal.setFilterParams((Map) value);
                    break;
                case DOC_IDS:
                    replicationInternal.setDocIds((List) value);
                    break;
                case AUTHENTICATOR:
                    replicationInternal.setAuthenticator((Authenticator) value);
                    break;
                case CREATE_TARGET:
                    replicationInternal.setCreateTarget((Boolean) value);
                    break;
                case REQUEST_HEADERS:
                    replicationInternal.setHeaders((Map) value);
                    break;
                case REMOTE_UUID:
                    replicationInternal.setRemoteUUID((String) value);
                    break;
                case CHANNELS:
                    replicationInternal.setChannels((List<String>)value);
                    break;
            }
        }
    }
375171
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, PARENT_FOLDER_ID_KEY);
        keyArea.addKeyField(PARENT_FOLDER_ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, NAME_KEY);
        keyArea.addKeyField(NAME, Constants.ASCENDING);
    }
117600
public function configureServers()
    {
        if (!array_key_exists('server', $this->config)) {
            throw new \InvalidArgumentException('Configuration key "server" must be set');
        }

        $servers = $this->config['server'];

        // Single server
        if (array_key_exists('host', $servers)) {
            $servers = array($servers);
        }

        $this->connection->addServers($servers);
    }
496192
public static synchronized void addCachedDatabaseConfigs(Collection<DatabaseTableConfig<?>> configs) {
		Map<Class<?>, DatabaseTableConfig<?>> newMap;
		if (configMap == null) {
			newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>();
		} else {
			newMap = new HashMap<Class<?>, DatabaseTableConfig<?>>(configMap);
		}
		for (DatabaseTableConfig<?> config : configs) {
			newMap.put(config.getDataClass(), config);
			logger.info("Loaded configuration for {}", config.getDataClass());
		}
		configMap = newMap;
	}
850833
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, NAME_KEY);
        keyArea.addKeyField(NAME, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, CODE_KEY);
        keyArea.addKeyField(CODE, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, EXTERNAL_QUEUE_NAME_KEY);
        keyArea.addKeyField(EXTERNAL_QUEUE_NAME, Constants.ASCENDING);
    }
1145283
private void setUpInternalProperties() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setUpInternalProperties");
        }

        if (getLocation() != null) {
            // KEYSTORE CUSTOM PROPERTIES
            Map<String, String> otherProps = getCustomProps();
            if (otherProps != null) {
                for (Entry<String, String> current : otherProps.entrySet()) {
                    setProperty(current.getKey(), current.getValue());
                }
            }

            // load as key store
            String keyStoreProvider = getProvider();
            if (keyStoreProvider != null) {
                setProperty(Constants.SSLPROP_KEY_STORE_PROVIDER, keyStoreProvider);
            }

            // KEYSTORE NAME
            String keyStoreName = getName();
            if (keyStoreName != null) {
                setProperty(Constants.SSLPROP_KEY_STORE_NAME, keyStoreName);
            }

            // KEYSTORE PASSWORD
            String keyStorePassword = getPassword();
            if (keyStorePassword != null) {
                setProperty(Constants.SSLPROP_KEY_STORE_PASSWORD, keyStorePassword);
            }

            // KEYSTORE LOCATION
            String keyStoreLocation = getLocation();
            if (keyStoreLocation != null) {
                setProperty(Constants.SSLPROP_KEY_STORE, keyStoreLocation);
            }

            // KEYSTORE IS FILE BASED
            if (getFileBased() != null) {
                setProperty(Constants.SSLPROP_KEY_STORE_FILE_BASED, getFileBased().toString());
            }

            // KEYSTORE TYPE
            String keyStoreType = getType();
            if (keyStoreType != null) {
                setProperty(Constants.SSLPROP_KEY_STORE_TYPE, keyStoreType);

                if (!keyStoreType.equalsIgnoreCase(Constants.KEYSTORE_TYPE_JKS) && !keyStoreType.equalsIgnoreCase(Constants.KEYSTORE_TYPE_JCEKS)
                    && !keyStoreType.equalsIgnoreCase(Constants.KEYSTORE_TYPE_PKCS12)) {
                    setProperty(Constants.SSLPROP_KEY_STORE_FILE_BASED, Constants.FALSE);
                }

                if (keyStoreType.equalsIgnoreCase(Constants.KEYSTORE_TYPE_JAVACRYPTO)) {
                    setProperty(Constants.SSLPROP_TOKEN_ENABLED, Constants.TRUE);

                    // set appropriate provider for jvm vendor
                    if (JavaInfo.vendor().equals(JavaInfo.Vendor.IBM))
                        setProperty(Constants.SSLPROP_KEY_STORE_PROVIDER, IBMPKCS11Impl_PROVIDER_NAME);
                    else
                        setProperty(Constants.SSLPROP_KEY_STORE_PROVIDER, SUNPKCS11_PROVIDER_NAME);
                }
            }

            // KEYSTORE IS READ ONLY
            if (getReadOnly() != null)
                setProperty(Constants.SSLPROP_KEY_STORE_READ_ONLY, getReadOnly().toString());

            // KEYSTORE IS INITIALIZED AT STARTUP
            if (getInitializeAtStartup() != null)
                setProperty(Constants.SSLPROP_KEY_STORE_INITIALIZE_AT_STARTUP, getInitializeAtStartup().toString());

            // KEYSTORE STASH FOR CMS
            if (getStashFile() != null)
                setProperty(Constants.SSLPROP_KEY_STORE_CREATE_CMS_STASH, getStashFile().toString());

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setUpInternalProperties");
        }
    }
321531
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, PARENT_FOLDER_ID_KEY);
        keyArea.addKeyField(PARENT_FOLDER_ID, Constants.ASCENDING);
        keyArea.addKeyField(SEQUENCE, Constants.ASCENDING);
        keyArea.addKeyField(TYPE, Constants.ASCENDING);
        keyArea.addKeyField(NAME, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, CODE_KEY);
        keyArea.addKeyField(CODE, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, TYPE_KEY);
        keyArea.addKeyField(TYPE, Constants.ASCENDING);
        keyArea.addKeyField(PROGRAM, Constants.ASCENDING);
    }
1243712
@Override
    public void prepare(Map conf) {
        _admins = new HashSet<String>();
        _supervisors = new HashSet<String>();
        _nimbusUsers = new HashSet<String>();
        _nimbusGroups = new HashSet<String>();

        if (conf.containsKey(Config.NIMBUS_ADMINS)) {
            _admins.addAll((Collection<String>) conf.get(Config.NIMBUS_ADMINS));
        }
        if (conf.containsKey(Config.NIMBUS_SUPERVISOR_USERS)) {
            _supervisors.addAll((Collection<String>) conf.get(Config.NIMBUS_SUPERVISOR_USERS));
        }
        if (conf.containsKey(Config.NIMBUS_USERS)) {
            _nimbusUsers.addAll((Collection<String>) conf.get(Config.NIMBUS_USERS));
        }

        if (conf.containsKey(Config.NIMBUS_GROUPS)) {
            _nimbusGroups.addAll((Collection<String>) conf.get(Config.NIMBUS_GROUPS));
        }

        _ptol = AuthUtils.GetPrincipalToLocalPlugin(conf);
        _groupMappingProvider = AuthUtils.GetGroupMappingServiceProviderPlugin(conf);
    }
602116
public function loadConfiguration(): void
	{
		$config = $this->validateConfig($this->defaults);
		$builder = $this->getContainerBuilder();

		Validators::assertField($config, 'siteKey', 'string');
		Validators::assertField($config, 'secretKey', 'string');

		$builder->addDefinition($this->prefix('provider'))
			->setFactory(ReCaptchaProvider::class, [$config['siteKey'], $config['secretKey']]);
	}