config filter tools DevOps

Can't access tools after migration

Question

After a migration to Jahia 8, we can't access the tools anymore, even if my user have the  System tools access permission.

Answer

You may have overridden the ShiroFilter bean. If so, you should either remove your custom config or adapt it (see the update from

authcBasic, roles[toolManager]

to

authcJahia, perms[/tools:systemToolsAccess]

Here is the shiroFilter bean for Jahia 8, as you may find it on https://github.com/Jahia/jahia/blob/master/core/src/main/resources/org/jahia/defaults/config/spring/auth/applicationcontext-security.xml

    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <property name="loginUrl" value="/cms/login"/>
        <property name="unauthorizedUrl" value="/cms/unauthorized"/>
        <property name="securityManager" ref="securityManager"/>
        <property name="filters">
            <map>
                <entry key="authcJahia">
                    <bean class="org.jahia.services.security.shiro.JahiaAuthenticationFilter">
                        <property name="authPipeline" ref="authPipeline"/>
                        <property name="sessionFactory" ref="jcrSessionFactory"/>
                    </bean>
                </entry>
                <entry key="invalidRequest">
                    <bean class="org.apache.shiro.web.filter.InvalidRequestFilter">
                        <property name="blockSemicolon" value="false"/>
                        <property name="blockNonAscii" value="false"/>
                    </bean>
                </entry>
            </map>
        </property>
        <property name="filterChainDefinitions">
            <value>
                /modules/*/tools/developer/*.jsp = authcJahia, perms[/:developerToolsAccess]
                /modules/**/configs/*.jsp = authcJahia, perms[/:jcr_read]
                /modules/**/*.jsp = authcJahia, perms[/tools:systemToolsAccess]
                /**/*.raw = authcJahia, perms[/tools:systemToolsAccess]
                /**/*.raw.ajax = authcJahia, perms[/tools:systemToolsAccess]
                /cms/serverStats = authcJahia, perms[/tools:systemToolsAccess]
                /cms/serverStats/** = authcJahia, perms[/tools:systemToolsAccess]
                /cms/text-extract = authcJahia, perms[/tools:systemToolsAccess]
                /cms/text-extract/** = authcJahia, perms[/tools:systemToolsAccess]
                /tools/** = authcJahia, perms[/tools:systemToolsAccess]
                /modules/tools/** = authcJahia, perms[/tools:systemToolsAccess]
            </value>
        </property>
    </bean>