Jump to content
We've recently updated our Privacy Statement, available here ×

Issue with my security file


srahmani

Recommended Posts

Hello I am trying to implement a new security file on my jaspersoft instance and am getting the following errors when trying to save my domain. I do not think this is an XML error but possibly something more specific to jaspersoft server when trying to load the file. otherwise i am not sure why this isn't working. Any help on this would be greatly appreciated!

There is a problem with the security file
The following field(s) can not be found:

The filter condition 'testProfileAttribute(dw_analytics_dim_faculty.faculty_username, 'username')' references one or more fields that cannot be found: ID [dw_analytics_dim_faculty.faculty_username].
The filter condition 'testProfileAttribute(dw_analytics_dim_graders_rls.grader_username, 'username')' references one or more fields that cannot be found: ID [dw_analytics_dim_graders_rls.grader_username].
The filter condition 'testProfileAttribute(dw_analytics_dim_coach.coach_username, 'username')' references one or more fields that cannot be found: ID [dw_analytics_dim_coach.coach_username].
The filter condition 'testProfileAttribute(dw_analytics_users_workspaces_rls.username, 'username')' references one or more fields that cannot be found: ID [dw_analytics_users_workspaces_rls.username].

here is my formatted XML:

<?xml version="1.0" encoding="UTF-8"?>
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<resourceAccessGrantList id="JoinTree_1_resource_access_grant" label="aLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<resourceAccessGrant id="Jointree_1_row_access_grant_faculty">
<principalExpression><![CDATA[authentication.getPrincipal().getRoles().any{it.getRoleName() in ['ROLE_FACULTY']}]]></principalExpression>
<filterExpression>testProfileAttribute(dw_analytics_dim_faculty.faculty_username,'username')</filterExpression>
</resourceAccessGrant>
<resourceAccessGrant id="Jointree_1_row_access_grant_grader">
<principalExpression><![CDATA[authentication.getPrincipal().getRoles().any{it.getRoleName() in ['ROLE_GRADER']}]]></principalExpression>
<filterExpression>testProfileAttribute(dw_analytics_dim_graders_rls.grader_username,'username')</filterExpression>
</resourceAccessGrant>
<resourceAccessGrant id="Jointree_1_row_access_grant_coach">
<principalExpression><![CDATA[authentication.getPrincipal().getRoles().any{it.getRoleName() in ['ROLE_COACH']} && !(attributesService.getAttribute('tenant','USER')?.getAttrValue().contains('brandman'))]]></principalExpression>
<filterExpression>testProfileAttribute(dw_analytics_dim_coach.coach_username,'username')</filterExpression>
</resourceAccessGrant>
<resourceAccessGrant id="Jointree_1_row_access_grant_workspaces">
<principalExpression><![CDATA[authentication.getPrincipal().getRoles().any{it.getRoleName() in ['ROLE_ADMIN','ROLE_COACH','ROLE_FACULTY','ROLE_GRADER']}]]></principalExpression>
<filterExpression>testProfileAttribute(dw_analytics_users_workspaces_rls.username,'username')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
</securityDefinition>

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

so I figured this out, the filter expression reads directly off of your joins from the tables so in some domains in our system the alias of the table read with "dw_analytics..." and in my case it was just the name of the view or table without that. Once I made that change in the xml it was accepted.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...