Skip to content

MihaStemberger/elytron-security-context-propagation-to-remote-ejb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elitron

Playground for troubleshooting security context propagation in remote EJB calls.

Credentials

Usage

1. Build maven project

mvn clean install

2. Start docker containers

docker compose up

3. Deploy artifacts

mvn wildfly:deploy-only

4. Run ServletTest or execute tests via cli

mvn verify -DskipTests=false

The result of the tests will show, that with usage of Keycloak Adapter, the Remote EJB gets a resolved principal.

Sending request to: http://localhost:8081/service-one/
HTTP Status: 200
HTTP principal: Name: 9302f4a1-5f37-4699-9971-ca6ff56bebc6, Type: org.keycloak.KeycloakPrincipal
Local EJB principal: Name: 9302f4a1-5f37-4699-9971-ca6ff56bebc6, Type: org.keycloak.KeycloakPrincipal
Remote EJB principal: Name: 9302f4a1-5f37-4699-9971-ca6ff56bebc6, Type: org.keycloak.KeycloakPrincipal

With out of the box standalone-full.xml, the Remote EJB principal remains anonymous.

Sending request to: http://localhost:8080/service-one/
HTTP Status: 200
HTTP principal: Name: 9302f4a1-5f37-4699-9971-ca6ff56bebc6, Type: org.wildfly.security.http.oidc.OidcPrincipal
Local EJB principal: Name: 9302f4a1-5f37-4699-9971-ca6ff56bebc6, Type: org.wildfly.security.http.oidc.OidcPrincipal
Remote EJB principal: Name: anonymous, Type: org.wildfly.security.auth.principal.AnonymousPrincipal

Deploying changes

If any changes are made to source code use: mvn clean install wildfly:deploy-only

If any changes are made to a DockerFile:

  1. remove running containers:
    docker compose down
  2. rebuild the project:
    mvn clean install
  3. build new docker images:
    docker compose build
  4. start docker containers:
    docker compose up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published