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

ConfidentialClientApplication federated by a Managed Identity #687

Draft
wants to merge 838 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
838 commits
Select commit Hold shift + click to select a range
2ae2d2c
Fine tune msaltest.py with prompt options
rayluo May 3, 2022
7d7a492
implement response_mode (#469)
eopeter May 12, 2022
0ef4a48
Automatically populate login_hint for easier tests
rayluo May 14, 2022
724746f
Merge branch 'msaltest' into dev
rayluo May 14, 2022
56d80c4
Emit warning when common or organizations is used in acquire_token_fo…
rayluo Nov 5, 2021
ead7d53
Merge pull request #435 from AzureAD/warning-in-acquire-token-for-client
rayluo May 17, 2022
669ac85
Acquire SSH cert from Cloud Shell IMDS
rayluo Oct 18, 2021
c644e57
MSAL Python 1.18.0b1
rayluo May 19, 2022
366e758
Fix typo in code
OvervCW May 30, 2022
a61ca7e
Merge pull request #420 from AzureAD/cloudshell-imds
rayluo May 31, 2022
dd79e93
Merge pull request #475 from AzureAD/release-1.18.0b1
rayluo May 31, 2022
8cb7f8b
MSAL Python 1.18.0
rayluo May 31, 2022
2e36358
Merge pull request #478 from AzureAD/release-1.18.0
rayluo May 31, 2022
a92a15b
Document our findings on addressing CVE-2022-29217
rayluo May 31, 2022
589c0be
Merge pull request #479 from AzureAD/pyjwt
rayluo May 31, 2022
bbd75fd
Disable test for China cloud
rayluo May 31, 2022
89b9da9
Merge branch 'disable-test-for-chinacloud' into dev
rayluo May 31, 2022
7f5bf64
Merge pull request #474 from OvervCW/patch-1
rayluo Jun 3, 2022
b74c08f
Merge remote-tracking branch 'oauth2cli/dev' into oauth2cli-dev
rayluo Jun 3, 2022
a995c05
Merge branch 'oauth2cli-dev' into dev
rayluo Jun 3, 2022
85f4f9e
Tolerate home_account_id to be None
rayluo Jun 8, 2022
6b709b0
Use provided authority port when building the tenant discovery endpoi…
sarathys Jun 29, 2022
0c885c4
Right regional endpoint for login.microsoft.com
rayluo Jun 17, 2022
a60c9a0
Merge pull request #485 from AzureAD/regional-microsoft-com
rayluo Jun 29, 2022
b553a51
Disable more tests for China cloud
rayluo Jun 29, 2022
46cea8a
Merge branch 'disable-test-for-china-cloud' into dev
rayluo Jun 29, 2022
ebfa0d5
Test latest 3.11 beta
tonybaloney Jul 25, 2022
94b53cf
Merge pull request #488 from tonybaloney/patch-2
rayluo Jul 26, 2022
cf6944c
Enable sphinx-paramlinks
rayluo Aug 25, 2022
d885927
Fix doc typo
rayluo Aug 26, 2022
980e898
Merge branch 'doc-param-links' into dev
rayluo Aug 26, 2022
95e523d
Broker (WAM) integration
rayluo Aug 29, 2022
bcefb10
Refine document
rayluo Aug 29, 2022
3773e00
Gracefully handle RuntimeError upfront
rayluo Sep 12, 2022
5ca97ee
Implement instance_discovery only
rayluo Sep 14, 2022
24d243f
Merge pull request #496 from AzureAD/instance-discovery-endpoint
rayluo Sep 19, 2022
a0a1286
MSAL Python 1.19.0
rayluo Sep 20, 2022
81b48ce
Bump up cryptography upperbound
rayluo Sep 20, 2022
45d0dc5
Merge pull request #501 from AzureAD/release-1.19.0
rayluo Sep 21, 2022
639f1b2
Test acquire_token_silent() for confidential client
rayluo Sep 21, 2022
f365f4e
Merge branch 'dev' into wam
rayluo Sep 28, 2022
11675e0
Adopt pymsalruntime 0.13
rayluo Sep 28, 2022
962fb0e
Remove automatic msa-pt for Azure CLI and Visual Studio
rayluo Sep 28, 2022
a08d6cd
Refactor test infrastructure to expose a known bug
rayluo Sep 30, 2022
3696acb
Add more docs
rayluo Oct 7, 2022
ac71fe8
Merge pull request #415 from AzureAD/wam
rayluo Oct 7, 2022
f9ff1a6
MSAL Python 1.20.0
rayluo Oct 7, 2022
0c73724
Update installation instruction
rayluo Oct 7, 2022
273868b
Merge pull request #504 from AzureAD/release-1.20.0
rayluo Oct 7, 2022
8026c02
Test matrix covers Python 3.11
rayluo Nov 2, 2022
efcb399
Merge pull request #512 from AzureAD/test-for-py3.11
rayluo Nov 3, 2022
c79d32e
Switch to new region endpoints
rayluo Nov 14, 2022
61e3ec8
Merge pull request #513 from AzureAD/new-region-endpoint
rayluo Nov 15, 2022
383fcfc
Test only Python versions available on github's ubuntu 22.04
rayluo Dec 8, 2022
4a93a6c
Merge branch 'update-ci' into dev
rayluo Dec 8, 2022
d0e4bb9
Cleaner skip declaration
rayluo Dec 9, 2022
fcb21b9
Merge branch 'refactor-e2e' into dev
rayluo Dec 9, 2022
14a4b79
Fallback to expires_on when expires_in is absent
rayluo Dec 8, 2022
eb8b71f
Merge pull request #519 from AzureAD/support_expires_on
rayluo Dec 9, 2022
6dc0fdd
Show lab api error, useful when trying api params
rayluo Jan 21, 2023
19d6aea
Merge branch 'lab-api-refactor' into dev
rayluo Jan 21, 2023
5dfe85e
Clarify when (not) to read API section
rayluo Oct 21, 2022
21bd422
Use broker for SSH Cert feature
rayluo Nov 10, 2022
918b93f
Merge pull request #515 from AzureAD/enable-msalruntime-for-ssh-cert
rayluo Jan 26, 2023
e8b52b7
Allow using client_id as scope. Needed by B2C.
rayluo Jan 27, 2023
8880918
Merge pull request #530 from AzureAD/allow-client_id-as-scope
rayluo Jan 30, 2023
206cf3e
Bump PyMsalRuntime to 0.13.2+
rayluo Jan 30, 2023
df5fefb
Merge branch 'use-pymsalruntime-0.13.2' into dev
rayluo Jan 31, 2023
8216e2c
MSAL Python 1.21.0
rayluo Jan 31, 2023
7593d08
Merge pull request #532 from AzureAD/release-1.21.0
rayluo Jan 31, 2023
e61e8a0
Remind user to use proper helper for ssh cert test
rayluo Jan 29, 2023
b277002
Merge branch 'refine-ssh-cert-test' into dev
rayluo Jan 30, 2023
7ecf651
point to correct quickstart
Dickson-Mwendia Feb 23, 2023
5cc9cd9
Merge pull request #537 from Dickson-Mwendia/update-doc-references
rayluo Feb 23, 2023
b9ac33f
Fix Markdown link
pamelafox Mar 2, 2023
a5fed26
Merge pull request #540 from pamelafox/patch-2
rayluo Mar 2, 2023
2fb3056
Remove effectiveless in-place clean
rayluo Feb 13, 2023
4673f4d
Merge branch 'cache-without-side-effect' into dev
rayluo Feb 15, 2023
0781ba1
Simplify and easier debugging
rayluo Feb 16, 2023
d4717ed
Merge branch 'refactor-oidc-discovery' into dev
rayluo Feb 17, 2023
8a429bd
Update setup.cfg with documentation URL (#539)
pamelafox Apr 6, 2023
ec4748d
Fix type introduced in #537
rayluo Feb 21, 2023
4b29298
Merge branch 'fix-docs-typo' into dev
rayluo Feb 23, 2023
078a573
Remove a deprecated attribute, scheduled for 1.21+
rayluo Feb 20, 2023
7e6a478
Merge pull request #547 from AzureAD/remove-deprecated-authority-http…
rayluo Apr 14, 2023
89ef015
CIAM end-to-end test cases based on new lab API
rayluo Dec 8, 2022
57c417b
Support https://contoso.ciamlogin.com as authority
rayluo Mar 1, 2023
ae7f40f
Bumping version numbers
rayluo Apr 4, 2023
74752cb
Merge pull request #520 from AzureAD/ciam
rayluo Apr 17, 2023
a0d0f0e
Merge branch 'release-1.22.0' into dev
rayluo Apr 7, 2023
a6023ea
Turns out they changed to a new tag for MSAL. Fix #539
rayluo Mar 30, 2023
d72409c
Merge branch 'fix-stackoverflow-link' into dev
rayluo Mar 31, 2023
a48e22b
Clarify that allow_broker is not applicable to ConfidentialClientAppl…
rayluo Mar 18, 2023
7d83e07
Merge pull request #559 from AzureAD/docs-staging
rayluo May 7, 2023
e1d2318
Merge remote-tracking branch 'oauth2cli/dev' into http-interface-polish
rayluo Mar 14, 2023
3517aed
No need for DummyHttpResponse
rayluo Mar 16, 2023
4a0eb39
Merge branch 'http-interface-polish' into dev
rayluo Mar 21, 2023
bc699f8
Adjustment for new CIAM partition
rayluo Apr 29, 2023
518d04e
Merge pull request #564 from AzureAD/ciam-in-new-partition
rayluo May 24, 2023
d4ca347
Improve logs
rayluo May 26, 2023
2638917
Merge branch 'improve-logs' into dev
rayluo May 30, 2023
634d328
Add more sections into TOC for the now long doc
rayluo May 31, 2023
6fe180f
Remove many Sphinx warnings
rayluo Jun 2, 2023
0d9050c
Merge branch 'docs-staging' into dev
rayluo Jun 6, 2023
97ec665
Github removes Python 2.7 support on 2023-6-19
rayluo Jun 8, 2023
d515d18
Merge branch 'fix-build-error' into dev
rayluo Jun 10, 2023
2184e50
Remove acquire_token_silent(..., account=None) usage in a backward-co…
rayluo Jun 29, 2023
0f635cd
Merge pull request #577 from AzureAD/silent-adjustment
rayluo Jul 22, 2023
0e5c685
Bumping up version numbers
rayluo Jul 12, 2023
7491207
Merge branch 'release-1.23.0' into dev
rayluo Jul 17, 2023
44df9c7
msaltest.py switches from confusing pprint to json
rayluo Jun 14, 2023
dfe4efa
Merge branch 'msaltest-json' into dev
rayluo Jun 15, 2023
76259f9
Switch from setup.py to setup.cfg
rayluo Jun 20, 2023
8d6d6c5
Ship release- branch of a non-draft PR to TestPyPI
rayluo Jun 21, 2023
54b65a2
Surface msal telemetry as a long opaque string
rayluo Jun 23, 2023
d98bb8f
Merge branch 'pipeline-adjustment' into dev
rayluo Jun 22, 2023
450ca64
Use a neutral name to hopefully avoid false alarm
rayluo Jul 24, 2023
4ae433d
Merge pull request #586 from AzureAD/avoid-false-alarm
rayluo Jul 27, 2023
4ca460f
Merge pull request #575 from AzureAD/msalruntime-telemetry
rayluo Aug 9, 2023
c943dc8
Fix typo in test names (warnning → warning)
musicinmybrain Aug 9, 2023
f5d2067
Merge pull request #588 from musicinmybrain/warnning
rayluo Aug 10, 2023
23e3ce2
Explicitly pip cache seems unnecessary
rayluo Jun 27, 2023
e90e36a
Merge branch 'simplify-workflow' into dev
rayluo Jun 28, 2023
546760d
Add enable_pii_log and wire it up with MsalRuntime
rayluo Aug 11, 2023
ca713b4
Merge pull request #590 from AzureAD/enable-pii
rayluo Aug 23, 2023
45d7682
Guarding against perf regression for acquire_token_for_client()
rayluo Jul 3, 2023
a3e6017
Add benchmark action and publish it to gh-pages
rayluo Jul 4, 2023
8d122f1
Merge pull request #580 from AzureAD/benchmark
rayluo Sep 6, 2023
dd9e090
Automatically check cryptography version
rayluo Aug 1, 2023
ae7cf14
Merge branch 'cryptography-ceiling' into dev
rayluo Aug 2, 2023
42516f5
Placeholders in some error will use curly brackets
rayluo Aug 22, 2023
e41b8f1
Merge branch 'improve-error-message' into dev
rayluo Aug 23, 2023
4850c81
Provide guidance on how to DIY the pkcs12-to-pem
rayluo Aug 24, 2023
8624982
Merge branch 'docs-staging' into dev
rayluo Aug 25, 2023
d788a88
Experimental: More precise regression detection
rayluo Aug 17, 2023
de3b757
Merge branch 'perf-baseline' into dev
rayluo Aug 28, 2023
0dd52f0
Refactor SshCert e2e test to use lab user
rayluo Aug 29, 2023
97152d8
E2E test for Azure CLI's connectedk8s AT POP
rayluo Aug 30, 2023
91f0b14
Add POP test function
rayluo Aug 31, 2023
dbd1508
Merge branch 'at-pop-with-external-key' into dev
rayluo Sep 1, 2023
4f146f7
Calls out that each commit triggers a TestPyPI release
rayluo Sep 4, 2023
62050de
Bumping version number
rayluo Sep 7, 2023
9a618ab
Merge branch 'release-1.24.0' into dev
rayluo Sep 11, 2023
841bb0b
CLI tester will be shipped with msal library
rayluo Sep 9, 2023
934414b
Merge branch 'tester' into dev
rayluo Sep 14, 2023
a4b76ab
Fix regression on input order for interactive test
rayluo Sep 10, 2023
1382469
Merge branch 'tester' into dev
rayluo Sep 16, 2023
affe78b
Merge remote-tracking branch 'oauth2cli/dev' into wip
rayluo Sep 3, 2023
0d9e07f
Bumping version number
rayluo Sep 26, 2023
1434c03
Merge branch 'release-1.24.1' into dev
rayluo Sep 29, 2023
82319cf
Mark package as supporting Python 3.12
tonybaloney Oct 6, 2023
a8e3811
Merge pull request #604 from tonybaloney/flag_312
rayluo Oct 6, 2023
e65781a
Remove x-client-cpu
rayluo Oct 6, 2023
593bcad
Merge pull request #605 from AzureAD/remove-x-client-cpu
rayluo Oct 11, 2023
a19f3e4
Resolve warnings node12 deprecation warnings
rayluo Sep 14, 2023
432ccc1
Merge branch 'upgrade-github-actions' into dev
rayluo Sep 21, 2023
395742f
Switch to ReadTheDocs configuration file v2
rayluo Sep 27, 2023
f4dc877
Merge branch 'docs-staging' into dev
rayluo Sep 28, 2023
aac3e26
Merge remote-tracking branch 'oauth2cli/dev' into docker-support
rayluo Oct 10, 2023
90d61ab
Hard code port for testing purpose
rayluo Oct 12, 2023
103a096
Merge branch 'docker-support' into dev
rayluo Oct 24, 2023
c113866
Fix a typo in api reference doc
rayluo Oct 2, 2023
7e2381d
Explain how to use global token cache and app
rayluo Oct 5, 2023
a482d93
Merge branch 'demo-global-token-cache' into dev
rayluo Oct 18, 2023
cf4b0da
Expose token_source for observability
rayluo Oct 19, 2023
e21a83a
Merge branch 'token-source' into dev
rayluo Oct 19, 2023
0b1a2fa
Deprecate allow_broker, use enable_broker_on_windows
rayluo Oct 25, 2023
9be25c1
add triage labels to bug report (#612)
jennyf19 Oct 30, 2023
a11469f
Merge branch 'broker-new-param' into dev
rayluo Oct 30, 2023
29abc4e
Only invoke broker for selected flows (grants)
rayluo Nov 2, 2023
5a6edde
Merge pull request #569 from AzureAD/device-flow-and-msal-runtime
rayluo Nov 3, 2023
943c75e
MSAL Python 1.25
rayluo Nov 6, 2023
1d9a426
Add more docs
rayluo Nov 9, 2023
87417a5
Merge pull request #621 from AzureAD/release-1.25.0
rayluo Nov 10, 2023
631472b
Remove newlines from description.
micwoj92 Nov 18, 2023
e50d86f
Merge pull request #626 from micwoj92/patch-1
rayluo Nov 23, 2023
63911a7
#629 - skip region discory when region=None (#630)
bgavrilMS Dec 1, 2023
fb182b7
AT POP for Public Client based on broker (#511)
rayluo Dec 5, 2023
b546cfe
Prepare 1.26 release
rayluo Nov 29, 2023
8e81f76
Merge branch 'release-1.26.0' into dev
rayluo Nov 29, 2023
6788901
Update issue templates (#642)
bgavrilMS Dec 20, 2023
ae5b467
Merge branch 'oauth2cli/dev' to close #546
rayluo Dec 25, 2023
827e934
AT POP with SHR is tested with Graph end-to-end
rayluo Dec 28, 2023
50aad3c
Sort scopes before writing to token cache
rayluo Jan 2, 2024
a044379
O(1) happy path for access token hits
rayluo Jan 5, 2024
5688654
Might as well refactor a _get_app_metadata()
rayluo Jan 6, 2024
d1bf3fe
Merge pull request #644 from AzureAD/order-scopes
rayluo Jan 9, 2024
817fe8f
Prevent crash on token_cache.find(..., query=None)
rayluo Jan 9, 2024
7415c4d
Merge branch 'order-scopes' into dev
rayluo Jan 10, 2024
b8f9fe3
Attempts account removal from broker first
rayluo Jan 18, 2024
f9616b1
Adding docs for PopAuthScheme
rayluo Jan 19, 2024
0017b0f
Tested with latest cryptography 42.x
rayluo Jan 22, 2024
d3dd97e
Mention instance_discovery instead of validate_authority in an error …
rayluo Feb 22, 2023
3848c58
Merge remote-tracking branch 'oauth2cli/dev' into oauth2
rayluo Jan 29, 2024
6571e62
Tolerate ID token time errors
rayluo Jan 26, 2024
d5d88ce
Merge pull request #657 from AzureAD/id-token-adjustment
rayluo Jan 29, 2024
90a3e07
Provide examples for B2C and CIAM
rayluo May 15, 2023
0072f9d
Give a hint on where the client_id came from
rayluo Feb 3, 2024
bf2f1fe
Merge pull request #661 from AzureAD/document-client-id
rayluo Feb 6, 2024
1b77385
Allow github action to write perf result into repo
rayluo Feb 1, 2024
b718929
Adding attributes that were not auto documented
rayluo Feb 27, 2023
67baae5
Implement remove_tokens_for_client()
rayluo Feb 7, 2024
4f99373
Remove premature int(...)
rayluo Mar 10, 2023
656cc95
MSAL's fallback-from-broker behavior remains a FAQ
rayluo Jun 5, 2023
63f85e0
Change back to use print(result) in error path
rayluo Oct 31, 2023
d07e5d2
CCA can be tested by: python -m msal
rayluo Feb 8, 2024
6aa91cf
Pick up latest PyMsalRuntime 0.14.x
rayluo Feb 9, 2024
835ec07
Don't use bare except when importing (#667)
Singletoned Feb 22, 2024
1f064a9
Releasing 1.27
rayluo Dec 21, 2023
18db82d
update the default broker redirect uri
iulico-1 Mar 1, 2024
757b2ce
Merge pull request #673 from AzureAD/iulico/update-broker-default-red…
rayluo Mar 6, 2024
af5cdd5
Rebrand from AAD to Microsoft Entra (#655)
SHERMANOUKO Mar 11, 2024
341ca90
Implements a new optional oidc_authority parameter
rayluo Feb 27, 2024
cb47ad6
A semi-auto script to test Azure CLI with broker
rayluo Mar 5, 2024
b6ea305
MSAL Python 1.28.0
rayluo Mar 13, 2024
1bc2a47
Convert most built-in samples from json to dotenv
rayluo Jul 15, 2023
caf8480
client_credential has its link in RTD now. Finally.
rayluo Jul 25, 2023
cde68a4
Add CODEOWNERS file (#689)
pmaytak Apr 15, 2024
bef12b7
Should have used the constant instead of a raw str
rayluo Dec 8, 2023
0cec70f
Merges remote-tracking branch and fixes #516
rayluo Apr 21, 2023
79f2381
Upgrade action's versions and also enable cache
rayluo Nov 14, 2023
c5cc6e0
Suggests to use XDG_RUNTIME_DIR for token cache
rayluo Apr 18, 2024
3c6628f
Support reading CCA cert from a pfx file. Tested.
rayluo May 3, 2024
00107fb
Lab API changed since May 14, 2024
rayluo May 24, 2024
c0c385c
No longer need to fake device code flow endpoint
rayluo Aug 3, 2023
cf68d13
Promote TokenCache._find() to TokenCache.search()
rayluo Apr 12, 2024
d2d2373
Update the ENV VAR hints in the top of test_e2e.py
rayluo May 28, 2024
6dea928
Pick up PyMsalRuntime 0.16.x
rayluo Jun 7, 2024
deb9fe1
Adapting to a lab change introduced today
rayluo Jun 11, 2024
255bf80
Merge branch 'release-1.28.1' into dev
rayluo Jun 12, 2024
b31360d
Read credential from pfx
rayluo Jun 5, 2024
6ebaa80
Enable public client ROPC via broker. On Windows, ROPC will call WAM; on
fengga Jun 17, 2024
c7ec8a8
Remove a fallback which ends up breaking tests now
rayluo Jun 19, 2024
27e1bf7
Improve error message to fix 710
rayluo Jun 14, 2024
964972e
Merge branch 'dev' into enable-ROPC-via-broker
fengga Jun 19, 2024
a2c189e
Merge pull request #712 from AzureAD/enable-ROPC-via-broker
fengga Jun 20, 2024
a0bf53e
Managed Identity implementation
rayluo Feb 22, 2023
750d8ff
Refactor throttling and add it to Managed Identity
rayluo Apr 20, 2024
ba00804
Use a short throttling threshold for MI (and CCA)
rayluo Apr 22, 2024
c7c9dc4
Managed Identity for Machine Learning
rayluo Apr 23, 2024
44434c8
Implementation based on feature requirement
rayluo May 24, 2024
565f175
get_managed_identity_source() for Azure Identity
rayluo May 1, 2024
828b4b8
Merge branch 'mi' into dev
rayluo Jun 13, 2024
34fa99f
MSAL Python 1.29.0
rayluo Jun 18, 2024
c0bd219
The old test app was somehow disabled
rayluo Jun 25, 2024
a86a6c8
Update ROPC broker related tests (#714)
fengga Jun 27, 2024
8267056
Add the missing token query check
rayluo Jun 27, 2024
2663232
Merge branch 'dev' into bugfix-token-cache-search
rayluo Jul 3, 2024
3d80726
CCA federated by managed identity
rayluo Nov 14, 2023
9ad2ad2
TODO
rayluo Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug] "
labels: needs attention, untriaged
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to our [off-the-shelf samples](https://github.com/AzureAD/microsoft-authentication-library-for-python/tree/dev/sample) and pick one that is closest to your usage scenario. You should not need to modify the sample.
2. Follow the description of the sample, typically at the beginning of it, to prepare a `config.json` containing your test configurations
3. Run such sample, typically by `python sample.py config.json`
4. See the error
5. In this bug report, tell us the sample you choose, paste the content of the config.json with your test setup (which you can choose to skip your credentials, and/or mail it to our developer's email).

**Expected behavior**
A clear and concise description of what you expected to happen.

**What you see instead**
Paste the sample output, or add screenshots to help explain your problem.

**The MSAL Python version you are using**
Paste the output of this
`python -c "import msal; print(msal.__version__)"`

**Additional context**
Add any other context about the problem here.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature request
description: Suggest a new feature for MSAL Python.
labels: ["feature request", "untriaged", "needs attention"]
title : '[Feature Request] '
body:
- type: markdown
attributes:
value: |
## Before submitting your feature request
Please make sure that your question or issue is not already covered in [MSAL documentation](https://learn.microsoft.com/entra/msal/python/) or [samples](https://learn.microsoft.com/azure/active-directory/develop/sample-v2-code?tabs=apptype).

- type: markdown
attributes:
value: |
## Feature request for MSAL Python

- type: dropdown
attributes:
label: MSAL client type
description: Are you using Public Client (desktop apps, CLI apps) or Confidential Client (web apps, web APIs, service-to-service, managed identity)?
multiple: true
options:
- "Public"
- "Confidential"
validations:
required: true

- type: textarea
attributes:
label: Problem Statement
description: "Describe the problem or context for this feature request."
validations:
required: true

- type: textarea
attributes:
label: Proposed solution
description: "Describe the solution you'd like."
validations:
required: false
133 changes: 133 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI/CD

on:
push:
pull_request:
branches: [ dev ]

# This guards against unknown PR until a community member vet it and label it.
types: [ labeled ]

jobs:
ci:
env:
# Fake a TRAVIS env so that the pre-existing test cases would behave like before
TRAVIS: true
LAB_APP_CLIENT_ID: ${{ secrets.LAB_APP_CLIENT_ID }}
LAB_APP_CLIENT_SECRET: ${{ secrets.LAB_APP_CLIENT_SECRET }}
LAB_APP_CLIENT_CERT_BASE64: ${{ secrets.LAB_APP_CLIENT_CERT_BASE64 }}
LAB_APP_CLIENT_CERT_PFX_PATH: lab_cert.pfx
LAB_OBO_CLIENT_SECRET: ${{ secrets.LAB_OBO_CLIENT_SECRET }}
LAB_OBO_CONFIDENTIAL_CLIENT_ID: ${{ secrets.LAB_OBO_CONFIDENTIAL_CLIENT_ID }}
LAB_OBO_PUBLIC_CLIENT_ID: ${{ secrets.LAB_OBO_PUBLIC_CLIENT_ID }}

# Derived from https://docs.github.com/en/actions/guides/building-and-testing-python#starting-with-the-python-workflow-template
runs-on: ubuntu-latest # It switched to 22.04 shortly after 2022-Nov-8
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
# It automatically takes care of pip cache, according to
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#about-caching-workflow-dependencies
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Populate lab cert.pfx
# https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#storing-base64-binary-blobs-as-secrets
run: echo $LAB_APP_CLIENT_CERT_BASE64 | base64 -d > $LAB_APP_CLIENT_CERT_PFX_PATH
- name: Test with pytest
run: pytest --benchmark-skip
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

cb:
# Benchmark only after the correctness has been tested by CI,
# and then run benchmark only once (sampling with only one Python version).
needs: ci
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Setup an updatable cache for Performance Baselines
uses: actions/cache@v4
with:
path: .perf.baseline
key: ${{ runner.os }}-performance-${{ hashFiles('tests/test_benchmark.py') }}
restore-keys: ${{ runner.os }}-performance-
- name: Run benchmark
run: pytest --benchmark-only --benchmark-json benchmark.json --log-cli-level INFO tests/test_benchmark.py
- name: Render benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'pytest'
output-file-path: benchmark.json
fail-on-alert: true
- name: Publish Gibhub Pages
run: git push origin gh-pages

cd:
needs: ci
# Note: github.event.pull_request.draft == false WON'T WORK in "if" statement,
# because the triggered event is a push, not a pull_request.
# This means each commit will trigger a release on TestPyPI.
# Those releases will only succeed when each push has a new version number: a1, a2, a3, etc.
if: |
github.event_name == 'push' &&
(
startsWith(github.ref, 'refs/tags') ||
startsWith(github.ref, 'refs/heads/release-')
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: Build a package for release
run: |
python -m pip install build --user
python -m build --sdist --wheel --outdir dist/ .
- name: |
Publish to TestPyPI when pushing to release-* branch.
You better test with a1, a2, b1, b2 releases first.
uses: pypa/[email protected]
if: startsWith(github.ref, 'refs/heads/release-')
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI when tagged
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ src/build

# Virtual Environments
/env*

.venv/
docs/_build/
# Visual Studio Files
/.vs/*
/tests/.vs/*
Expand All @@ -56,3 +57,6 @@ src/build
# The test configuration file(s) could potentially contain credentials
tests/config.json


.env
.perf.baseline
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,43 @@ python:
- "2.7"
- "3.5"
- "3.6"
# Borrowed from https://github.com/travis-ci/travis-ci/issues/9815
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- python: 3.8
dist: xenial
sudo: true

install:
- pip install -r requirements.txt
script:
- python -m unittest discover -s tests

deploy:
- # test pypi
provider: pypi
distributions: "sdist bdist_wheel"
server: https://test.pypi.org/legacy/
user: "nugetaad"
password:
secure: KkjKySJujYxx31B15mlAZr2Jo4P99LcrMj3uON/X/WMXAqYVcVsYJ6JSzUvpNnCAgk+1hc24Qp6nibQHV824yiK+eG4qV+lpzkEEedkRx6NOW/h09OkT+pOSVMs0kcIhz7FzqChpl+jf6ZZpb13yJpQg2LoZIA4g8UdYHHFidWt4m5u1FZ9LPCqQ0OT3gnKK4qb0HIDaECfz5GYzrelLLces0PPwj1+X5eb38xUVtbkA1UJKLGKI882D8Rq5eBdbnDGsfDnF6oU+EBnGZ7o6HVQLdBgagDoVdx7yoXyntULeNxTENMTOZJEJbncQwxRgeEqJWXTTEW57O6Jo5uiHEpJA9lAePlRbS+z6BPDlnQogqOdTsYS0XMfOpYE0/r3cbtPUjETOmGYQxjQzfrFBfM7jaWnUquymZRYqCQ66VDo3I/ykNOCoM9qTmWt5L/MFfOZyoxLHnDThZBdJ3GXHfbivg+v+vOfY1gG8e2H2lQY+/LIMIJibF+MS4lJgrB81dcNdBzyxMNByuWQjSL1TY7un0QzcRcZz2NLrFGg8+9d67LQq4mK5ySimc6zdgnanuROU02vGr1EApT6D/qUItiulFgWqInNKrFXE9q74UP/WSooZPoLa3Du8y5s4eKerYYHQy5eSfIC8xKKDU8MSgoZhwQhCUP46G9Nsty0PYQc=
on:
branch: master
tags: false
condition: $TRAVIS_PYTHON_VERSION = "2.7"

- # production pypi
provider: pypi
distributions: "sdist bdist_wheel"
user: "nugetaad"
password:
secure: KkjKySJujYxx31B15mlAZr2Jo4P99LcrMj3uON/X/WMXAqYVcVsYJ6JSzUvpNnCAgk+1hc24Qp6nibQHV824yiK+eG4qV+lpzkEEedkRx6NOW/h09OkT+pOSVMs0kcIhz7FzqChpl+jf6ZZpb13yJpQg2LoZIA4g8UdYHHFidWt4m5u1FZ9LPCqQ0OT3gnKK4qb0HIDaECfz5GYzrelLLces0PPwj1+X5eb38xUVtbkA1UJKLGKI882D8Rq5eBdbnDGsfDnF6oU+EBnGZ7o6HVQLdBgagDoVdx7yoXyntULeNxTENMTOZJEJbncQwxRgeEqJWXTTEW57O6Jo5uiHEpJA9lAePlRbS+z6BPDlnQogqOdTsYS0XMfOpYE0/r3cbtPUjETOmGYQxjQzfrFBfM7jaWnUquymZRYqCQ66VDo3I/ykNOCoM9qTmWt5L/MFfOZyoxLHnDThZBdJ3GXHfbivg+v+vOfY1gG8e2H2lQY+/LIMIJibF+MS4lJgrB81dcNdBzyxMNByuWQjSL1TY7un0QzcRcZz2NLrFGg8+9d67LQq4mK5ySimc6zdgnanuROU02vGr1EApT6D/qUItiulFgWqInNKrFXE9q74UP/WSooZPoLa3Du8y5s4eKerYYHQy5eSfIC8xKKDU8MSgoZhwQhCUP46G9Nsty0PYQc=
on:
branch: master
tags: true
condition: $TRAVIS_PYTHON_VERSION = "2.7"

1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @AzureAD/id4s-msal-team
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
The MIT License (MIT)

Copyright (c) Microsoft Corporation.
All rights reserved.

This code is licensed under the MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading
Loading