[JBoss JIRA] (ELY-646) Unable to setup CLIENT_CERT authentication with elytron.
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/ELY-646?page=com.atlassian.jira.plugin.sy... ]
Jan Kalina edited comment on ELY-646 at 9/28/16 12:07 PM:
----------------------------------------------------------
The certificate is not required, because setWantClientAuth(true) call resets needClientAuth to false. Needs be fixed in wildfly-elytron.
was (Author: honza889):
The certificate is not required, because setting setWantClientAuth(true) resets needClientAuth to false.
> Unable to setup CLIENT_CERT authentication with elytron.
> --------------------------------------------------------
>
> Key: ELY-646
> URL: https://issues.jboss.org/browse/ELY-646
> Project: WildFly Elytron
> Issue Type: Bug
> Components: SSL
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
>
> Following Zach's notes on [How to setup 2 way TLS|https://gitlab.cee.redhat.com/zrhoads/kbase/blob/master/eap71.elytron...] I am unable to setup it properly. User is not requested by browser for specifying client certificate and get access to application without certificate.
> In log you there is:
> 1. Server send request for certificate
> {code}
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) *** CertificateRequest
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Types: RSA, DSS, ECDSA
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Authorities:
> ^[[0m^[[0m13:55:33,310 INFO [stdout] (default task-1) <CN=client>
> {code}
> 2. And client responds with empty certificate chain. Without asking for certificate
> {code}
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) *** Certificate chain
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) <Empty>
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) ***
> {code}
> I am attaching:
> * server.log - server log with -Djavax.net.debug=all turn on.
> * 2wayTLS.pcap - wireshark recording of port 8443
> * secured-app - tested application
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (ELY-646) Unable to setup CLIENT_CERT authentication with elytron.
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/ELY-646?page=com.atlassian.jira.plugin.sy... ]
Jan Kalina moved WFLY-7218 to ELY-646:
--------------------------------------
Project: WildFly Elytron (was: WildFly)
Key: ELY-646 (was: WFLY-7218)
Component/s: SSL
(was: Security)
Affects Version/s: (was: 11.0.0.Alpha1)
> Unable to setup CLIENT_CERT authentication with elytron.
> --------------------------------------------------------
>
> Key: ELY-646
> URL: https://issues.jboss.org/browse/ELY-646
> Project: WildFly Elytron
> Issue Type: Bug
> Components: SSL
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
>
> Following Zach's notes on [How to setup 2 way TLS|https://gitlab.cee.redhat.com/zrhoads/kbase/blob/master/eap71.elytron...] I am unable to setup it properly. User is not requested by browser for specifying client certificate and get access to application without certificate.
> In log you there is:
> 1. Server send request for certificate
> {code}
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) *** CertificateRequest
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Types: RSA, DSS, ECDSA
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Authorities:
> ^[[0m^[[0m13:55:33,310 INFO [stdout] (default task-1) <CN=client>
> {code}
> 2. And client responds with empty certificate chain. Without asking for certificate
> {code}
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) *** Certificate chain
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) <Empty>
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) ***
> {code}
> I am attaching:
> * server.log - server log with -Djavax.net.debug=all turn on.
> * 2wayTLS.pcap - wireshark recording of port 8443
> * secured-app - tested application
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (WFLY-7218) Unable to setup CLIENT_CERT authentication with elytron.
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/WFLY-7218?page=com.atlassian.jira.plugin.... ]
Jan Kalina commented on WFLY-7218:
----------------------------------
The certificate is not required, because setting setWantClientAuth(true) resets needClientAuth to false.
> Unable to setup CLIENT_CERT authentication with elytron.
> --------------------------------------------------------
>
> Key: WFLY-7218
> URL: https://issues.jboss.org/browse/WFLY-7218
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 11.0.0.Alpha1
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Blocker
>
> Following Zach's notes on [How to setup 2 way TLS|https://gitlab.cee.redhat.com/zrhoads/kbase/blob/master/eap71.elytron...] I am unable to setup it properly. User is not requested by browser for specifying client certificate and get access to application without certificate.
> In log you there is:
> 1. Server send request for certificate
> {code}
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) *** CertificateRequest
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Types: RSA, DSS, ECDSA
> ^[[0m^[[0m13:55:33,309 INFO [stdout] (default task-1) Cert Authorities:
> ^[[0m^[[0m13:55:33,310 INFO [stdout] (default task-1) <CN=client>
> {code}
> 2. And client responds with empty certificate chain. Without asking for certificate
> {code}
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) *** Certificate chain
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) <Empty>
> ^[[0m^[[0m13:55:33,432 INFO [stdout] (default task-2) ***
> {code}
> I am attaching:
> * server.log - server log with -Djavax.net.debug=all turn on.
> * 2wayTLS.pcap - wireshark recording of port 8443
> * secured-app - tested application
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (JASSIST-261) Issue with javassist on jdk 9b112
by Andrei Ivanov (JIRA)
[ https://issues.jboss.org/browse/JASSIST-261?page=com.atlassian.jira.plugi... ]
Andrei Ivanov commented on JASSIST-261:
---------------------------------------
But 3.21 also has fixes for other issues not related to Java 9 support.
I would suggest releasing 3.21.0 for them and perhaps have a different release for Java 9.
> Issue with javassist on jdk 9b112
> ---------------------------------
>
> Key: JASSIST-261
> URL: https://issues.jboss.org/browse/JASSIST-261
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.20.0-GA
> Environment: Javassist with jdk 9b112
> Reporter: Hoang Chuong Tran
> Assignee: Shigeru Chiba
>
> I am migrating a project to java 9, which also uses javassist to generate runtime code.
> One test of mine fails on jdk 9b112 while it passes on jdk 8u77.
> {noformat}
> import static javassist.CtClass.voidType;
> import java.lang.reflect.Method;
> import java.lang.reflect.Modifier;
> import java.util.HashMap;
> import java.util.Map;
> import org.junit.Test;
> import javassist.ClassClassPath;
> import javassist.ClassPool;
> import javassist.CtClass;
> import javassist.CtField;
> import javassist.CtMethod;
> import javassist.CtNewMethod;
> public class MyTests {
> public static class MyObject {
> protected Object field;
> Object getField() {return field;}
> public void setField(Object field) {}
> }
> @Test
> public void test() throws InstantiationException, IllegalAccessException {
> Class<? extends MyObject> clazz = compile(MyObject.class);
> clazz.newInstance().setField(null);
> }
> /** Compile a transfer class */
> public static synchronized Class<? extends MyObject> compile(Class<?> targetClass) {
> // Determine class setters
> Map<String, Method> setters = extractSetters(targetClass);
> ClassPool classPool = ClassPool.getDefault();
> classPool.insertClassPath(new ClassClassPath(targetClass));
> try {
> // Compile a new transfer class on the fly
> CtClass baseClass = classPool.get(MyObject.class.getName());
> CtClass proxyClass = classPool.makeClass(targetClass.getName() + "_Modified", baseClass);
> for(Method originalSetter : setters.values()) {
> // Create a field to hold the attribute
> Class<?> fieldClass = originalSetter.getParameterTypes()[0];
> CtClass fieldType = classPool.get(fieldClass.getName());
> String fieldName = originalSetter.getName().substring(3);
> CtField field = new CtField(fieldType, fieldName, proxyClass);
> proxyClass.addField(field);
> // Create a setter method to set that field
> CtClass[] parameters = new CtClass[] { fieldType };
> String setterBody = "{ System.out.println(\"Hello World\"); }";
> CtMethod setter = CtNewMethod.make(voidType, originalSetter.getName(), parameters, new CtClass[0], setterBody, proxyClass);
> proxyClass.addMethod(setter);
> }
> Class<? extends MyObject> javaClass = proxyClass.toClass(targetClass.getClassLoader(), targetClass.getProtectionDomain());
> return javaClass;
> } catch(Exception e) {
> throw new RuntimeException("Failure during transfer compilation for " + targetClass, e);
> }
> }
> /** Extract setter methods from a class */
> public static Map<String, Method> extractSetters(Class<?> cls) {
> Map<String, Method> setters = new HashMap<String, Method>();
> for(Method method : cls.getMethods()) {
> // Lookup setter methods
> if(method.getName().startsWith("set")) {
> // Only public setters
> int modifiers = method.getModifiers();
> if(Modifier.isPublic(modifiers)) {
> Class<?>[] exceptions = method.getExceptionTypes();
> Class<?>[] parameters = method.getParameterTypes();
> Class<?> returnType = method.getReturnType();
> if(exceptions.length <= 0 && parameters.length == 1 && "void".equals(returnType.getName())) {
> setters.put(method.getName(), method);
> }
> }
> }
> }
> return setters;
> }
> }
> {noformat}
> On jdk 8u77, the {{compile()}} function returns with success and "Hello world" is printed to the console.
> On jdk 9b112, I got the following exception
> {noformat}
> java.lang.RuntimeException: Failure during transfer compilation for class MyTests$MyObject
> at MyTests.compile(MyTests.java:68)
> at MyTests.test(MyTests.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:670)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: javassist.NotFoundException: java.lang.Object
> at javassist.ClassPool.get(ClassPool.java:450)
> at MyTests.compile(MyTests.java:51)
> ... 24 more
> {noformat}
> I suspect that is due to the jigsaw integration into the jdk.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (WFCORE-1836) Rejection-style transformer tests assume each operation generated by parser has distinct PathAddress
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1836?page=com.atlassian.jira.plugi... ]
Kabir Khan commented on WFCORE-1836:
------------------------------------
[~pferraro] Are you talking about the recursive loop in checkFailedTransformedBootOperations, or in the FailedOperationTransformationConfig?
> Rejection-style transformer tests assume each operation generated by parser has distinct PathAddress
> ----------------------------------------------------------------------------------------------------
>
> Key: WFCORE-1836
> URL: https://issues.jboss.org/browse/WFCORE-1836
> Project: WildFly Core
> Issue Type: Bug
> Components: Test Suite
> Reporter: Paul Ferraro
> Assignee: Brian Stansberry
>
> For rejection-style transformer tests, the subsystem test framework stores expected rejected operations in a map keyed by PathAddress. This is fine when the subsystem's parser only generates add operations. However, if the parser generates an add operation as well as a a write-attribute operation, these 2 operations will have the same path address. If we expect one of these operations to be rejected, but not the other, we end up with an unexpected rejection - and the test fails.
> This is a little hard to explain in the abstract, so let me know if any of the above doesn't make sense.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (JASSIST-261) Issue with javassist on jdk 9b112
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/JASSIST-261?page=com.atlassian.jira.plugi... ]
Scott Marlow commented on JASSIST-261:
--------------------------------------
+1 for the idea of releasing a 3.21.0.CR1 for now and later adjusting for coming Java 9 updates (if needed) prior to 3.21.0.GA/Final.
> Issue with javassist on jdk 9b112
> ---------------------------------
>
> Key: JASSIST-261
> URL: https://issues.jboss.org/browse/JASSIST-261
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.20.0-GA
> Environment: Javassist with jdk 9b112
> Reporter: Hoang Chuong Tran
> Assignee: Shigeru Chiba
>
> I am migrating a project to java 9, which also uses javassist to generate runtime code.
> One test of mine fails on jdk 9b112 while it passes on jdk 8u77.
> {noformat}
> import static javassist.CtClass.voidType;
> import java.lang.reflect.Method;
> import java.lang.reflect.Modifier;
> import java.util.HashMap;
> import java.util.Map;
> import org.junit.Test;
> import javassist.ClassClassPath;
> import javassist.ClassPool;
> import javassist.CtClass;
> import javassist.CtField;
> import javassist.CtMethod;
> import javassist.CtNewMethod;
> public class MyTests {
> public static class MyObject {
> protected Object field;
> Object getField() {return field;}
> public void setField(Object field) {}
> }
> @Test
> public void test() throws InstantiationException, IllegalAccessException {
> Class<? extends MyObject> clazz = compile(MyObject.class);
> clazz.newInstance().setField(null);
> }
> /** Compile a transfer class */
> public static synchronized Class<? extends MyObject> compile(Class<?> targetClass) {
> // Determine class setters
> Map<String, Method> setters = extractSetters(targetClass);
> ClassPool classPool = ClassPool.getDefault();
> classPool.insertClassPath(new ClassClassPath(targetClass));
> try {
> // Compile a new transfer class on the fly
> CtClass baseClass = classPool.get(MyObject.class.getName());
> CtClass proxyClass = classPool.makeClass(targetClass.getName() + "_Modified", baseClass);
> for(Method originalSetter : setters.values()) {
> // Create a field to hold the attribute
> Class<?> fieldClass = originalSetter.getParameterTypes()[0];
> CtClass fieldType = classPool.get(fieldClass.getName());
> String fieldName = originalSetter.getName().substring(3);
> CtField field = new CtField(fieldType, fieldName, proxyClass);
> proxyClass.addField(field);
> // Create a setter method to set that field
> CtClass[] parameters = new CtClass[] { fieldType };
> String setterBody = "{ System.out.println(\"Hello World\"); }";
> CtMethod setter = CtNewMethod.make(voidType, originalSetter.getName(), parameters, new CtClass[0], setterBody, proxyClass);
> proxyClass.addMethod(setter);
> }
> Class<? extends MyObject> javaClass = proxyClass.toClass(targetClass.getClassLoader(), targetClass.getProtectionDomain());
> return javaClass;
> } catch(Exception e) {
> throw new RuntimeException("Failure during transfer compilation for " + targetClass, e);
> }
> }
> /** Extract setter methods from a class */
> public static Map<String, Method> extractSetters(Class<?> cls) {
> Map<String, Method> setters = new HashMap<String, Method>();
> for(Method method : cls.getMethods()) {
> // Lookup setter methods
> if(method.getName().startsWith("set")) {
> // Only public setters
> int modifiers = method.getModifiers();
> if(Modifier.isPublic(modifiers)) {
> Class<?>[] exceptions = method.getExceptionTypes();
> Class<?>[] parameters = method.getParameterTypes();
> Class<?> returnType = method.getReturnType();
> if(exceptions.length <= 0 && parameters.length == 1 && "void".equals(returnType.getName())) {
> setters.put(method.getName(), method);
> }
> }
> }
> }
> return setters;
> }
> }
> {noformat}
> On jdk 8u77, the {{compile()}} function returns with success and "Hello world" is printed to the console.
> On jdk 9b112, I got the following exception
> {noformat}
> java.lang.RuntimeException: Failure during transfer compilation for class MyTests$MyObject
> at MyTests.compile(MyTests.java:68)
> at MyTests.test(MyTests.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:670)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: javassist.NotFoundException: java.lang.Object
> at javassist.ClassPool.get(ClassPool.java:450)
> at MyTests.compile(MyTests.java:51)
> ... 24 more
> {noformat}
> I suspect that is due to the jigsaw integration into the jdk.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (JGRP-2103) GroupRequest times out when the only recipient leaves too soon
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/JGRP-2103?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on JGRP-2103:
------------------------------------
> The point of passing the listener as arg to the call itself, rather than setting it later, is exactly to prevent the scenario you hit.
I don't agree, as long as it's part of the API it should work :)
Adding the listener later made it possible for me to use a single instance as the request listener and as the timeout task, both having access to `GroupRequest.getResults()`. I'm pretty sure I can get it to work with the listener created beforehand, it will just be a little uglier.
> I assume this doesn't happen in 4.0?
Indeed, 4.0 is fine.
> GroupRequest times out when the only recipient leaves too soon
> --------------------------------------------------------------
>
> Key: JGRP-2103
> URL: https://issues.jboss.org/browse/JGRP-2103
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.10
> Reporter: Dan Berindei
> Assignee: Bela Ban
> Fix For: 3.6.12
>
>
> There is a concurrency issue when a user calls {{messageDispatcher.cast(dests, msg, options, block_for_results, null)}} and adds a listener later with {{req.setListener(listener)}}.
> If the node installs a new view between {{cast()}} and {{setListener()}} that removes all the {{dests}} nodes, the listener is never called. This test fails:
> {code}
> public void testCastToMissingNode() throws Exception {
> d1.setRequestHandler(new MyHandler(new byte[10]));
> b = createChannel(a);
> b.setName("B");
> final CountDownLatch targetLatch = new CountDownLatch(1);
> d2 = new MessageDispatcher(b, null, null, new RequestHandler() {
> @Override
> public Object handle(Message msg) throws Exception {
> targetLatch.await();
> return null;
> }
> });
> b.connect("MessageDispatcherUnitTest");
> Assert.assertEquals(2, b.getView().size());
> final CountDownLatch futureLatch = new CountDownLatch(1);
> FutureListener listener = new FutureListener() {
> @Override
> public void futureDone(Future future) {
> futureLatch.countDown();
> }
> };
> List<Address> dests = Collections.singletonList(b.getAddress());
> byte[] buf = new byte[1];
> Message msg = new Message();
> msg.setBuffer(buf);
> NotifyingFuture<RspList<Object>> future = d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), null);
> b.disconnect();
> Thread.sleep(100);
> future.setListener(listener);
> assertTrue(futureLatch.await(10, TimeUnit.SECONDS));
> targetLatch.countDown();
> }
> {code}
> If I change the {{d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), null)}} with {{d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), listener)}} and comment out the {{future.setListener(listener)}} line, the test passes.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (WFCORE-1834) Unexpected attribute error message doesn't list 'name' attribute.
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1834?page=com.atlassian.jira.plugi... ]
Tomaz Cerar commented on WFCORE-1834:
-------------------------------------
Name isn't technically an attribute, but name/anchor for resource.
But yes we should report that in error messages.
> Unexpected attribute error message doesn't list 'name' attribute.
> -----------------------------------------------------------------
>
> Key: WFCORE-1834
> URL: https://issues.jboss.org/browse/WFCORE-1834
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Darran Lofthouse
> Assignee: Tomaz Cerar
> Fix For: 3.0.0.Alpha9
>
>
> I have recently updated one of our resource definitions and missed updating one of the subsystem templates so currently have the following error reported: -
> {noformat}
> Message: WFLYCTL0376: Unexpected attribute 'security-domain' encountered. Valid attributes are: 'http-authentication-factory, override-deployment-config'
> [Host Controller] at org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:128)
> {noformat}
> Previously my resource has been using the 'security-domain' attribute for it's name but now has been reverted to using 'name' for the name - in the above error message 'name' should have been listed as one of the valid attributes.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (ELY-644) Creating LDAP security realm fails with cryptic error message
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/ELY-644?page=com.atlassian.jira.plugin.sy... ]
Darran Lofthouse reassigned ELY-644:
------------------------------------
Assignee: Jan Kalina (was: Darran Lofthouse)
> Creating LDAP security realm fails with cryptic error message
> -------------------------------------------------------------
>
> Key: ELY-644
> URL: https://issues.jboss.org/browse/ELY-644
> Project: WildFly Elytron
> Issue Type: Bug
> Reporter: Zach Rhoads
> Assignee: Jan Kalina
>
> When creating an LDAP security realm via CLI, setup fails with cryptic error message.
> For example, creating a dir-context works fine:
> /subsystem=elytron/dir-context=exampleDC:add(url="ldap://127.0.0.1:10389",principal="uid=admin,ou=system",credential="secret")
> But when creating an ldap-realm:
> /subsystem=elytron/ldap-realm=exampleLR:add(dir-context=exampleDC,identity-mapping={search-base-dn="ou=Users,dc=jboss,dc=org",rdn-identifier="uid",user-password-mapper={from="userPassword"}})
> It fails:
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException",
> "rolled-back" => true
> }
> Full log in wildfly:
> 14:11:03,368 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
> ("subsystem" => "elytron"),
> ("ldap-realm" => "exampleLR")
> ]): java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.asBoolean(ModelValue.java:69)
> at org.jboss.dmr.ModelNode.asBoolean(ModelNode.java:267)
> at org.wildfly.extension.elytron.LdapRealmDefinition$UserPasswordCredentialMappingObjectDefinition.configure(LdapRealmDefinition.java:163)
> at org.wildfly.extension.elytron.LdapRealmDefinition$RealmAddHandler.configureIdentityMapping(LdapRealmDefinition.java:420)
> at org.wildfly.extension.elytron.LdapRealmDefinition$RealmAddHandler.performRuntime(LdapRealmDefinition.java:375)
> at org.jboss.as.controller.AbstractAddStepHandler.performRuntime(AbstractAddStepHandler.java:337)
> at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:151)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:940)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:683)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:382)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1363)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:410)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:232)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:213)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:136)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:153)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:149)
> at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:153)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
> at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> at org.jboss.threads.JBossThread.run(JBossThread.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months
[JBoss JIRA] (JGRP-2103) GroupRequest times out when the only recipient leaves too soon
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-2103?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-2103:
--------------------------------
The point of passing the listener as arg to the call itself, rather than setting it later, is exactly to prevent the scenario you hit.
> GroupRequest times out when the only recipient leaves too soon
> --------------------------------------------------------------
>
> Key: JGRP-2103
> URL: https://issues.jboss.org/browse/JGRP-2103
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.10
> Reporter: Dan Berindei
> Assignee: Bela Ban
> Fix For: 3.6.12
>
>
> There is a concurrency issue when a user calls {{messageDispatcher.cast(dests, msg, options, block_for_results, null)}} and adds a listener later with {{req.setListener(listener)}}.
> If the node installs a new view between {{cast()}} and {{setListener()}} that removes all the {{dests}} nodes, the listener is never called. This test fails:
> {code}
> public void testCastToMissingNode() throws Exception {
> d1.setRequestHandler(new MyHandler(new byte[10]));
> b = createChannel(a);
> b.setName("B");
> final CountDownLatch targetLatch = new CountDownLatch(1);
> d2 = new MessageDispatcher(b, null, null, new RequestHandler() {
> @Override
> public Object handle(Message msg) throws Exception {
> targetLatch.await();
> return null;
> }
> });
> b.connect("MessageDispatcherUnitTest");
> Assert.assertEquals(2, b.getView().size());
> final CountDownLatch futureLatch = new CountDownLatch(1);
> FutureListener listener = new FutureListener() {
> @Override
> public void futureDone(Future future) {
> futureLatch.countDown();
> }
> };
> List<Address> dests = Collections.singletonList(b.getAddress());
> byte[] buf = new byte[1];
> Message msg = new Message();
> msg.setBuffer(buf);
> NotifyingFuture<RspList<Object>> future = d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), null);
> b.disconnect();
> Thread.sleep(100);
> future.setListener(listener);
> assertTrue(futureLatch.await(10, TimeUnit.SECONDS));
> targetLatch.countDown();
> }
> {code}
> If I change the {{d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), null)}} with {{d1.castMessageWithFuture(dests, msg, RequestOptions.SYNC(), listener)}} and comment out the {{future.setListener(listener)}} line, the test passes.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 7 months