Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/Arcus.Security.Core/Arcus.Security.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<NoWarn>S1133</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\ObsoleteDefaults.cs" Link="ObsoleteDefaults.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" />
Expand Down
8 changes: 4 additions & 4 deletions src/Arcus.Security.Core/Caching/CachedSecretProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Arcus.Security.Core.Caching
/// <summary>
/// A <see cref="ISecretProvider"/> that will cache secrets in memory, to improve performance.
/// </summary>
[Obsolete("Will be removed in v3.0 as caching will happen directly on the secret store")]
[Obsolete("Will be removed in v3.0 as caching will happen directly on the secret store", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public class CachedSecretProvider : ICachedSecretProvider, IVersionedSecretProvider, ISyncSecretProvider
{
private readonly ISecretProvider _secretProvider;
Expand Down Expand Up @@ -92,7 +92,7 @@ public CachedSecretProvider(ISecretProvider secretProvider) :
/// <exception cref="ArgumentException">The name must not be empty</exception>
/// <exception cref="ArgumentNullException">The name must not be null</exception>
/// <exception cref="SecretNotFoundException">The secret was not found, using the given name</exception>
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead")]
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public Task<string> GetRawSecretAsync(string secretName)
{
if (string.IsNullOrWhiteSpace(secretName))
Expand Down Expand Up @@ -130,7 +130,7 @@ public Task<Secret> GetSecretAsync(string secretName)
/// <exception cref="ArgumentException">The name must not be empty</exception>
/// <exception cref="ArgumentNullException">The name must not be null</exception>
/// <exception cref="SecretNotFoundException">The secret was not found, using the given name</exception>
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead")]
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public async Task<string> GetRawSecretAsync(string secretName, bool ignoreCache)
{
if (string.IsNullOrWhiteSpace(secretName))
Expand Down Expand Up @@ -190,7 +190,7 @@ private bool TryGetValueFromCache(string secretName, bool ignoreCache, out Secre
/// <exception cref="ArgumentException">Thrown when the <paramref name="secretName"/> is blank.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="amountOfVersions"/> is less than zero.</exception>
/// <exception cref="SecretNotFoundException">Thrown when no secret was not found, using the given <paramref name="secretName"/>.</exception>
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead")]
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecret) + " instead", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public async Task<IEnumerable<string>> GetRawSecretsAsync(string secretName, int amountOfVersions)
{
if (string.IsNullOrWhiteSpace(secretName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Arcus.Security.Core.Caching.Configuration
/// <summary>
/// Default implementation of the collected configuration values to control the caching when interacting with Azure Key Vault.
/// </summary>
[Obsolete("Will be removed in v3.0 as caching will be handled by the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will be handled by the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public class CacheConfiguration : ICacheConfiguration
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Arcus.Security.Core.Caching.Configuration
/// <summary>
/// Collected configuration values to control the caching when interacting with Azure Key Vault.
/// </summary>
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public interface ICacheConfiguration
{
/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions src/Arcus.Security.Core/Caching/ICachedSecretProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ namespace Arcus.Security.Core.Caching
/// <summary>
/// <see cref="ICachedSecretProvider"/> allows developers to build specific Secret key providers with caching.
/// </summary>
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public interface ICachedSecretProvider : ISecretProvider
{
/// <summary>
/// Gets the cache-configuration for this instance.
/// </summary>
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
ICacheConfiguration Configuration { get; }

/// <summary>
Expand All @@ -25,7 +25,7 @@ public interface ICachedSecretProvider : ISecretProvider
/// <exception cref="ArgumentException">The name must not be empty</exception>
/// <exception cref="ArgumentNullException">The name must not be null</exception>
/// <exception cref="SecretNotFoundException">The secret was not found, using the given name</exception>
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecretAsync) + " instead")]
[Obsolete("Will be removed in v3 in favor of solely using " + nameof(GetSecretAsync) + " instead", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
Task<string> GetRawSecretAsync(string secretName, bool ignoreCache);

/// <summary>
Expand All @@ -37,7 +37,7 @@ public interface ICachedSecretProvider : ISecretProvider
/// <exception cref="ArgumentException">The name must not be empty</exception>
/// <exception cref="ArgumentNullException">The name must not be null</exception>
/// <exception cref="SecretNotFoundException">The secret was not found, using the given name</exception>
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
Task<Secret> GetSecretAsync(string secretName, bool ignoreCache);


Expand All @@ -46,7 +46,7 @@ public interface ICachedSecretProvider : ISecretProvider
/// so the next time <see cref="CachedSecretProvider.GetSecretAsync(string)"/> is called, a new version of the secret will be added back to the cache.
/// </summary>
/// <param name="secretName">The name of the secret that should be removed from the cache.</param>
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself")]
[Obsolete("Will be removed in v3.0 as caching will happen on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
Task InvalidateSecretAsync(string secretName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class SecretProviderCachingExtensions
/// <returns>A secret provider that caches values</returns>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="secretProvider"/> or <paramref name="memoryCache"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="cachingDuration"/> is not a positive time duration.</exception>
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself")]
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public static ICachedSecretProvider WithCaching(this ISecretProvider secretProvider, TimeSpan cachingDuration, IMemoryCache memoryCache)
{
if (secretProvider is null)
Expand Down Expand Up @@ -48,7 +48,7 @@ public static ICachedSecretProvider WithCaching(this ISecretProvider secretProvi
/// <returns>A secret provider that caches values</returns>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="secretProvider"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="cachingDuration"/> is not a positive time duration.</exception>
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself")]
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public static ICachedSecretProvider WithCaching(this ISecretProvider secretProvider, TimeSpan cachingDuration)
{
if (secretProvider is null)
Expand All @@ -71,7 +71,7 @@ public static ICachedSecretProvider WithCaching(this ISecretProvider secretProvi
/// <param name="secretProvider">An instantiated <see cref="ISecretProvider" /> that will only be called if the value is not cached</param>
/// <returns>A secret provider that caches values</returns>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="secretProvider"/> is <c>null</c>.</exception>
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself")]
[Obsolete("Will be removed in v3.0 in favor of placing the secret caching on the secret store itself", DiagnosticId = ObsoleteDefaults.DiagnosticId)]
public static ICachedSecretProvider WithCaching(this ISecretProvider secretProvider)
{
if (secretProvider is null)
Expand Down
Loading
Loading