open-vault/builtin/logical
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
..
aws update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
cassandra refactor: replace strings.Replace with strings.ReplaceAll (#15392) 2022-08-03 15:22:48 -04:00
consul Update Consul bootstrap test case to conditionally add token to config (#16560) 2022-08-03 13:43:43 -05:00
database Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
mongodb Pin MongoDB test container images pre-v6 (#16880) 2022-08-25 08:14:37 -07:00
mssql refactor: replace strings.Replace with strings.ReplaceAll (#15392) 2022-08-03 15:22:48 -04:00
mysql refactor: replace strings.Replace with strings.ReplaceAll (#15392) 2022-08-03 15:22:48 -04:00
nomad Allow reading Nomad CA/Client cert configuration (#15809) 2022-06-10 10:09:54 -04:00
pki Don't race for CRL rebuilding capability check (#17185) 2022-09-19 11:41:32 -04:00
postgresql refactor: replace strings.Replace with strings.ReplaceAll (#15392) 2022-08-03 15:22:48 -04:00
rabbitmq Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
ssh update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
totp base32.DecodeString expects length 8 for the buffer (#11887) 2021-07-14 07:38:10 -04:00
transit make fmt (#17131) 2022-09-14 07:45:50 -05:00