Commit graph

1732 commits

Author SHA1 Message Date
Renovate Bot
ad85147312 chore(deps): update dependency eslint-plugin-jest to v26.1.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-23 02:26:34 +00:00
Renovate Bot
04c2c0fa18 fix(deps): update dependency sqlite3 to v5.0.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 16:39:50 +02:00
Renovate Bot
5fc5db3aec chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 16:28:45 +02:00
Erik Michelson
ef0fdac18c fix(notes): primaryAddress reveals internal UUID
The primaryAddress field of a note contained the internal UUID of the note when no primary alias was defined instead of the public note id.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2022-04-18 11:02:53 +02:00
David Mehren
3cff7f861a fix(console-logger): don't sanitize colors away
2467b125 mistakenly applied the sanitize function
to the log messages *after* the color was applied.

This commit reverses the order to un-break colored logs.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-04-17 21:51:03 +02:00
Philip Molares
819dd8f568 docs(dev): add developer documentation about ldap
This explains how a developer is able to get a ldap server up and running and configure HedgeDoc to use it quickly.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
b4e62c8425 feat: add ldap login to auth controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
82dd9f8885 feat: add ldap strategy
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
90d97689fd feat: add ldap support methods
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
174eee8f0a test: ldap auth config
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
6181e586bf fix: ldap auth config
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
98db69448c feat: add logging to local.strategy.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
1c9d228658 chore: add ldapauth-fork dependency
This is used to implement a custom passport strategy for ldap auth since the passport-ldap package can only handle one ldap server and not multiple like we want.
This dependency was chosen, because it's the same lib that powers the passport-ldap package used in HedgeDoc 1.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
5dfb668484 chore: add passport-custom dependency
This is used to implement a custom passport strategy for ldap auth since the passport-ldap package can only handle one ldap server and not multiple like we want.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
ec6e66b6a8 test: add authConfig tests for ldap
This tests the ldap part of the authConfig. Other tests shall be added as the auth method is implemented.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
91d7f1a529 fix: error in toArrayConfig
If an empty string or undefined is provided the method should not return [], but undefined instead. This way defaults defined in Joi function as expected.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Philip Molares
5db2229771 fix: error in replaceAuthErrorsWithEnvironmentVariables
The method should only change error messages if it was called with the correct parameters. Otherwise the function would change e.g `.url` in the error message to `_URL` and the regex is not able to change the front of the error message.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-17 21:05:13 +02:00
Renovate Bot
dd1825486c fix(deps): update definitelytyped
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-16 10:06:58 +02:00
Renovate Bot
54364adf60 chore(deps): update linters to v5.19.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-16 10:06:43 +02:00
Renovate Bot
d7908ddfb4 chore(deps): update node.js to f61706c
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-16 04:45:31 +00:00
Philip Molares
87041f84ce test: test sanitize method
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-14 16:19:48 +02:00
Philip Molares
2467b1250f feat: add sanitization to logger service
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-04-14 16:19:48 +02:00
Renovate Bot
f1f1d8cc94 chore(deps): update codecov/codecov-action action to v3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-10 10:06:01 +02:00
Renovate Bot
c879132ab4 chore(deps): update linters
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-10 10:05:44 +02:00
Renovate Bot
25386d5d96 fix(deps): update dependency minio to v7.0.27
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-10 00:00:38 +00:00
Renovate Bot
655f1b0904 chore(deps): update nestjs packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-09 16:27:04 +00:00
Renovate Bot
788514572a chore(deps): update dependency mkdocs-material to v8.2.9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-09 13:33:24 +00:00
Renovate Bot
e69e49950a chore(deps): update dependency eslint-plugin-jest to v26.1.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-09 11:24:48 +00:00
Renovate Bot
8c6656f72b chore(deps): update node.js to 57106b8
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-09 05:33:07 +00:00
Renovate Bot
6325808b27 chore(deps): update linters to v5.17.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-03 18:10:01 +02:00
Renovate Bot
58bd837dc4 fix(deps): update dependency @nestjs/schedule to v1.1.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-03 18:09:44 +02:00
David Mehren
7d9f795592
ci: hard-code image name in docker cleanup workflow
The variable seems to be empty for some reason

Signed-off-by: David Mehren <git@herrmehren.de>
2022-04-03 18:06:07 +02:00
Renovate Bot
8ed6e4ec3a chore(deps): update dependency prettier to v2.6.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-02 22:39:31 +00:00
Renovate Bot
110ffcba1c fix(deps): update dependency cli-color to v2.0.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-02 13:14:22 +00:00
Renovate Bot
b3f4167011 chore(deps): update dependency @nestjs/schematics to v8.0.9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-02 10:14:11 +00:00
Renovate Bot
d50a5990b1 chore(deps): update node.js to 787f03b
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-04-02 04:56:36 +00:00
Renovate Bot
62d72d2c08 chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-28 04:14:52 +00:00
Renovate Bot
ce14c4a135 chore(deps): update dependency mkdocs-material to v8.2.8
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-27 17:06:56 +00:00
Renovate Bot
60347d7a5b chore(deps): update linters
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 22:57:56 +01:00
Renovate Bot
007c75a029 chore(deps): update nestjs packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 22:44:13 +01:00
Renovate Bot
02db188376 chore(deps): update dependency mkdocs to v1.3.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 22:43:52 +01:00
Renovate Bot
d0f5753030 chore(deps): update test packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 22:43:04 +01:00
Renovate Bot
e519c5dfb1 chore(deps): update dependency typescript to v4.6.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 21:22:51 +01:00
Renovate Bot
69027e9483 chore(deps): update dependency tsconfig-paths to v3.14.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 20:14:31 +00:00
Renovate Bot
ec0acafff0 chore(deps): update dependency prettier to v2.6.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 18:04:16 +00:00
Renovate Bot
20058d5b5c chore(deps): update dependency mkdocs-material to v8.2.7
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 11:58:00 +00:00
Renovate Bot
e76d8be25d chore(deps): update dependency eslint-plugin-jest to v26.1.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 08:50:38 +00:00
Renovate Bot
0d19dc15cf chore(deps): update node.js to e4a152d
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 04:36:52 +00:00
David Mehren
05b8987747 ci: add docker image cleanup workflow
This adds a daily CI workflow to delete old tags from the
'hedgedoc-ci' image.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-03-21 14:57:27 +01:00
David Mehren
5078b863c6 ci: build and test docker image
This adds a new workflow performing these steps:
- A development docker image is built and pushed to GHCR as
  'hedgedoc-ci' labeled with the commit hash
- Tests are run with the image
- If the tests are successful, a production image is built and
  pushed to GHCR as 'hedgedoc' labeled with the branch, version tag
  if available and the commit hash

At a later time, the built dev image can also be used to run E2E tests
with the other supported databases. Currently, this is not yet possible,
as the database is always expected to run on localhost, not other hosts.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-03-21 14:57:27 +01:00