summaryrefslogtreecommitdiff
path: root/internal/configuration/schema/notifier.go
AgeCommit message (Collapse)Author
2024-03-04refactor: apply suggestions from code reviewJames Elliott
Per our standard review process this adjusts the appropriate elements detected during the review. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2023-09-03docs: jsonschema (#5493)James Elliott
Adds a JSON Schema for the configuration, user database, and most exports. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2023-05-09refactor(configuration): umask from query (#5416)James Elliott
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2023-05-07feat(authentication): suport ldap over unix socket (#5397)James Elliott
This adds support for LDAP unix sockets using the ldapi scheme. In addition it improves all of the address related parsing significantly deprecating old options. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2022-10-21feat(configuration): mtls clients (#4221)James Elliott
This implements mTLS support for LDAP, Redis, and SMTP. Specified via the tls.certificate_chain and tls.private_key options. Closes #4044
2022-10-02feat(notification): add disable_starttls option (#3855)Manuel Nuñez
This adds a boolean option to SMTP which disables StartTLS for SMTP servers that ignore standards.
2022-07-18fix(notification): incorrect date header format (#3684)James Elliott
* fix(notification): incorrect date header format The date header in the email envelopes was incorrectly formatted missing a space between the `Date:` header and the value of this header. This also refactors the notification templates system allowing people to manually override the envelope itself. * test: fix tests and linting issues * fix: misc issues * refactor: misc refactoring * docs: add example for envelope with message id * refactor: organize smtp notifier * refactor: move subject interpolation * refactor: include additional placeholders * docs: fix missing link * docs: gravity * fix: rcpt to command * refactor: remove mid * refactor: apply suggestions Co-authored-by: Amir Zarrinkafsh <nightah@me.com> * refactor: include pid Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
2022-04-03feat(notification): password reset notification custom templates (#2828)Manuel Nuñez
Implemented a system to allow overriding email templates, including the remote IP, and sending email notifications when the password was reset successfully. Closes #2755, Closes #2756 Co-authored-by: Manuel Nuñez <@mind-ar> Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
2021-11-30fix(notifier): force use of sender email in smtp from cmd (#2616)James Elliott
This change addresses an issue with the usage of the full sender configuration option in the MAIL FROM SMTP command. If a user includes a name in the sender this shouldn't be sent in the MAIL FROM command, instead we should extract it and use just the email portion. Fixes #2571
2021-08-10fix(notifier): use sane default connection timeout (#2273)James Elliott
2021-08-03feat(configuration): replace viper with koanf (#2053)James Elliott
This commit replaces github.com/spf13/viper with github.com/knadh/koanf. Koanf is very similar library to viper, with less dependencies and several quality of life differences. This also allows most config options to be defined by ENV. Lastly it also enables the use of split configuration files which can be configured by setting the --config flag multiple times. Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
2021-04-16fix: removed deprecated smtp/ldap options (#1912)James Elliott
This removes the deprecated options from 4.25. This includes the LDAP filters which allow {0} or {1} placeholders. The new aliases are documented. Additionally it refactors the keys validator to use uniform messages for most replaced keys.
2021-01-04[FEATURE] Enhance LDAP/SMTP TLS Configuration and Unify Them (#1557)James Elliott
* add new directive in the global scope `certificates_directory` which is used to bulk load certs and trust them in Authelia * this is in ADDITION to system certs and are trusted by both LDAP and SMTP * added a shared TLSConfig struct to be used by both SMTP and LDAP, and anything else in the future that requires tuning the TLS * remove usage of deprecated LDAP funcs Dial and DialTLS in favor of DialURL which is also easier to use * use the server name from LDAP URL or SMTP host when validating the certificate unless otherwise defined in the TLS section * added temporary translations from the old names to the new ones for all deprecated options * added docs * updated example configuration * final deprecations to be done in 4.28.0 * doc updates * fix misc linting issues * uniform deprecation notices for ease of final removal * added additional tests covering previously uncovered areas and the new configuration options * add non-fatal to certificate loading when system certs could not be loaded * adjust timeout of Suite ShortTimeouts * add warnings pusher for the StructValidator * make the schema suites uninform * utilize the warnings in the StructValidator * fix test suite usage for skip_verify * extract LDAP filter parsing into it's own function to make it possible to test * test LDAP filter parsing * update ErrorContainer interface * add tests to the StructValidator * add NewTLSConfig test * move baseDN for users/groups into parsed values * add tests to cover many of the outstanding areas in LDAP * add explicit deferred LDAP conn close to UpdatePassword * add some basic testing to SMTP notifier * suggestions from code review
2020-11-05[BUGFIX] Add ability to specify SMTP HELO/EHLO identifier (#1416)James Elliott
* add docs * add configuration option for SMTP called `identifier` * default should act the same as before
2020-08-21[FEATURE] Plain Text Email Notifications (#1238)James Elliott
* add a plain text email template * use plain text email template for file based emails * add config option to SMTP emails named disable_html_emails * config option is a boolean that when set to true will only send plain text emails * add docs for more complex SMTP notifier options * update template * add rfc1341 multipart logic to notifier * check for errors after identity_verification * * fix nil ptr * go mod tidy * remove needless checks * * use multipart/atlernative instead * * add rfc5322 compliant date header * * fix linting issues
2020-04-21[FEATURE] Notifier Startup Checks (#889)James Elliott
* implement SMTP notifier startup check * check dial, starttls, auth, mail from, rcpt to, reset, and quit * log the error on failure * implement mock * misc optimizations, adjustments, and refactoring * implement validate_skip config option * fix comments to end with period * fix suites that used smtp notifier without a smtp container * add docs * add file notifier startup check * move file mode into const.go * disable gosec linting on insecureskipverify since it's intended, warned, and discouraged * minor PR commentary adjustment * apply suggestions from code review Co-Authored-By: Amir Zarrinkafsh <nightah@me.com>
2020-04-20[MISC] Implement golint recommendations (#885)Amir Zarrinkafsh
Co-authored-by: Clément Michaud <clement.michaud34@gmail.com>
2020-04-09[FEATURE] Customizable Email Subject (#830)James Elliott
* [FEATURE] Customizable Email Subject * allow users to optionally change email subject * this is so they can more easily communicate the source of the email * Update docs/configuration/notifier/smtp.md Co-Authored-By: Amir Zarrinkafsh <nightah@me.com> Co-authored-by: Clément Michaud <clement.michaud34@gmail.com> Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
2020-01-22Introduce viper in order to read secrets from env variables.Clement Michaud
2020-01-22Add validation for notifier configuration.Clement Michaud
2020-01-10Force TLS and valid x509 certs in SMTP Notifier by defaultJames Elliott
- Adjust AUTH LOGIN functionality to be closer to AUTH PLAIN - Removed: secure (notifier smtp conf) boolean string - Added: disable_verify_cert (notifier smtp conf) boolean - disables X509 validation of certificates - Added: disable_require_tls (notifier smtp conf) boolean - allows emails to be sent over plain text (for non-authenticated only) - Added: trusted_cert (notifier smtp conf) string (path) - allows specifying the path of a PEM format cert to add to trusted cert pool - Make SMTP notifier return errors on connection over plain text - Make SMTP notifier return errors on TLS connection with invalid certs - Implemented various debug logging for the SMTP notifier - Implemented explicit SMTP closes on errors (previously left con open) - Split SMTPNotifier Send func to seperate funcs for: - writing future test suites and startup checks more easily - organization and readability - Add details of changes to docs/security.yml - Adjust config.yml's (template and test) for the changes
2020-01-10Fix spelling errorsAmir Zarrinkafsh
2019-12-28Implement SMTP StartTLS and Adaptive AuthJames Elliott
- If the STARTTLS extension is advertised we automatically STARTTLS before authenticating or sending - Uses the secure config key to determine if we should verify the cert. By default it does not verify the cert (should not break any configs) - Attempt auth when the config has a SMTP password and the server supports the AUTH extension and either the PLAIN or LOGIN mechanism - Check the mechanisms supported by the server and use PLAIN or LOGIN depending on which is supported - Changed secure key to use boolean values instead of strings - Arranged SMTP notifier properties/vars to be in the same order - Log the steps for STARTTLS (debug only) - Log the steps for AUTH (debug only)
2019-11-17Move source code into internal directory to follow standard project layout.Clement Michaud
https://github.com/golang-standards/project-layout