open-vault/builtin
Alexander Scheel c0264c923d
Don't race for CRL rebuilding capability check (#17185)
* Don't race for CRL rebuilding capability check

Core has recently seen some data races during SystemView/replication
updates between them and the PKI subsystem. This is because this
SystemView access occurs outside of a request (during invalidation
handling) and thus the proper lock isn't held.

Because replication status cannot change within the lifetime of a plugin
(and instead, if a node switches replication status, the entire plugin
instance will be torn down and recreated), it is safe to cache this
once, at plugin startup, and use it throughout its lifetime.

Thus, we replace this SystemView access with a stored boolean variable
computed ahead of time.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Update builtin/logical/pki/backend.go

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-09-19 11:41:32 -04:00
..
audit File Audit Mode 0000 bug (#15759) 2022-06-03 09:17:41 -07:00
credential Fix race in cert auth tests (#17181) 2022-09-19 09:09:03 -04:00
logical Don't race for CRL rebuilding capability check (#17185) 2022-09-19 11:41:32 -04:00
plugin Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00