Hi, Thomas.
If you need attributes you are adding to template to not be duplicated (and you need this), you should add name of each of your attribute to this segment already present in your `/opt/tomcat/conf/shibboleth2/idp/attribute-resolver.xml.vm`, like that:
```
#foreach( $attribute in $attrParams.attributes )
#if( ! ( $attribute.name.equals('transientId') or $attribute.name.equals('persistentId') or $attribute.name.equals('yourCustomAttribute') ) )
```
Then you just add your complete custom attribute definition here:
```
#end
#end
YOUR_CUSTOM_ATTRIBUTE_DEFINITION_GOES_HERE
<!-- Name Identifier related attributes -->
```
You shouldn't need to edit `attribute-filter`, neither template, nor actual file, though. When you'll add your custom attribute to the list of attributes to release in web UI, it will add it to `attribute-filter` for you. But due to exception you created modifying this `#if` section above it won't be added to `attribute-resolver` and your fixed definition will be used instead.
Regards,
Alex.