Skip to content
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

Add support for API Keys authentication with Twilio Binding #8039

Open
Swimburger opened this issue Jan 7, 2022 · 5 comments
Open

Add support for API Keys authentication with Twilio Binding #8039

Swimburger opened this issue Jan 7, 2022 · 5 comments
Assignees
Labels
Milestone

Comments

@Swimburger
Copy link

What problem would the feature you're requesting solve? Please describe.

Currently, the Twilio binding requires you to use the account SID and the account auth token.
This is the quickest way to authenticate, but a better way is to use Twilio API keys.
You can read more about switching to API keys with C# here: https://www.twilio.com/blog/better-twilio-authentication-csharp-twilio-api-keys

Describe the solution you'd like

Add a property or properties to support API keys. In Twilio's SDK the arguments to authenticate are username, password, and account SID.
To authenticate using account SID and account auth token, you'd pass in account sid to the username, and the account auth token to the password.
To authenticate using API keys, you'd pass in the API key SID to the username, and the API key secret to the password, and the account SID to accountSid.
Since the Twilio attribute for the Azure Function binding uses different property names, you probably can't follow the same naming convention without a breaking change.

I'd suggest adding 2 new properties to make this as explicit as possible without breaking changes.

  • TwilioApiKeySid
  • TwilioApiKeySecret

If those are filled out, you know the user wants to use API key authentication. Or even more explicitly, you could add an enum property to switch between the two types of auth.

Describe alternatives you've considered

I tried using the API key SID and API key secret as account SID and auth token in the binding, but that didn't work.

@ghost ghost assigned satvu Jan 7, 2022
@v-bbalaiagar v-bbalaiagar self-assigned this Jan 10, 2022
@v-bbalaiagar
Copy link

Hi @Swimburger , Thank you for your feedback! We will check for the possibilities internally and update you with the findings.

@v-bbalaiagar
Copy link

Hi @Swimburger , Opened a new issue for further insights - twilio/twilio-csharp#593. Closing this issue here.

@Swimburger
Copy link
Author

I'm confused why an issue would be opened at Twilio's C# SDK repo, it already supports what I am suggesting which is described in the article I referenced. This is a feature request for the Twilio binding for Azure Functions, not for the Twilio C# SDK.

@v-bbalaiagar
Copy link

Hi @Swimburger , Apologies for the confusion. We will investigate this further and update you with the findings.

@v-bbalaiagar
Copy link

Hi @Swimburger , I checked this internally. Adding this issue as a feature request to consider this in future implementations.

@v-bbalaiagar v-bbalaiagar added this to the Backlog milestone Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants