agroal / pgagroal

High-performance connection pool for PostgreSQL
https://agroal.github.io/pgagroal/
BSD 3-Clause "New" or "Revised" License
667 stars 59 forks source link

Enabled SSL in vault #444

Closed ashu3103 closed 1 month ago

ashu3103 commented 2 months ago

WORK IN PROGRESS

Main Feature

@jesperpedersen PTAL.

The main objective of this commit is to enable SSL feature for the vault i.e. establishing secure SSL connections between the vault HTTP server and the management port of pgagroal.

jesperpedersen commented 2 months ago

@ashu3103 The bug fix should be a separate pull request

ashu3103 commented 2 months ago

@ashu3103 The bug fix should be a separate pull request

Done!

ashu3103 commented 2 months ago

Kindly first merge the bug-fix commit then I'll rebase this.

ashu3103 commented 2 months ago

@jesperpedersen PTAL

jesperpedersen commented 2 months ago

Aren't you missing the TLS properties in pgagroal-vault.conf for the [main] section ?

ashu3103 commented 2 months ago

Aren't you missing the TLS properties in pgagroal-vault.conf for the [main] section ?

While going through the code of cli.c and security.c I noticed that the TLS properties of the cli was defined in .pgagroal directory in the home_directory, so I have followed the same for the vault, The cert_file, key_file and root_file for the vault should be provided in .pgagroal directory.

jesperpedersen commented 2 months ago

Ok, but at least we need documentation for that - so doc/VAULT.md and doc/manual/user-12-vault.md

See doc/DEVELOPERS.md on how to enable the manuals...

ashu3103 commented 2 months ago

Ok, but at least we need documentation for that - so doc/VAULT.md and doc/manual/user-12-vault.md

I have added the requirements on how to enable SSL in vault in doc/VAULT.md and doc/manual/user-12-vault.md. Also for now, I have kept the content same.

See doc/DEVELOPERS.md on how to enable the manuals...

I really can't find on how to handle manuals in doc/DEVELOPERS.md.

ashu3103 commented 2 months ago

Ok, but at least we need documentation for that - so doc/VAULT.md and doc/manual/user-12-vault.md

Can you brief what is the difference between both the files like why are we maintaining both if the content is almost similar as both of these are talking about configurations of vault.

jesperpedersen commented 2 months ago

Yes, currently the content will be the same - or almost - doc/VAULT.md is online focused, where as doc/manual/user-12-vault.md is focused on somebody who is reading the manual to get to know pgagroal as a whole

See https://github.com/agroal/pgagroal/blob/master/doc/DEVELOPERS.md#generate-user-and-developer-guide to make sure that the manuals are being generated during your build

jesperpedersen commented 2 months ago

Think of doc/VAULT.md as the guide for an advanced developer to setup the vault, and doc/manual/user-12-vault.md as the guide where step-by-step is needed

ashu3103 commented 2 months ago

Think of doc/VAULT.md as the guide for an advanced developer to setup the vault, and doc/manual/user-12-vault.md as the guide where step-by-step is needed

Thanks :)

jesperpedersen commented 1 month ago

Merged.

Thanks for your contribution !