Commit Graph

19 Commits

Author SHA1 Message Date
Girish Ramakrishnan 0e195679bf Make tests pass 2023-10-01 13:42:02 +05:30
Girish Ramakrishnan d2c702f890 eventlog: always use AuditSource objects as source field 2023-08-28 08:13:56 +05:30
Girish Ramakrishnan 6aad89ae6e demo is just a constant, not a setting 2023-08-04 14:13:30 +05:30
Girish Ramakrishnan bbc6ba1a35 settings: move service setting into services.js
this also introduces getJson/setJson
2023-08-03 11:50:00 +05:30
Girish Ramakrishnan 67e4c90d37 settings: move directory server config to it's own route 2023-08-03 02:48:21 +05:30
Johannes Zellner 650966a7e5 directoryserver: Add member and uniquemember attributes
https://datatracker.ietf.org/doc/html/rfc4519#section-2.17
https://datatracker.ietf.org/doc/html/rfc4519#section-2.40
2023-07-31 13:13:07 +02:00
Girish Ramakrishnan c4f4f3e914 logs: use %o to format error
otherwise, they are printed as multi-line and this messes up tail+date formatting
2023-04-16 10:49:59 +02:00
Girish Ramakrishnan 53e9eccf72 unify totp check
the totp check is done in several places causing errors like 3552232e99

* ldap (addon)
* accesscontrol (dashboard)
* proxyauth
* directoryserver (exposed ldap)
* externalldap (the connector)

The code also makes externalldap auto-create work now across all the cases where there is a username
2023-03-12 16:01:12 +01:00
Girish Ramakrishnan f27847950c reverseproxy: notify cert change only in cron job
notifying this in ensureCertificate does not work if provider changed in the middle anyway.
might as well get them to be in sync in the cronjob.

this change also resulted in tls addon getting restarted non-stop if you change from wildcard
to non-wildcard since ensureCertificate notifies the change.
2022-11-30 15:55:32 +01:00
Girish Ramakrishnan 15cc624fa5 do string compare in certs 2022-11-30 09:59:19 +01:00
Girish Ramakrishnan 89127e1df7 reverseproxy: rework cert logic
9c8f78a059 already fixed many of the cert issues.

However, some issues were caught in the CI:

* The TLS addon has to be rebuilt and not just restarted. For this reason, we now
  move things to a directory instead of mounting files. This way the container is just restarted.

* Cleanups must be driven by the database and not the filesystem . Deleting files on disk or after a restore,
  the certs are left dangling forever in the db.

* Separate the db cert logic and disk cert logic. This way we can sync as many times as we want and whenever we want.
2022-11-29 11:07:23 +01:00
Girish Ramakrishnan b70572a6e9 dns: fqdn only needs domain string
This is from the caas days, when we had hyphenated subdomains flag
2022-11-28 21:56:25 +01:00
Girish Ramakrishnan 9c8f78a059 reverseproxy: simplify certificate renewal
An issue was that mail container was not getting refreshed with the up to
date certs. The root cause is that it is refreshed only in the renewCerts()
cron job. If cert renewal was caused by an app task, then the cron job will
skip the restart (since cert is fresh).

The other issue is that we keep hitting 0 length certs when we run out of disk
space. The root cause is that when out of disk space, a cert renewal will
cause cert to be written but since it has no space it is 0 length. Then, when
the user tries to restart the server, the box code does not write the cert again.

This change fixes the above two including:
* To simplify, we use the fallback cert only if we failed to get a LE cert. Expired LE certs
  will continue to be used. nginx is fine with this.

* restart directory as well on renewal
2022-11-13 11:55:12 +01:00
Girish Ramakrishnan f917eb8f13 rename variable 2022-11-11 16:21:28 +01:00
Girish Ramakrishnan 59783eb11b ldap: memberof is a DN and not just group name
https://ldapwiki.com/wiki/MemberOf
https://access.redhat.com/documentation/en-us/red_hat_jboss_operations_network/3.1/html/admin_initial_setup_inventory_groups_and_users/ex-ldap-authz
2022-10-30 15:07:26 +01:00
Johannes Zellner 6d8c3febac Also add rootDSE to the directory server 2022-10-12 22:13:54 +02:00
Girish Ramakrishnan d07b1c7280 directoryServer: move out start/stop from cron 2022-08-15 21:08:22 +02:00
Girish Ramakrishnan bb3be9f380 style 2022-08-15 20:45:55 +02:00
Girish Ramakrishnan edd284fe0b rename user directory to directory server 2022-08-15 20:45:51 +02:00