Performs a sanity check on properties. Sanity checking includes:
- verifying that a server url is present
- verifying various combinations of properties given the authenticator

@throws SFException
322645
private void performSanityCheckOnProperties() throws SFException
  {
    for (SFSessionProperty property : SFSessionProperty.values())
    {
      if (property.isRequired() &&
          !connectionPropertiesMap.containsKey(property))
      {
        switch (property)
        {
          case SERVER_URL:
            throw new SFException(ErrorCode.MISSING_SERVER_URL);

          default:
            throw new SFException(ErrorCode.MISSING_CONNECTION_PROPERTY,
                                  property.getPropertyKey());
        }
      }
    }

    String authenticator = (String) connectionPropertiesMap.get(
        SFSessionProperty.AUTHENTICATOR);
    if (isSnowflakeAuthenticator() ||
        ClientAuthnDTO.AuthenticatorType.OKTA.name().equalsIgnoreCase(
            authenticator))
    {
      // userName and password are expected for both Snowflake and Okta.
      String userName = (String) connectionPropertiesMap.get(
          SFSessionProperty.USER);
      if (userName == null || userName.isEmpty())
      {
        throw new SFException(ErrorCode.MISSING_USERNAME);
      }

      String password = (String) connectionPropertiesMap.get(
          SFSessionProperty.PASSWORD);
      if (password == null || password.isEmpty())

      {
        throw new SFException(ErrorCode.MISSING_PASSWORD);
      }
    }

    // perform sanity check on proxy settings
    boolean useProxy = (boolean) connectionPropertiesMap.getOrDefault(
        SFSessionProperty.USE_PROXY, false);
    if (useProxy)
    {
      if (!connectionPropertiesMap.containsKey(SFSessionProperty.PROXY_HOST)
          || !connectionPropertiesMap.containsKey(SFSessionProperty.PROXY_PORT))
      {
        throw new SFException(ErrorCode.INVALID_PROXY_PROPERTIES);
      }
    }
  }
121723
private void verify() {
		if (!this.encoded) {
			return;
		}
		verifyUriComponent(getScheme(), Type.SCHEME);
		verifyUriComponent(this.userInfo, Type.USER_INFO);
		verifyUriComponent(this.host, getHostType());
		this.path.verify();
		for (Map.Entry<String, List<String>> entry : queryParams.entrySet()) {
			verifyUriComponent(entry.getKey(), Type.QUERY_PARAM);
			for (String value : entry.getValue()) {
				verifyUriComponent(value, Type.QUERY_PARAM);
			}
		}
		verifyUriComponent(getFragment(), Type.FRAGMENT);
	}
155065
public void verify() throws CredentialException {
        try {
            String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations();

            KeyStore keyStore = Stores.getTrustStore(caCertsLocation + "/" + Stores.getDefaultCAFilesPattern());
            CertStore crlStore = Stores.getCRLStore(caCertsLocation + "/" + Stores.getDefaultCRLFilesPattern());
            ResourceSigningPolicyStore sigPolStore = Stores.getSigningPolicyStore(caCertsLocation + "/" + Stores.getDefaultSigningPolicyFilesPattern());

            X509ProxyCertPathParameters parameters = new X509ProxyCertPathParameters(keyStore, crlStore, sigPolStore, false);
            X509ProxyCertPathValidator validator = new X509ProxyCertPathValidator();
            validator.engineValidate(CertificateUtil.getCertPath(certChain), parameters);
        } catch (Exception e) {
            throw new CredentialException(e);
        }
    }
890235
public void validateSSLConfig() throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "validateSSLConfig");

        try {
            if (Boolean.parseBoolean(getProperty(Constants.SSLPROP_VALIDATION_ENABLED))) {
                JSSEProviderFactory.getInstance().getSSLContext(null, this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    Tr.exit(tc, "validateSSLConfig -> true");
                return;
            }

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "validateSSLConfig not enabled.");
            return;
        } catch (Exception e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "validateSSLConfig -> false");
            throw e;
        }
    }
