Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
markjbrown authored Sep 6, 2024
2 parents 6eab8dd + df9f09d commit 86e7fd3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Text.RegularExpressions;
using Microsoft.Azure.Cosmos.Encryption;
using Azure.Security.KeyVault.Keys.Cryptography;
using System.Net;

namespace Cosmos.DataTransfer.CosmosExtension
{
Expand All @@ -33,6 +34,10 @@ public static CosmosClient CreateClient(CosmosSettingsBase settings, string disp
EnableContentResponseOnWrite = false,
Serializer = cosmosSerializer,
};

if (!string.IsNullOrEmpty(settings.WebProxy)){
clientOptions.WebProxy = new WebProxy(settings.WebProxy);
}

CosmosClient? cosmosClient;
if (settings.UseRbacAuth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public abstract class CosmosSettingsBase : IValidatableObject
[Required]
public string? Container { get; set; }
public ConnectionMode ConnectionMode { get; set; } = ConnectionMode.Gateway;

public string? WebProxy { get; set; }
public bool UseRbacAuth { get; set; }
public string? AccountEndpoint { get; set; }
public bool EnableInteractiveCredentials { get; set; } = true;
Expand Down
6 changes: 4 additions & 2 deletions Extensions/Cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Source and sink settings also both require parameters to specify the data locati
- `Database`
- `Container`

Source supports an optional `IncludeMetadataFields` parameter (`false` by default) to enable inclusion of built-in Cosmos fields prefixed with `"_"`, for example `"_etag"` and `"_ts"`. An optional PartitionKeyValue setting allows for filtering to a single partition. The optional Query setting allows further filtering using a Cosmos SQL statement.
Source supports an optional `IncludeMetadataFields` parameter (`false` by default) to enable inclusion of built-in Cosmos fields prefixed with `"_"`, for example `"_etag"` and `"_ts"`. An optional PartitionKeyValue setting allows for filtering to a single partition. The optional Query setting allows further filtering using a Cosmos SQL statement. An optional `WebProxy` parameter (`null` by default) enables connections through a proxy.

### Always Encrypted

Expand All @@ -33,7 +33,8 @@ The extension will also automatically handle the encryption keys and encryption
"Container":"myContainer",
"IncludeMetadataFields": false,
"PartitionKeyValue":"123",
"Query":"SELECT * FROM c WHERE c.category='event'"
"Query":"SELECT * FROM c WHERE c.category='event'",
"WebProxy":"http://yourproxy.server.com/"
}
```

Expand All @@ -50,6 +51,7 @@ Or with RBAC:
"PartitionKeyValue":"123",
"Query":"SELECT * FROM c WHERE c.category='event'",
"InitClientEncryption": false
"WebProxy":"http://yourproxy.server.com/"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Npgsql" Version="7.0.6" />
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="System.ComponentModel.Composition" Version="7.0.0" />
</ItemGroup>

Expand Down

0 comments on commit 86e7fd3

Please sign in to comment.