Skip to content

Commit a5f71b2

Browse files
committed
Removing secret migration functionality
1 parent ac5b9d1 commit a5f71b2

File tree

6 files changed

+5
-307
lines changed

6 files changed

+5
-307
lines changed

src/WebJobs.Script.WebHost/Security/KeyManagement/BlobStorageSecretsMigrationRepository.cs

Lines changed: 0 additions & 146 deletions
This file was deleted.

src/WebJobs.Script.WebHost/Security/KeyManagement/BlobStorageSecretsRepository.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,6 @@ public BlobStorageSecretsRepository(string secretSentinelDirectoryPath, string a
6767

6868
public event EventHandler<SecretsChangedEventArgs> SecretsChanged;
6969

70-
public CloudBlobContainer BlobContainer
71-
{
72-
get
73-
{
74-
return _blobContainer;
75-
}
76-
}
77-
78-
public string SecretsSentinelFilePath
79-
{
80-
get
81-
{
82-
return _secretsSentinelFilePath;
83-
}
84-
}
85-
86-
public string SecretsBlobPath
87-
{
88-
get
89-
{
90-
return _secretsBlobPath;
91-
}
92-
}
93-
9470
private string GetSecretsBlobPath(ScriptSecretsType secretsType, string functionName = null)
9571
{
9672
return secretsType == ScriptSecretsType.Host

src/WebJobs.Script.WebHost/Security/KeyManagement/DefaultSecretManagerProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ internal ISecretsRepository CreateSecretsRepository()
6363
{
6464
string siteSlotName = _environment.GetAzureWebsiteUniqueSlotName() ?? _hostIdProvider.GetHostIdAsync(CancellationToken.None).GetAwaiter().GetResult();
6565

66-
return new BlobStorageSecretsMigrationRepository(Path.Combine(_options.CurrentValue.SecretsPath, "Sentinels"), storageString, siteSlotName, _logger);
66+
return new BlobStorageSecretsRepository(Path.Combine(_options.CurrentValue.SecretsPath, "Sentinels"), storageString, siteSlotName);
6767
}
6868
}
6969
}

src/WebJobs.Script/ScriptConstants.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public static class ScriptConstants
4848
public const string LogCategoryHost = "Host";
4949
public const string LogCategoryFunction = "Function";
5050
public const string LogCategoryWorker = "Worker";
51-
public const string LogCategoryMigration = "Host.Migration";
5251

5352
public const string SkipHostJsonConfigurationKey = "MS_SkipHostJsonConfiguration";
5453
public const string SkipHostInitializationKey = "MS_SkipHostInitialization";

test/WebJobs.Script.Tests.Integration/Host/SecretsRepositoryMigrationTests.cs

Lines changed: 0 additions & 135 deletions
This file was deleted.

test/WebJobs.Script.Tests/Security/SecretManagerProviderTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.Extensions.Logging.Abstractions;
88
using Microsoft.Extensions.Options;
99
using Moq;
10+
using System.Threading;
1011
using Xunit;
1112

1213
namespace Microsoft.Azure.WebJobs.Script.Tests.Security
@@ -34,6 +35,9 @@ public SecretManagerProviderTests()
3435
.AddEnvironmentVariables()
3536
.Build();
3637

38+
mockIdProvider.Setup(p => p.GetHostIdAsync(It.IsAny<CancellationToken>()))
39+
.ReturnsAsync("testhostid");
40+
3741
_provider = new DefaultSecretManagerProvider(optionsMonitor, mockIdProvider.Object, config,
3842
new TestEnvironment(), NullLoggerFactory.Instance);
3943
}

0 commit comments

Comments
 (0)