I want to use HTTP API in order to integrate alfresco functionnality into another webapp. This webapp kwnow the alfresco's username, but not his password. Do you think it' s possible to implement a custom WebScriptServletAuthenticator which authenticate user with his username ? (I will secure this Authenticator to only accept request from the webapp server)
If your web app is essentially performing the authentication, then yes - otherwise, you'll be allowing free access to the repository. Maybe that's what you want.
Basically, you can develop an authenticator similar to the JSR-168 authenticator. You just need to pull the username and then 'run as' that user.
See JSR68PortletAuthenticator.java for an example.
An authentication filter to do just this exists to support SiteMinder and IChains. The user name as taken from a request header. You need to use SSL between you SSO/Redirection layer and alfresco and disable normal authentication.