Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ease database diagnosis via local IP access configuration #2730

Closed
phillxnet opened this issue Oct 31, 2023 · 5 comments
Closed

Ease database diagnosis via local IP access configuration #2730

phillxnet opened this issue Oct 31, 2023 · 5 comments
Assignees

Comments

@phillxnet
Copy link
Member

phillxnet commented Oct 31, 2023

We currently limit our Host Based Authentication (./conf/pg_hba.conf) to what is required functionally and for running our tests. That is unix socket access only. It is proposed that we add the following, but remarked out, configurations that enable local IP host access that can be invaluable while working on database related issues and using for example a remove PyCharm setup where a IDE client exists locally on the development VM instance:

host   storageadmin    rocky              127.0.0.1/32            md5
host   smartdb         rocky              127.0.0.1/32            md5
host   storageadmin    rocky              ::1/128                 md5
host   smartdb         rocky              ::1/128                 md5
@phillxnet
Copy link
Member Author

Our existing access is via local Unix socket only. And it is not proposed that we change this, only that we add the above as a way to ease folks ability to enable IP based access from localhost (IPv4 & IPv6).

@Hooverdan96
Copy link
Member

@phillxnet, this additional "option" would then also find entry into our dev contribution docs or is that something an experienced developer would automatically hunt for?

@phillxnet
Copy link
Member Author

@Hooverdan96

find entry into our dev contribution docs

Possibly, yes. But when trying to do this the error indicates a refusal based on HBA auth so looking at the file and finding a solution is within the remit of those editing such a file. Just wanted to make it easier once one gets to that file. We don't want to reproduce all upstream docs, and folks messing with hba is fairly deep. But yes over-all - i.e. I'd like a PyCharm pro setup HowTo in the end, and these entries already in-config (but remarked out) simplifies the on-boarding bit. So we could have a quick reference within this proposed PyCharm remote setup howto was my thinking. We don't otherwise have docs relating to this level of development as it goes. And I'm not too keen on establishing a doc section with cli approaches to doing all this db stuff actually as it would be another book. Where-as point and click to see this or the other table-db is super handy within the IDE setting, and accessible from the get-go as it were. But only in Pro PyCharm unfortunately.

@Hooverdan96
Copy link
Member

the PyCharm pro setup HowTo would be a great idea I think!

@phillxnet phillxnet self-assigned this Nov 10, 2023
@phillxnet phillxnet changed the title Ease database diagnosis via local access configration Ease database diagnosis via local IP access configuration Nov 10, 2023
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Nov 10, 2023
Add to Postgresql's Host Based Authentication config (pg_hba.conf),
remarked out examples of enabling IPv4 & IPv6 based access, from
localhost. Typical DB interfaces found in IDEs are limited to IP
access only, and so cannot connect using the unix socket only
configuration used by Rockstor.
phillxnet added a commit that referenced this issue Nov 10, 2023
…via-local-IP-access-configration

Ease database diagnosis via local IP access configuration #2730
@phillxnet
Copy link
Member Author

Closing as:
Fixed by #2736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants