-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Board Review: Add SharedKey/SAS Credential types to Azure.Core (all languages) #1954
Comments
We should discuss together with #1942 |
scheduled for 10/28 |
@lilyjma Can we get a timeline on this, please? We have an SDK upgrade feature that is blocked on this. |
Shared KeyAfter discussion, rather than add a specific namespace Azure
{
public class AzureKeyCredential {
public AzureKeyCredential(string key);
+ public AzureKeyCredential(string name, string key);
+ public string Name { get; }
[EditorBrowsable(EditorBrowsableState.Never)]
public string Key { get; }
public void Update(string key);
+ public void Update(string name, string key);
}
}
Additional topics to discuss:
|
SASWhile Storage currently takes SAS tokens as part of the URI and doesn't distinguish between anonymous auth and using SAS for auth, customers have found the inability to roll SAS tokens to be a pain point. See #1942 for more discussion about scenarios. We're proposing an API that looks like: namespace Azure
{
public class AzureSharedAccessSignatureCredential {
public AzureSharedAccessSignatureCredential(string signature);
[EditorBrowsable(EditorBrowsableState.Never)]
public string Signature { get; }
public void Update(string signature);
}
} Additional topics to discuss:
|
Base TypeFor anyone dealing with multiple types of credentials today, it's annoying that there's no base type. We're on the fence about creating something like: namespace Azure.Core
{
public abstract class AzureCredential { }
public abstract class TokenCredential : AzureCredential { /* ... */ }
}
namespace Azure
{
public class AzureKeyCredential : AzureCredential { /* ... */ }
public class AzureSharedAccessSignatureCredential : AzureCredential { /* ... */ }
} Additional topics to discuss:
|
Recording (MS internal): https://msit.microsoftstream.com/video/0a25a1ff-0400-9fb2-9f3b-f1eb196ee5ee Highlights:
|
@avg-msft : Please take a look at Ted's last comment on the priorities we have now. |
**In this PR:** - Add `AzureSasCredential` per Azure/azure-sdk#1954 - `AzureSasCredential` is the name that has been settled on the end of discussion. - Add `AzureSasCredentialPolicy` that appends SAS to query **Remarks:** - Some service (like storage in the Portal) present SAS with leading "?". This has to be stripped before appending - The validation if serviceUri already contain sas (mentioned [here](Azure/azure-sdk#1954 (comment))) will be responsibility of service clients: - the format varies between services (i.e. Event Grid SAS and Storage SAS are vastly different) - it would be good to fail fast (at client creation) rather than late (at request send). **References** - [.NET PR](Azure/azure-sdk-for-net#17636)
**In this PR:** - Add `AzureSasCredential` per Azure/azure-sdk#1954 - `AzureSasCredential` is the name that has been settled on the end of discussion. - Add `AzureSasCredentialPolicy` that appends SAS to query **Remarks:** - Some service (like storage in the Portal) present SAS with leading "?". This has to be stripped before appending - The validation if serviceUri already contain sas (mentioned [here](Azure/azure-sdk#1954 (comment))) will be responsibility of service clients: - the format varies between services (i.e. Event Grid SAS and Storage SAS are vastly different) - it would be good to fail fast (at client creation) rather than late (at request send). **References** - [.NET PR](Azure/azure-sdk-for-net#17636)
I see the PRs in the .Net, Java and Python repo adding both Also, what is the update on AzureSharedKeyCredential? |
**In this PR:** - Add `AzureSasCredential` per Azure/azure-sdk#1954 - `AzureSasCredential` is the name that has been settled on the end of discussion. - Add `AzureSasCredentialPolicy` that appends SAS to query **Remarks:** - Some service (like storage in the Portal) present SAS with leading "?". This has to be stripped before appending - The validation if serviceUri already contain sas (mentioned [here](Azure/azure-sdk#1954 (comment))) will be responsibility of service clients: - the format varies between services (i.e. Event Grid SAS and Storage SAS are vastly different) - it would be good to fail fast (at client creation) rather than late (at request send). **References** - [.NET PR](Azure/azure-sdk-for-net#17636)
We have several services that support Shared Key and SAS credentials with the same API shape and usage:
I'd like to discuss adding
AzureSharedKeyCredential
andAzureSharedAccessSignatureCredential
in Azure.Core so we don't have multiple copies of each.(I'll edit in API specifics, a possible plan for refreshing SAS tokens automatically, and a plan for integration with the existing StorageSharedKeyCredential)
The text was updated successfully, but these errors were encountered: