Commit Graph

71 Commits

Author SHA1 Message Date
reshke fcd349bc44 introduce a couple of hooks in auth & config reload 2021-04-12 21:58:06 +05:00
kirill reshke 3a55be6e61
change formatting (#250)
Co-authored-by: reshke <Kirill Reshke>
2020-12-28 15:43:31 +05:00
kirill reshke 89ef383056
fix build (#237)
Co-authored-by: reshke <Kirill Reshke>
2020-11-27 23:03:42 +05:00
kirill reshke dd52fbd83e
compiler hints + just make world a better place & formatting things (#236) 2020-11-25 15:17:15 +05:00
kirill reshke 785e85ab6f
Fix leaks and improve locking in cron (#229)
Also fix some warnings.
2020-11-23 14:13:28 +05:00
kirill reshke 070c2a7fe1
apply fmt && fix CI second try (#215)
Co-authored-by: reshke <Kirill Reshke>
2020-10-19 14:51:02 +05:00
kirill reshke 7135f2f0c8
fix CI (#213)
Co-authored-by: reshke <Kirill Reshke>
2020-10-16 21:30:45 +05:00
Andrey Borodin b2cc1a4af6 Format 2020-07-09 10:45:17 +05:00
Andrey Borodin cb094d9722 Suppress few warnings 2020-07-09 10:45:17 +05:00
kirill reshke bfd5e07ed2
PAM PI modifications (#176)
Co-authored-by: reshke <Kirill Reshke>
2020-06-16 10:27:33 +05:00
lowgear 11f8567e38
Fix memory leak at auth.c (#151)
* free pointer after use

* free only after use

* more accurate freeing

* use USE_SSL macro if openssl is found for correct pg sha256 structures definition
2020-06-11 15:02:48 +05:00
kirill reshke 41a5449969
odyssey modules (#156) 2020-06-09 14:19:11 +05:00
lowgear 1d5d1b5c21
treat buffer respecting size (1) (#160) 2020-06-09 11:51:13 +05:00
lowgear ea79d800d2
added style check to travis (#158)
* added style check to travis

* fixed style

* missing change

* check style first

* no excludes, use certain clang-format version

* install clang-format-9

* added submodule

* fix exclude
2020-06-04 22:35:44 +05:00
Andrey Borodin 5c9357f4fe
Improve frequent user error messages (#153) 2020-06-04 15:25:28 +05:00
kirill reshke 6398523292
Add remote hosthona param to pam auth (#142)
Co-authored-by: reshke <Kirill Reshke>
2020-04-07 13:58:13 +05:00
Georgy Rylov c25c5bd050
Applying clang-format with saving indentations (#140)
* applying clang-format with saving indentations

* rebase
2020-04-02 16:00:56 +05:00
Andrey Borodin b2d75b0b3c
Coverity scan results (#119)
A lot of small fixes for small bugs of various severity
2020-02-18 18:05:02 +05:00
Andrey 2a37c37e23 Fix incorrect password response forwarding 2020-01-20 11:46:43 +05:00
Andrey Borodin 42695c614f One more compiler warning 2019-11-19 15:33:51 +05:00
Dima Starkov a8ca664a63 Implements SCRAM Authentication (#73) 2019-11-11 12:28:50 +03:00
Dmitry Simonenko c6542d7003 odyssey: post merge fixes 2019-09-27 16:47:45 +03:00
reshke debfd09d8e Add PAM auth support 2019-09-26 13:54:53 +05:00
Dmitry Simonenko feb97828c6 odyssey: post merge fixes and refactoring 2019-08-10 19:30:45 +03:00
Michael Goryainov 7713e08f41 Moved od_getpeername() call to auth.c 2019-07-17 13:07:34 +03:00
Andrey Borodin 99b1979ea5 Reformat code 2019-06-26 10:49:51 +05:00
Michael Goryainov 7b6fb2ded7 * Corrected SEGFAULT in case of non-existent user in auth_query
+ Added ability for host-based authentification a-la pg_hba:
  e.g.
  auth_query "SELECT usename, passwd FROM pg_shadow,pg_hba_net WHERE usename='%u' AND ((pg_shadow.usename=pg_hba_net.username and network >> '%h') OR (SELECT COUNT(*) FROM pg_hba_net WHERE username='%u'))
2019-06-25 17:09:31 +03:00
Andrey Borodin 5fa204b082 Minor fixes 2019-04-25 14:23:23 +05:00
Dmitry Simonenko 6c0a1f09f8 odyssey: major rework of io architecture
This patch intend is to improve overall io performance, reduce
cpu and system usage.

Machinarium:

IO read/write logic is highly simplified and now based on conditions
instead of previously made internal readahead buffer and msg
queues. This allows to give user more control over io operations and
avoid doing undesired readahead copying.

Above that, TLS implementation reworked to use async logic instead of
separate BIO layer.

Direct pooling functions removed.

New objects machine_cond_t and machine_iov_t objects.

Odyssey:

Introduced readahead, io and relay objects.

Relay allows to connect two io handles for direct data retransmission
without double copying.

Removed configuration options no longer needed:
packet_read_size, packet_write_queue
2019-01-23 18:43:52 +03:00
Dmitry Simonenko 9d6dea5d92 odyssey: major parameter settings optimization 2018-12-12 16:07:25 +03:00
Dmitry Simonenko 2e03af9c88 odyssey: major router and shared logic rework
Goal is to improve overall performance during massive peaks
of connecting clients.

This patch makes router a shared structure, instead of
being run in separate system worker thread/coroutine.

Now router and each route object is protected by
separate mutex. Worker threads directly access router object
without calls to separate thread.
2018-12-06 17:23:15 +03:00
Dmitry Simonenko da7e6ea7a5 odyssey: major io rework and refactoring
This patch moves Odyssey from stream based write caching
to message driven. All write operations are delayed
and happen on a group of messages.

This removes necessity to do IO and wait for write completion during calls
from SSL_write() context. Write timings should behave more predictable now and
number of used syscalls should be also decreased.

This patch also simplifies caching management. All clients are simply
reusing cached messages without prolonged contention.

Several configuration options are no longer used:
pipeline, cache, cache_chunk
2018-08-28 17:43:46 +03:00
Dmitry Simonenko f7a4438ec1 odyssey: move stats out of server_t 2018-08-02 16:38:36 +03:00
Dmitry Simonenko f5a4bd9a35 odyssey: support configurable list of common names to check 2018-05-10 15:49:31 +03:00
Dmitry Simonenko 120ae88b3c odyssey: log tls certificate name mismatch details 2018-04-26 16:36:54 +03:00
Dmitry Simonenko a907873715 odyssey: implement authenitcation "cert" 2018-04-26 16:02:18 +03:00
Dmitry Simonenko 5ca3fa926a odyssey: update source file headers 2018-04-04 16:19:58 +03:00
Dmitry Simonenko 38430a9d51 odyssey: remove config versioning 2018-03-21 17:36:57 +03:00
Dmitry Simonenko 9fcf2a4a80 odyssey: remake pooler service as system 2018-03-13 16:26:04 +03:00
Dmitry Simonenko 20a092098e odyssey: remake system_t as global_t 2018-03-13 16:17:27 +03:00
Dmitry Simonenko f108dcba09 odyssey: project rename 2018-03-12 17:03:15 +03:00
Dmitry Simonenko bb826db7e8 odissey: major scheme rework, rename it to config 2018-03-06 18:23:52 +03:00
Dmitry Simonenko 4df9f8e760 odissey: move config to config_reader 2018-03-05 17:24:30 +03:00
Dmitry Simonenko d48cd092a0 odissey: relay and relay_pool is worker and worker_pool now 2018-03-02 13:00:52 +03:00
Dmitry Simonenko c90932b3d5 odissey: print message names 2018-03-01 16:53:27 +03:00
Dmitry Simonenko 11d89831c1 odissey: use msg enum names instead of hardcoded types 2018-03-01 16:22:08 +03:00
Dmitry Simonenko a19f18cef1 odissey: rework router cancel logic 2018-02-22 16:43:52 +03:00
Dmitry Simonenko f11a98432f odissey: rework server buffering using client stream 2018-02-13 16:33:40 +03:00
Dmitry Simonenko c891dc757a odissey: make client stream shared 2018-02-12 16:50:51 +03:00
Dmitry Simonenko 0cc0f949b3 odissey: make server stream shared driven by attach/detach logic 2018-02-12 16:29:40 +03:00