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

docs: use newer ysql_hba_conf_csv #6710

Closed
jaki opened this issue Dec 19, 2020 · 3 comments · Fixed by #6920
Closed

docs: use newer ysql_hba_conf_csv #6710

jaki opened this issue Dec 19, 2020 · 3 comments · Fixed by #6920
Assignees
Labels
area/documentation Documentation needed

Comments

@jaki
Copy link
Contributor

jaki commented Dec 19, 2020

ysql_hba_conf tserver flag is deprecated. Use ysql_hba_conf_csv instead in the documentation. For example, change the page https://docs.yugabyte.com/latest/secure/authentication/password-authentication/.

@jaki jaki added the area/documentation Documentation needed label Dec 19, 2020
@ddorian
Copy link
Contributor

ddorian commented Dec 21, 2020

@jaki is it used the same ? If it has changed, where can I learn about the new syntax ?

@jaki
Copy link
Contributor Author

jaki commented Dec 21, 2020

I'm actually not too sure about the new syntax. It worked about the same when I had tried it. I think @d-uspenskiy worked on the feature, so he can clarify.

@d-uspenskiy
Copy link
Contributor

d-uspenskiy commented Dec 22, 2020

Hi @ddorian

the rule is:

  • in case filed has , or " it should be quoted with "
  • the " symbol in quoted field should be doubled (i.e. "")

Example. Suppose we have two fields:
host all all 127.0.0.1/0 password
and
host all all 0.0.0.0/0 ldap ldapserver=***** ldapsearchattribute=cn ldapport=3268 ldapbinddn=***** ldapbindpasswd="*****"
Second field has the " symbol so we should quote this field and doubles the " symbol in this field
result will be
"host all all 0.0.0.0/0 ldap ldapserver=***** ldapsearchattribute=cn ldapport=3268 ldapbinddn=***** ldapbindpasswd=""*****"""

now fields can be joined with the , symbol
host all all127.0.0.1/0 password,"host all all 0.0.0.0/0 ldap ldapserver=***** ldapsearchattribute=cn ldapport=3268 ldapbinddn=***** ldapbindpasswd=""*****"""
and the final result is the using of the ' symbol to set the flag value
--ysql_hba_conf_csv='host all all 127.0.0.1/0 password,"host all all 0.0.0.0/0 ldap ldapserver=***** ldapsearchattribute=cn ldapport=3268 ldapbinddn=***** ldapbindpasswd=""*****"""'

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

Successfully merging a pull request may close this issue.

3 participants