Open Lifa-Harburg opened 4 years ago
Config seems to be OK, could you try with the :stable branch of the docker image. Cause :mhs was a development branch is is now merged into stable. I recently fixed some ldap issues and may have not merged the fixes to the mhs branch, cause it's not going to be used anymore.
I started from scratch with the stable branch.
Admin Account is created but the hashed password dosen't match with the one from the variable. Feedback is "Anmelden Fehler! Falsches Passwort,Falsches Passwort"
In the database the Admin Account is created the Passwrod field is empty after filling that login is possible.
with LDAP Account the response is the same as befor: "Fehler! Benutzer nicht gefunden,Benutzer nicht gefunden"
Heres the docker log after fresh install:
2020-07-05T14:34:15: PM2 log: Launching in no daemon mode
2020-07-05T14:34:15: PM2 log: App [app:0] starting in -fork mode-
2020-07-05T14:34:15: PM2 log: App [app:0] online
Loading app configuration...
Loading project settings...
starting http server on: 8080
== 00_initial: migrating =======
== 00_initial: migrated (2.736s)
== 01_hashpassword: migrating =======
== 01_hashpassword: migrated (3.218s)
== 02_setpasswordnullable: migrating =======
== 02_setpasswordnullable: migrated (1.165s)
== 03_passwordtoken: migrating =======
== 03_passwordtoken: migrated (2.831s)
== 04_savedviews: migrating =======
== 04_savedviews: migrated (1.271s)
== 05_createaudits: migrating =======
== 05_createaudits: migrated (2.609s)
== 06_transactiontype: migrating =======
== 06_transactiontype: migrated (1.101s)
== 07_interestpaymenttype: migrating =======
== 07_interestpaymenttype: migrated (1.240s)
All migrations performed successfully
Admin user lifa-dk with e-mail address admin@lifa-harburg.org created
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/e12ElLjIaV3sYTT25XMH2KMxBjAfDFZP.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/e12ElLjIaV3sYTT25XMH2KMxBjAfDFZP.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/e12ElLjIaV3sYTT25XMH2KMxBjAfDFZP.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/e12ElLjIaV3sYTT25XMH2KMxBjAfDFZP.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/e12ElLjIaV3sYTT25XMH2KMxBjAfDFZP.json'
Sun, 05 Jul 2020 14:34:39 GMT express deprecated req.host: Use req.hostname instead at app.js:128:41
[sass] skip: /login nothing to do
[05/Jul/2020:14:34:39 +0000] "GET /login HTTP/1.1" 200 4470
[sass] skip: /public/datatables/jquery.dataTables.min.js nothing to do
[sass] source: /habidat/public/chart.js/Chart.min.scss
[sass] dest: /habidat/public/chart.js/Chart.min.css
[sass] source: /habidat/public/datatables/dataTables.bootstrap4.min.scss
[sass] dest: /habidat/public/datatables/dataTables.bootstrap4.min.css
[sass] skip: /public/bootbox/bootbox.min.js nothing to do
[sass] source: /habidat/public/datepicker/bootstrap-datepicker.min.scss
[sass] dest: /habidat/public/datepicker/bootstrap-datepicker.min.css
[sass] source: /habidat/public/css/red.scss
[sass] dest: /habidat/public/css/red.css
[sass] skip: /public/datepicker/bootstrap-datepicker.min.js nothing to do
[sass] source: /habidat/public/datatables/responsive.bootstrap4.min.scss
[sass] dest: /habidat/public/datatables/responsive.bootstrap4.min.css
[sass] read: /habidat/public/chart.js/Chart.min.scss
[sass] skip: /habidat/public/chart.js/Chart.min.scss does not exist
[sass] read: /habidat/public/datatables/dataTables.bootstrap4.min.scss
[sass] skip: /habidat/public/datatables/dataTables.bootstrap4.min.scss does not exist
[sass] read: /habidat/public/datepicker/bootstrap-datepicker.min.scss
[sass] skip: /habidat/public/datepicker/bootstrap-datepicker.min.scss does not exist
[sass] read: /habidat/public/css/red.scss
[sass] read: /habidat/public/datatables/responsive.bootstrap4.min.scss
[sass] skip: /habidat/public/datatables/responsive.bootstrap4.min.scss does not exist
[sass] skip: /public/bootstrap/bootstrap.bundle.min.js nothing to do
[sass] skip: /public/jquery/jquery.min.js nothing to do
[sass] skip: /public/multiselect/bootstrap-multiselect.min.js nothing to do
[sass] skip: /public/datatables/dataTables.bootstrap4.min.js nothing to do
[sass] skip: /public/moment/locale/de.js nothing to do
[sass] skip: /public/datatables/responsive.bootstrap4.min.js nothing to do
[sass] skip: /public/select/bootstrap-select.min.js nothing to do
[sass] skip: /public/moment/moment.min.js nothing to do
[sass] skip: /public/javascripts/locale/de.js nothing to do
[sass] skip: /public/datatables/dataTables.responsive.min.js nothing to do
[sass] skip: /public/javascripts/custom.js nothing to do
[sass] skip: /public/chart.js/Chart.min.js nothing to do
[sass] skip: /public/javascripts/actions.js nothing to do
[05/Jul/2020:14:34:39 +0000] "GET /public/bootbox/bootbox.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datepicker/bootstrap-datepicker.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/jquery.dataTables.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/javascripts/locale/de.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/bootstrap/bootstrap.bundle.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/jquery/jquery.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/multiselect/bootstrap-multiselect.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/dataTables.bootstrap4.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/javascripts/custom.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/select/bootstrap-select.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/moment/moment.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/chart.js/Chart.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/javascripts/actions.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/chart.js/Chart.min.css HTTP/1.1" 200 521
[05/Jul/2020:14:34:39 +0000] "GET /public/moment/locale/de.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/dataTables.bootstrap4.min.css HTTP/1.1" 200 5222
[05/Jul/2020:14:34:39 +0000] "GET /public/datepicker/bootstrap-datepicker.min.css HTTP/1.1" 200 15731
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/dataTables.responsive.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/responsive.bootstrap4.min.js HTTP/1.1" 304 -
[05/Jul/2020:14:34:39 +0000] "GET /public/datatables/responsive.bootstrap4.min.css HTTP/1.1" 200 3993
[sass] render: /habidat/public/css/red.scss
[sass] write: /habidat/public/css/red.css
[05/Jul/2020:14:34:40 +0000] "GET /public/css/red.css HTTP/1.1" 200 -
[sass] skip: /public/images/logo.jpg nothing to do
[05/Jul/2020:14:34:40 +0000] "GET /public/images/logo.jpg HTTP/1.1" 200 97960
2020-07-05 14:34:67 AUTH-FAIL: URL: /login, USER: lifa-dk, CLIENT IP: xx.xx.xx.xx
2020-07-05 14:34:72 AUTH-FAIL: URL: /login, USER: lifa-dk, CLIENT IP: xx.xx.xx.xx
[05/Jul/2020:14:34:49 +0000] "POST /login HTTP/1.1" 302 46
[sass] skip: / nothing to do
[05/Jul/2020:14:34:49 +0000] "GET / HTTP/1.1" 302 56
[sass] skip: /login nothing to do
[05/Jul/2020:14:34:49 +0000] "GET /login HTTP/1.1" 200 4761
[sass] source: /habidat/public/css/red.scss
[sass] dest: /habidat/public/css/red.css
[05/Jul/2020:14:34:50 +0000] "GET /public/css/red.css HTTP/1.1" 200 290746
The password field in the DB is legacy from the days when the thing used no hashed password. When it is filled the password is hashed and moved to the password_hashed field on the first login.
Strange, that it still does not work, just to doublecheck:
I started over again. The Ldap Server is working with CN field on other Applications the Login works. The Direktkredite App worked before the changes with the seperate Projekt app. I did not change the LDAP configuration. Is the app using StartTLS?
docker-compose.yaml
web-direktkredit:
container_name: web-direktkredit
depends_on:
- db-direktkredit
environment:
- HABIDAT_DK_PROJECT_ID=Lifa
- "HABIDAT_DK_PROJECT_NAME=Lifa e.V."
- HABIDAT_DK_PROJECT_EMAIL=direktkredite@example.org
- HABIDAT_DK_PROJECT_LOGO=logo.gif
- HABIDAT_DK_ADMIN_EMAIL=admin@example.org
- HABIDAT_DK_ADMIN_USERNAME=admin
- HABIDAT_DK_ADMIN_PASSWORD=secret
- HABIDAT_DK_DB_PASSWORD=secret
- HABIDAT_DK_DB_USER=direktkredit
- HABIDAT_DK_DB_DATABASE=direktkredit
- HABIDAT_DK_DB_HOST=db-direktkredit
- HABIDAT_DK_ADMIN_AUTH=local
- HABIDAT_DK_LDAP_HOST=security-openldap
- HABIDAT_DK_LDAP_PORT=389
- "HABIDAT_DK_LDAP_BINDDN=cn=admin,dc=lifa-harburg,dc=org"
- HABIDAT_DK_LDAP_PASSWORD=secret
- "HABIDAT_DK_LDAP_BASE=dc=example,dc=org"
- "HABIDAT_DK_LDAP_SEARCHFILTER=(cn={{username}})"
- HABIDAT_DK_PORT_HTTP=8080
- HABIDAT_DK_HTTPS=false
- HABIDAT_DK_PORT_HTTPS=443
- HABIDAT_DK_SSL_CERT=config/certificate.pem
- HABIDAT_DK_SSL_KEY=config/key.pem
image: habidat/direktkredit
labels:
- traefik.enable=true
- traefik.http.routers.direktkredit.entrypoints=web
- traefik.http.routers.direktkredit.rule=Host(direktkredite.example.org)
- traefik.http.routers.direktkredit-secured.entrypoints=web-secured
- traefik.http.routers.direktkredit-secured.rule=Host(direktkredite.example.org)
- traefik.http.routers.direktkredit-secured.tls=true
- traefik.http.routers.direktkredit-secured.tls.certresolver=cloudflare
- traefik.http.routers.direktkredit.middlewares=redirect@file
- traefik.http.routers.direktkredit-secured.middlewares=default-chain@file
- traefik.http.routers.direktkredit-secured.service=direktkredit
- traefik.http.services.direktkredit.loadbalancer.server.port=8080
links:
- db-direktkredit
logging:
options:
max-size: 50m
networks:
- backend
- web
- security
restart: always
volumes:
- "./config:/habidat/config"
- "./files:/habidat/public/files"
- "./images:/habidat/public/images"
- "./upload:/habidat/upload"
db-direktkredit:
command: "--default-authentication-plugin=mysql_native_password"
container_name: db-direktkredit
environment:
MYSQL_DATABASE: direktkredit
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: direktkredit
image: "mysql:5.7"
logging:
options:
max-size: 50m
networks:
- backend
ports:
- "3306:3306"
restart: always
volumes:
- "./db/direktkredit:/var/lib/mysql"
config.sample.json
{
"database": {
"host": "$HABIDAT_DK_DB_HOST",
"dialect": "mysql",
"username": "$HABIDAT_DK_DB_USER",
"password": "$HABIDAT_DK_DB_PASSWORD",
"database": "$HABIDAT_DK_DB_DATABASE"
},
"auth": {
"admin": {
"method": "ldap",
"ldap": {
"server": {
"url": "ldap://$HABIDAT_DK_LDAP_HOST:389",
"bindDN": "$HABIDAT_DK_LDAP_BINDDN",
"bindCredentials": "$HABIDAT_DK_LDAP_PASSWORD",
"searchBase": "$HABIDAT_DK_LDAP_BASE",
"searchFilter": "$HABIDAT_DK_LDAP_SEARCHFILTER"
},
"passReqToCallback": true,
"usernameField": "uid"
}
},
"user": "local"
},
"site": {
"http": "true",
"https": "$HABIDAT_DK_HTTPS",
"sslcert": "$HABIDAT_DK_SSL_CERT",
"sslkey": "$HABIDAT_DK_SSL_KEY",
"porthttps": "$HABIDAT_DK_PORT_HTTPS",
"porthttp": "$HABIDAT_DK_PORT_HTTP",
"reverseproxy": "false"
}
}
project.sample.json
{
"projectname": "$HABIDAT_DK_PROJECT_NAME",
"logo": "/public/$HABIDAT_DK_PROJECT_LOGO",
"url" : "https://direktkredite.example.org",
"usersuffix": "direktkredit",
"defaults": {
"interest_method": "365_compound",
"interest_payment_type": "end",
"termination_type": "T",
"termination_period": "6",
"termination_period_type": "M",
"relationships": ["Unbekannt","Bewohner_innen","Nutzer_innen","Verwandte","Bekannte","MHS","habiTAT"],
"country": "AT"
}
}
After starting the log show the following:
Generating config.json...
Generating project.json...
2020-07-09T09:10:47: PM2 log: Launching in no daemon mode
2020-07-09T09:10:48: PM2 log: App [app:0] starting in -fork mode-
2020-07-09T09:10:48: PM2 log: App [app:0] online
Loading app configuration...
Loading project settings...
starting http server on: 8080
== 00_initial: migrating =======
== 00_initial: migrated (1.479s)
== 01_hashpassword: migrating =======
== 01_hashpassword: migrated (1.987s)
== 02_setpasswordnullable: migrating =======
== 02_setpasswordnullable: migrated (0.649s)
== 03_passwordtoken: migrating =======
== 03_passwordtoken: migrated (1.221s)
== 04_savedviews: migrating =======
== 04_savedviews: migrated (0.647s)
== 05_createaudits: migrating =======
== 05_createaudits: migrated (1.541s)
== 06_transactiontype: migrating =======
== 06_transactiontype: migrated (0.652s)
== 07_interestpaymenttype: migrating =======
== 07_interestpaymenttype: migrated (0.695s)
All migrations performed successfully
Admin user admin with e-mail address admin@lifa-harburg.org created
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/MqMQp2u0yFEkz1azgsmi3xeRBuq0-UlM.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/MqMQp2u0yFEkz1azgsmi3xeRBuq0-UlM.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/MqMQp2u0yFEkz1azgsmi3xeRBuq0-UlM.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/MqMQp2u0yFEkz1azgsmi3xeRBuq0-UlM.json'
[session-file-store] will retry, error on last attempt: Error: ENOENT: no such file or directory, open 'sessions/MqMQp2u0yFEkz1azgsmi3xeRBuq0-UlM.json'
Thu, 09 Jul 2020 09:12:16 GMT express deprecated req.host: Use req.hostname instead at app.js:128:41
The created table in Heidi SQL looks like this:
when trying to log in with Admin:
[sass] skip: / nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:09:12:16 +0000] "GET / HTTP/1.1" 302 56
[sass] skip: /login nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:09:12:16 +0000] "GET /login HTTP/1.1" 200 4493
[sass] skip: /public/logo.gif nothing to do
[sass] skip: /public/logo.gif nothing to do
::ffff:172.18.0.4 - - [09/Jul/2020:09:12:17 +0000] "GET /public/logo.gif HTTP/1.1" 200 3474
2020-07-09 09:15:60 AUTH-FAIL: URL: /login, USER: admin, CLIENT IP: xxx.xxx.xxx.xxx
2020-07-09 09:15:65 AUTH-FAIL: URL: /login, USER: admin, CLIENT IP: xxx.xxx.xxx.xxx
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:09:15:03 +0000] "POST /login HTTP/1.1" 302 46
[sass] skip: / nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:09:15:03 +0000] "GET / HTTP/1.1" 302 56
[sass] skip: /login nothing to do
Test with LDAP Account Log from Direktkredite:
2020-07-09 10:00:23 AUTH-FAIL: URL: /login, USER: Test, CLIENT IP: xxx.xxx.xxx.xxx
2020-07-09 10:00:23 AUTH-FAIL: URL: /login, USER: Test, CLIENT IP: xxx.xxx.xxx.xxx
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:10:00:46 +0000] "POST /login HTTP/1.1" 302 46
[sass] skip: / nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:10:00:46 +0000] "GET / HTTP/1.1" 302 56
[sass] skip: /login nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:10:00:46 +0000] "GET /login HTTP/1.1" 200 4796
[sass] skip: /public/logo.gif nothing to do
[sass] skip: /public/logo.gif nothing to do
::ffff:xxx.xxx.xxx.xxx - - [09/Jul/2020:10:00:46 +0000] "GET /public/logo.gif HTTP/1.1" 304 -
On LDAP Site there is no bind Request from Direktkredite App
thanks for the detailed configs..
I'm really low on available time right now, so sorry for the late reply. I took a look and found 2 issues, that may resolve the issue.
1) HABIDAT_DK_ADMIN_AUTH needs to be "ldap" not "local" (ldap will also allow for local logins) 2) in config.sample.json you need to have "userNameField" set to "userid". This is only a setting to tell the ldap authenticator which html form input to use for user name and has nothing to do with the actual ldap end of it.
Hope it helps..
Hey sorry for the late reply, our project is progressing and so there were a lot besides IT-Stuff to do. Thanks for investigating this Issue.
I changed the configuration on the above mentioned points, now I get a far more preciese error in the logs. Before the changes 08_splitadmins was not started.
`
2020-08-24T14:28:40: PM2 log: Launching in no daemon mode
2020-08-24T14:28:40: PM2 log: App [app:0] starting in -fork mode-
2020-08-24T14:28:40: PM2 log: App [app:0] online
Loading app configuration...
Loading project settings...
starting http server on: 8080
== 08_splitadmins: migrating =======
Error migrating database: DatabaseError [SequelizeDatabaseError]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
at Query.formatError (/habidat/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)
at Query.handler [as onResult] (/habidat/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)
at Query.execute (/habidat/node_modules/mysql2/lib/commands/command.js:30:14)
at Connection.handlePacket (/habidat/node_modules/mysql2/lib/connection.js:408:32)
at PacketParser.onPacket (/habidat/node_modules/mysql2/lib/connection.js:70:12)
at PacketParser.executeStart (/habidat/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.
parent: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
at Packet.asError (/habidat/node_modules/mysql2/lib/packets/packet.js:712:17)
at Query.execute (/habidat/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/habidat/node_modules/mysql2/lib/connection.js:408:32)
at PacketParser.onPacket (/habidat/node_modules/mysql2/lib/connection.js:70:12)
at PacketParser.executeStart (/habidat/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.admin
() VALUES ;',
parameters: undefined`
I think I found it, it was a bug with new installations that I missed while testing with existing ones. Can you try again please?
So I started over again I think we are near the solution. Seems like the password hash in Generation doesn't work properly. So the local Admin User is not generated correctly.
`2020-09-10T12:24:34: PM2 log: Launching in no daemon mode 2020-09-10T12:24:34: PM2 log: App [app:0] starting in -fork mode- 2020-09-10T12:24:34: PM2 log: App [app:0] online
Loading app configuration... Loading project settings... starting http server on: 8080
== 00_initial: migrating ======= == 00_initial: migrated (2.345s) == 01_hashpassword: migrating ======= == 01_hashpassword: migrated (2.328s) == 02_setpasswordnullable: migrating ======= == 02_setpasswordnullable: migrated (0.709s) == 03_passwordtoken: migrating ======= == 03_passwordtoken: migrated (1.274s) == 04_savedviews: migrating ======= == 04_savedviews: migrated (0.776s) == 05_createaudits: migrating ======= == 05_createaudits: migrated (1.379s) == 06_transactiontype: migrating ======= == 06_transactiontype: migrated (1.079s) == 07_interestpaymenttype: migrating ======= == 07_interestpaymenttype: migrated (0.761s) == 08_splitadmins: migrating ======= == 08_splitadmins: migrated (0.461s) == 09_cleanupusers: migrating ======= == 09_cleanupusers: migrated (2.192s) == 10_fixdatatypes: migrating ======= == 10_fixdatatypes: migrated (8.210s)
All migrations performed successfully
Error migrating database: ValidationError [SequelizeValidationError]: notNull Violation: admin.passwordHashed cannot be null at /habidat/node_modules/sequelize/lib/instance-validator.js:74:15 at tryCatcher (/habidat/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/habidat/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/habidat/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/habidat/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/habidat/node_modules/bluebird/js/release/promise.js:729:18) at Promise._fulfill (/habidat/node_modules/bluebird/js/release/promise.js:673:18) at PromiseArray._resolve (/habidat/node_modules/bluebird/js/release/promise_array.js:127:19) at PromiseArray._promiseFulfilled (/habidat/node_modules/bluebird/js/release/promise_array.js:145:14) at Promise._settlePromise (/habidat/node_modules/bluebird/js/release/promise.js:609:26) at Promise._settlePromise0 (/habidat/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/habidat/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/habidat/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/habidat/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/habidat/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/habidat/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:456:21) {
errors: [ ValidationErrorItem { message: 'admin.passwordHashed cannot be null', type: 'notNull Violation', path: 'passwordHashed', value: null, origin: 'CORE', instance: [admin], validatorKey: 'is_null', validatorName: null, validatorArgs: [] } ] }`
Sorry, was on vacation for 2 weeks, I found another issue. Pls try one more time fingerscrossed
I will take some time to overhaul some things and put more thourough testing into it later this week or next week. We are still in the dev/alpha phase, but the quality should improve over the next month. The plan is to release it by the end of the year.
Do you want to request a feature or report a bug/Issue?
Bug/ Issue
What did you do? Updating the config files to the new Format, I could not log in to the System with the local Admin Account or existing LDAP Accounts, with a fresh & clean instance.
What did you expect to see? Login with Admin Account from Variables HABIDAT_DK_ADMIN_USERNAME & HABIDAT_DK_ADMIN_PASSWORD. Also the Login with existing LDAP Accounts.
What did you see instead?
the User Table in mysql was empty so i assume the user is not generated while startup. After creating the User by Hand Login is possible as local Admin, still not working for LDAP. Even when LDAP Account ist created via Admin Panel.
Log from Direktkredit App:
2020-07-01 07:52:02 AUTH-FAIL: URL: /login, USER: TEST, CLIENT IP: XXX.XXX.XXX.XXX, ::ffff:172.XXX.XXX.XXX - - [01/Jul/2020:07:52:36 +0000] "GET /login HTTP/1.1" 200 4810, ::ffff:172.XXX.XXX.XXX - - [01/Jul/2020:07:52:36 +0000] "GET / HTTP/1.1" 302 56, ::ffff:172.XXX.XXX.XXX - - [01/Jul/2020:07:52:36 +0000] "POST /login HTTP/1.1" 302 46, [sass] skip: / nothing to do, [sass] skip: /login nothing to do
Log fom OpenLDAP:
5efc40c4 <= mdb_equality_candidates: (cn) not indexed ,5efc40c4 conn=1238 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text= ,5efc40c4 conn=1239 op=0 BIND dn="cn=TEST,ou=project,ou=users,dc=domain,dc=org" method=128 ,5efc40c4 conn=1239 op=0 BIND dn="cn=TEST,ou=project,ou=users,dc=domain,dc=org" mech=SIMPLE ssf=0 ,5efc40c4 conn=1239 op=0 RESULT tag=97 err=0 text= ,5efc40c4 conn=1238 op=2 UNBIND ,5efc40c4 conn=1238 fd=12 closed
What is your environment & configuration docker-compose: `db: container_name: db environment: MYSQL_DATABASE: direktkredit MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: secret MYSQL_USER: db-dk TZ: Europe/Berlin image: "mysql:5.7" networks:backend
restart: always volumes:
direktkredite.domain.org
)direktkredite.domain.org
)config.json
{ "database": { "host": "db", "dialect": "mysql", "username": "db-dk", "password": "secret", "database": "direktkredit" }, "auth": { "admin": { "method": "ldap", "ldap": { "server": { "url": "ldap://security-openldap:389", "bindDN": "cn=read,dc=domain,dc=org", "bindCredentials": "secret", "searchBase": "ou=project,ou=users,dc=domain,dc=org", "searchFilter": "(cn={{username}})" }, "passReqToCallback": true, "usernameField": "userid" } }, "user": "local" }, "site": { "http": "true", "https": "false", "sslcert": "", "sslkey": "", "porthttps": "", "porthttp": "8080", "reverseproxy": "false" } }
project.json
{ "projectname":"Project", "logo":"/public/images/logo.jpg", "url":"https://direktkredite.domain.org", "usersuffix":"dk", "defaults": { "interest_method":"365_compound", "interest_payment_type":"end", "termination_type":"T", "termination_period":"6", "termination_period_type":"M", "relationships":"Unbekannt","Bewohner_innen","Nutzer_innen","Verwandte","Bekannte","MHS","habiTAT"], "country":"DE" }, "projectid":"Projekt", "theme":"monochrome", "smtp":{ "port":"465", "host":"mailserver", "auth":{ "user":"user", "pass":"secret", } } "email":"direktkredite@domain.org" }