Enable case sensitiveness on ldap2pg
See original GitHub issueHello Étienne,
Can we enable case sensitiveness support within Ldap2pg package?
We have upper and lower case sAMAccountName http://joxi.ru/D2P9nQ3IqQDkRA
But looks like Ldap2pg is not able to handle it as I can see lowercase users on PSQL side: http://joxi.ru/Q2K9Z7LILnVXRr
IMHO, to enable case sensitiveness support for PSQL Ldap2pg just need to pass usernames or sAMAccountName or cn from LDAP or statically defined role name from .yaml to PSQL within double quotes “DD474HD”.
For example:
psql> create role "TOTO";
psql> create role "ToTo";
But we need to use double quotes while dropping users and roles as well then.
psql> drop role "ToTo";
psql> drop role "TOTO";
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Changelog - ldap2pg documentation
Set application_name to ldap2pg. Configure SASL_MECH from ... This will help manage breaking changes in ldap2pg. ... Fix case sensitivity in LDAP search....
Read more >559315 – Searching some attributes are now case sensitive ...
559315 – Searching some attributes are now case sensitive when they were previously case-insensitive. View All Add an attachment (proposed patch, testcase, etc ......
Read more >Release - ldap2pg v3.0 - PostgreSQL
Ldap2pg is a tool to synchronize roles and ACL in PostgreSQL from a LDAP compatible directory. ... Fix case sensitivity in grant rule....
Read more >How to deal with Case Sensitivity in PostgreSQL
I'd specify a case insensitive collation for the column. – jarlh. Nov 21, 2020 at 19:03. Add a comment ...
Read more >LDAP does not return attributes in case sensitive — oracle-tech
Attribute NAMES are not case sensitive - however, the LDAP server should preserve the ... With return-exact-case set to off, I'd expect the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello Étienne, worked like a charm! Thank you!
$ ldap2pg -c /etc/ldap2pg/ldap2pg.yml Starting ldap2pg 5.1. Using /etc/ldap2pg/ldap2pg.yml. Running in dry mode. Postgres will be untouched. Inspecting roles in Postgres cluster… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Role gooddeeds_md already exists in cluster. Reusing. Would rename dd474hd to DD474HD. Would rename vb263ea to VB263EA. Would rename ve665rb to VE665RB. Would rename xx582hj to XX582HJ. Would rename zu459vb to ZU459VB. Inspecting GRANTs in Postgres cluster… In dry mode, some owners aren’t created, their default privileges can’t be determined. Comparison complete.
$ ldap2pg -c /etc/ldap2pg/ldap2pg.yml --real Starting ldap2pg 5.1. Using /etc/ldap2pg/ldap2pg.yml. Running in real mode. Inspecting roles in Postgres cluster… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Querying LDAP ou=.custom,dc=f10,dc=clo… (&(objectCla… Role gooddeeds_md already exists in cluster. Reusing. Rename dd474hd to DD474HD. Rename vb263ea to VB263EA. Rename ve665rb to VE665RB. Rename xx582hj to XX582HJ. Rename zu459vb to ZU459VB. Inspecting GRANTs in Postgres cluster… Synchronization complete.
@zurikus, It’s merged, released. Please test, especially renaming. I still suggest to avoid capital in role name since it violate SQL standard !