[JBoss JIRA] (WFLY-8151) Unable to create custom credentail security factory
by Martin Choma (JIRA)
Martin Choma created WFLY-8151:
----------------------------------
Summary: Unable to create custom credentail security factory
Key: WFLY-8151
URL: https://issues.jboss.org/browse/WFLY-8151
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Martin Choma
Assignee: Darran Lofthouse
Priority: Blocker
When I try to register custom credential security factory I get {{NoClassDefFoundError}}
{code}
06:54:49,166 WARN [org.jboss.modules] (MSC service thread 1-4) Failed to define class org.wildfly.extras.creaper.commands.elytron.credfactory.AddCustomCredentialSecurityFactoryImpl in Module "org.jboss.customcredsecfacimpl" from local module loader @282ba1e (finder: local module finder @13b6d03 (roots: /home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules,/home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules/system/layers/base)): java.lang.NoClassDefFoundError: Failed to link org/wildfly/extras/creaper/commands/elytron/credfactory/AddCustomCredentialSecurityFactoryImpl (Module "org.jboss.customcredsecfacimpl" from local module loader @282ba1e (finder: local module finder @13b6d03 (roots: /home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules,/home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules/system/layers/base))): org/wildfly/extension/elytron/capabilities/CredentialSecurityFactory
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:448)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:276)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:79)
at org.jboss.modules.Module.loadModuleClass(Module.java:708)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:192)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.wildfly.extension.elytron.CustomComponentDefinition$ComponentAddHandler.createValue(CustomComponentDefinition.java:156)
at org.wildfly.extension.elytron.CustomComponentDefinition$ComponentAddHandler.lambda$performRuntime$1(CustomComponentDefinition.java:135)
at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
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)
06:54:49,167 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service org.wildfly.security.security-factory.credential.CreaperTestAddCustomCredentialSecurityFactory: org.jboss.msc.service.StartException in service org.wildfly.security.security-factory.credential.CreaperTestAddCustomCredentialSecurityFactory: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
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)
Caused by: java.lang.NoClassDefFoundError: Failed to link org/wildfly/extras/creaper/commands/elytron/credfactory/AddCustomCredentialSecurityFactoryImpl (Module "org.jboss.customcredsecfacimpl" from local module loader @282ba1e (finder: local module finder @13b6d03 (roots: /home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules,/home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules/system/layers/base))): org/wildfly/extension/elytron/capabilities/CredentialSecurityFactory
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:448)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:276)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:79)
at org.jboss.modules.Module.loadModuleClass(Module.java:708)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:192)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.wildfly.extension.elytron.CustomComponentDefinition$ComponentAddHandler.createValue(CustomComponentDefinition.java:156)
at org.wildfly.extension.elytron.CustomComponentDefinition$ComponentAddHandler.lambda$performRuntime$1(CustomComponentDefinition.java:135)
at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
... 3 more
06:54:49,168 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "elytron"),
("custom-credential-security-factory" => "CreaperTestAddCustomCredentialSecurityFactory")
]) - failure description: {
"WFLYCTL0080: Failed services" => {"org.wildfly.security.security-factory.credential.CreaperTestAddCustomCredentialSecurityFactory" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-factory.credential.CreaperTestAddCustomCredentialSecurityFactory: Failed to start service
Caused by: java.lang.NoClassDefFoundError: Failed to link org/wildfly/extras/creaper/commands/elytron/credfactory/AddCustomCredentialSecurityFactoryImpl (Module \"org.jboss.customcredsecfacimpl\" from local module loader @282ba1e (finder: local module finder @13b6d03 (roots: /home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules,/home/mchoma/workspace/eap-versions/7.1.0.DR12/jboss-eap-7.1/modules/system/layers/base))): org/wildfly/extension/elytron/capabilities/CredentialSecurityFactory"},
"WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-factory.credential.CreaperTestAddCustomCredentialSecurityFactory"]
}
{code}
That works in DR11 without issue
Here is implementation of custom credential security factory
{code:java|title=AddCustomCredentialSecurityFactoryImpl.java}
package org.wildfly.extras.creaper.commands.elytron.credfactory;
import java.security.GeneralSecurityException;
import java.util.Map;
import org.wildfly.extension.elytron.Configurable;
import org.wildfly.extension.elytron.capabilities.CredentialSecurityFactory;
import org.wildfly.security.credential.Credential;
public class AddCustomCredentialSecurityFactoryImpl<T> implements CredentialSecurityFactory, Configurable {
@Override
public Credential create() throws GeneralSecurityException {
return null;
}
@Override
public void initialize(Map<String, String> configuration) {
if (configuration.containsKey("throwException")) {
throw new IllegalStateException("Only test purpose. This exception was thrown on demand.");
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (ELY-967) Impossible to authorize as a non-name Principal
by David Lloyd (JIRA)
David Lloyd created ELY-967:
-------------------------------
Summary: Impossible to authorize as a non-name Principal
Key: ELY-967
URL: https://issues.jboss.org/browse/ELY-967
Project: WildFly Elytron
Issue Type: Bug
Components: Authentication Server, API / SPI
Reporter: David Lloyd
Priority: Minor
There are no methods on SecurityIdentity to create a run-as authorized user with a Principal, only a String name. There is no authorize(Principal) variant on ServerAuthenticationContext.
These should be added to support realms which do not use plain text names to identify users.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (WFLY-8150) The undertow attributes: "processing-time" and "max-processing-time" do not have "unit" defined
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-8150?page=com.atlassian.jira.plugin.... ]
Stuart Douglas moved JBEAP-8902 to WFLY-8150:
---------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-8150 (was: JBEAP-8902)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Web (Undertow)
(was: Web (Undertow))
Affects Version/s: (was: 7.0.4.GA)
> The undertow attributes: "processing-time" and "max-processing-time" do not have "unit" defined
> -----------------------------------------------------------------------------------------------
>
> Key: WFLY-8150
> URL: https://issues.jboss.org/browse/WFLY-8150
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Reporter: Stuart Douglas
> Assignee: Stuart Douglas
>
> The undertow attributes: "processing-time" and "max-processing-time" do not have "unit" defined. For instance, if you execute:
> /subsystem=undertow/server=default-server/http-listener=default:read-resource-description
> this will return:
> ...
> "max-processing-time" =>
> { "type" => LONG, "description" => "The maximum processing time taken by a request on this listener", "expressions-allowed" => false, "nillable" => false, "access-type" => "metric", "storage" => "runtime" }
> ,
> "no-request-timeout" =>
> { "type" => INT, "description" => "The length of time in milliseconds that the connection can be idle before it is closed by the container, defaults to 60000 (one minute)", "expressions-allowed" => true, "nillable" => true, "default" => 60000, "unit" => "MILLISECONDS", "access-type" => "read-write", "storage" => "configuration", "restart-required" => "no-services" }
> ,
> "processing-time" => {
> "type" => LONG,
> "description" => "The total processing time of all requests handed by this listener",
> "expressions-allowed" => false,
> "nillable" => false,
> "access-type" => "metric",
> "storage" => "runtime"
> ...
> According to the code:
> https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io...
> attributes "processing-time" and "max-processing-time" should be shown as nano seconds.
> I have just realised that only few attributes have "unit" defined - like "no-request-timeout" while the most of them is without it.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (WFLY-8148) Intermittent failure in InterDeploymentDependenciesEarTestCase
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-8148?page=com.atlassian.jira.plugin.... ]
Brian Stansberry commented on WFLY-8148:
----------------------------------------
Before anyone spends time on this, I recommend checking if this test stills fails after my WFLY-8149 fix. I don't have a good reason to think it won't, but TBH I don't understand why the changes I made to the original contributor PR for that issue had the effect it did.
> Intermittent failure in InterDeploymentDependenciesEarTestCase
> --------------------------------------------------------------
>
> Key: WFLY-8148
> URL: https://issues.jboss.org/browse/WFLY-8148
> Project: WildFly
> Issue Type: Bug
> Components: EE, Test Suite
> Reporter: Brian Stansberry
>
> On a fairly frequent basis we are seeing failures in InterDeploymentDependenciesEarTestCase. This then seems to be followed by ~ 200 other failures.
> https://ci.wildfly.org/viewLog.html?buildId=46213&buildTypeId=WildFlyCore... is an example.
> Pattern is:
> Failure:
> {code}
> javax.ejb.NoSuchEJBException: No such EJB: app2/hello/LogAccessBean
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:354)
> at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:75)
> at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:357)
> at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:608)
> at org.jboss.ejb.client.EJBInvocationHandler.lambda$invoke$0(EJBInvocationHandler.java:164)
> at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:428)
> at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:387)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:150)
> at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:100)
> at com.sun.proxy.$Proxy65.getLog(Unknown Source)
> at org.jboss.as.test.integration.deployment.dependencies.ear.InterDeploymentDependenciesEarTestCase.test(InterDeploymentDependenciesEarTestCase.java:127)
> {code}
> Earliest failure I see with this pattern in the TeamCity history is from Aug 17, 2016. But such failures were confined to JDK9 runs and stopped last Sept 2. Then they start appearing quite frequently on Feb 6, 2017. First appearance was in a test of PR #9600, but there are other failures before that PR was merged so I doubt that PR is relevant.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (LOGMGR-144) Allow the # symbol to be used for expressions in a PatternFormatter
by James Perkins (JIRA)
[ https://issues.jboss.org/browse/LOGMGR-144?page=com.atlassian.jira.plugin... ]
James Perkins updated LOGMGR-144:
---------------------------------
Fix Version/s: 2.1.0.Beta1
> Allow the # symbol to be used for expressions in a PatternFormatter
> -------------------------------------------------------------------
>
> Key: LOGMGR-144
> URL: https://issues.jboss.org/browse/LOGMGR-144
> Project: JBoss Log Manager
> Issue Type: Feature Request
> Reporter: James Perkins
> Assignee: James Perkins
> Fix For: 2.1.0.Beta1
>
>
> Currently in the format pattern when you want to define an expression the format pattern is {code}
> %${system.property.key:default-value}
> {code}
> This can cause problems other applications that parse the same type of expression format like WildFly. Adding an option like the following will allow a workaround for this issue.
> {code}
> %#{system.property.key:default:value}
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (LOGMGR-146) Suppressed exception format is not correct
by James Perkins (JIRA)
[ https://issues.jboss.org/browse/LOGMGR-146?page=com.atlassian.jira.plugin... ]
James Perkins reassigned LOGMGR-146:
------------------------------------
Assignee: James Perkins
Resolution: Done
> Suppressed exception format is not correct
> ------------------------------------------
>
> Key: LOGMGR-146
> URL: https://issues.jboss.org/browse/LOGMGR-146
> Project: JBoss Log Manager
> Issue Type: Bug
> Reporter: James Perkins
> Assignee: James Perkins
> Fix For: 2.0.5.Final, 2.1.0.Beta1
>
>
> The suppressed exception format is not correct when multiple exceptions are suppressed. Too many causes are printed likely because the circular dependencies are not working correctly.
> {code:java|title=Example Reproducer}
> final RuntimeException r1 = new RuntimeException("Exception 1");
> final RuntimeException r2 = new RuntimeException("Exception 2", r1);
> final RuntimeException r3 = new RuntimeException("Exception 3", r2);
> final RuntimeException cause = new RuntimeException("This is the cause", r1);
> cause.addSuppressed(r2);
> cause.addSuppressed(r3);
> Logger.getLogger(Main.class).error("Log message", cause);
> {code}
> {code:title=Output from JBoss Log Manager}
> 13:03:53,684 ERROR [com.jamezp.test.Main] Log message: java.lang.RuntimeException: This is the cause
> at com.jamezp.test.Main.main(Main.java:165)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> Suppressed: java.lang.RuntimeException: Exception 2
> at com.jamezp.test.Main.main(Main.java:162)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 1
> at com.jamezp.test.Main.main(Main.java:161)
> ... 5 more
> Suppressed: java.lang.RuntimeException: Exception 3
> at com.jamezp.test.Main.main(Main.java:163)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 2
> at com.jamezp.test.Main.main(Main.java:162)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 1
> at com.jamezp.test.Main.main(Main.java:161)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 1
> at com.jamezp.test.Main.main(Main.java:161)
> ... 5 more
> {code}
> {code:title=Output from Throwable.printStackTrace()}
> java.lang.RuntimeException: This is the cause
> at com.jamezp.test.Main.main(Main.java:165)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> Suppressed: java.lang.RuntimeException: Exception 2
> at com.jamezp.test.Main.main(Main.java:162)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 1
> at com.jamezp.test.Main.main(Main.java:161)
> ... 5 more
> Suppressed: java.lang.RuntimeException: Exception 3
> at com.jamezp.test.Main.main(Main.java:163)
> ... 5 more
> [CIRCULAR REFERENCE:java.lang.RuntimeException: Exception 2]
> [CIRCULAR REFERENCE:java.lang.RuntimeException: Exception 1]
> {code}
> {code:title=Output from JUL}
> Jan 26, 2017 1:06:29 PM com.jamezp.test.Main main
> ERROR: Log message
> java.lang.RuntimeException: This is the cause
> at com.jamezp.test.Main.main(Main.java:165)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> Suppressed: java.lang.RuntimeException: Exception 2
> at com.jamezp.test.Main.main(Main.java:162)
> ... 5 more
> Caused by: java.lang.RuntimeException: Exception 1
> at com.jamezp.test.Main.main(Main.java:161)
> ... 5 more
> Suppressed: java.lang.RuntimeException: Exception 3
> at com.jamezp.test.Main.main(Main.java:163)
> ... 5 more
> [CIRCULAR REFERENCE:java.lang.RuntimeException: Exception 2]
> [CIRCULAR REFERENCE:java.lang.RuntimeException: Exception 1]
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months