ldap2pg
ldap2pg copied to clipboard
test_nominal.py failed on PG16
Hi,
test_nominal.py failed with the following messages.
=========================== short test summary info ============================
ERROR test/test_nominal.py::test_roles - sh.ErrorReturnCode_1:
ERROR test/test_nominal.py::test_re_grant - sh.ErrorReturnCode_1:
ERROR test/test_nominal.py::test_re_revoke - sh.ErrorReturnCode_1:
ERROR test/test_nominal.py::test_nothing_to_do - sh.ErrorReturnCode_1:
========================= 7 passed, 4 errors in 15.48s =========================
+ /home/postgres/ldap2pg/test/ldap2pg.sh -c ldap2pg.yml --real
time=2024-01-10T14:58:23.690+09:00 level=INFO msg="Starting ldap2pg" version=v6.1.0-alpha0 runtime=go1.21.3 commit=<none>
time=2024-01-10T14:58:23.690+09:00 level=WARN msg="Running a prerelease! Use at your own risks!"
time=2024-01-10T14:58:23.690+09:00 level=INFO msg="Using YAML configuration file." path=ldap2pg.yml
time=2024-01-10T14:58:23.700+09:00 level=INFO msg="Running as unprivileged user." user=ldap2pg super=false server="PostgreSQL 16.1" cluster="" database=nominal
time=2024-01-10T14:58:23.711+09:00 level=INFO msg="Connected to LDAP directory." uri=ldap://127.0.1.1:3899 authzid="dn:cn=admin,dc=ldap,dc=ldap2pg,dc=docker"
time=2024-01-10T14:58:23.711+09:00 level=INFO msg="Setup static roles and grants."
time=2024-01-10T14:58:23.711+09:00 level=INFO msg="Search LDAP to create readers, writers and owners."
time=2024-01-10T14:58:23.717+09:00 level=INFO msg="Real mode. Postgres instance will modified."
time=2024-01-10T14:58:23.718+09:00 level=CHANGE msg="Inherit role for management." role=readers database=nominal
time=2024-01-10T14:58:23.718+09:00 level=ERROR msg="Fatal error." err="sync: ERROR: permission denied to grant role \"readers\" (SQLSTATE 42501)"
exit status 1
According to the error message, I think non-superuser(ldap2pg) could not execute GRANT %s TO CURRENT_USER WITH ADMIN OPTION
due to the following postgresql change.
cf5eb37c5e Restrict the privileges of CREATEROLE users.