1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[PM-17562] Add Azure Service Bus for Distributed Events (#5382)

* [PM-17562] Add Azure Service Bus for Distributed Events

* Fix failing test

* Addressed issues mentioned in SonarQube

* Respond to PR feedback

* Respond to PR feedback - make webhook opt-in, remove message body from log
This commit is contained in:
Brant DeBow
2025-02-11 10:20:06 -05:00
committed by GitHub
parent e01cace189
commit 02262476d6
13 changed files with 278 additions and 36 deletions

View File

@ -260,8 +260,31 @@ public class GlobalSettings : IGlobalSettings
public class EventLoggingSettings
{
public AzureServiceBusSettings AzureServiceBus { get; set; } = new AzureServiceBusSettings();
public virtual string WebhookUrl { get; set; }
public RabbitMqSettings RabbitMq { get; set; } = new RabbitMqSettings();
public class AzureServiceBusSettings
{
private string _connectionString;
private string _topicName;
public virtual string EventRepositorySubscriptionName { get; set; } = "events-write-subscription";
public virtual string WebhookSubscriptionName { get; set; } = "events-webhook-subscription";
public string ConnectionString
{
get => _connectionString;
set => _connectionString = value.Trim('"');
}
public string TopicName
{
get => _topicName;
set => _topicName = value.Trim('"');
}
}
public class RabbitMqSettings
{
private string _hostName;
@ -270,8 +293,7 @@ public class GlobalSettings : IGlobalSettings
private string _exchangeName;
public virtual string EventRepositoryQueueName { get; set; } = "events-write-queue";
public virtual string HttpPostQueueName { get; set; } = "events-httpPost-queue";
public virtual string HttpPostUrl { get; set; }
public virtual string WebhookQueueName { get; set; } = "events-webhook-queue";
public string HostName
{