Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ejb client artifact to call ejb basic in oidc-with-identity-propagation #214

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion oidc-with-identity-propagation/configure-server.cli
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ batch
/subsystem=ejb3/application-security-domain=BusinessDomain:add(security-domain=BusinessDomain)

/subsystem=elytron/virtual-security-domain=virtual-security-domain-to-domain.ear:add(outflow-security-domains=[BusinessDomain])
/subsystem=elytron/security-domain=BusinessDomain:write-attribute(name=trusted-virtual-security-domains, value=[virtual-security-domain-to-domain.ear])
/subsystem=elytron/virtual-security-domain=ejb-basic.ear:add(outflow-security-domains=[BusinessDomain])
/subsystem=elytron/security-domain=BusinessDomain:write-attribute(name=trusted-virtual-security-domains, value=[virtual-security-domain-to-domain.ear, ejb-basic.ear])

# Run the batch commands
run-batch
Expand Down
11 changes: 11 additions & 0 deletions oidc-with-identity-propagation/ejb-basic/ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<version>2.0.0.Alpha1-SNAPSHOT</version>
</parent>
<artifactId>ejb-basic-ejb</artifactId>
<packaging>ejb</packaging>

<dependencies>
<dependency>
Expand Down Expand Up @@ -53,10 +54,20 @@
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>5.1.1.Final</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
<generateClient>true</generateClient>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<version>2.0.0.Alpha1-SNAPSHOT</version>
</parent>
<artifactId>virtual-security-domain-to-domain-ejb</artifactId>
<packaging>ejb</packaging>

<dependencies>
<dependency>
Expand All @@ -31,7 +32,7 @@
<dependency>
<groupId>org.wildfly.security.examples</groupId>
<artifactId>ejb-basic-ejb</artifactId>
<type>ejb</type>
<type>ejb-client</type>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public boolean userHasRole(final String roleName) {

@PermitAll
public String invokeManagementBean() {
Management management = lookup(Management.class, "java:global/virtual-security-domain-to-domain/ejb-basic-ejb/ManagementBean!org.wildfly.security.examples.ejb_basic.ejb.Management");
Management management = lookup(Management.class, "java:global/ejb-basic/ejb-basic-ejb/ManagementBean!org.wildfly.security.examples.ejb_basic.ejb.Management");
return management.adminOnlyMethod();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class SecuredServlet extends HttpServlet {

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
EntryBean bean = lookup(EntryBean.class, "java:global/virtual-security-domain-to-domain/virtual-security-domain-to-domain-ejb/EntryBean");
EntryBean bean = lookup(EntryBean.class, "java:global/virtual-security-domain-to-domain/virtual-security-domain-to-domain-ejb/EntryBean!org.wildfly.security.examples.virtual_security_domain_to_domain.ejb.EntryBean");
final PrintWriter writer = resp.getWriter();

writer.println("<html><head><title>virtual-security-domain-to-domain</title></head><body>");
Expand Down