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

Resolve scopes in an oidcSecurityContext #5

Open
rsoika opened this issue Dec 11, 2024 · 0 comments
Open

Resolve scopes in an oidcSecurityContext #5

rsoika opened this issue Dec 11, 2024 · 0 comments
Labels

Comments

@rsoika
Copy link
Member

rsoika commented Dec 11, 2024

If the workflow engine runs in Wildfly using the new elytron-oidc-subsystem we can provide an additional (but proprietary) plugin to resolve the scopes provided in the security context.

Jakarta 10

For jakarta EE 10 possible we can use a generic solution to resolve claims:

@OpenIdAuthenticationMechanismDefinition( //
        clientId = "${oidcConfig.clientId}", //
        clientSecret = "${oidcConfig.clientSecret}", //
        redirectURI = "${baseURL}/callback", //
        providerURI = "${oidcConfig.issuerUri}" //
)
.....
    @Inject
    private OpenIdContext context;
 ....
     System.out.println("  Subject = " + context.getSubject());
                System.out.println("  Access token = " + context.getAccessToken());
                System.out.println("  ID token = " + context.getIdentityToken());
                System.out.println("  Claims json = " + context.getClaimsJson());
                System.out.println("=========================================");
                message = "Imixs-Security-OIDC ==> OK \n" + //
                        "User Principal      ==> " + principal.getName()
                        + "\n\nSession details are available on server log";

Wildfly

See the example here

It looks like we just need to get the OidcSecurityContext class from the HttpServletRequest and parse the scopes

We can implement a WIldflyOidcSecrutiyContextPlugin that can be added into a profile worklfow in the same way as we do it with the LDAPPlugin

@rsoika rsoika added the feature label Dec 11, 2024
@rsoika rsoika transferred this issue from imixs/imixs-adapters Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant