]
Ilia Vassilev reassigned ELY-1576:
----------------------------------
Assignee: Ilia Vassilev
Wildfly Elytron Tool, location is required even for non-filebased
type e.g. PKCS11
----------------------------------------------------------------------------------
Key: ELY-1576
URL:
https://issues.jboss.org/browse/ELY-1576
Project: WildFly Elytron
Issue Type: Bug
Components: Command-Line Tool
Affects Versions: 1.3.1.Final
Reporter: Martin Choma
Assignee: Ilia Vassilev
Wildfly Elytron tool is not aligned with fix for ELY-1460 - Do not reuse location
attribute for externalPath attribute. Make externalPath required when external
configured.
In Wildfly Elytron tool location is mandatory
{code:java|title=CredentialStoreCommand.java}
String location = cmdLine.getOptionValue(STORE_LOCATION_PARAM);
if (location == null) {
setStatus(GENERAL_CONFIGURATION_ERROR);
throw ElytronToolMessages.msg.optionNotSpecified(STORE_LOCATION_PARAM);
}
{code:java|title=CredentialStoreCommand.java}
After relaxing this check, double check usage of location, e.g. here
{code}
if ((cmdLine.hasOption(ALIASES_PARAM) || cmdLine.hasOption(CHECK_ALIAS_PARAM))
&& !Files.exists(Paths.get(location))) {
setStatus(GENERAL_CONFIGURATION_ERROR);
throw ElytronToolMessages.msg.storageFileDoesNotExist(location);
}
{code}