This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/internal/outpost/ldap
Marc 'risson' Schmitt 5d87eb97be outposts/ldap: fix race condition when refreshing the provider
Fixes the race condition causing the crash found in #4138, which doesn't
actually have anything to do with the issue itself.

As far as I can work out, when the outpost refreshes its list of
providers, it copies over its `boundUsers`, probably to avoid having to
fetch them all again, and does so by making a shallow copy of that
`map`, but not the mutex associated with it. It now has multiple
references to the same map, each protected by a different mutex, which
under certain conditions can cause a `concurrent map read and map write`
error.

This fix copies the map contents instead of make a shallow copy.

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2023-06-02 15:42:19 +02:00
..
bind core: bump github.com/getsentry/sentry-go from 0.20.0 to 0.21.0 (#5548) 2023-05-09 11:22:57 +02:00
constants providers/ldap: making ldap compatible with synology (#4694) 2023-02-22 15:26:41 +01:00
flags outposts/ldap: cached bind (#2824) 2022-05-08 16:48:53 +02:00
group providers/ldap: remove deprecated fields (#5154) 2023-04-21 14:10:24 +03:00
handler providers/ldap: memory Query (#1681) 2021-11-05 10:37:30 +01:00
metrics internal: centralise config for listeners to use same config system everywhere (#3367) 2022-08-03 21:33:27 +02:00
search core: bump github.com/getsentry/sentry-go from 0.20.0 to 0.21.0 (#5548) 2023-05-09 11:22:57 +02:00
server providers/ldap: add unbind flow execution (#4484) 2023-01-23 20:36:30 +01:00
utils providers/ldap: correctly use pagination in search results in both modes (#5492) 2023-05-05 15:51:02 +03:00
bind.go providers/ldap: making ldap compatible with synology (#4694) 2023-02-22 15:26:41 +01:00
entries.go providers/ldap: remove deprecated fields (#5154) 2023-04-21 14:10:24 +03:00
instance.go outposts/ldap: fix race condition when refreshing the provider 2023-06-02 15:42:19 +02:00
ldap.go internal: fix crash when port 9000 is in use (#4863) 2023-03-07 13:27:46 +01:00
ldap_tls.go internal: ignore insecure TLS certs (#5483) 2023-05-05 15:57:52 +03:00
refresh.go outposts/ldap: fix race condition when refreshing the provider 2023-06-02 15:42:19 +02:00
search.go providers/ldap: making ldap compatible with synology (#4694) 2023-02-22 15:26:41 +01:00
unbind.go providers/ldap: add unbind flow execution (#4484) 2023-01-23 20:36:30 +01:00
utils.go outposts/ldap: use backend group num_pk 2022-03-22 23:54:50 +01:00