Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

0001496: exception during login with LDAP backend #835

Closed
Gloirin opened this issue Jun 8, 2018 · 1 comment
Closed

0001496: exception during login with LDAP backend #835

Gloirin opened this issue Jun 8, 2018 · 1 comment
Assignees
Labels
Bug Mantis Migrated from old Mantis bugtracker forge.tine20.org Tinebase

Comments

@Gloirin
Copy link
Contributor

Gloirin commented Jun 8, 2018

Reported by czytom on 12 Aug 2009 08:18

Version: Leonie (2009-07-1)

after adding configuration for LDAP:
'authentication' => array(
'backend' => 'ldap',
'ldap' => array(
'host' => 'ldaphost"',
'username' => "uid=ws,ou=Access,dc=p,dc=com",
'password' => 'something',
'bindRequiresDn' => true,
'baseDn' => "dc=p,dc=com",
'accountCanonicalForm' => 2
),
),
'accounts' => array(
'backend' => 'ldap',
'ldap' => array(
'host' => 'ldaphost',
'username' => "uid=ws,ou=Access,dc=p,dc=com",
'password' => "something"',
'bindRequiresDn' => true,
'userDn' => "ou=People,dc=p,dc=com",
'groupsDn' => "ou=Groups,dc=p,dc=com",
'pwEncType' => 'MD5CRYPT',
//'useRfc2307bis' => true,
'minUserId' => 1000,
'maxUserId' => 29999,
'minGroupId' => 12000,
'maxGroupId' => 12099,
),

and try to login with ldap user credentials I'm getting:

exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tine20/tine20_accounts, CONSTRAINT tine20_accounts::primary_group_id--groups::id FOREIGN KEY (primary_group_id) REFERENCES tine20_groups (id))' in /var/www/webim/tine/library/Zend/Db/Statement/Pdo.php:238

Additional information: 2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Core::setupLogger::309 logger initialized
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Core::setupCache::348 cache disabled
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Preference_Abstract::getValue::126 get user preference "timezone" for account id 0
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Core::setupUserLocale::510 given localeString 'auto'
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Core::setupUserLocale::523 session value 'en'
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Translation::getLocale::173 given localeString 'en'
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Translation::getLocale::208 selected locale: 'en'
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Server_Json::handle::39 is json request. method: Tinebase.login
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_Auth::__construct::110 authentication backend: Ldap
2009-08-12T07:58:44+00:00 DEBUG (7): trying to authenticate mylogin
2009-08-12T07:58:44+00:00 DEBUG (7): authentication of mylogin succeeded
2009-08-12T07:58:44+00:00 DEBUG (7): Tinebase_User::getInstance::54 accounts backend: Ldap
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_Group::getInstance::60 groups backend: Ldap
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_TransactionManager::startTransaction::84 startTransaction request
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_TransactionManager::startTransaction::86 new transactionable. Starting transaction on this resource
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_TransactionManager::startTransaction::99 queued transaction with id 4fc3db5cd9f9120afe6966d6003bcdbfe6929980
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_TransactionManager::rollBack::141 rollBack request, rollBack all transactionables
2009-08-12T07:58:49+00:00 DEBUG (7): Tinebase_Server_Json::handle::117 got exception code0
2009-08-12T07:58:49+00:00 DEBUG (7): Zend_Json_Server:
exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tine20/tine20_accounts, CONSTRAINT tine20_accounts::primary_group_id--groups::id FOREIGN KEY (primary_group_id) REFERENCES tine20_groups (id))' in /var/www/webim/tine/library/Zend/Db/Statement/Pdo.php:238
Stack trace:
#0 /var/www/webim/tine/library/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->execute(Array)
#1 /var/www/webim/tine/library/Zend/Db/Adapter/Abstract.php(430): Zend_Db_Statement->execute(Array)
#2 /var/www/webim/tine/library/Zend/Db/Adapter/Pdo/Abstract.php(220): Zend_Db_Adapter_Abstract->query('INSERT INTO ti...', Array) #3 /var/www/webim/tine/library/Zend/Db/Adapter/Abstract.php(508): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO ti...', Array)
#4 /var/www/webim/tine/library/Zend/Db/Table/Abstract.php(815): Zend_Db_Adapter_Abstract->insert('tine20_accounts', Array)
#5 /var/www/webim/tine/Tinebase/User/Sql.php(474): Zend_Db_Table_Abstract->insert(Array)
#6 /var/www/webim/tine/Tinebase/User/Ldap.php(188): Tinebase_User_Sql->addUser(Object(Tinebase_Model_FullUser))
#7 /var/www/webim/tine/Tinebase/User/Abstract.php(214): Tinebase_User_Ldap->getUserByLoginName('mylogin', 'Tinebase_Model
...')
#8 /var/www/webim/tine/Tinebase/Controller.php(73): Tinebase_User_Abstract->getFullUserByLoginName('mylogin')
#9 /var/www/webim/tine/Tinebase/Frontend/Json.php(271): Tinebase_Controller->login('mylogin', 'mypass', '10.5.0.15')
#10 [internal function]: Tinebase_Frontend_Json->login('mylogin', 'mypass')
#11 [internal function]: ReflectionMethod->invokeArgs(Object(Tinebase_Frontend_Json), Array)
#12 /var/www/webim/tine/library/Zend/Server/Reflection/Function/Abstract.php(371): call_user_func_array(Array, Array)
#13 [internal function]: Zend_Server_Reflection_Function_Abstract->__call('invokeArgs', Array)
#14 /var/www/webim/tine/Zend/Json/Server.php(144): Zend_Server_Reflection_Method->invokeArgs(Object(Tinebase_Frontend_Json), Array)
#15 /var/www/webim/tine/Tinebase/Server/Json.php(108): Zend_Json_Server->handle(Array)
#16 /var/www/webim/tine/Tinebase/Core.php(162): Tinebase_Server_Json->handle()
#17 /var/www/webim/tine/index.php(51): Tinebase_Core::dispatchRequest()
#18 {main}

@Gloirin Gloirin added this to the August (2009-11) Beta 1 milestone Jun 8, 2018
@Gloirin Gloirin self-assigned this Jun 8, 2018
@Gloirin Gloirin added Bug Mantis Migrated from old Mantis bugtracker forge.tine20.org Tinebase labels Jun 8, 2018
@Gloirin Gloirin closed this as completed Jun 8, 2018
@Gloirin
Copy link
Contributor Author

Gloirin commented Jun 10, 2018

Comment posted by unknown user on 14 Oct 2009 08:32

Since r10973 it is possible to switch between accounts storage backend (Database/Ldap).

Note however, that switching from Database to Ldap will delete all existing accounts, groups, roles and rights and then get re-created/imported from Ldap. Of course, you have to confirm a warning message before this will happen.

Switching from Ldap to mySql simply disconnects from Ldap and continues working with the mirrored Database accounts/groups.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Mantis Migrated from old Mantis bugtracker forge.tine20.org Tinebase
Projects
None yet
Development

No branches or pull requests

1 participant