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 OnBehalfOfCredential #20451

Merged
merged 13 commits into from
Sep 3, 2021
Merged

Add OnBehalfOfCredential #20451

merged 13 commits into from
Sep 3, 2021

Conversation

chlowell
Copy link
Member

Closes #19308

@chlowell chlowell added Client This issue points to a problem in the data-plane of the library. Azure.Identity labels Aug 27, 2021
:param str user_assertion: the access token the credential will use as the user assertion when requesting
on-behalf-of tokens

:keyword bool allow_multitenant_authentication: when True, enables the credential to acquire tokens from any tenant
Copy link
Member

Choose a reason for hiding this comment

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

If allow_multitenant_authentication is true, is tenant_id still required?

Copy link
Member Author

@chlowell chlowell Aug 30, 2021

Choose a reason for hiding this comment

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

Yes, if only to identify a tenant the service principal is registered in.

_LOGGER = logging.getLogger(__name__)


class OnBehalfOfCredential:
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to inherit from abc.ABC?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. Should this class have an abstract method?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry. I meant AsyncContextManager. I need some coffee. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Right you are. I needed coffee when I wrote this 💤

@chlowell chlowell merged commit 1f3fe27 into Azure:main Sep 3, 2021
@chlowell chlowell deleted the obo-simple branch September 3, 2021 16:15
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Sep 7, 2021
…into switch_to_protocol

* 'main' of https://github.com/Azure/azure-sdk-for-python: (53 commits)
  Smoke test package verification (Azure#20547)
  Update CHANGELOG.md (Azure#20569)
  updating codeowners (Azure#20570)
  Simplify recorded OnBehalfOfCredential tests (Azure#20568)
  Search: update release date (Azure#20564)
  [Exporter] Support redirect response in exporter (Azure#20489)
  [AutoRelease] t2-synapse-2021-09-06-18774 (Azure#20552)
  [AutoRelease] t2-logz-2021-08-26-01773 (Azure#20426)
  [AutoRelease] t2-relay-2021-09-03-32777 (Azure#20530)
  [AutoRelease] t2-resource-2021-09-03-61345 (Azure#20527)
  [AutoRelease] t2-servicefabric-2021-09-02-41879 (Azure#20512)
  [Keyvault] Remove exception message parsing from samples in keys, certificates and secrets (Azure#20540)
  [ACR] Update cloud configuration API (Azure#20464)
  Get rid of generated code (Azure#20536)
  Search: Skill Versions (Azure#20431)
  Check fd is reg file or symlink in get_length before using st_size. (Azure#19725)
  Add OnBehalfOfCredential (Azure#20451)
  Fix incorrect parsing of message from Exception (Azure#20534)
  [Release sdk status] swagger repo default branch changes to `main` (Azure#20529)
  [AutoRelease] t2-rdbms-2021-09-02-91864 (Azure#20513)
  ...
iscai-msft pushed a commit that referenced this pull request Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity 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.

Feature: Add On-Behalf-Of (OBO) Auth Flow for the Microsoft Graph Team
3 participants