Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/getting-started/server/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ To emulate this locally:
1. Make sure you've installed and setup Azurite, as described in the
[Server Setup Guide](./guide.md#azurite)

2. Make sure that the `globalSettings:events:connectionString` user secret is not set, or has the
default value of `UseDevelopmentStorage=true`
2. Make sure that the following user secrets are set correctly:
- `globalSettings:events:connectionString` should not be set, or has the default value of
`UseDevelopmentStorage=true`
- `globalSettings:events:queueName` should be set to `"event"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โ“ Isn't there a default for this? And this is the legacy system we as Bitwarden no longer use, in favor of Rabbit of ASB.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secrets example JSON updated and would cover this for compatibility reasons, but what I am not understanding is how this is used -- shouldn't the direct database writer for events be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone running pwsh setup_secrets.ps1, the updated secrets will now include the necessary configuration. However, I noticed this change because I still use Azure Queue locally. Since we now check for both globalSettings:events:connectionString and globalSettings:events:queueName:

if (CoreHelpers.SettingHasValue(globalSettings.Events.ConnectionString) &&
            CoreHelpers.SettingHasValue(globalSettings.Events.QueueName))
{
    services.TryAddSingleton<IEventWriteService, AzureQueueEventWriteService>();
    return services;
}

Anyone still using Azure Queue who hasn't updated their secrets won't have AzureQueueEventWriteService registered, which would break their local event logging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to break these engineers' local experiences in that case. We all need to upgrade. We almost outright removed the queueing logic altogether but left it in case someone in the field might.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that makes sense. I will close this PR then. Thanks.


3. Start the Events and EventsProcessor projects using `dotnet run` or your IDE. (Also ensure you
have Api, Identity and your web vault running.)
Expand Down