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

Shared credential #10509

Merged
merged 12 commits into from
Mar 30, 2020
Merged

Shared credential #10509

merged 12 commits into from
Mar 30, 2020

Conversation

iscai-msft
Copy link
Contributor

@iscai-msft iscai-msft commented Mar 25, 2020

Created a shared AzureKeyCredential and AzureKeyCredentialPolicy

Will create later PRs in TextAnalytics and Search that use this AzureKeyCredential instead of their own key credentials

fixes #10529

@iscai-msft iscai-msft added Client This issue points to a problem in the data-plane of the library. Azure.Core labels Mar 25, 2020
@iscai-msft iscai-msft self-assigned this Mar 25, 2020
@adxsdk6
Copy link

adxsdk6 commented Mar 25, 2020

Can one of the admins verify this patch?

…into shared_credential

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  regenerated resource graph (Azure#10450)
  Release azure mgmt rdbms (Azure#10498)
  [Compute] Manual release for 2019-12-01 (Azure#10433)
  Wrap variable length time.sleeps in a helper such that they don't fail if already expired. (Azure#10511)
  Move archetype-python-release.yml into the public repo (Azure#10212)
  Give complete response to IMDS probe in tests (Azure#10504)
  Fix failing servicebus tests (Azure#10457)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10506)
maririos
maririos previously approved these changes Mar 26, 2020
…into shared_credential

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  Update install link
  [Event Hubs]  Put uamqp.Message.properties into EventData.system_properties (Azure#10508)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10531)
  Prevent DefaultAzureCredential changing authentication method (Azure#10349)
  Update Batch Data plane (Azure#10477)
maririos
maririos previously approved these changes Mar 27, 2020
xiangyan99
xiangyan99 previously approved these changes Mar 27, 2020
@@ -28,3 +29,45 @@ def get_token(self, *scopes, **kwargs):
from collections import namedtuple

AccessToken = namedtuple("AccessToken", ["token", "expires_on"])

__all__ = ["AzureKeyCredential"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for? AccessToken is public.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then AccessToken should also be in __all__

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added AccessToken to the all in credentials.py

sdk/core/azure-core/tests/test_authentication.py Outdated Show resolved Hide resolved
sdk/core/azure-core/tests/test_authentication.py Outdated Show resolved Hide resolved
sdk/core/azure-core/tests/test_authentication.py Outdated Show resolved Hide resolved
johanste
johanste previously approved these changes Mar 27, 2020
@iscai-msft iscai-msft merged commit c695902 into Azure:master Mar 30, 2020
@iscai-msft iscai-msft deleted the shared_credential branch March 30, 2020 17:00
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Mar 30, 2020
…into shared_credential_ta

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  Shared credential (Azure#10509)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10557)
  add back preparer (Azure#10558)
  initial release (Azure#10545)
  Release azure mgmt storage (Azure#10525)
  [Event Hubs] Update sample README to use absolute path (Azure#10556)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10550)
  update the javascript to currectly select the latest version as if we're in the latest folder (Azure#10544)
  ensure the change doesn't break anything (Azure#10541)
  locking dev reqs (Azure#10536)
  removed await_prepared_test from async tests (Azure#10548)
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Mar 30, 2020
…into shared_credential_search

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  Shared credential (Azure#10509)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10557)
  add back preparer (Azure#10558)
  initial release (Azure#10545)
  Release azure mgmt storage (Azure#10525)
  [Event Hubs] Update sample README to use absolute path (Azure#10556)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10550)
  update the javascript to currectly select the latest version as if we're in the latest folder (Azure#10544)
  ensure the change doesn't break anything (Azure#10541)
  locking dev reqs (Azure#10536)
  removed await_prepared_test from async tests (Azure#10548)
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Mar 31, 2020
…into regenerate_v3_ta

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  [text analytics] Use AzureKeyCredential from core instead of TextAnalyticsKeyCredential (Azure#10528)
  Enable TransportType.AmqpOverWebsocket for ServiceBus (Azure#10012)
  Install tools packages in dev requirements from regression test branch (Azure#10575)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10570)
  Shared credential (Azure#10509)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10557)
  add back preparer (Azure#10558)
  initial release (Azure#10545)
  Release azure mgmt storage (Azure#10525)
  [Event Hubs] Update sample README to use absolute path (Azure#10556)
  Sync eng/common directory with azure-sdk-tools repository (Azure#10550)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] create AzureKeyCredential and policy
8 participants