LDAP Okta authentication with interface works - Metabase Throws Error

Hi all,

We have LDAP Okta authentication working (Okta logs show successful login)

However, Metabase throws errors whenever we try to login. Here are the associated logs:

Date	Message
2024-03-20T20:25:38.082Z	[0m
2024-03-20T20:25:38.082Z	{:via [{:type java.lang.NullPointerException}], :trace [], :message nil}
2024-03-20T20:25:38.082Z	2024-03-20 20:25:37,297 ERROR middleware.log :: e[31mPOST /api/session 500 13.1 s (2 DB calls)
2024-03-20T20:25:38.082Z	java.lang.NullPointerException
2024-03-20T20:25:38.082Z	2024-03-20 20:25:37,296 ERROR api.session :: Authentication endpoint error
2024-03-20T20:24:12.043Z	2024-03-20 20:24:11,649 DEBUG middleware.log :: e[32mGET /api/session/properties 200 10.6 ms (1 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:24:12.043Z	[0m
2024-03-20T20:24:12.042Z	"Unauthenticated"
2024-03-20T20:24:12.042Z	2024-03-20 20:24:11,635 DEBUG middleware.log :: e[31mGET /api/user/current 401 217.5 ┬Ás (0 DB calls)
2024-03-20T20:23:05.005Z	2024-03-20 20:23:04,651 DEBUG middleware.log :: e[32mGET /api/session/properties 200 14.9 ms (5 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:23:05.005Z	2024-03-20 20:23:04,646 DEBUG middleware.log :: e[32mGET /api/setting 200 18.9 ms (4 DB calls) App DB connections: 2/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:23:05.005Z	2024-03-20 20:23:04,528 DEBUG middleware.log :: e[32mPUT /api/ldap/settings 200 860.5 ms (52 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (4 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:41.995Z	2024-03-20 20:22:41,010 DEBUG middleware.log :: e[32mGET /api/session/properties 200 22.4 ms (5 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:41.995Z	2024-03-20 20:22:40,995 DEBUG middleware.log :: e[32mGET /api/setting 200 19.2 ms (4 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:40.995Z	2024-03-20 20:22:40,915 DEBUG middleware.log :: e[32mPUT /api/setting/ldap-group-mappings 204 20.2 ms (6 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (4 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:38.994Z	2024-03-20 20:22:38,825 DEBUG middleware.log :: e[32mGET /api/session/properties 200 16.8 ms (5 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:38.994Z	2024-03-20 20:22:38,815 DEBUG middleware.log :: e[32mGET /api/setting 200 19.6 ms (4 DB calls) App DB connections: 2/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:38.994Z	2024-03-20 20:22:38,741 DEBUG middleware.log :: e[32mPUT /api/setting/ldap-group-mappings 204 16.4 ms (6 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (4 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:18.984Z	2024-03-20 20:22:18,240 DEBUG middleware.log :: e[32mGET /api/permissions/group 200 3.8 ms (2 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (4 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:04.977Z	2024-03-20 20:22:04,138 DEBUG middleware.log :: e[32mGET /api/setup/admin_checklist 200 13.2 ms (9 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (4 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:04.977Z	2024-03-20 20:22:04,020 DEBUG middleware.log :: e[32mGET /api/setting 200 23.0 ms (4 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:22:04.977Z	2024-03-20 20:22:04,016 DEBUG middleware.log :: e[32mGET /api/session/properties 200 21.9 ms (5 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,340 DEBUG middleware.log :: e[32mGET /api/activity/popular_items 200 31.2 ms (10 DB calls) App DB connections: 1/15 Jetty threads: 3/50 (3 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,334 DEBUG middleware.log :: e[32mGET /api/search 200 43.3 ms (4 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (2 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,314 DEBUG middleware.log :: e[32mGET /api/activity/recent_views 200 5.6 ms (3 DB calls) App DB connections: 4/15 Jetty threads: 7/50 (0 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,312 DEBUG middleware.log :: e[32mGET /api/collection/tree 200 17.7 ms (6 DB calls) App DB connections: 3/15 Jetty threads: 6/50 (1 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,303 DEBUG middleware.log :: e[32mGET /api/bookmark 200 11.4 ms (1 DB calls) App DB connections: 3/15 Jetty threads: 5/50 (1 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,302 DEBUG middleware.log :: e[32mGET /api/database 200 10.4 ms (3 DB calls) App DB connections: 4/15 Jetty threads: 6/50 (0 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,293 DEBUG middleware.log :: e[32mGET /api/collection/root 200 9.3 ms (2 DB calls) App DB connections: 4/15 Jetty threads: 7/50 (0 idle, 0 queued) (55 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,219 DEBUG middleware.log :: e[32mGET /api/user/current 200 27.0 ms (11 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (2 idle, 0 queued) (53 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,210 DEBUG middleware.log :: e[32mGET /api/session/properties 200 17.7 ms (6 DB calls) App DB connections: 2/15 Jetty threads: 4/50 (2 idle, 0 queued) (53 total active threads) Queries in flight: 0 (0 queued)e[0m
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,203 INFO public-settings.premium-features :: e[32m=>e[0m 6
2024-03-20T20:21:58.975Z	2024-03-20 20:21:58,202 INFO public-settings.premium-features :: e[33mGETTING ACTIVE USER COUNT!e[0m

Are there any silly gotchas that we might be overlooking? Or other ideas?

Thank you.

Can you try with v49.1 and increasing the verbosity of the LDAP namespace? with that you should be able to see what's going on with LDAP

Thanks for the reply. I am OOO for a few days, but will try this when I get back.