Re: pgAdmin4 web ldap authtification
От | Stefan Harbich |
---|---|
Тема | Re: pgAdmin4 web ldap authtification |
Дата | |
Msg-id | 32d22b8fa9e196a201498857a0242324d86557fe.camel@harnet.de обсуждение исходный текст |
Ответ на | Re: pgAdmin4 web ldap authtification (Stefan Harbich <stefan.harbich@harnet.de>) |
Список | pgadmin-support |
Hello,
i found the solution. here my config_local.py
...
/pgadmin4 # cat config_local.py
AUTHENTICATION_SOURCES = ['ldap','internal']
LDAP_SERVER_URI = 'ldaps://ldap.intern.example.de'
LDAP_USERNAME_ATTRIBUTE = 'uid'
LDAP_BASE_DN = 'ou=users,dc=example,dc=de'
LDAP_SEARCH_BASE_DN = 'ou=users,dc=example,dc=de'
LDAP_USE_STARTTLS = True
LDAP_CA_CERT_FILE = '/pgadmin4/HarbichCA.pem'
LDAP_CERT_FILE = '/pgadmin4/ldap.intern.example.de.crt'
LDAP_KEY_FILE = '/pgadmin4/ldap.intern.example.de.key'
...
Greetings from Stefan Harbich
Am Dienstag, dem 07.11.2023 um 09:16 +0100 schrieb Stefan Harbich:
Hello,for your information an entry from the LDAP and the config_local.py LDAP configuration for pgAdmin.ldapsearch -x -H ldaps://ldap.intern.example.de uid=stefan.example...# extended LDIF## LDAPv3# base <dc=example,dc=de> (default) with scope subtree# filter: uid=stefan.example# requesting: ALL## stefan.example, users, example.dedn: uid=stefan.example,ou=users,dc=example,dc=decn: Stefan exampleobjectClass: evolutionPersonobjectClass: topobjectClass: personobjectClass: organizationalPersonobjectClass: inetOrgPersonobjectClass: mailExtensionobjectClass: posixAccountobjectClass: dcMailUseruidNumber: 10000uid: stefan.exampletitle: adminpostalAddress: ################################, NRW$53113$DeutschlandhomePostalAddress: ############################################$DeutschlandloginShell: /bin/bashfileAs: Stefan examplegidNumber: 10000givenName: Stefansn: examplehomeDirectory: /home/stefan.exampledcMailMessageStore: /vmail/mailboxes/example.de/stefan.example/mailmailEnabled: TRUEinitials: STHdisplayName: STHbusinessRole: #######birthDate: 1968-01-29homeFacsimileTelephoneNumber: 0049##########mailQuota: 700MhomePhone: ###########mobile: ###########note:: WnVnw6RuZ2UgdW5kIFBhc3N3w7ZydGVyOkxBTSwgYWRtaW4sIE1hcmxpZXMoNjc4OSk7IFVTViwgTWFybGllczEyOyBtcGhwbWUwMSwgcm9vdCwgTWFybGllcygxMik7dm1haWxwYW5lbCwgYWRtaW4sIE1hcmxpZXMoNjc4OSk7IFN1cGVybWljcm8sIEFETUlOLCBNYXJsaWVzKDEyKTsgRWxzdGVyIFBJTjogMTk2ODAxMjk7IERITCwgc3RlZmFuLmhhcmJpY2hAaGFybmV0LmRlLCBNYXJsaWVzKDEyKTsgUG9zdGdyZVNRTCwgc3RlZmFuLmhhcmJpY2gsIFN0ZWZhbkhhcmJpY2gxMjsgSGVydHosIDQzMzc0Nzk1LCBIZXJ0eiMxQ2x1YkdvbGQ7IE9wZW5IQUIgRm9ydW0sIHN0aGFyYmljaCwgRGVja2VyKDEyKTsgYW5ydWZiZWFudHdvcnRlciwgNTYoNzgpYW5ydWZiZWFudHdvcnRlcjEyKDM0KSwgU2VsZmhvc3QsIHNoYXJiaWNoLnJ1YmlkaXVtLnNlbGZob3N0LmRlLCBBeCg3MylEZWNrZXIzNihGUSksIFNlbGZob3N0LVp1Z2FuZywgNzI3MjIsIERlY2tlcigxMjM0KSwgSU5HIERpQmEsIFBJTiAyOTE2ODsgUFNELUJhbmsgT25saW5lIFBJTjogU3RyYWZhbnplaWdlIHZvbSAxMy4wMy4yMDIzIEFrdGVuemVpY2hlbjogMjMwMzEzLTE1MDYtSVA2MzQ2LSBBbnNwcmVjaHBhcnRuZXI6IEhlcnIgRWdlbmJlcmdlciArN###################telephoneNumber: ############# search resultsearch: 2result: 0 Success# numResponses: 2# numEntries: 1...config_local.py.../pgadmin4 # cat config_local.pyAUTHENTICATION_SOURCES = 'ldap'LDAP_AUTO_CREATE_USER = TrueLDAP_SERVER_URI = 'ldap://192.168.20.20:9009'LDAP_USERNAME_ATTRIBUTE = 'uid'LDAP_BIND_USER = 'cn=admin,dc=example,dc=de'LDAP_BIND_PASSWORD = '#############'LDAP_BASE_DN = 'ou=users,dc=example,dc=de'LDAP_SEARCH_BASE_DN = 'ou=users,dc=example,dc=de'LDAP_SEARCH_FILTER = '(objectclass=*)'LDAP_USE_STARTTLS = False...Greetings from StefanAm Dienstag, dem 07.11.2023 um 10:05 +0530 schrieb Khushboo Vashi:On Tue, Nov 7, 2023 at 1:58 AM Stefan Harbich <stefan.harbich@harnet.de> wrote:Hello,i created the file config_local.py in the config.py directory. Now I get the following error message....2023-11-06 20:22:52,271: ERROR pgadmin: pgadmin.authenticate.AuthSourceRegistry 'l' has not been implemented.Traceback (most recent call last):File "/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_requestrv = self.dispatch_request()^^^^^^^^^^^^^^^^^^^^^^^File "/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_requestreturn self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/pgadmin4/pgadmin/authenticate/__init__.py", line 102, in loginreturn _login()^^^^^^^^File "/pgadmin4/pgadmin/authenticate/__init__.py", line 141, in _loginif not auth_obj.validate():^^^^^^^^^^^^^^^^^^^File "/pgadmin4/pgadmin/authenticate/__init__.py", line 267, in validatesource = get_auth_sources(src)^^^^^^^^^^^^^^^^^^^^^File "/pgadmin4/pgadmin/authenticate/__init__.py", line 328, in get_auth_sourcesauth_source = AuthSourceRegistry.get(type)^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/pgadmin4/pgadmin/utils/dynamic_registry/__init__.py", line 48, in __getraise NotImplementedError(NotImplementedError: pgadmin.authenticate.AuthSourceRegistry 'l' has not been implemented....What else can I do?Please send your config_local.py settings, so I can have a look.Greetings from StefanAm Montag, dem 06.11.2023 um 10:30 +0530 schrieb Khushboo Vashi:On Sat, Nov 4, 2023 at 2:06 AM Stefan Harbich <stefan.harbich@harnet.de> wrote:Hello, my dears,
i can't get the LDAP login user to pgAdmin on the website. In Docker
Bash, I created the file config_local.py with the following content in
the “/var/lib/pgadmin” directory.
...
AUTHENTICATION_SOURCES = ['ldap','internal']
LDAP_SERVER_URI = 'ldap://<my-ip-address>:10389'
LDAP_USERNAME_ATTRIBUTE = 'uid'
LDAP_BASE_DN = 'uid=admin,ou=system'
LDAP_SEARCH_BASE_DN = 'uid=admin,ou=system'
...
Unfortunately, the content is not used after the container is
restarted. Why not?config_local.py should be created in the same directory as config.py.Please refer: https://www.pgadmin.org/docs/pgadmin4/7.8/config_py.html
Greetings from Stefan Harbich
В списке pgadmin-support по дате отправления: