Skip to content

Using policy enforcer without security constraint #4

Description

@MoatazAbdallh

Hi,
I am facing an issue after I have updated keycloak to v10 as previously I was able to user policy-enforcer in application.properties without configuring security constraints, as now if I didn't add security constraint config the AbstractPolicyEnforcer will retrieve null securityContext
KeycloakSecurityContext securityContext = httpFacade.getSecurityContext();
& hence it will delegate the authZ to userManagmentAccess which by the way is null so at the end I got 403 if I didn't add

keycloak.securityConstraints[0].authRoles[0]=*
#keycloak.securityConstraints[0].securityCollections[0].patterns[0]=/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions