Commit Graph

2005 Commits

Author SHA1 Message Date
Andrey Borodin 36a4bbb137
Minor grammar fix (#384) 2021-12-09 15:06:39 +05:00
kirill reshke cb508c3d78
Fix scram with pg version num >= 140 000 (#383) 2021-12-09 12:26:27 +05:00
kirill reshke ee9b0e23e2
Fix config validation for auth query when there is no PAM module avai… (#382)
* Fix config validation for auth query when there is no PAM module available in system

* Fix compiler warns

Co-authored-by: Kirill Reshke <reshke@qavm-da1bb86b.qemu>
2021-12-09 12:26:20 +05:00
kirill reshke 95fad60af2
Fix flacy test & func naming (#381) 2021-12-08 18:12:14 +05:00
kirill reshke ba6513323f
Add storage watchdog with standby lag polling support (#380)
* Move auth query server querying logic to separate file

* Refactor query code to support not only "auth_query" like queries

* Move storage logic to separate file & add storage watchdog

* Force several settings on starts

* Fix simple query parsing

* Fixed bugs

* Fix config reload

* Add tests

* Move cathcup logic to separate func

* Fix tests[2]

Co-authored-by: Andrey Borodin <amborodin@acm.org>
2021-12-08 15:54:43 +05:00
Andrey Borodin 4be82c95d8
Merge pull request #375 from reshke/master
Refactor rule pool, add internal pooling feature
2021-12-06 12:21:23 +03:00
reshke 70b4c6f3e6 Feature: ability to use connections separate pooling with auth query 2021-12-06 09:12:23 +00:00
reshke a9a6c07044 Refactor rule pool, add internal pooling feature 2021-12-06 08:28:02 +00:00
reshke 71d5b14a9f Fix pool setting naming 2021-12-05 19:57:05 +00:00
Andrey Borodin c9932b606b
Merge pull request #372 from reshke/master
Deb fixes for pgdg
2021-12-05 19:51:16 +03:00
Andrey Borodin 15845f6cc9
Merge pull request #373 from reshke/auth_query_fixes
Fix SCRAM support & fix for auth query when user password is empty
2021-12-05 19:50:55 +03:00
reshke 8073a821ab Fix scram API broken after e6bdfd9700 2021-12-05 16:00:15 +00:00
reshke 8967555f61 Fix for auth query when user password is empty 2021-12-05 15:51:00 +00:00
kirill reshke 01f3c036b7
Update tls certs in test, regenerate them with 4096 bytes length, move test to docker (#374)
* Update tls certs in test, regenerate them with 4096 bytes length

* Fix compile errors

* Fix tests
2021-12-05 20:41:01 +05:00
reshke 63b981e8c0 Deb fixes for https://www.postgresql.org/message-id/flat/YOMyXyErQ50je0zh%40msg.df7cb.de#c997486f4403d814ff6d1967772e58eb 2021-12-03 21:52:33 +00:00
reshke 2b261db9d3 Use Postgresql Version number from pg_config.h 2021-12-03 17:47:09 +00:00
kirill reshke 3137c74ec0
Fix show storages to actually show storages (#370) 2021-11-30 17:45:09 +05:00
Andrey Borodin 466bcd97bb
Merge pull request #369 from reshke/master
Refactor tls options
2021-11-30 10:39:34 +03:00
reshke 4630c5d72f Refactor tls options 2021-11-29 18:39:33 +05:00
Andrey Borodin f925c80586
Merge pull request #368 from reshke/master
Moved dev condigs to special folder
2021-11-29 14:54:12 +03:00
Andrey Borodin 3af5449907
Fix error message for CVE-2021-23222 (#363) 2021-11-29 16:53:35 +05:00
reshke 60179948ae Moved dev condigs to special folder 2021-11-29 16:03:32 +05:00
Andrey Borodin 703fceec53
Merge pull request #366 from pratikbalar/master
fix: lint and format sh, set xtrace where necessary...
2021-11-26 07:59:20 +03:00
Pratik Balar 84f7ce6458 fix: lint and format sh, set xtrace where necessary...
- Ignore grep in grep
- trim spaces
2021-11-25 14:47:09 +05:30
Andrey Borodin dbc8a80b93
Merge pull request #362 from reshke/master
SHOW LISTEN support in virtual (local) database
2021-11-15 15:08:31 +05:00
reshke 68b1a9f4db apply fmt 2021-11-15 15:06:50 +05:00
reshke 88d2a9e7df SHOW LISTEN support in virtual (local) database 2021-11-15 15:06:50 +05:00
Andrey Borodin 346b8f4748
Merge pull request #360 from 3nprob/spelling-fixes
Spelling fixes
2021-11-14 14:22:43 +05:00
3nprob a3d2e0f72f Rename cleint-server.go -> client-server.go 2021-11-14 17:03:51 +09:00
3nprob 3be43f3caa Rename ody-intergration-test -> ody-integration-test 2021-11-14 17:03:00 +09:00
Andrey Borodin f062d4ee16
Fix some warnings (#357)
* Fix some warnings

* Some leftover hash

* Add include
2021-11-12 19:01:32 +05:00
Andrey Borodin 4e00bf797a
Reject extraneous data after SSL negatiation (#359)
* Reject extraneous data after SSL negatiation
This prevents attacks like in CVE-2021-23214 and CVE-2021-23222.

* Fix fmt issue

Co-authored-by: reshke <reshkekirill@gmail.com>
2021-11-12 17:04:27 +05:00
kirill reshke 763862ac8c
fix tests and drop travis ci (#358)
* Fix test

* replace clang-format-9 with clang-format

* Drop travis
2021-11-12 16:54:50 +05:00
Andrey Borodin 2119328341
Merge pull request #350 from Firm/patch-1
Update option.h
2021-09-13 11:27:13 +05:00
Andrey Borodin e91bbecfa4 Apply fortmatting 2021-09-13 06:26:23 +00:00
Firm 2dc81e7993
Update option.h
Declare od_cli_options as static to avoid compilation errors.
2021-09-12 11:24:30 +03:00
Andrey Borodin 354fbfa02a
Merge pull request #347 from Vampouille/patch-1
fix: typo
2021-09-07 09:45:48 +05:00
Julien Acroute 46420ba05b
fix: typo 2021-09-06 22:59:17 +02:00
kirill reshke 85e6288539
Fix compilation without LDAP support (#345)
Co-authored-by: reshke <Kirill Reshke>
2021-08-17 18:13:44 +05:00
Yury Frolov 02f3144265
Enabled writing stats in Prometheus format. (#346)
* Early implementation

* Added description for gauges

* Added prometheus lib finding to Cmake

* Fixed FindProm comments

* Small changes

* free to prom_free

* Moved metrics to separate file

* Refactored & added new methods to prom_metrics

* Refactored cron.c to use prom_metrics.h

* Refactored CMake & odyssey.h

* Added new metrics

* Small refactoring

* Small method renaming

* Small fix in init

* Added methods for use in od_cron_stats_cb

* Small fixes

* Refactored metrics to use separate collectors

* Small fix

* Passing metrics to od_cron_stat_cb now.

* Removed unused imports

* Removed old od_log calls

* Removed TODO

* Revert "Removed old od_log calls"

This reverts commit 60000c8321.

* Uncommented od_log calls

* Added processed clients field to metrics

* Refactored metrics init

* Fixed write_stat

* Added method for worker stats

* Added method for worker stat to metrics header file

* Refactored worker stat method

* Reverted changes in odyssey.h

* Added writing metrics to od_worker

* Added new method to logger

Method provides writing big strings to log without formatting.

* Fixed prometheus log writing

* More fixes

* Fixed log writing

* Fixed log calls

* Added TODO

* Added assertion whether prom.h found

* Fixed no format logger method

Now logs follow log format

* Fixed logger

* Added log_stats_prom option to config

* Renamed od_logger_write_no_fmt to od_logger_write_plain

* Formatted

* More ifdefs

* Added memory deallocating in od_cron_stop

* Updated configuration.md

* Removed outdated TODO

* Changed label

* Formatted
2021-08-17 17:07:16 +05:00
kirill reshke 5d129fa783
Allow logging in module init cb (#344)
fix memory corruption in config reload, also fix logging & route disabling

Co-authored-by: reshke <Kirill Reshke>
2021-08-10 12:50:00 +05:00
kirill reshke d2bf7f2977
Fix reload of ldap endpoints (#343)
* Better indentation for client_max, print ldap endpoint name for ldap-auth route

* Better logging in ldap connection initialization

* Fix compiler usused arg warning

* Fix reload of ldap endpoints: make them a part of od rules struct;

Co-authored-by: reshke <Kirill Reshke>
2021-07-28 13:42:00 +05:00
Andrey Borodin 28a485eead
Merge pull request #342 from reshke/master
Fix odyssey print config indentation
2021-07-28 10:06:32 +05:00
reshke 44abe83764 Fix odyssey print config indentation 2021-07-28 10:03:43 +05:00
Andrey Borodin f40fe1b765
Merge pull request #341 from yandex/stmtpooling
STATEMENT pooling
2021-07-08 16:34:36 +05:00
reshke d9a8bcd6f4 Comment invasive code section 2021-07-08 16:13:32 +05:00
reshke 53113fec74 do not detach replication on stmt pooling 2021-07-08 16:09:56 +05:00
reshke af703ed0a3 STATEMENT pooling 2021-07-08 15:51:42 +05:00
Andrey Borodin 83e7af6a03
Merge pull request #340 from heckad/add-parse-pgoption
Add parse pgoptions and extract search_path
2021-07-07 14:13:45 +05:00
Heckad f4d6f4794b Add parse pgoptions and extract search_path 2021-07-07 11:32:38 +03:00