LDAP Autenticacion

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LDAP Autenticacion

nnagio
This post has NOT been accepted by the mailing list yet.
Hola,

Nosotros estamos tratando de vincular los usuarios de geonetwork a través de LDAP.
Estamos trabajando sobre la version 3.2.1 de Geonetwork.
Nosotros hemos configurado los archivos config-security.xml y config-security-ldap-overrides.properties.

Revisando el debug, el proceso se conecta al ldap, pero en el momento de insertar el usuario a la base de datos (que esta en oracle) saca un error:



DEBUG [org.springframework.security.ldap.authentication.BindAuthenticator] - Attempting to bind as cn=Diana Giovanna Rivera Pineda,ou=Proyecto REDD,dc=xxx,dc=xx,dc=xx,dc=xx
DEBUG [org.springframework.security.ldap.DefaultSpringSecurityContextSource] - Removing pooling flag for user cn=Diana Giovanna Rivera Pineda,ou=Proyecto REDD,dc=xxx,dc=xx,dc=xx,dc=xx
DEBUG [org.springframework.ldap.core.support.AbstractContextSource] - Got Ldap context on server 'ldap://xxx.xxx.xxx.xx:389/dc=xxx,dc=xx,dc=xx,dc=xx'
DEBUG [org.springframework.security.ldap.authentication.BindAuthenticator] - Retrieving attributes...
DEBUG [geonetwork.ldap] - LDAP attribute 'name' = Diana Giovanna
DEBUG [geonetwork.ldap] - LDAP attribute 'surname' = Rivera Pineda
DEBUG [geonetwork.ldap] - LDAP attribute 'organisation' = xxx
DEBUG [geonetwork.ldap] - LDAP attribute 'mail' = drivera@xxx.xxx.xxx.xx
DEBUG [geonetwork.ldap] - LDAP attribute 'address' =
DEBUG [geonetwork.ldap] - LDAP attribute 'state' =
DEBUG [geonetwork.ldap] - LDAP attribute 'zip' =
DEBUG [geonetwork.ldap] - LDAP attribute 'city' =
DEBUG [geonetwork.ldap] - LDAP attribute 'country' =
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Creating new transaction with name [org.fao.geonet.kernel.security.ldap.LDAPUtils.saveUser]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Opened new EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@d508a06] for JPA transaction
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Exposing JPA transaction as JDBC transaction [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@3e4a81d6]
DEBUG [geonetwork.ldap] - LDAP user sync for Diana Giovanna Rivera Pineda ...
DEBUG [geonetwork.ldap] -   - Saving new LDAP user Diana Giovanna Rivera Pineda to database.
DEBUG [org.springframework.data.repository.core.support.TransactionalRepositoryProxyPostProcessor$CustomAnnotationTransactionAttributeSource] - Adding transactional method 'save' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Found thread-bound EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@d508a06] for JPA transaction
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Participating in existing transaction
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Initiating transaction commit
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Committing JPA transaction on EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@d508a06]
DEBUG [org.springframework.orm.jpa.JpaTransactionManager] - Initiating transaction rollback after commit exception
org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into Users (enabled, kind, lastLoginDate, name, organisation, profile, authtype, nodeId, password, security, surname, username, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch
        at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
...
....
Caused by: java.sql.BatchUpdateException: ORA-01400: no se puede realizar una inserción NULL en ("METADATOS"."USERS"."PASSWORD")

        at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:11190)
        at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:244)


No entendemos por qué saca que el password es null.
Nosotros pensamos que el problema esta en la configuración de los privilegios, sin embargo no encontramos documentacion que nos explique que valores deben tener estos atributos:

ldapUserContextMapper.mapping[privilege]=memberOf,sample
# If not set, the default profile is RegisteredUser
# Valid profiles are http://geonetwork-opensource.org/manuals/trunk/eng/developer/apidocs/geonetwork/org/fao/geonet/constants/Geonet.Profile.html
ldapUserContextMapper.mapping[profile]=memberOf,Guest


El link no sirve.
Cuales valores deben tener (XXX) los siguientes parametros:

ldapUserContextMapper.profileMapping[XXX]=Administrator
ldapUserContextMapper.profileMapping[XXX]=Reviewer
ldapUserContextMapper.profileMapping[XXX]=Editor


Gracias por su ayuda y su tiempo.
Saludos
nnagio
Loading...