Skip to content

Add username and password handling from user mapping#33

Open
Hunaid2000 wants to merge 7 commits intomainfrom
user_mapping
Open

Add username and password handling from user mapping#33
Hunaid2000 wants to merge 7 commits intomainfrom
user_mapping

Conversation

@Hunaid2000
Copy link
Copy Markdown
Contributor

User/password options are in server options which is not according to the standard. We retrieve username and password from user mapping instead of server options.

Those using this FDW need to enable auth, setup roles/users (like root) on etcd, as mentioned in docs. Then create a user mapping for that user with password like

CREATE USER MAPPING FOR CURRENT_USER SERVER my_etcd_server OPTIONS (user 'root', password 'secret');

@Hunaid2000 Hunaid2000 marked this pull request as ready for review January 28, 2026 10:57
@Hunaid2000 Hunaid2000 requested a review from pashagolub January 28, 2026 10:57
'root' is a special role, so no need to grant permissions to it.
Copy link
Copy Markdown
Contributor

@if-loop69420 if-loop69420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice all in all. Good use of the pg_sys things even if they're unsafe, but there's no safe way to do it afaik. You've added tests and updated the docs, which I'm happy with. Please add the small change i suggested for the error message. Also sorry for taking so long to review

Comment thread src/lib.rs Outdated
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

Successfully merging this pull request may close these issues.

2 participants