Set these properties in ``disk.0.os.credentials``.
976691
def setUserKeyCredentials(self, username, public_key=None, private_key=None):
        """"""

        self.setCredentialValues(username=username, public_key=public_key, private_key=private_key)
646255
def _AddCredentialConfiguration(
      self, path_spec, credential_type, credential_data):
    
    credential_configuration = configurations.CredentialConfiguration(
        credential_data=credential_data, credential_type=credential_type,
        path_spec=path_spec)

    self._credential_configurations.append(credential_configuration)
1081617
def setup(self):
        """"""
        if self.dry_run is not True:
            self.client = self._get_client()
            self._disable_access_key()
213577
public static Credentials copy(Credentials credentials) {
        if (credentials == null) {
            return null;
        }
        return new Credentials(credentials.login, credentials.password);
    }
1245539
def updateNewCredentialValues(self):
        

        credentials_base = "disk.0.os.credentials."
        new_credentials_base = "disk.0.os.credentials.new."

        for elem in ['password', 'public_key', 'private_key']:
            if self.getValue(new_credentials_base + elem):
                self.setValue(credentials_base + elem, self.getValue(new_credentials_base + elem))
                self.delValue(new_credentials_base + elem)
614739
def _build_credentials_tuple(mech, source, user, passwd, extra, database):
    
    if mech != 'MONGODB-X509' and user is None:
        raise ConfigurationError("%s requires a username." % (mech,))
    if mech == 'GSSAPI':
        if source is not None and source != '$external':
            raise ValueError(
                "authentication source must be $external or None for GSSAPI")
        properties = extra.get('authmechanismproperties', {})
        service_name = properties.get('SERVICE_NAME', 'mongodb')
        canonicalize = properties.get('CANONICALIZE_HOST_NAME', False)
        service_realm = properties.get('SERVICE_REALM')
        props = GSSAPIProperties(service_name=service_name,
                                 canonicalize_host_name=canonicalize,
                                 service_realm=service_realm)
        # Source is always $external.
        return MongoCredential(mech, '$external', user, passwd, props, None)
    elif mech == 'MONGODB-X509':
        if passwd is not None:
            raise ConfigurationError(
                "Passwords are not supported by MONGODB-X509")
        if source is not None and source != '$external':
            raise ValueError(
                "authentication source must be "
                "$external or None for MONGODB-X509")
        # user can be None.
        return MongoCredential(mech, '$external', user, None, None, None)
    elif mech == 'PLAIN':
        source_database = source or database or '$external'
        return MongoCredential(mech, source_database, user, passwd, None, None)
    else:
        source_database = source or database or 'admin'
        if passwd is None:
            raise ConfigurationError("A password is required.")
        return MongoCredential(
            mech, source_database, user, passwd, None, _Cache())
998789
public void setCredentials(String username, String password) {
        this.username = username;
        this.password = password;
    	authorization = "Basic " + Base64.getEncoder().encodeToString(filesystem.getWorld().getSettings().bytes(username + ":" + password));
    }
25453
def write_credentials(self):
        
        c = self.get_credentials()
        return self.storage.write_credentials(
            credentials=c, profile=self.profile,
            cache_token=self.cache_token
        )
826346
protected function setTitleEditCredential()
    {
        if (isset($this->data_credential['name'])) {
            $text = $this->text('Edit %name', array('%name' => $this->data_credential['name']));
        } else {
            $text = $this->text('Add credential');
        }

        $this->setTitle($text);
    }
173973
def __set_dir_properties(self):
        
        directories = [
            ("home", "The ROUGE home directory."),
            ("data", "The path of the ROUGE 'data' directory."),
            ("system", "Path of the directory containing system summaries."),
            ("model", "Path of the directory containing model summaries."),
            ]
        for (dirname, docstring) in directories:
            self.__create_dir_property(dirname, docstring)
939547
private void setProxyCredentials(Run<?, ?> run) {
    	if (proxySettings != null && proxySettings.getFsProxyCredentialsId() != null) {
    		UsernamePasswordCredentials up = CredentialsProvider.findCredentialById(
    				proxySettings.getFsProxyCredentialsId(),
            		StandardUsernamePasswordCredentials.class,
            		run,
        			URIRequirementBuilder.create().build());
			
    		if (up != null) {
    			proxySettings.setFsProxyUserName(up.getUsername());
        		proxySettings.setFsProxyPassword(up.getPassword());
    		}
    	}
    }
668670
public AuthenticationBuilder setCredentials(final @NonNull List<CredentialMetaData> credentials) {
        this.credentials.clear();
        this.credentials.addAll(credentials);
        return this;
    }
730923
def extend_settings(self, data_id, files, secrets):
        """"""
        process = Data.objects.get(pk=data_id).process
        if process.requirements.get('resources', {}).get('secrets', False):
            raise PermissionDenied(
                "Process which requires access to secrets cannot be run using the local executor"
            )

        return super().extend_settings(data_id, files, secrets)
1323655
def set_os_environ(self):
        
        for key in self.manifest['env'].keys():
            os.environ[key] = str(self.manifest['env'][key])
219363
def set_basic_auth(self, username, password):
        """"""
        credentials = str(b64encode('{}:{}'.format(username, password).encode('utf-8')), 'utf-8')
        self.authorization = 'Basic {}'.format(credentials)
446065
def _build_credentials_tuple(mech, source, user, passwd, extra):
    
    user = _unicode(user) if user is not None else None
    password = passwd if passwd is None else _unicode(passwd)
    if mech == 'GSSAPI':
        properties = extra.get('authmechanismproperties', {})
        service_name = properties.get('SERVICE_NAME', 'mongodb')
        canonicalize = properties.get('CANONICALIZE_HOST_NAME', False)
        service_realm = properties.get('SERVICE_REALM')
        props = GSSAPIProperties(service_name=service_name,
                                 canonicalize_host_name=canonicalize,
                                 service_realm=service_realm)
        # Source is always $external.
        return MongoCredential(mech, '$external', user, password, props)
    elif mech == 'MONGODB-X509':
        # user can be None.
        return MongoCredential(mech, '$external', user, None, None)
    else:
        if passwd is None:
            raise ConfigurationError("A password is required.")
        return MongoCredential(mech, source, user, password, None)
569582
def setpassword(self, pwd):
        """"""
        if pwd and not isinstance(pwd, bytes):
            raise TypeError("pwd: expected bytes, got %s" % type(pwd))
        if pwd:
            self.pwd = pwd
        else:
            self.pwd = None