cancel
Showing results for 
Search instead for 
Did you mean: 

Acces share feed with HTTPBasic auth while using CAS SSO

skyfredox
Champ in-the-making
Champ in-the-making
Hi,

I am using SVN rev 21322 (pre 3.4)

I have managed to set up SSO between alfresco and share using mod_auth_cas  and external auth.

Now I would like to let me users access AtomFeed (RSS) related to activity in share from RSS client that support basic HTTP auth but not coockie (required by mod_auth_cas and external auth)…

As you can guess, I have authentication problems…

I have tried to set 2 virtual hosts
mydomain.com serves alfresco in the regular way, virtual host includes mod_auth_cas instructions
feed.mydomain.com, same conf as mydomain.com but does not have mod_auth_cas instructions

and in share-config-custom.xml, i have set
 
         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfrescoCookie</connector-id>
            <endpoint-url>http://gdprojets.eu/alfresco/wcs</endpoint-url>
            <identity>user</identity>
            <external-auth>true</external-auth>
         </endpoint>
        <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://feed.mydomain.com/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>

hoping it would do the trick

unsurprisingly,
I can login in to Alfresco (I have set external and ldap auth chain in alfresco-global-properties)
and I cannot login to Share since I have set alfresco endpoint (user auth) to external with alfrescoCookie connector

unfortately
http://feed.mydomain.com/share/feedservice/components/dashlets/activities/list?format=atomfeed&mode=...

after asking for Http Basic auth as expected, give this error

The Web Script /share/page/feed/components/dashlets/activities/list  has responded with a status of 401 - Unauthorized.
401 Description:   The request requires HTTP authentication.


Would you have any suggestion ?
Shoud I set up some kind of proxy

Thanks for any help

Fred
2 REPLIES 2

oresistemas
Champ in-the-making
Champ in-the-making
Hi. I have a similar problem. I have Alfresco 3.4d with MySQL (CAS and LDAP for SSO). The SSO works great but the RSS feed not work.

In my file 'share-config-custom.xml':


   <!–Overriding endpoints to reference a remote Alfresco server–>
    <config evaluator="string-compare" condition="Remote">
        <remote>
            <!– Authenticator implementation used in CAS authentication scenario,
                overrides the default alfresco-ticket authenticator
                <class>org.alfresco.connector.AlfrescoAuthenticator</class> –>
            <authenticator>
                <id>alfresco-ticket</id>
                <name>Alfresco Authenticator</name>
                <description>Alfresco Authenticator</description>
                <class>com.mycompany.alfresco.sso.CasAlfrescoAuthenticator</class>
            </authenticator>

            <!– Connects to an Alfresco instance using ticket-based authentication,
                overrides the default alfresco connector to use CAS ticket authenticator–>
            <connector>
                <id>alfresco</id>
                <name>Alfresco Connector</name>
                <description>Connects to an Alfresco instance using ticket-based authentication</description>
                <class> org.springframework.extensions.webscripts.connector.AlfrescoConnector</class>
                <authenticator-id>alfresco-ticket</authenticator-id>
            </connector>

            <!– Endpoint using external authentication via CAS–>
            <endpoint>
                <id>alfresco</id>
                <name>Alfresco - user access</name>
                <description>Access to Alfresco Repository WebScripts that require external user authentication</description>
                <connector-id>alfresco</connector-id>
                <endpoint-url>http://alfrescoserver:8090/alfresco/s</endpoint-url>
                <identity>user</identity>
                <external-auth>true</external-auth>
            </endpoint>
         </remote>
    </config>

I added missing endpoints for 'alfresco-feed' (as the original file) to resolves the problem but not:


             <endpoint>
                <id>alfresco-noauth</id>
                <name>Alfresco - unauthenticated access</name>
                <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
                <connector-id>alfresco</connector-id>
                <endpoint-url>http://localhost:8090/alfresco/s</endpoint-url>
                <identity>none</identity>
             </endpoint>
             <endpoint>
                <id>alfresco-feed</id>
                <name>Alfresco Feed</name>
                <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
                <connector-id>http</connector-id>
                <endpoint-url>http://localhost:8090/alfresco/s</endpoint-url>
                <identity>user</identity>
                <external-auth>true</external-auth>
             </endpoint>

I also tried to set 'external-auth' to true or 'basic-auth' set to true as originally appeared in this file, but nothing works.
If I add the last enpoints and I want to see the feeds I have the following error:

Web Script Status 401 - Unauthorized

The Web Script /share/page/feed/components/dashlets/activities/list has responded with a status of 401 - Unauthorized.
401 Description:    The request requires HTTP authentication.
Message:  
Server:    Spring WebScripts - v1.0.0 (Release Candidate 2 744) schema 1,000
Time:    Feb 7, 2012 7:09:05 PM   
Diagnostics:    Inspect Web Script (org/alfresco/components/dashlets/activity-list.get)


Any Idea??

sburky
Champ in-the-making
Champ in-the-making
Hi,
I'm in same config too…
authentication throw Active Directory and passthru but Rss feeds don't work and ask a newer basic http authentication…