open-vault/vault
hc-github-team-secure-vault-core f4453384cb
events: Ignore send context (#23500) (#23538)
When sending an event asynchronously, the original context used for
whatever generated the event (probably a synchronous, quick HTTP
context) is probably not what is wanted for sending the event, which
could face delays if a consumer is backed up.

I will admit myself to sometimes having "context blindness", where
I just take whatever context is incoming in a function and thread it
out to all calls. Normally this is the right thing to do when, say,
tying downstream API calls to an upstream HTTP timeout.

When making KV events, for example, we used the HTTP context for
`SendEvent()`, and this can cause the events to be dropped if they
aren't taken from the channel before the HTTP request finishes.

In retrospect, it was probably unnecessary to include a context in
the `SendEvent` interface.

We keep the context in place for backwards compability, but also in
case we want to use it for purposes other than timeouts and
cancellations in the future.

Co-authored-by: Christopher Swenson <christopher.swenson@hashicorp.com>
2023-10-05 21:35:10 +00:00
..
activity VAULT-14735: generate mock clients for activity log (#20252) 2023-05-23 11:58:51 +02:00
cluster backport of commit c67242463c239215a1dbf3b9979787a5f8359bbf (#20830) 2023-05-29 15:02:27 +00:00
diagnose Extend expiration of diagnose test-fixture certificate (#19868) 2023-04-03 09:34:58 -04:00
eventbus events: Ignore send context (#23500) (#23538) 2023-10-05 21:35:10 +00:00
external_tests backport of commit 0fa36a36ae1b4842d96623eef0d20af5dea557c0 (#23443) 2023-10-02 09:49:05 -07:00
hcp_link backport of commit a98c0d9cbe9d7cc59fc17a0416e61469cd9d56ac (#21797) 2023-07-12 20:40:35 +00:00
quotas backport of commit c4a8b23d933fcbd65647ffabfcb0b4c1809a57e9 (#22637) 2023-08-30 15:28:32 +00:00
replication adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
seal Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
tokens adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
acl.go add ns path to granting_policies (#20522) 2023-05-04 15:08:22 -07:00
acl_test.go add ns path to granting_policies (#20522) 2023-05-04 15:08:22 -07:00
acl_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
acme_billing_system_view.go Move activityType to a constant, set precedence (#20738) 2023-05-24 12:29:47 -04:00
activity_log.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
activity_log_test.go backport of commit 35a5fbfc6002e0440c708e722dc8aabbcb7a81b2 (#22507) 2023-08-22 18:48:14 +00:00
activity_log_testing_util.go VAULT-15395: Support mocking time functions in the activity log (#20720) 2023-05-23 16:25:23 +00:00
activity_log_util.go Refactor reporter for unseal setup (#20296) 2023-04-21 15:29:37 -04:00
activity_log_util_common.go VAULT-15395: Support mocking time functions in the activity log (#20720) 2023-05-23 16:25:23 +00:00
activity_log_util_common_test.go VAULT-14733: SegmentReader interface for reading activity log segments (#19934) 2023-04-06 16:23:41 +02:00
audit.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
audit_broker.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
audit_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
audited_headers.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
audited_headers_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
auth_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_access.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_aes_gcm.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_aes_gcm_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_view.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_view_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
barrier_view_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
capabilities.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
capabilities_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
census.go VAULT-15703: Reload automated reporting (#20680) 2023-05-19 14:42:50 +00:00
cluster.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
cluster_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
core.go backport of commit 5123ea933a1d8e4df0af2aefb049c3556f843b72 (#23505) 2023-10-04 15:19:12 -04:00
core_metrics.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
core_metrics_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
core_test.go backport of commit b54645514400b7c3db6e4a60b5491cdb7d55ceb6 (#20869) 2023-05-31 17:51:20 +00:00
core_util.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
core_util_common.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
cors.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
counters.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
counters_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
custom_response_headers.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
custom_response_headers_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
dynamic_system_view.go backport of commit c040f901e57d2d04772827b52f7b052757986897 (#22135) 2023-07-31 13:57:29 -04:00
dynamic_system_view_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
events_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
expiration.go backport of commit 547bff752e056ff81d4359267e0f8afa4629f505 (#23321) 2023-09-27 16:03:53 -04:00
expiration_integ_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
expiration_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
expiration_testing_util_common.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
expiration_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
external_plugin_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
forwarded_writer_oss.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
generate_root.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
generate_root_recovery.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
generate_root_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
ha.go backport of commit 0fa36a36ae1b4842d96623eef0d20af5dea557c0 (#23443) 2023-10-02 09:49:05 -07:00
ha_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_lookup.go openapi: Add display attributes for identity/ (remaining) (#19763) 2023-04-12 15:46:01 -04:00
identity_lookup_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
identity_store_aliases.go VAULT-15840: Allow updates of only entity-alias custom-metadata (#20368) 2023-05-01 12:42:30 +02:00
identity_store_aliases_test.go VAULT-15840: Allow updates of only entity-alias custom-metadata (#20368) 2023-05-01 12:42:30 +02:00
identity_store_entities.go openapi: Add display attributes for identity/entity (#19760) 2023-04-12 15:44:43 -04:00
identity_store_entities_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_group_aliases.go openapi: Add display attributes for identity/group (#19762) 2023-04-12 15:45:12 -04:00
identity_store_group_aliases_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_groups.go backport of commit 8931e4790b46df81cca615865e1f33a127276e1d (#20972) 2023-06-08 18:59:55 +00:00
identity_store_groups_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_oidc.go Upgrade go-jose library to v3 (#20559) 2023-05-23 12:25:58 +00:00
identity_store_oidc_provider.go Upgrade go-jose library to v3 (#20559) 2023-05-23 12:25:58 +00:00
identity_store_oidc_provider_test.go backport of commit 3a46ecc389e9096ccea6c6f847b68ada7f8068d7 (#21362) 2023-06-21 14:01:13 +00:00
identity_store_oidc_provider_util.go Upgrade go-jose library to v3 (#20559) 2023-05-23 12:25:58 +00:00
identity_store_oidc_test.go Upgrade go-jose library to v3 (#20559) 2023-05-23 12:25:58 +00:00
identity_store_oidc_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_oss.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_schema.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_structs.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
identity_store_test.go backport of commit e1a9d85a18858bccf4de71ddc0ce7592170ab894 (#21879) 2023-07-17 09:46:00 -07:00
identity_store_upgrade.go openapi: Add display attributes for identity/ (remaining) (#19763) 2023-04-12 15:46:01 -04:00
identity_store_util.go backport of commit e1a9d85a18858bccf4de71ddc0ce7592170ab894 (#21879) 2023-07-17 09:46:00 -07:00
init.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
init_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
inspectable.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
inspectable_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
keyring.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
keyring_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logical_cubbyhole.go openapi: Add display attributes for cubbyhole/ (#19880) 2023-04-13 11:33:21 -04:00
logical_cubbyhole_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logical_passthrough.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logical_passthrough_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logical_raw.go openapi: Add display attributes for /sys (p2) (#19707) 2023-04-13 11:32:57 -04:00
logical_system.go backport of commit c73eacbaf6ae6b5860e1ad9a3b6ce930c093a105 (#23174) 2023-09-19 19:54:42 +00:00
logical_system_activity.go backport of commit 3a46ecc389e9096ccea6c6f847b68ada7f8068d7 (#21362) 2023-06-21 14:01:13 +00:00
logical_system_activity_write.go VAULT-14734: activity log write endpoint (#20019) 2023-04-12 18:26:26 +02:00
logical_system_activity_write_testonly.go VAULT-14735: write mock activity log entity files (#20702) 2023-05-25 18:55:55 +02:00
logical_system_activity_write_testonly_test.go VAULT-14735: write mock activity log entity files (#20702) 2023-05-25 18:55:55 +02:00
logical_system_helpers.go VAULT-16217 Fixing Broken OpenAPI Specification Generation (#20597) 2023-05-17 14:56:45 -04:00
logical_system_integ_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
logical_system_paths.go backport of commit 2f677665b37fcced51737cdef7abbebb4c719529 (#21527) 2023-07-06 20:01:33 +00:00
logical_system_pprof.go backport of commit 2f677665b37fcced51737cdef7abbebb4c719529 (#21527) 2023-07-06 20:01:33 +00:00
logical_system_quotas.go openapi: Add display attributes for /sys (p2) (#19707) 2023-04-13 11:32:57 -04:00
logical_system_raft.go backport of commit 727c73cbd1ff3341ea7a19420f36dc8bd0dd8848 (#22684) 2023-08-31 13:18:25 +00:00
logical_system_test.go backport of commit c73eacbaf6ae6b5860e1ad9a3b6ce930c093a105 (#23174) 2023-09-19 19:54:42 +00:00
logical_system_user_lockout.go backport of commit b54645514400b7c3db6e4a60b5491cdb7d55ceb6 (#20869) 2023-05-31 17:51:20 +00:00
logical_system_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
login_mfa.go backport of commit cccfdb088f218f5631195e8b653c07a77cfac2b5 (#22596) 2023-08-28 18:16:57 -05:00
login_mfa_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
managed_key_registry.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
mfa_auth_resp_priority_queue.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
mfa_auth_resp_priority_queue_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
mount.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
mount_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
mount_util.go backport of commit 9ace8751ff0df06058043b92343ceab2121c2bbd (#21727) 2023-07-10 12:52:42 -07:00
mount_util_shared.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
namespaces.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
namespaces_oss.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
password_policy_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
plugin_catalog.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
plugin_catalog_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
plugin_reload.go Simplify tracking of external plugins (#20009) 2023-04-12 18:34:35 +01:00
policy.go add ns path to granting_policies (#20522) 2023-05-04 15:08:22 -07:00
policy_store.go backport of commit 37215ae 2023-09-14 19:27:30 +00:00
policy_store_test.go backport of commit 37215ae 2023-09-14 19:27:30 +00:00
policy_store_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
policy_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
policy_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
raft.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
rekey.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
rekey_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_forwarding.go backport of commit c67242463c239215a1dbf3b9979787a5f8359bbf (#20830) 2023-05-29 15:02:27 +00:00
request_forwarding_rpc.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_forwarding_rpc_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_forwarding_service.pb.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_forwarding_service.proto adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_forwarding_service_grpc.pb.go Update protobuf & grpc libraries and protoc plugins (#12679) 2021-09-29 18:25:15 -07:00
request_handling.go backport of commit 37215ae 2023-09-14 19:27:30 +00:00
request_handling_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
request_handling_util.go backport of commit b54645514400b7c3db6e4a60b5491cdb7d55ceb6 (#20869) 2023-05-31 17:51:20 +00:00
rollback.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
rollback_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
router.go feat: add plugin metadata to audit logging (#19814) 2023-04-06 00:41:07 -07:00
router_access.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
router_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
router_testing.go Ignore errors from rollback manager invocations (#22235) (#22238) 2023-08-16 17:34:37 +00:00
seal.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
seal_access.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
seal_autoseal.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
seal_autoseal_test.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
seal_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
seal_testing.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
seal_testing_util.go Convert seal.Access struct into a interface (OSS) (#20510) 2023-05-04 14:22:30 -04:00
sealunwrapper.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sealunwrapper_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
test_cluster_detect_deadlock.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
test_cluster_do_not_detect_deadlock.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
testing.go backport of commit 4c8cc87794ed2d989f515cd30c1c1b953d092ef3 (#22247) 2023-09-01 13:02:28 -04:00
testing_util.go Revert "Remove dead licensing code and extra core setup (#20080)" (#20112) 2023-04-12 13:46:15 +00:00
token_store.go backport of commit f3a4c01ba9e05850e255406f5bf4bc7f052c3985 (#22140) 2023-07-31 14:54:29 -07:00
token_store_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
token_store_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
token_store_util_common.go Add extra ssct gen counter debug logs (#19980) 2023-04-05 13:06:57 -04:00
ui.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
ui_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
util_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
vault_version_time.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
version_store.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
version_store_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
wrapping.go Only track role in login path (#22620) (#22626) 2023-08-29 21:52:08 +00:00
wrapping_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00