[
https://issues.jboss.org/browse/SRAMP-384?page=com.atlassian.jira.plugin....
]
David virgil naranjo commented on SRAMP-384:
--------------------------------------------
I found a solution. Is this:
-It is not possible to modify a ENV variable in the same thread execution. It is possible
to create another java thread execution and modify the env variable, BUT in that case, the
System.console() is null...
My solution has been drastic! And it is this:
-Copy the class AddPropertiesUser from jboss-as-domain-management jar.
-Modify the class and add a parameter --jboss_home.
-In case the parameter is set, then take the jboss home from there instead of ENV VARS.
Are there more reasons to modify the jboss-as main? Yes:
-When there is an ErrorState in the jboss implementation not always is thrown a
RuntimeException or Exception. It is only displayed an error message, but the execution
continues as it has been well created the user. This is the case of introducing a password
"david".
-In other cases it is thrown a RuntimeException, for instance in case you introduced a
password with the same value as the user, for instance 'admin' 'admin'.
In the change I have done, when the state is ErrorState, i always throw a
RuntimeException.
In the next comment you can see how would be the execution of the s-ramp-installer:
Add validation for password in overlord commons installer
---------------------------------------------------------
Key: SRAMP-384
URL:
https://issues.jboss.org/browse/SRAMP-384
Project: S-RAMP
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Eric Wittmann
Assignee: David virgil naranjo
Fix For: 0.5.0 - API Management
Currently the overlord commons installer is responsible for doing all security related
work. This includes creating the overlord 'admin' user and configured a password
for this user. The installer prompts the user for this password and then passes whatever
the user entered to the JBoss EAP add-user utility. This utility will fail if the
password does not meet certain standards. However, the utility fails without failing the
overall install.
The installer should do its own validation of the password entered by the user so that
this silent failure doesn't happen. Also note that the password input and validation
should happen before anything else security related gets installed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira