Tomcat Web Application Manager - is it possible to limit what each user role can see? -


i couldn't find regarding on internet, expert here answer question.

i have set tomcat web application manager on test server, created roles/users in tomcat-users.xml follows:

<role rolename="manager"/> <user username="admin" password="admin" roles="manager"/> <user username="user1" password="password" roles="manager"/> 

admin supposed have full rights on webapp manager, while user1 (and perhaps subsequent users) users have been granted permission upload/deploy war files.

right have same roles, see same ui upon logging in, want user1 see deploy/upload option - limited access webapp manager.

is possible achieve this? if yes, how? if no, acceptable compromise?

you didn't hard if couldn't find this. it's under "manager" section of tomcat users' guide:

http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#configuring_manager_application_access

with standard user-acces roles, cannot trying do. fortunately, there's nothing stopping inventing some.

let's want set different roles deploy , undeploy. add them tomcat-users.xml this:

<role rolename="deploy"/> <role rolename="undeploy"/> 

now, modify manager webapp's web.xml , add auth-constraints allow these new roles access specific functions:

<security-constraint>   <web-resource-collection>     <web-resource-name>manual deployment</web-resource-name>     <url-pattern>/html/deploy</url-pattern>   </web-resource-collection>   <auth-constraint>      <role-name>manager-gui</role-name>      <role-name>deploy</role-name>   </auth-constraint> </security-constraint>  <security-constraint>   <web-resource-collection>     <web-resource-name>manual deployment</web-resource-name>     <url-pattern>/html/undeploy</url-pattern>   </web-resource-collection>   <auth-constraint>     <role-name>manager-gui</role-name>     <role-name>undeploy</role-name>   </auth-constraint> </security-constraint> 

note have modify existing <web-resource-collection> /html/* users appropriate role (for instance, 'deploy' role) can access gui in order functions configured above.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -