Hi Team,
We have the below error with respect to declarative security, the role check is failing even though respective role has been set.
ds.xml:
<binding operationType="fetch" requiresRole="ADMIN" />
Note: Only one fetch operation specified in the ds file.
SecureIDACall servlet has been extending the IDACall and in processRequest we are setting the roles for RPC using below code.
SecureIDACall Code:
rpc.setAuthenticated(true);
rpc.setUserId("ABC");
rpc.setUserRoles(Arrays.asList(roles));
Error:
java.lang.SecurityException: DataSource 'Bill', operationType 'fetch', operationId 'Bill_fetch'. This operation requires role(s) 'ADMIN'. User 'ABC' fails the role check.
at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2621) ~[isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.bp2s.xproducts.lba.server.servlet.SecureIDACall.processRequest(SecureIDACall.java:49) [classes/:?]
at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) [isomorphic-core-rpc-6.1-p20171121.jar:?]
Expecting your help on this to proceed further.
Thanks,
Manjula
We have the below error with respect to declarative security, the role check is failing even though respective role has been set.
ds.xml:
<binding operationType="fetch" requiresRole="ADMIN" />
Note: Only one fetch operation specified in the ds file.
SecureIDACall servlet has been extending the IDACall and in processRequest we are setting the roles for RPC using below code.
SecureIDACall Code:
rpc.setAuthenticated(true);
rpc.setUserId("ABC");
rpc.setUserRoles(Arrays.asList(roles));
Error:
java.lang.SecurityException: DataSource 'Bill', operationType 'fetch', operationId 'Bill_fetch'. This operation requires role(s) 'ADMIN'. User 'ABC' fails the role check.
at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2621) ~[isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.bp2s.xproducts.lba.server.servlet.SecureIDACall.processRequest(SecureIDACall.java:49) [classes/:?]
at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) [isomorphic-core-rpc-6.1-p20171121.jar:?]
at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) [isomorphic-core-rpc-6.1-p20171121.jar:?]
Expecting your help on this to proceed further.
Thanks,
Manjula
Comment