private static AllowableValue buildDefaultWeakCryptoAllowableValue() { return new AllowableValue(WEAK_CRYPTO_NOT_ALLOWED_NAME, "Not Allowed", "When set, operation will be blocked and alerts will be presented to the user " + "if unsafe combinations of encryption algorithms and passwords are provided on a JVM with limited strength crypto. To fix this, see the Admin Guide."); }
public <E extends Enum<E>> Builder allowableValues(final E[] values) { if (null != values) { this.allowableValues = new ArrayList<>(); for (final E value : values) { allowableValues.add(new AllowableValue(value.name(), value.name())); } } return this; }
/** * @param values contrained set of values * @return the builder */ public Builder allowableValues(final Set<String> values) { if (null != values) { this.allowableValues = new ArrayList<>(); for (final String value : values) { this.allowableValues.add(new AllowableValue(value, value)); } } return this; }
/** * @param values constrained set of values * @return the builder */ public Builder allowableValues(final String... values) { if (null != values) { this.allowableValues = new ArrayList<>(); for (final String value : values) { allowableValues.add(new AllowableValue(value, value)); } } return this; }
private static AllowableValue[] buildWeakCryptoAllowableValues() { List<AllowableValue> allowableValues = new ArrayList<>(); allowableValues.add(new AllowableValue(WEAK_CRYPTO_ALLOWED_NAME, "Allowed", "Operation will not be blocked and no alerts will be presented " + "when unsafe combinations of encryption algorithms and passwords are provided")); allowableValues.add(buildDefaultWeakCryptoAllowableValue()); return allowableValues.toArray(new AllowableValue[0]); }
/** * Returns an array of {@link AllowableValue} elements for each {@link Charset}. Only the charsets in {@link StandardCharsets} are returned to be consistent across JVM instances. * * @return an ordered {@code AllowableValue[]} containing the values */ public static AllowableValue[] buildCharacterSetAllowableValues() { final List<Charset> charsets = getSupportedCharsets(); return charsets.stream().map(cs -> new AllowableValue(cs.name(), cs.displayName(), cs == StandardCharsets.UTF_16 ? UTF_16_DESCRIPTION : cs.displayName()) ).toArray(AllowableValue[]::new); }
public static List<AllowableValue> getCompressionTypes() { final List<AllowableValue> compressionTypes = new ArrayList<>(); for (CompressionCodecName compressionCodecName : CompressionCodecName.values()) { final String name = compressionCodecName.name(); compressionTypes.add(new AllowableValue(name, name)); } return Collections.unmodifiableList(compressionTypes); }
protocolAllowableValues.add(new AllowableValue(protocol));
protocolAllowableValues.add(new AllowableValue(protocol));
public static AllowableValue[] allowableValues() { List<AllowableValue> values = new ArrayList<AllowableValue>(); for (CompressionType type : CompressionType.values()) { values.add(new AllowableValue(type.name(), type.name(), type.getDescription())); } return values.toArray(new AllowableValue[values.size()]); }
private static AllowableValue[] buildEncryptionMethodAllowableValues() { final EncryptionMethod[] encryptionMethods = EncryptionMethod.values(); List<AllowableValue> allowableValues = new ArrayList<>(encryptionMethods.length); for (EncryptionMethod em : encryptionMethods) { allowableValues.add(new AllowableValue(em.name(), em.name(), em.toString())); } return allowableValues.toArray(new AllowableValue[0]); }
private static AllowableValue[] buildKeyDerivationFunctionAllowableValues() { final KeyDerivationFunction[] keyDerivationFunctions = KeyDerivationFunction.values(); List<AllowableValue> allowableValues = new ArrayList<>(keyDerivationFunctions.length); for (KeyDerivationFunction kdf : keyDerivationFunctions) { allowableValues.add(new AllowableValue(kdf.name(), kdf.getName(), kdf.getDescription())); } return allowableValues.toArray(new AllowableValue[0]); }
/** * Returns an array of {@link AllowableValue} elements for each {@link HashAlgorithm}. The * complete {@code description} is built from the digest length, safety warnings, etc. See * {@link HashAlgorithm#buildAllowableValueDescription()}. * * @return an ordered {@code AllowableValue[]} containing the values */ public static AllowableValue[] buildHashAlgorithmAllowableValues() { final HashAlgorithm[] hashAlgorithms = HashAlgorithm.values(); List<AllowableValue> allowableValues = new ArrayList<>(hashAlgorithms.length); for (HashAlgorithm algorithm : hashAlgorithms) { allowableValues.add(new AllowableValue(algorithm.getName(), algorithm.getName(), algorithm.buildAllowableValueDescription())); } return allowableValues.toArray(new AllowableValue[0]); }
protected static AllowableValue createAllowableValue(final Regions region) { return new AllowableValue(region.getName(), region.getDescription(), "AWS Region Code : " + region.getName()); }
List<AllowableValue> engineList = new LinkedList<>(); for (ScriptEngineFactory factory : scriptEngineFactories) { engineList.add(new AllowableValue(factory.getLanguageName())); scriptEngineFactoryMap.put(factory.getLanguageName(), factory);
public static final AllowableValue TCP_VALUE = new AllowableValue("TCP", "TCP"); public static final AllowableValue UDP_VALUE = new AllowableValue("UDP", "UDP");
private static AllowableValue[] buildWeakCryptoAllowableValues() { List<AllowableValue> allowableValues = new ArrayList<>(); allowableValues.add(new AllowableValue(WEAK_CRYPTO_ALLOWED_NAME, "Allowed", "Operation will not be blocked and no alerts will be presented " + "when unsafe combinations of encryption algorithms and passwords are provided")); allowableValues.add(buildDefaultWeakCryptoAllowableValue()); return allowableValues.toArray(new AllowableValue[0]); }
private static AllowableValue[] buildEncryptionMethodAllowableValues() { final EncryptionMethod[] encryptionMethods = EncryptionMethod.values(); List<AllowableValue> allowableValues = new ArrayList<>(encryptionMethods.length); for (EncryptionMethod em : encryptionMethods) { allowableValues.add(new AllowableValue(em.name(), em.name(), em.toString())); } return allowableValues.toArray(new AllowableValue[0]); }
public static AllowableValue[] allowableValues() { List<AllowableValue> values = new ArrayList<AllowableValue>(); for (CompressionType type : CompressionType.values()) { values.add(new AllowableValue(type.name(), type.name(), type.getDescription())); } return values.toArray(new AllowableValue[values.size()]); }
private static AllowableValue[] buildKeyDerivationFunctionAllowableValues() { final KeyDerivationFunction[] keyDerivationFunctions = KeyDerivationFunction.values(); List<AllowableValue> allowableValues = new ArrayList<>(keyDerivationFunctions.length); for (KeyDerivationFunction kdf : keyDerivationFunctions) { allowableValues.add(new AllowableValue(kdf.name(), kdf.getName(), kdf.getDescription())); } return allowableValues.toArray(new AllowableValue[0]); }