jleylegian Posted June 1, 2016 Share Posted June 1, 2016 I have an external authentication service. I would like to use that service to authenticate users and use the roles returned. I got the login process working. I set up a role mapping. I have an Authentication object populated with roles. When I login, it looks like the roles aren't working. I can see using the admin (jasperadmin) the external roles. Why isn't my role mapping working? Besides adding this, what else should I do? <bean id="mtExternalUserSetupProcessor" class="com.jaspersoft.jasperserver.multipleTenancy.security.externalAuth.processors.MTExternalUserSetupProcessor" parent="abstractExternalProcessor"> <property name="userAuthorityService"> <ref bean="${bean.internalUserAuthorityService}"/> </property> <property name="defaultInternalRoles"> <list> <value>ROLE_USER</value> </list> </property> <property name="organizationRoleMap"> <map> <entry> <key> <value>ROLE_EXTERNAL_ADMINISTRATOR</value> </key> <value>ROLE_ADMINISTRATOR</value> </entry> </map> </property> </bean> The user I was testing with, it has a role of "ROLE_EXTERNAL_ADMINISTRATOR" and "EXTERNAL_ADMINISTRATOR". It seems jaspersoft prepends "ROLE_" to the role if it is missing. What did I do wrong or what am I missing? Link to comment Share on other sites More sharing options...
viki.panmand Posted June 3, 2016 Share Posted June 3, 2016 Am trying to understand what exactly do you want ??? Can you detail what are you trying to achieveJasper creates ROLE_ for every role you try to create Link to comment Share on other sites More sharing options...
jleylegian Posted June 13, 2016 Author Share Posted June 13, 2016 I'm trying to use the roles returned by my custom authentication method and map them to system and organizational roles in Jaspersoft. Thus far I haven't been able to get system roles to be mapped. Everything seems to be mapped to organziational roles.I have this bean, but it doesn't seem to be enough for mapping to system roles. <bean id="mtExternalUserSetupProcessor" class="com.jaspersoft.jasperserver.multipleTenancy.security.externalAuth.processors.MTExternalUserSetupProcessor" parent="abstractExternalProcessor"> <property name="userAuthorityService"> <ref bean="${bean.internalUserAuthorityService}"/> </property> <property name="defaultInternalRoles"> <list> <value>ROLE_USER</value> </list> </property> <property name="organizationRoleMap"> <map> <entry> <key> <value>ROLE_EXTERNAL_ADMINISTRATOR</value> </key> <value>ROLE_ADMINISTRATOR</value> </entry> </map> </property> </bean> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now