[#14606] - Having trouble loading a security file in a domain

Category:
General
Priority:
High
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

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>

JasperServer
srahmani's picture
Joined: Aug 23 2022 - 6:27am
Last seen: 5 months 1 week ago
Feedback