234563
private static void sanityChecks() {
        Config config = getInstance(Config.class);
        List<String> warnings = new ArrayList<>();
        
        if (!config.isAuthenticationCookieSecure()) {
            String warning = "Authentication cookie has secure flag set to false. It is highly recommended to set authentication.cookie.secure to true in an production environment.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getAuthenticationCookieName().equals(Default.AUTHENTICATION_COOKIE_NAME.toString())) {
            String warning = "Authentication cookie name has default value. Consider changing authentication.cookie.name to an application specific value.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getAuthenticationCookieSignKey().equals(config.getApplicationSecret())) {
            String warning = "Authentication cookie sign key is using application secret. It is highly recommended to set a dedicated value to authentication.cookie.signkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getAuthenticationCookieEncryptionKey().equals(config.getApplicationSecret())) {
            String warning = "Authentication cookie encryption is using application secret. It is highly recommended to set a dedicated value to authentication.cookie.encryptionkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (!config.isSessionCookieSecure()) {
            String warning = "Session cookie has secure flag set to false. It is highly recommended to set session.cookie.secure to true in an production environment.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getSessionCookieName().equals(Default.SESSION_COOKIE_NAME.toString())) {
            String warning = "Session cookie name has default value. Consider changing session.cookie.name to an application specific value.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getSessionCookieSignKey().equals(config.getApplicationSecret())) {
            String warning = "Session cookie sign key is using application secret. It is highly recommended to set a dedicated value to session.cookie.signkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getSessionCookieEncryptionKey().equals(config.getApplicationSecret())) {
            String warning = "Session cookie encryption is using application secret. It is highly recommended to set a dedicated value to session.cookie.encryptionkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getFlashCookieName().equals(Default.FLASH_COOKIE_NAME.toString())) {
            String warning = "Flash cookie name has default value. Consider changing flash.cookie.name to an application specific value.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getFlashCookieSignKey().equals(config.getApplicationSecret())) {
            String warning = "Flash cookie sign key is using application secret. It is highly recommended to set a dedicated value to flash.cookie.signkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        if (config.getFlashCookieEncryptionKey().equals(config.getApplicationSecret())) {
            String warning = "Flash cookie encryption key is using application secret. It is highly recommended to set a dedicated value to flash.cookie.encryptionkey.";
            warnings.add(warning);
            LOG.warn(warning);
        }
        
        getInstance(CacheProvider.class).getCache(CacheName.APPLICATION).put(Key.MANGOOIO_WARNINGS.toString(), warnings);
    }
1115930
private void assertValidSSLConfig() {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        boolean sslEnabled = (((Boolean) props.get(SSL_ENABLED)) == null) ? false : (Boolean) props.get(SSL_ENABLED);
        boolean sslRefExists = ((props.get(SSL_REF)) == null) ? false : true;

        if (sslRefExists && !sslEnabled) {
            if (trace && tc.isDebugEnabled()) {
                // sslRef property set in the server.xml but sslEnabled not set to true.
                Tr.error(tc, "CWKKD0024.ssl.sslref.no.ssl", MONGO, id);
            }
            throw new RuntimeException(Tr.formatMessage(tc, "CWKKD0024.ssl.sslref.no.ssl", MONGO, id));
        }

        if (sslEnabled) {
            // we should have the ssl-1.0 feature selected
            if (sslHelper == null) {
                throw new RuntimeException(Tr.formatMessage(tc, "CWKKD0015.ssl.feature.missing", MONGO, id));
            }

            if (useCertAuth) {

                if (!sslEnabled) {
                    // SSL not enabled, so shouldn't be using certificate authentication
                    throw new RuntimeException(Tr.formatMessage(tc, "CWKKD0019.ssl.certificate.no.ssl", MONGO, id));
                }
                if (props.get(USER) != null || props.get(PASSWORD) != null) {
                    // shouldn't be using userid and pasword with certificate authentication
                    throw new RuntimeException(Tr.formatMessage(tc, "CWKKD0018.ssl.user.pswd.certificate", MONGO, id));
                }
            }
        }
    }
983491
public function verifyAll()
    {
        $arguments = $this->getBrokerHttpClient()->getAllConsumerUrls($this->config->getProviderName());

        $arguments = \array_merge($arguments, $this->getArguments());

        $this->verifyAction($arguments);
    }
