1

It is part of web.xml from app which runs on JBoss

  <security-constraint>
    <web-resource-collection>
      <web-resource-name></web-resource-name>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>User manual should be accesable for user</web-resource-name>
      <url-pattern>/User Manual.pdf</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>user</role-name>
    </auth-constraint>
  </security-constraint>

As you can see admin has access to all content, and user should have access only to user manual file 'User Manual.pdf'. But it does not work, only admin have access.

This can be fixed by renaming file to 'User_Manual.pdf' and changing <url-pattern> to '/User_Manual.pdf'

My question is can this be fixed somehow to use spaces in file names?

  • What version of JBoss AS? The given sample works for me as expected (tested on JBoss AS 7.1.1 and JBoss EAP 6.3). – kwart Oct 20 '14 at 20:22
  • I am using JBoss AS 7.1.1.Final, but looks like there present additional third party layer of security. And I have found how to fix this in my case: we need replace all spaces by %20 in '' – Valdermeyder Hussar Oct 21 '14 at 08:14
  • Interesting. For me it works even with the standard space (without escaping). – kwart Oct 21 '14 at 19:55

0 Answers0