Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10487

keycloak-cxf quickstart test fails with RH-SSO 7.3.0.GA

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • fuse-7.4-GA
    • fuse-7.3
    • Examples, Karaf
    • None
    • % %
    • Fuse 7.4 Sprint 47 - Bug Fix

    Description

      The quickstart test started to fail after we updated our testsuite to use RH-SSO 7.3.0.(was 7.2.4)

      To reproduce follow the readme for quickstarts/security/keycloak/keycloak-cxf/README.md for the embedded Undertow servlet engine

      after executing:

      mvn test -Pqtest -Dtest=JaxRsClientTest#helloEmbeddedAuthenticated,JaxWsClientTest#helloEmbeddedAuthenticated

      i get this error:

      15:36:37 WARN [org.apache.cxf.phase.PhaseInterceptorChain] : Interceptor for {urn:fuse:cxf:1}JaxWsServiceService#{urn:fuse:cxf:1}hello has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Could not send Message.
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67) ~[cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:333) [cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxWsClientTest.helloEmbeddedAuthenticated(JaxWsClientTest.java:185) [test-classes/:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:369) [surefire-junit4-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:275) [surefire-junit4-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:239) [surefire-junit4-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:160) [surefire-junit4-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:373) [surefire-booter-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:334) [surefire-booter-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:119) [surefire-booter-2.20.1.jar:2.20.1]
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:407) [surefire-booter-2.20.1.jar:2.20.1]
      Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with http://localhost:8181/cxf/jaxws
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1620) ~[cxf-rt-transports-http-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627) ~[cxf-rt-transports-http-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572) ~[cxf-rt-transports-http-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373) ~[cxf-rt-transports-http-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) ~[cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673) ~[cxf-rt-transports-http-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) ~[cxf-core-3.2.7.fuse-730037-redhat-00001.jar:3.2.7.fuse-730037-redhat-00001]
      	... 34 more
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.047 s <<< FAILURE! - in org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxWsClientTest
      [ERROR] helloEmbeddedAuthenticated(org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxWsClientTest)  Time elapsed: 1.588 s  <<< ERROR!
      org.apache.cxf.interceptor.Fault: Could not send Message.
      	at org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxWsClientTest.helloEmbeddedAuthenticated(JaxWsClientTest.java:185)
      Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with http://localhost:8181/cxf/jaxws
      	at org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxWsClientTest.helloEmbeddedAuthenticated(JaxWsClientTest.java:185)
      
      [INFO] Running org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxRsClientTest
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "POST /auth/realms/fuse7karaf/protocol/openid-connect/token HTTP/1.1[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "Authorization: Basic Y3hmOmYxZWM3MTZkLTIyNjItNDM0ZC04ZTk4LWJmMzFiNmI4NThkNg==[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "Content-Length: 52[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "Host: localhost:8180[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_181)[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "[\r][\n]"
      15:36:37 DEBUG [org.apache.http.wire] : http-outgoing-1 >> "grant_type=password&username=admin&password=passw0rd"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Connection: keep-alive[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Cache-Control: no-store[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Set-Cookie: KC_RESTART=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; Path=/auth/realms/fuse7karaf/; HttpOnly[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Pragma: no-cache[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Content-Type: application/json[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Content-Length: 3976[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "Date: Thu, 11 Apr 2019 13:36:38 GMT[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-1 << "{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJDQjlzS1V3RWtIWE1Mb0lSX2ZPLUNBZ0w3cjhlc2NnclNuNUp0eWVUOEFNIn0.eyJqdGkiOiIzNjAwN2FkMC0zNGNjLTQ4MWYtYmFiOC0wZTQ4MGEwZTA5OTMiLCJleHAiOjE1NTQ5OTAwOTgsIm5iZiI6MCwiaWF0IjoxNTU0OTg5Nzk4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvZnVzZTdrYXJhZiIsImF1ZCI6WyJocy1pbmZvIiwiY2FtZWwtdW5kZXJ0b3ctZW5kcG9pbnQiLCJrZXljbG9hay13YXIiLCJzc2giLCJoYXd0aW8tc2VydmVyIiwid2hpdGVib2FyZC1ibHVlcHJpbnQtaW5mbyIsImN4Zi1leHRlcm5hbCIsImNhbWVsLXVuZGVydG93LXJlc3Rkc2wtZW5kcG9pbnQiLCJhY2NvdW50Iiwid2hpdGVib2FyZC1pbmZvIiwiaHMtYmx1ZXByaW50LWluZm8iXSwic3ViIjoiY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tl5VPA","token_type":"bearer","not-before-policy":0,"session_state":"56a5a1fd-76cd-4baf-bea6-22e915f00fc5","scope":"email profile"}"
      15:36:38 INFO [org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxRsClientTest] : token: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJDQjlzS1V3RWtIWE1Mb0lSX2ZPLUNBZ0w3cjhlc2NnclNuNUp0eWVUOEFNIn0.eyJqdGkiOiIzNjAwN2FkMC0zNGNjLTQ4MWYtYmFiOC0wZTQ4MGEwZTA5OTMiLCJleHAiOjE1NTQ5OTAwOTgsIm5iZiI6MCwiaWF0IjoxNTU0OTg5Nzk4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvZnVzZTdrYXJhZiIsImF1ZCI6WyJocy1pbmZvIiwiY2FtZWwtdW5kZXJ0b3ctZW5kcG9pbnQiLCJrZXljbG9hay13YXIiLCJzc2giLCJoYXd0aW8tc2VydmVyIiwid2hpdGVib2FyZC1ibHVlcHJpbnQtaW5mbyIsImN4Zi1leHRlcm5hbCIsImNhbWVsLXVuZGVydG93LXJlc3Rkc2wtZW5kcG9pbnQiLCJhY2NvdW50Iiwid2hpdGVib2FyZC1pbmZvIiwiaHMtYmx1ZXByaW50LWluZm8iXSwic3ViIjoiYjYzNTk0MzEtZTljOS00NTNhLTgxNWItNTIyMmZkYzhhZWUxIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiY3hmIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiNTZhNWExZmQtNzZjZC00YmFmLWJlYTYtMjJlOTE1ZjAwZmM1IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwOi8vbG9jYWxob3N0OjgxODEiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2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uIh76Lgh5WvicbW76jfYVF4xFLPNXm5FS_FPB7hjGJsg4k1XginHoLxEhnX2z0fQ9dUu5FXIOiuaoyqCUYYlsFJ2-5rkbSWu-h1TO6DJ2Za0g1A47UTfoD3JJiCRBgttl40kFKOz9qLn1A_93vGWQ-P6xBSxQat0KlUhr2forvOmqjKWRDETnbigqcvBqCXYCuzqZyLEtjdLDTy4Md2LrQzyj6zolPCvcY7zmFQTOqq-WyfvjUL8kFIYeVsDtefGhQ
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "GET /cxf/jaxrs/service/hello/hi HTTP/1.1[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJDQjlzS1V3RWtIWE1Mb0lSX2ZPLUNBZ0w3cjhlc2NnclNuNUp0eWVUOEFNIn0.eyJqdGkiOiIzNjAwN2FkMC0zNGNjLTQ4MWYtYmFiOC0wZTQ4MGEwZTA5OTMiLCJleHAiOjE1NTQ5OTAwOTgsIm5iZiI6MCwiaWF0IjoxNTU0OTg5Nzk4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgxODAvYXV0aC9yZWFsbXMvZnVzZTdrYXJhZiIsImF1ZCI6WyJocy1pbmZvIiwiY2FtZWwtdW5kZXJ0b3ctZW5kcG9pbnQiLCJrZXljbG9hay13YXIiLCJzc2giLCJoYXd0aW8tc2VydmVyIiwid2hpdGVib2FyZC1ibHVlcHJpbnQtaW5mbyIsImN4Zi1leHRlcm5hbCIsImNhbWVsLXVuZGVydG93LXJlc3Rkc2wtZW5kcG9pbnQiLCJhY2NvdW50Iiwid2hpdGVib2FyZC1pbmZvIiwiaHMtYmx1ZXByaW50LWluZm8iXSwic3ViIjoiYjYzNTk0MzEtZTljOS00NTNhLTgxNWItNTIyMmZkYzhhZWUxIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiY3hmIiwiYXV0aF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ZWQiOmZhbHNlLCJuYW1lIjoiSm9obiBEb2UiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhZG1pbiIsImdpdmVuX25hbWUiOiJKb2huIiwiZmFtaWx5X25hbWUiOiJEb2UiLCJlbWFpbCI6ImFkbWluQHJlZGhhdC5jb20ifQ.G8eWgoUV0Tdgd7eM5X1vvKF5Bq54OgyzUsNmPV15tdFKgiHtrEsQhfVVrD5qkPOUVnYS6a6fyZTDoTaHdTXtuIh76Lgh5WvicbW76jfYVF4xFLPNXm5FS_FPB7hjGJsg4k1XginHoLxEhnX2z0fQ9dUu5FXIOiuaoyqCUYYlsFJ2-5rkbSWu-h1TO6DJ2Za0g1A47UTfoD3JJiCRBgttl40kFKOz9qLn1A_93vGWQ-P6xBSxQat0KlUhr2forvOmqjKWRDETnbigqcvBqCXYCuzqZyLEtjdLDTy4Md2LrQzyj6zolPCvcY7zmFQTOqq-WyfvjUL8kFIYeVsDtefGhQ[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "Host: localhost:8181[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_181)[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 >> "[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "HTTP/1.1 401 Unauthorized[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Expires: 0[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Cache-Control: no-cache, no-store, must-revalidate[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "X-Powered-By: Open Source[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Server: Pax-HTTP-Undertow[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Pragma: no-cache[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Date: Thu, 11 Apr 2019 13:36:38 GMT[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Connection: keep-alive[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "WWW-Authenticate: Bearer realm="fuse7karaf", error="invalid_token", error_description="Expected audience not available in the token"[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Content-Type: text/html;charset=UTF-8[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "Content-Length: 71[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "[\r][\n]"
      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "<html><head><title>Error</title></head><body>Unauthorized</body></html>"
      15:36:38 INFO [org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxRsClientTest] : response: <html><head><title>Error</title></head><body>Unauthorized</body></html>
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 s - in org.jboss.fuse.quickstarts.security.keycloak.cxf.JaxRsClientTest
      [INFO]
      [INFO] Results:
      [INFO]
      [ERROR] Errors:
      [ERROR]   JaxWsClientTest.helloEmbeddedAuthenticated:185 ยป Fault Could not send Message.
      [INFO]
      [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
      

      the important bit is probably:

      15:36:38 DEBUG [org.apache.http.wire] : http-outgoing-2 << "WWW-Authenticate: Bearer realm="fuse7karaf", error="invalid_token", error_description="Expected audience not available in the token"[\r][\n]"

      Attachments

        Activity

          People

            ggrzybek Grzegorz Grzybek
            jkasztur@redhat.com Jan Kasztura (Inactive)
            Lucia Drozdova Lucia Drozdova
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: