Hello All , I am trying to follow the given documentation to implement sso based on docs .
For the testing , i just hardcoded to some dummy user id and groups and trying to access the camunda webapp , I could see empty page is displayed [without cokcpit/admin/tasklist] and the roles for the same users were not displayed underneath his name .
The Code sample :
This is my Spring security auth provider .
public AuthenticationResult extractAuthenticatedUser(HttpServletRequest request, ProcessEngine engine) {
System.out.println("Enter SpringSecurityAuthProvider >>> ");
final HttpServletRequest req = (HttpServletRequest) request;
AuthenticationResult authenticationResult = new AuthenticationResult("Test.User@xyz.com", true);
authenticationResult.setGroups(ImmutableList.of("TESTING_GROUP_A","TESTING_GROUP_B"));
System.out.println("getGroups :=>" + authenticationResult.getGroups());
System.out.println("Exit SpringSecurityAuthProvider <<< ");
return authenticationResult;
}
Below is my stateless Auth filter :
public class StatelessAuthenticationFilter implements Filter {
private static final Logger LOG = LoggerFactory.getLogger(StatelessAuthenticationFilter.class);
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
System.out.println("Enter StatelessAuthenticationFilter >>> ");
ProcessEngine engine = EngineUtil.lookupProcessEngine("default");
final HttpServletRequest req = (HttpServletRequest) request;
SSPGoAuthenticationToken principal = (SSPGoAuthenticationToken) req.getUserPrincipal();
String name = principal.getName();
try {
Authentications authentications = Authentications.getFromSession(req.getSession());
engine.getIdentityService().setAuthentication("Test.User@xyz.com", ImmutableList.of("TESTING_GROUP_A","TESTING_GROUP_B"));
System.out.println("Delegating to Chain#doFilter");
chain.doFilter(request, response);
} finally {
engine.getIdentityService().clearAuthentication();
}
}
How to get this corrected ?
I do have the localization error when deployed into openshift platform
The request to retrive the filters are succesfull
Key | Value |
---|---|
Request | GET /camunda/api/engine/engine/default/filter?firstResult=0&maxResults=2000&itemCount=false&resourceType=Task HTTP/1.1 |
response :
[{“id”:“d48307d4-de23-11ea-8687-0a58c0a815bd”,“resourceType”:“Task”,“name”:“Approvals”,“owner”:null,“query”:{“processDefinitionKey”:“APPROVAL_V1”,“taskVariables”:[],“processVariables”:[],“caseInstanceVariables”:[],“orQueries”:[]},“properties”:{“variables”:[{“name”:“businessKey”,“label”:“ID”},{“name”:“amount”,“label”:“Amount”},{“name”:“date”,“label”:“date”},{“name”:“deliveringParticipantNumber”,“label”:“Del. Part.”}],“color”:"#555555",“showUndefinedVariable”:true,“refresh”:true,“priority”:0}}]