-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update SignalR Functions extension to support Azure.Identity #238
Comments
You can use AAD connection string in SignalR Service binding. See |
No, that only gets me Managed Identity support. With Azure.Identity we get much more than that, including all of the credential types derived from TokenCredential, AzureCliCredential, etc. Have a look at the new extensions for Event Grid, Event Hub, Service Bus and Storage for implementation ideas. |
Is to create a |
@pakrym @JoshLove-msft Could you please provide @Y-Sindo with guidance on how to implement Azure.Identity for the SignalR extension? Should they also look at moving it in to the mono-repo? |
Yes, you just need to create and use the TokenCredential based on the IConfiguration. |
@AlexGhiondea what do you think about moving the SignalR extension to the mono repo? |
I think moving makes a lot of sense. Other extensions are there, free infrastructure is there. |
@Y-Sindo - Do you own this? Would like to discuss. Thanks |
@jongio Sure, already ping you on teams. |
tested this out, seems to work for sends. should add to list at https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference#connection-properties and related signalr docs. |
i'm new to signalr and this specific function binding extension, but i am somewhat randomly getting
not sure if this is identity related, but seems like random failures would be reported elsewhere. seemingly happens after i don't do anything for a few minutes with signalr, a subsequent send immediately after seems to work. this is running local with a VS provided credential. i see no entries in the live trace tool. |
@drdamour Thanks for your testing. Could you give me your SignalR resource ID and a time span when the error occurred so that we could investigate the issue? If your resource ID contains sensitive information, you could send it to this email: zityang AT microsoft.com |
usos1sig01-advisor-test and the errors 9/24 2pm - 6 pm MT |
@Y-Sindo any luck figuring out a cause? |
just got it again MT
|
@drdamour Your resource happens to be located at a known problematic cluster, and we are still investigating into it. Now we have moved your resource to another cluster. Could you please validate if the problem mitigates? |
Any update on this? It would be nice to get Managed Identity working when developing with SignalR locally |
@kensykora It's already supported. Please upgrade to 1.7.0. FYI:
|
@Y-Sindo I reviewed your docs, and tried making some changes, but am experiencing the same result. Can you help me figure out what the correct settings are then? It is not working for me. Functions version: When I use the connection string: local.settings.json {
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureSignalRConnectionString": "Endpoint=https://mytestservice.service.signalr.net;AuthType=aad;Version=1.0;",
"AzureSignalRConnectionString__credential": "managedidentity" // I've tried with & without this, same results
},
"ConnectionStrings": {}
} And using this function: Function.cs namespace CSharp
{
public class Function : ServerlessHub
{
[FunctionName("negotiate")]
public Task<SignalRConnectionInfo> NegotiateAsync([HttpTrigger(AuthorizationLevel.Anonymous)] HttpRequest req)
{
return NegotiateAsync(new NegotiationOptions());
}
}
} Calling negotiate endpoint results in:
However I've confirmed that my az cli user is logged in and has the role SignalR Service Owner Calls to send messages from within a simple timer function using
So I'm confused how it's supposed to work. What am I missing? |
@kensykora Your configuration mixes two kinds of configuration styles together. And what you need is Azure Cli identity instead of managed identity.
|
@Y-Sindo thanks for following up -- I tried as you suggested and am running into the same thing. I'll open up a separate issue. |
Right now the only way to connect to SignalRService is via connection string, which causes the developer to have to store the connection string in a secret store.
The SignalR service supports managed identity.
We should update the SignalRService binding to also support Azure Identity.
Tracking issue: Azure/azure-sdk-for-net#21446
The text was updated successfully, but these errors were encountered: