Giter Club home page Giter Club logo

elytron-security-context-propagation-to-remote-ejb's Introduction

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

elytron-security-context-propagation-to-remote-ejb's People

Contributors

mihastemberger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.