cancel
Showing results for 
Search instead for 
Did you mean: 

Webscript with guest access requiring authentication

hiten_rastogi1
Star Contributor
Star Contributor

Hi,

I have a webscript that have guest access enabled but it still requires me to authenticate when I try to access it on my production instance, though it work fine on my local.

Below is the desc file for the webscript

<webscript>
    <shortname>doclist</shortname>
    <description>Publicly available document list</description>
    <url>/eu/xfel/make-public/doclist</url>
    <format default="html">argument</format>
    <authentication>guest</authentication>
    <transaction allow="readonly">required</transaction>
</webscript>

I am hitting the webscript with the below url

http://localhost:8080/alfresco/s/eu/xfel/make-public/doclist?nodeRef=workspace://SpacesStore/jt0fcff... 

the above one works

https://abc.net/alfresco/s/eu/xfel/make-public/doclist?nodeRef=workspace://SpacesStore/fw0fcffa-f5c8... 

this one doesn't work. It ask me for authentication and I have to put in guest:guest as usernameSmiley Tongueassword

I have made sure that the content this webscript is trying to access has Consumer access for the Guest user and in the instance where I am having issue there is no customisation that disable the guest user access.

Please educate me why this is the happening.

Thanks

12 REPLIES 12

Hi Mikel,

I tried bypassing the apache by accessing the tomcat directly but to no avail. I was still prompted for authentication.

Any other that I can try ??

It's hard to tell.... If you got same code, same Alfresco version, same auth configuration and nothing in between.

What about tomcat configuration? you could inpect both server.xml files to see if you got a valve or something causing your trouble.

Hi Mikel,

Sorry for the late reply. 

I did some testing and it wasn't pretty clear as to why this is happening as on some instances that are behind the same apache server. I also checked the Valve in <TOMCAT_HOME>/conf/server.xml and didn't find any custom changes.

Finally I have to change the authentication in the webscript desc.xml file that fetches the list of children of a folder from 

<authentication>guest</authentication>

to

<authentication user=guest>none</authentication>

and now it is working correctly.