OC 9.1 as authentication provider through PDO

expert
oc-internals
9.1.x

#1

Hi all,

I want to use an OC 9.1 installation as an authentication provider for Dokuwiki, by using authPDO (https://www.dokuwiki.org/plugin:authpdo#configuration) with PHP Data Objects. I need some in-depth info about the used database structure and the hashes used for the user passwords.
Aside from reading the code, can anyone give me some hints for good links and provide some detailed info about the hashes?

Thanks, Thommie

Operating system: Ubuntu LTS 16.04
Web server: Apache 2.4
Database: MySQL
PHP version: 7.x
ownCloud version: 9.1.2
Updated from an older ownCloud or fresh install: updated


#2

There are probably some salts used (from config/config.php). Can't you directly use webdav-authentication or I'm not sure if there is a way with an api instead of accessing the database directly.

@DeepDiver1975


#3

Unfortunately not. There is either a totally outdated plugin for owncloud (https://www.dokuwiki.org/plugin:authowncloud). And I am pretty shure it won''t work with current OC code. And another one against http basic schemes (https://www.dokuwiki.org/plugin:authhttp) but this is also not what I need. I want to integrate Dokuwiki so that user credentials from OC are used for the access to the wiki pages.

Bye, Thommie


#4

This is basically the code you are looking for https://github.com/owncloud/core/blob/master/lib/private/Security/Hasher.php

You can follow down the path of the method verify.

Let me know if this helps - happy coding!