[JBoss JIRA] (WFLY-13319) Wildfly 19 MP-JWT & EJB Integration
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/WFLY-13319?page=com.atlassian.jira.plugi... ]
Darran Lofthouse updated WFLY-13319:
------------------------------------
Issue Type: Enhancement (was: Feature Request)
> Wildfly 19 MP-JWT & EJB Integration
> -----------------------------------
>
> Key: WFLY-13319
> URL: https://issues.redhat.com/browse/WFLY-13319
> Project: WildFly
> Issue Type: Enhancement
> Components: EJB, MP JWT, Test Suite
> Affects Versions: 19.0.0.Final
> Reporter: Radu Cimpean
> Assignee: Darran Lofthouse
> Priority: Major
> Fix For: 20.0.0.Beta1
>
> Attachments: server-cli.txt, web.xml
>
>
> ===Previous configuration & situation===
> As written https://groups.google.com/forum/#!topic/wildfly/L1BxATschCU,
> We were running wildfly 18 and used jwt for securing the application. We did this via a series of cli commands (see server-cli.txt) to configure the server, as well as referencing the created domains in the web.xml.
> Under jboss-web.xml we are referencing the "ejb-domain" created in the CLIs. The web.xml (see attachments) protects the resource wit the role referenced in the CLIs (role present in the token)
> All our jax-rs resources are annotated with @Stateless and are calling EJBs which in turn are @Statless and declare allowed roles.
> ===Current situation===
> We've upgraded to wildfly 19 in hopes of using microprofile jwt. To do this, we've annotated the Application class with
> @LoginConfig(authMethod = "MP-JWT", realmName = "MP-JWT-REALM"), removed the login-config from the web.xml, and removed the security-domain from jboss-web.xml (since otherwise I would receive an error: ELY01148: A SecurityDomain has already been associated with the specified ClassLoader").
> After also removing the security-constraint tag from the web.xml I was able to get to the resource and noticed that the JWTToken was properly injected (all claims and entries are there), and the SecurityContext injected in the resource also contained the jwt specific values. From what I can tell, in the context of the jax-rs classloader, I am authenticated.
> I would, however, always receive a "Invocation on method... is not allowed" the second the resource would try calling a bean, even if the role matched. Upon checking the logs, and what the injected SessionContext contained, I noticed the principal was anonymous and had no roles allowed.
> I therefore believe that the credentials are somehow not being properly passed.
> Is there a documented way of properly integrating jax-rs&ejb with microprofile jwt?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-13434) Update EJB / Elytron Integration to use SecurityMetaData in DeploymentUnit
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/WFLY-13434?page=com.atlassian.jira.plugi... ]
Darran Lofthouse updated WFLY-13434:
------------------------------------
Description:
WFCORE-4962 is adding a new SecurityMetaData class and adding as an attachment to the DeploymentUnit.
If this contains a ServiceName for a security domain this should be used instead of any local mapping in the subsystem, additionally the presence of this domain should act as a flag to enable the Elytron form of interceptors.
Also if an Elytron SecurityDomain is selected for the deployment it's ServiceName should be set on the SecurityMetaData instance.
was:
WFCORE-4962 is adding a new SecurityMetaData class and adding as an attachment to the DeploymentUnit.
If this contains a ServiceName for a security domain this should be used instead of any local mapping in the subsystem, additionally the presence of this domain should act as a flag to enable the Elytron form of interceptors.
> Update EJB / Elytron Integration to use SecurityMetaData in DeploymentUnit
> --------------------------------------------------------------------------
>
> Key: WFLY-13434
> URL: https://issues.redhat.com/browse/WFLY-13434
> Project: WildFly
> Issue Type: Task
> Components: EJB, Security
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Major
> Fix For: 20.0.0.Beta1
>
>
> WFCORE-4962 is adding a new SecurityMetaData class and adding as an attachment to the DeploymentUnit.
> If this contains a ServiceName for a security domain this should be used instead of any local mapping in the subsystem, additionally the presence of this domain should act as a flag to enable the Elytron form of interceptors.
> Also if an Elytron SecurityDomain is selected for the deployment it's ServiceName should be set on the SecurityMetaData instance.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-13435) Update Undertow / Elytron Integration to use SecurityMetaData in DeploymentUnit
by Darran Lofthouse (Jira)
Darran Lofthouse created WFLY-13435:
---------------------------------------
Summary: Update Undertow / Elytron Integration to use SecurityMetaData in DeploymentUnit
Key: WFLY-13435
URL: https://issues.redhat.com/browse/WFLY-13435
Project: WildFly
Issue Type: Task
Components: Security, Web (Undertow)
Reporter: Darran Lofthouse
Assignee: Darran Lofthouse
Fix For: 20.0.0.Beta1
WFCORE-4962 is adding a new SecurityMetaData class and adding as an attachment to the DeploymentUnit.
If this contains a ServiceName for a security domain this should be used instead of any local mapping in the subsystem, additionally the presence of this domain should act as a flag to enable the Elytron form of interceptors.
Also if an Elytron SecurityDomain is selected for the deployment it's ServiceName should be set on the SecurityMetaData instance.
The use of the VirtualSecurityDomain API should also be removed as this attachment replaces it in a more generic way.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-13434) Update EJB / Elytron Integration to use SecurityMetaData in DeploymentUnit
by Darran Lofthouse (Jira)
Darran Lofthouse created WFLY-13434:
---------------------------------------
Summary: Update EJB / Elytron Integration to use SecurityMetaData in DeploymentUnit
Key: WFLY-13434
URL: https://issues.redhat.com/browse/WFLY-13434
Project: WildFly
Issue Type: Task
Components: EJB, Security
Reporter: Darran Lofthouse
Assignee: Darran Lofthouse
Fix For: 20.0.0.Beta1
WFCORE-4962 is adding a new SecurityMetaData class and adding as an attachment to the DeploymentUnit.
If this contains a ServiceName for a security domain this should be used instead of any local mapping in the subsystem, additionally the presence of this domain should act as a flag to enable the Elytron form of interceptors.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-13433) Improve capability support in EJB3 subsystem
by Richard Achmatowicz (Jira)
[ https://issues.redhat.com/browse/WFLY-13433?page=com.atlassian.jira.plugi... ]
Richard Achmatowicz commented on WFLY-13433:
--------------------------------------------
Introducing a central repository for capability names and references, as used in Undertow:
{noformat}
public final class Capabilities {
/*
* Capabilities defined in this subsystem
*/
public static final String CAPABILITY_APPLICATION_SECURITY_DOMAIN = "org.wildfly.ejb3.application-security-domain";
public static final String CAPABILITY_CLUSTERED_SINGLETON = "org.wildfly.ejb3.clustered.singleton";
public static final String CAPABILITY_EJB3 = "org.wildfly.ejb3";
public static final String CAPABILITY_EJB_REMOTE = "org.wildfly.ejb.remote";
public static final String CAPABILITY_IDENTITY = "org.wildfly.ejb3.identity";
public static final String CAPABILITY_REMOTE_CLIENT_CONFIGURATOR = "org.wildfly.ejb3.remote.client-configurator";
/*
* Capabilities referenced by this subsystem
*/
public static final String REF_GLOBAL_DEFAULT_LOCAL_PROVIDER = "org.wildfly.transactions.global-default-local-provider";
public static final String REF_JACC_POLICY = "org.wildfly.security.jacc-policy";
public static final String REF_SECURITY_DOMAIN = "org.wildfly.security.security-domain";
public static final String REF_LEGACY_SERVER_SECURITY_MANAGER = "org.wildfly.legacy-security.server-security-manager";
public static final String REF_TXN_SYNCHRONIZATION_REGISTRY = "org.wildfly.transactions.transaction-synchronization-registry";
}
{noformat}
This will eliminate the many capability-related text strings being defined across the resources in EJB3 subsystem and give a better picture of what is defined and what is referenced.
> Improve capability support in EJB3 subsystem
> --------------------------------------------
>
> Key: WFLY-13433
> URL: https://issues.redhat.com/browse/WFLY-13433
> Project: WildFly
> Issue Type: Enhancement
> Components: EJB
> Affects Versions: 20.0.0.Beta1
> Reporter: Richard Achmatowicz
> Assignee: Richard Achmatowicz
> Priority: Major
>
> Survey all external subsystem dependencies and introduce capability based dependencies where required.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years