Skip to content

No Application found for security initialization when run with Arquillian #4

@flavienlaurent

Description

@flavienlaurent

I configured Keycloak with kumuluzee-security-keycloak and I'm trying to write some integration tests with Arquillian.

When I run the app the normal way with EeApplication, Keycloak is intialized and the resources are secured. But when I run the app the Arquillian way, Keycloak is loaded as an extension:

2018-07-19 17:19:19,112 INFO -- EeApplication --  Found extension implemented by keycloak {}  
2018-07-19 17:19:19,112 INFO -- com.kumuluz.ee.security.extensions.KeycloakSecurityExtension --  Initialised security implemented by Keycloak. {}  
2018-07-19 17:19:19,112 INFO -- com.kumuluz.ee.security.extensions.KeycloakSecurityExtension --  Initialising security implemented by Keycloak. {}  

But the AnnotationProcessorUtil class doesn't find my Application (via ServiceLoader.load(Application.class)) so security configuration is not initialized and the resources are not secured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions