08-08-2007 08:55 AM
<config evaluator="string-compare" condition="Filesystem Security" replace="true">
<authenticator type="passthru">
<Server>my.ldap.server</Server> <!– LDAP server –>
</authenticator>
</config>
<bean id="authenticationDao" class="org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao" >
<property name="nodeService">
<ref bean="nodeService"/>
</property>
</bean>
<bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl">
<property name="servers">
<value>my.ldap.server</value>
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="guestAccess">
<value>false</value>
</property>
</bean>
<bean id="authenticationComponent" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
<property name="LDAPInitialDirContextFactory">
<ref bean="ldapInitialDirContextFactory"/>
</property>
<property name="userNameFormat">
<value>uid=%s,ou=Usuarios,dc=audiovisual,dc=es</value>
</property>
</bean>
<bean id="ldapAuthenticationComponentImpl" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
<property name="LDAPInitialDirContextFactory">
<ref bean="ldapInitialDirContextFactory"/>
</property>
<property name="userNameFormat">
<value>uid=%s,ou=Usuarios,dc=domain,dc=domain</value>
</property>
</bean>
<bean id="ldapInitialDirContextFactory" class="org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl">
<property name="initialDirContextEnvironment">
<map>
<entry key="java.naming.factory.initial">
<value>com.sun.jndi.ldap.LdapCtxFactory</value>
</entry>
<entry key="java.naming.provider.url">
<value>ldap://my.ldap.server:port</value>
</entry>
<entry key="java.naming.security.authentication">
<value>simple</value> <!– DIGEST-MD5 –>
</entry>
</map>
</property>
</bean>
NTLanManAuthContext ntlmCtx = (NTLanManAuthContext) getAuthContext( sess);
type2Msg.buildType2(ntlmFlags, domain, ntlmCtx.getChallenge(), null, tList);
09-22-2007 07:19 AM
Hi Finner sorry again if my question wasn't clear:
I did the following:
First I test local Domain as u suggestedNote passuthr authinticator can only work with LDPA or NTLM )
1. I add the ldap-authentication-context.xml
<beans>
<bean name="authenticationDao" class="org.alfresco.repo.security.authentication.DefaultMutableAuthenticationDao" >
<property name="allowDeleteUser">
<value>true</value>
</property>
</bean>
<bean id="authenticationComponent" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
<property name="LDAPInitialDirContextFactory">
<ref bean="ldapInitialDirContextFactory"/>
</property>
<property name="userNameFormat">
<value>%s</value>
</property>
</bean>
<!– <bean id="passwordEncoder" class="net.sf.acegisecurity.providers.encoding.Md5PasswordEncoder"></bean>–>
<bean id="ldapInitialDirContextFactory" class="org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl">
<property name="initialDirContextEnvironment">
<map>
<entry key="java.naming.factory.initial">
<value>com.sun.jndi.ldap.LdapCtxFactory</value>
</entry>
<entry key="java.naming.provider.url">
<value>ldap://x.x.x.x:389</value>
</entry>
<entry key="java.naming.security.authentication">
<value>simple</value>
</entry>
</map>
</property>
</bean>
</beans>
2. Modify the file-servers-custom.xml to add the following part:
<config evaluator="string-compare" condition="Filesystem Security" replace="true">
<authenticator type="passthru">
<LocalDomain/> or <Domain>domainName</Doamin>
</authenticator>
</config>
In this case i can login from the pc that alfersco installed on it only, and failed to logon from any another pc even it is on te same Domain.
for the web no problem in the authentication.
Secondly i apply ur solution:
1. Modify the authenticationComponent bean to refer to ur wrapper calss
2. Modify the file-servers-custom.xml to use enterprise authenticator
<config evaluator="string-compare" condition="Filesystem Security" replace="true">
<authenticator type="enterprise">
</authenticator>
</config>
In this case no pc in my domain can connect to the CIFS server, even the authintacation work suceffuly on the web
so when trace in the code i find it stop at this line (//HERE) in the EnterpriseCifsAuthenticator Class
int i = 0;
while ( i < clientHash.length && clientHash[i] == localHash[i])
i++;
if ( i != clientHash.length)
{
// Return a logon failure
//HERE
throw new SMBSrvException( SMBStatus.NTLogonFailure, SMBStatus.DOSAccessDenied, SMBStatus.ErrDos);
}
so now can u give any advice to me, plz, i need ur help it is really works with u.
thx a lot
09-22-2007 07:52 AM
if ( i != clientHash.length)
{
// Return a logon failure
throw new SMBSrvException(SMBStatus.NTLogonFailure,SMBStatus.DOSAccessDenied, SMBStatus.ErrDos);}
10-02-2007 11:22 AM
The class my.package.LDAPAuthenticationComponentWrapper is implemented to use MD4 hashing as follows:What do you mean?
10-05-2007 02:25 AM
so i ask u again shouldn't the getMD4HashedPassword(String userName)method return the hashed password fot this user not the hashed username.
<bean id="passwordEncoder" class="org.alfresco.repo.security.authentication.MD4PasswordEncoderImpl"></bean>
This is probably a dumb question, but when you say
Quote:The class my.package.LDAPAuthenticationComponentWrapper is implemented to use MD4 hashing as follows:What do you mean?
i understand changing the file to point to the new class, but where do i put the class?
10-05-2007 12:59 PM
This class goes into a JAR which then goes into the Alfresco.war
10-11-2007 05:45 AM
12-04-2007 05:15 AM
12-04-2007 06:01 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.