cancel
Showing results for 
Search instead for 
Did you mean: 

Disable basic authentication

wolfgang_freund
Champ on-the-rise
Champ on-the-rise
Hi there,

hope the community can help. I am working on a development system, and i do create some web scripts. My Version is Alfresco Community 3.4

When I now list the webscripts via the url http://localhost:8080/alfresco/service/index, i always need authentication via [alf_ticket]. I am not even able to click the button 'Refresh Web Scripts'  because I always get the 401 message: Web Script Status 401 - Unauthorized. I do always need to restart tomcat to update my webscripts

Is there a way to disable this kind of authentication on my development system?

Thanks a lot.

Cheers
Wolfgang
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
In a word, yes.

The authentication for a script is set the descriptor file, for example the index.get.desc.xml script:
<webscript>
  <shortname>Web Scripts Home</shortname>
  <description>Web Scripts Home</description>
  <url>/</url>
  <url>/index</url>
  <authentication>admin</authentication>
  <lifecycle>internal</lifecycle>
</webscript>
has authentication=admin - which is why you are prompted for login. So to disabled that, you just need overrides for the both the .get (retrieve index page) and .post (refresh index page i.e. Refresh Web Scripts command) scripts.

So add a new file called index.get.desc.xml to: \<your alfresco tomcat>\shared\classes\alfresco\extension\templates\webscripts\org\springframework\extensions\webscripts
<webscript>
  <shortname>Web Scripts Home</shortname>
  <description>Web Scripts Home</description>
  <url>/</url>
  <url>/index</url>
  <authentication>none</authentication>
  <lifecycle>internal</lifecycle>
</webscript>
and a new file called index.post.desc.xml to the same folder:
<webscript>
  <shortname>Web Script Maintenance</shortname>
  <description>Maintain index of Web Scripts</description>
  <url>/index?reset={reset?}</url>
  <url>/?reset={reset?}</url>
  <authentication>none</authentication>
  <lifecycle>internal</lifecycle>
</webscript>
and refresh your webscripts or restart the server. You will no longer need admin privileges to execute a refresh or view the index page.

Kev

wolfgang_freund
Champ on-the-rise
Champ on-the-rise
Thanks a lot. Now it works.

kevinr
Star Contributor
Star Contributor
Excellent, please mark the topic as Solved.

Kev