Skip to content

Release v1.6.0

Latest
Compare
Choose a tag to compare
@Y-Sindo Y-Sindo released this 16 Sep 06:44
edd4123

Features

  1. Support identity-based connections. Please note it does not work for SignalR Trigger now. After assign the SignalR Service Owner role to your Azure identity, and configure your identity, you don't need connetion string. DefalutAzureCredential and other credentials are supported. The following <CONNECTION_NAME_PREFIX> defaults to AzureSignalRConnectionString, and could be customized with ConnectionStringSetting. Please note that the : in keys at local should be replaced with __ on Azure portal.

    • To use DefaultAzureCredential, set in local.settings.json
      {
        "Values": {
          "<CONNECTION_NAME_PREFIX>:serviceUri": "https://<SIGNALR_RESOURCE_NAME>.service.signalr.net"
        }
      }
      On Azure portal, set as follows:
      <CONNECTION_NAME_PREFIX>__serviceUri=https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
      
    • To use managed-identity, set on Azure portal:
    <CONNECTION_NAME_PREFIX>__serviceUri = https://<SIGNALR_RESOURCE_NAME>.service.signalr.net
    <CONNECTION_NAME_PREFIX>__credential = managedidentity
    <CONNECTION_NAME_PREFIX>__clientId = <client-id>   # With this line, use user-assigned identity, otherwise, use system-assigned identity
    
    • To use Azure application identity,
      • Choice 1
        You could set a serviceUri as well as pre-defined environment variables. For example, on local.settings.json:

        {
          "Values": {
            "<CONNECTION_NAME_PREFIX>:serviceUri": "https://<SIGNALR_RESOURCE_NAME>.service.signalr.net",
            "AZURE_CLIENT_ID":"...",
            "AZURE_CLIENT_SECRET":"...",
            "AZURE_TENANT_ID":"..."
          }
        }
      • Choice 2

        {
          "Values": {
            "<CONNECTION_NAME_PREFIX>:serviceUri": "https://<SIGNALR_RESOURCE_NAME>.service.signalr.net",
            "<CONNECTION_NAME_PREFIX>:clientId": "...",
            "<CONNECTION_NAME_PREFIX>:clientSecret": "...",
            "<CONNECTION_NAME_PREFIX>:tenantId": "..."
          }
        }
  2. Support a global connection string setting for all the SignalR trigger functions in ServerlessHub.
    Usage: Add a SignalRConnection attribute to your class derived from ServerlessHub as follows. Then all the SignalR trigger insides your class will look up the connection string whose key is MyConnection. This setting has higher priority than the function-based setting.

    [SignalRConnection("MyConnection")]
    public class SimpleChat : ServerlessHub
    {
    }