[JBoss JIRA] (WFLY-1904) Usage of vault for system-properties throws java.lang.SecurityException
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-1904?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-1904:
-----------------------------------------------
Vaclav Tunka <vtunka(a)redhat.com> changed the Status of [bug 1076507|https://bugzilla.redhat.com/show_bug.cgi?id=1076507] from MODIFIED to ON_QA
> Usage of vault for system-properties throws java.lang.SecurityException
> -----------------------------------------------------------------------
>
> Key: WFLY-1904
> URL: https://issues.jboss.org/browse/WFLY-1904
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Security
> Affects Versions: 8.0.0.Beta1
> Reporter: Navin Surtani
> Assignee: Brian Stansberry
> Fix For: 8.1.0.CR1
>
>
> Steps to Reproduce: 1. add the lines in standalone.xml:-
> {code}
> <system-properties>
> <property name="javax.net.ssl.trustStore" value="/dir/truststore.jks"/>
> <property name="javax.net.ssl.trustStorePassword" value="${VAULT::blk::attr::MTBlYWUzNDEtMjI2MC00NWYzLWFiZmUtM2EyYjZkNDgyZWM4TElORV9CUkVBS215YWxpYXM=}" />
> </system-properties>
> <vault>
> <vault-option name="KEYSTORE_URL" value="/opt/jboss-eap-6.0/standalone/configuration/vault.jks"/>
> <vault-option name="KEYSTORE_PASSWORD" value="MASK-2gTQPnrWJaqrh0pURMKAOw"/>
> <vault-option name="KEYSTORE_ALIAS" value="myalias"/>
> <vault-option name="SALT" value="12345678"/>
> <vault-option name="ITERATION_COUNT" value="44"/>
> <vault-option name="ENC_FILE_DIR" value="/opt/jboss-eap-6.0/standalone/configuration/"/>
> </vault>
> {code}
> 2. start EAP6 in standalone mode
> project_key: JBPAPP6
> Usage of vault for system-properties throws java.lang.SecurityException.
> boot.log:-
> {code}
> 20:35:30,267 ERROR [org.jboss.as.controller.management-operation] JBAS014612: Operation ("add") failed - address: ([("system-property" => "javax.net.ssl.trustStorePassword")]): java.lang.SecurityException: JBAS013322: Vault is not initialized
> at org.jboss.as.security.vault.RuntimeVaultReader.retrieveFromVault(RuntimeVaultReader.java:98) [jboss-as-security-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.server.RuntimeExpressionResolver.resolvePluggableExpression(RuntimeExpressionResolver.java:45) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.ExpressionResolverImpl.resolveExpressionsRecursively(ExpressionResolverImpl.java:58) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.ExpressionResolverImpl.resolveExpressions(ExpressionResolverImpl.java:40) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.ModelControllerImpl.resolveExpressions(ModelControllerImpl.java:455) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.OperationContextImpl.resolveExpressions(OperationContextImpl.java:689) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.operations.common.SystemPropertyAddHandler.execute(SystemPropertyAddHandler.java:112) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:397) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:284) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:211) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:175) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:191) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.server.ServerService.boot(ServerService.java:295) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.server.ServerService.boot(ServerService.java:270) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:156) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 8 months
[JBoss JIRA] (WFLY-2921) Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
by Sri Ram (JIRA)
[ https://issues.jboss.org/browse/WFLY-2921?page=com.atlassian.jira.plugin.... ]
Sri Ram edited comment on WFLY-2921 at 5/3/14 3:22 PM:
-------------------------------------------------------
I think, It's the right condition. That method is expected to return "ipAddress:port" and not the "hostname:port"
Reason :
With this below condition, if an inet socket address is unresolved, then we can't get it's address (i.e., inet.getAddress() will return null) and the getHostName() will return whatever we passed as string).
>>
if(inet.isUnresolved()){
result.append(inet.getHostName());
}else{
result.append(formatPossibleIpv6Address(formatAddress(inet.getAddress())));
}
<<
I'll post a patch with few more test cases to test the unresolved scenarios.
Does it sounds good?
was (Author: ramsrib):
I think, It's the right condition. That method is expected to return "ipAddress:port" and not the "hostname:port"
Reason :
With this below condition, if an inet socket address is unresolved, then we can't get it's address (i.e., inet.getAddress() will return null) and the getHostName() will return whatever we passed as string).
>>
if(inet.isUnresolved()){
result.append(inet.getHostName());
}else{
result.append(formatPossibleIpv6Address(formatAddress(inet.getAddress())));
}
<<
Does it sounds good?
> Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
> --------------------------------------------------------------------------
>
> Key: WFLY-2921
> URL: https://issues.jboss.org/browse/WFLY-2921
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 8.0.0.Final
> Reporter: Ted Won
> Priority: Minor
>
> It seems there is a wrong condition statement of formatAddress(InetSocketAddress inet) in the class org.jboss.as.network.NetworkUtils.
> https://github.com/wildfly/wildfly/blob/master/network/src/main/java/org/...
> This method returns "ipAddress:port", but expected to "hostname:port".
> public static String formatAddress(InetSocketAddress inet)
> ...
> // As-is
> if(inet.isUnresolved()){
> result.append(inet.getHostName());
> // Expected to reversely:
> if(!inet.isUnresolved()){
> result.append(inet.getHostName());
> ...
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 8 months
[JBoss JIRA] (WFLY-2921) Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
by Sri Ram (JIRA)
[ https://issues.jboss.org/browse/WFLY-2921?page=com.atlassian.jira.plugin.... ]
Sri Ram commented on WFLY-2921:
-------------------------------
I think, It's the right condition. That method is expected to return "ipAddress:port" and not the "hostname:port"
Reason :
With this below condition, if an inet socket address is unresolved, then we can't get it's address (i.e., inet.getAddress() will return null) and the getHostName() will return whatever we passed as string).
>>
if(inet.isUnresolved()){
result.append(inet.getHostName());
}else{
result.append(formatPossibleIpv6Address(formatAddress(inet.getAddress())));
}
<<
Does it sounds good?
> Wrong condition statement in NetworkUtils#formatAddress(InetSocketAddress)
> --------------------------------------------------------------------------
>
> Key: WFLY-2921
> URL: https://issues.jboss.org/browse/WFLY-2921
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 8.0.0.Final
> Reporter: Ted Won
> Priority: Minor
>
> It seems there is a wrong condition statement of formatAddress(InetSocketAddress inet) in the class org.jboss.as.network.NetworkUtils.
> https://github.com/wildfly/wildfly/blob/master/network/src/main/java/org/...
> This method returns "ipAddress:port", but expected to "hostname:port".
> public static String formatAddress(InetSocketAddress inet)
> ...
> // As-is
> if(inet.isUnresolved()){
> result.append(inet.getHostName());
> // Expected to reversely:
> if(!inet.isUnresolved()){
> result.append(inet.getHostName());
> ...
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 8 months