AccessControlUnitTest="true" : Disable Access Control Policy

Posted by Unknown on
One of the regular TASKS for a developer while creating new Views and controllers is to define the access control policy, Although it is a must have step for security reasons, I have always wondered why we need to do this during development time, wouldn't it be cool to develop the commands and views without having to create the policies during development. Well yes, that is very much possible with a simple configuration, and this information can not be found in any of the IBM official documentation.

In your toolkit, navigate to your instance.xml file, on WCS 7 , this will be typically located in
C:\IBM\WCDE_ENT70\workspace\WC\xml\config\wc-server.xml

you have to look for the xml elemented named "<Instance", make an entry immediately after this line with AccessControlUnitTest="true"

The updated configuration will look as follows/

    <Instance
      AccessControlUnitTest="true"
     .....
    .......

Save and restart your test server, from now on any controller and view command that you create will not require a acppolicy to be loaded.

Do remember this hack is only for development purpose and never try this configuration on your server environment :)

I would like to thank my colleague Shubamoy for providing me this tech tip.



10 comments:

  1. Hi Hari, thanks for this information. I managed to get it working for WebSphere 6 too, although the wc-server.xml will be located somewhere like C:\WCToolkitEE60\xml\config\wc-server.xml.

    ReplyDelete
  2. I was looking out for the way to disable policies in WCS7 and I stumbled upon ur blog in Google. At the end when you thanked Subhamoy, I wanted to check if you belonged to Sapient as thats where I belong. The world is a small place :)

    ReplyDelete
  3. the world is a small place too! this blog helped me sort out an issue now!

    ReplyDelete
  4. Hi Hari,

    Can we disable access control policy on server edition too?.

    Thanks

    ReplyDelete
  5. yes it does, but not recommended for production.

    ReplyDelete
  6. Hi Hari,

    Will this impact User approval process after new user registration?

    Thanks

    ReplyDelete
  7. I wonder whether it is possible to disable permission checks globaly? I need to use WSC 7 for backend purposes, and the frontend would take care of permissions. So is it possible tod get rid of those checks once for all?

    ReplyDelete