1221387
public void validate() throws GridConfigurationException {
    // validations occur here in the getters called on the configuration.
    try {
      configuration.getHubHost();
      configuration.getHubPort();
    } catch (RuntimeException e) {
      throw new GridConfigurationException(e.getMessage());
    }
  }
268930
public function verifySettings()
    {
        if ($this->pattern === null && $this->regex === null) {
            $this->setError("The name or regex attribute is required");
        } elseif ($this->pattern !== null && $this->regex !== null) {
            $this->setError("Only one of name and regex attribute is allowed");
        }
    }
18665
public void afterPropertiesSet() throws Exception {
		Assert.notNull(authenticationEntryPoint, "authenticationEntryPoint must be specified");
		Assert.notNull(portResolver, "portResolver must be specified");
		Assert.notNull(authenticationTrustResolver, "authenticationTrustResolver must be specified");
	}
183327
private function validate()
    {
        if (null === $this->provider) {
            throw new MissingProviderException('A provider must be set for converting a currency');
        }

        if (null === $this->from || null === $this->to) {
            throw new \RuntimeException('from and to parameters must be provided');
        }
    }
751137
public function checkValidProperties()
    {
        if (!$this->controller && !$this->action && !$this->callable) {
            throw new \Parable\Routing\Exception('Either a controller/action combination or callable is required.');
        }
        if (empty($this->methods)) {
            throw new \Parable\Routing\Exception('Methods are required and must be passed as an array.');
        }
        return $this;
    }
762075
static void validate( Map<String,String> targetProperties ) throws TargetException {

		checkProperty( API_URL, targetProperties );
		checkProperty( IMAGE_NAME, targetProperties );
		checkProperty( TENANT_NAME, targetProperties );
		checkProperty( FLAVOR_NAME, targetProperties );
		checkProperty( SECURITY_GROUP, targetProperties );
		checkProperty( KEY_PAIR, targetProperties );
		checkProperty( USER, targetProperties );
		checkProperty( PASSWORD, targetProperties );
	}
29864
@Override
	public void validate() throws AddressStringException {
		if(isValidated()) {
			return;
		}
		synchronized(this) {
			if(isValidated()) {
				return;
			}
			//we know nothing about this address.  See what it is.
			try {
				parsedAddress = getValidator().validateAddress(this);
				isValid = true;
			} catch(AddressStringException e) {
				cachedException = e;
				isValid = false;
				throw e;
			}
		}
	}
622881
protected function checkParams()
    {
        if ((null === $this->jar) or !file_exists($this->jar)) {
            throw new BuildException(
                sprintf(
                    'Specify the name of the LiquiBase.jar. "%s" does not exist!',
                    $this->jar
                )
            );
        }

        $this->checkChangeLogFile();

        if (null === $this->classpathref) {
            throw new BuildException('Please provide a classpath!');
        }

        if (null === $this->username) {
            throw new BuildException('Please provide a username for database acccess!');
        }

        if (null === $this->password) {
            throw new BuildException('Please provide a password for database acccess!');
        }

        if (null === $this->url) {
            throw new BuildException('Please provide a url for database acccess!');
        }
    }
73608
private void validateConfigurationProperties() {
        if (isStringValueUndefined(config.userName()) && !isStringValueUndefined(config.userPassword())) {
            Tr.error(tc, "QUICK_START_SECURITY_MISSING_ATTIRBUTES", CFG_KEY_USER);
        }
        if (!isStringValueUndefined(config.userName()) && isStringValueUndefined(config.userPassword())) {
            Tr.error(tc, "QUICK_START_SECURITY_MISSING_ATTIRBUTES", CFG_KEY_PASSWORD);
        }
        errorOnAnotherRegistry();
        errorOnAnotherManagementRole();
    }
232174
private static void checkProperty() {
		if (!pngLoaderPropertyChecked) {
			pngLoaderPropertyChecked = true;

			try {
				AccessController.doPrivileged(new PrivilegedAction() {
		            public Object run() {
						String val = System.getProperty(PNG_LOADER);
						if ("false".equalsIgnoreCase(val)) {
							usePngLoader = false;
						}
						
						Log.info("Use Java PNG Loader = " + usePngLoader);
						return null;
		            }
				});
			} catch (Throwable e) {
				// ignore, security failure - probably an applet
			}
		}
	}