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

Implement an Event Hubs Shared Access Key Credential #16466

Closed
jsquire opened this issue Oct 16, 2020 · 4 comments
Closed

Implement an Event Hubs Shared Access Key Credential #16466

jsquire opened this issue Oct 16, 2020 · 4 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@jsquire
Copy link
Member

jsquire commented Oct 16, 2020

Summary

Event Hubs allows for authorization using a shared key and shared access signature that is currently only supported when using a connection string. To align with best practices, we would like to guide library users to down the path of using Identity credentials for production applications. In order to provide a unified approach to authorization around the use of a credential for all scenarios, a service-specific credential type that mimics the API of the TokenCredential is desirable.

Scope of Work

  • Design and implementation of a EventHubsSharedAccessKeyCredential type where the API mimics the TokenCredential form.

  • The credential should NOT derive from TokenCredential to avoid accidentally attempting to use it with another service.

  • The credential should support creation using a shared key name and shared key value combination.

  • The credential should support creation using a shared access signature.

  • The credential should allow the shared key and value or the shared access signature to be updated without stopping or recreating the associated clients.

  • The proposed surface area of the credential, as well as changes to the client API to accept it should be reviewed with the language architect, and approval obtained. Full board review is not necessary.

Success Criteria

  • The design of a credential type detailed by the scope has been completed and approved by the language architect.

  • The credential has been implemented according to the design and is exposed as part of the public API of the library.

  • All clients that accept a TokenCredential also accept the new EventHubsSharedAccessKeyCredential in a similar manner,

  • The tests necessary for its validation have been created or adjusted and pass reliably.

  • The existing test suite continues to produce deterministic results and pass reliably.

References

@jsquire jsquire added Event Hubs Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. labels Oct 16, 2020
@ramya-rao-a ramya-rao-a added this to the Backlog milestone Oct 20, 2020
@ramya-rao-a ramya-rao-a removed the needs-team-triage Workflow: This issue needs the team to triage. label Oct 20, 2020
@ramya-rao-a ramya-rao-a modified the milestones: Backlog, [2021] May Apr 7, 2021
@YijunXieMS YijunXieMS modified the milestones: [2021] May, [2021] June Apr 27, 2021
@conniey conniey assigned tzhanl and unassigned YijunXieMS Apr 27, 2021
@ramya-rao-a
Copy link
Contributor

The scope of this task has changed since the last 6 months.
Latest update:

AzureNamedKeyCredential and AzureSasCredential classes were added to Azure Core in the past few months. This task is to ensure that the client builders in Event Hubs support these classes as overloads to the existing credential() builder.

The name and key in AzureNamedKeyCredential are to be used just like how the SharedAccessKeyName and SharedAccessKey parts of the connection string in the connectionString() builder get used

The signature in AzureSasCredential class is to be used just like how the SharedAccessSignature part of the connection string in the connectionString() builder gets used.

cc @joshfree, @YijunXieMS, @conniey, @hemanttanwar

@v-xuto
Copy link
Member

v-xuto commented Jun 10, 2021

PR #21228 merged, could we close this issue?

@jsquire
Copy link
Member Author

jsquire commented Jun 10, 2021

could we close this issue?

Thanks, @v-xuto. Seems reasonable to me; closing out. @conniey: feel free to reopen if you think there's more that needs to be done.

@jsquire jsquire closed this as completed Jun 10, 2021
@conniey
Copy link
Member

conniey commented Jun 10, 2021

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

6 participants