summaryrefslogtreecommitdiffstats
path: root/certServiceClient/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'certServiceClient/src/main/java')
-rw-r--r--certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/ClientConfigurationFactory.java2
-rw-r--r--certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/validation/client/ClientEnvsValueValidators.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/ClientConfigurationFactory.java b/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/ClientConfigurationFactory.java
index f1541b04..2bd57f77 100644
--- a/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/ClientConfigurationFactory.java
+++ b/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/factory/ClientConfigurationFactory.java
@@ -59,7 +59,7 @@ public class ClientConfigurationFactory implements ConfigurationFactory<ClientCo
.orElseThrow(() -> new ClientConfigurationException(ClientConfigurationEnvs.OUTPUT_PATH + " is invalid."));
envsForClient.getCaName()
- .filter(ClientEnvsValueValidators::isAlphaNumeric)
+ .filter(ClientEnvsValueValidators::isCaNameValid)
.map(configuration::setCaName)
.orElseThrow(() -> new ClientConfigurationException(ClientConfigurationEnvs.CA_NAME + " is invalid."));
diff --git a/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/validation/client/ClientEnvsValueValidators.java b/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/validation/client/ClientEnvsValueValidators.java
index 503b7e46..86d1e0f0 100644
--- a/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/validation/client/ClientEnvsValueValidators.java
+++ b/certServiceClient/src/main/java/org/onap/oom/certservice/client/configuration/validation/client/ClientEnvsValueValidators.java
@@ -20,11 +20,11 @@
package org.onap.oom.certservice.client.configuration.validation.client;
public final class ClientEnvsValueValidators {
- private static final String ALPHA_NUMERIC_REGEX = "^[a-zA-Z0-9]*$";
+ private static final String CA_NAME_REGEX = "^[a-zA-Z0-9_.~-]{1,128}$";
private static final String VALID_PATH_REGEX = "^/|(/[a-zA-Z0-9_-]+)+/?$";
- public static boolean isAlphaNumeric(String caName) {
- return caName.matches(ALPHA_NUMERIC_REGEX);
+ public static boolean isCaNameValid(String caName) {
+ return caName.matches(CA_NAME_REGEX);
}
public static boolean isPathValid(String path) {