Skip to content

Managed Identity Support #712

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

Merged
merged 54 commits into from
Mar 25, 2024
Merged

Managed Identity Support #712

merged 54 commits into from
Mar 25, 2024

Conversation

neha-bhargava
Copy link
Collaborator

Managed identity feature branch.

neha-bhargava and others added 30 commits June 20, 2023 13:22
Missed to add these changes to the merged PR
* Refactor the Application class hierarchy to better separate Public/ConfidentialClientApplication and ManagedIdentityApplication

* Refactor ManagedIdentity classes to better follow Java best-practices, reduce use of public scope, and generally match the library's existing code styles

* Merge cloud shell changes

* Address code review comments

* Move instance discovery and region fields back into AbstractClientApplicationBase only

* Better grouping of public vs. non-public APIs
* Add static token cache to ManagedIdentityApplication

* Add TokenSource and AuthenticationResultMetadata
* Add azure arc managed identity

* Removed lenient from mock and merge conflicts

* Clear cache in unit tests

* Fix after manual testing

* Update the log message

* Service Fabric MSI (#729)

* Support for service fabric, most tests working

* TODOs and sonarlint recommendations

* Address PR comments

---------

Co-authored-by: Avery-Dunn <[email protected]>
Co-authored-by: Avery-Dunn <[email protected]>
* Fix bug with error response parsing

* Cover both error message types in unit test
…tion-library-for-java into nebharg/MSI

# Conflicts:
#	README.md
#	changelog.txt
#	msal4j-sdk/README.md
#	msal4j-sdk/bnd.bnd
#	msal4j-sdk/pom.xml
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/AuthenticationErrorCode.java
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/AuthenticationResult.java
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/PublicClientApplication.java
#	msal4j-sdk/src/samples/msal-b2c-web-sample/pom.xml
#	msal4j-sdk/src/samples/msal-obo-sample/pom.xml
#	msal4j-sdk/src/samples/msal-web-sample/pom.xml
* Move changelog to root

* Update issue templates (#707)

* Re-add lombok source line (#705)

* Version changes for release 1.13.11 (#714)

* Update bug report

* Delete .github/ISSUE_TEMPLATE/bug_report.md

* Update bug_report.yaml

* Create FeatureRequest.yaml

* Update FeatureRequest.yaml

* Set default throttling time to 5 sec (#721)

Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

* MSAL Java/MSALRuntime integration (#590)

* Add IBroker implementation for MSALRuntime

* Remove dll used during testing

* Integrate broker steps to relevant flows in PublicClientApplication

* Add logic to cancel MsalRuntimeFutures

* Expand javadocs and exception handling

* Address code review comments

* Simplify future chaining, address code review comments

* Reorganize future chaining, fix testing issues

* Adjust how broker availability is checked

* Create automated test

* Adjust startup logic

* Correct version number for interop

* Correct broker versioning

* Move broker tests to MSAL Java package

* Remove usage of msal4j-brokers from msal4j

* Add missing SLFJ dependency

* Use newest msal4j

* Bump javamsalruntime version number

* Version changes for 1.14.0-beta release (#589)

* Add missing pom info needed by sonatype

* APIs for toggling MSALRuntime's logging (#608)

* Add APIs for toggling MSALRuntime's logging systems

* Rename logging methods to be more clear

* Add support for POP tokens to MSAL Java and MSAL Java Brokers (#639)

* Version changes for 1.14.0-beta release

* regional endpoint change to always use login.microsoft.com

* Add support for both current and legacy B2C authority formats (#594)

* Add support for both current and legacy B2C authority formats

* Fix B2C format test

* add 2 seconds timeout while calling IMDS

* Fix failing tests

* Fix failing tests

* delete commented out code

* Use the dedicated admin consent endpoint instead of a query parameter (#599)

* updated versions for release

* update condition to throw exception

* added test for invalid authority

* Add tests for a CIAM user and reduce test code duplication (#603)

* Add tests for a CIAM user and reduce code duplication in several test files

* Revert changed method name

* Attempt to resolve credscan flag

* Resolve credscan issues

* Address code review comments

* Use default scope

* expose extraQueryParameters

* expose extraQueryParameters

* ExtraQueryParameters tests

* retrigger the tests

* Updated an existing test case to check added parameters

* Replace exception with warning

* version updates for release

* update json-smart version

* Updated json-smart version 

Updated json-smart version to a 'bug-free' version

* version updates for release

* Initial commit

* add CIAM authority file

* revert authority validation changes

* Fix failing tests

* Fix failing tests

* remove commented out line

* remove unnecessary code

* update exception message for device code flow

* add refresh_in logic

* resolve build issues + address PR comments

* update tests

* updated org-json version to resolve Dependabot alert

* Better redirect URI error handling and dependency upgrade (#633)

* Better error handling for redirect URIs

* Update oauth2-oidc-sdk dependency

* Address review comments

Co-authored-by: Bogdan Gavril <[email protected]>

---------

Co-authored-by: Bogdan Gavril <[email protected]>

* Version updates for 1.13.8 release (#634)

* Version updates for 1.13.8 release

* Update changelog.txt

* Point to MSAL Java reference docs onboarded to Microsoft Learn

* Add support for POP tokens to MSAL Java and MSAL Java Brokers

* Send extraQueryParameters to interop's AuthParameters

* Avoid exposing new PopParameters class, change API to match design doc

* Update msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/InteractiveRequestParameters.java

Co-authored-by: Bogdan Gavril <[email protected]>

* Update msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/InteractiveRequestParameters.java

Co-authored-by: Bogdan Gavril <[email protected]>

* Update change log URl in README.md (#649)

Replaced broken link in change log reference with msal4j-sdk/changelog.txt

* Issue 447

* Feedback incorporation

* enum for os type

* Use enum for HTTP methods

* Add broker tests, address PR review comments

* Improve PoP tests

* Address code review comments

* Version updates

* Re-add extraQueryParameters support

---------

Co-authored-by: siddhijain <[email protected]>
Co-authored-by: Bogdan Gavril <[email protected]>
Co-authored-by: Dickson Mwendia <[email protected]>
Co-authored-by: Tamas Csizmadia <[email protected]>

* Fix silent issue

* Ensure correlation ID is never null

* Broker fixes and feedback (#733)

* Delete codeql.yml

* Test framework update (#672)

* Initial working tests

* Remove CIAM extra query parameter

* Fix failing tests

* Remove duplicate unit tests

* Remove duplicate unit tests

* Update tests with mocking to use Mockito

* Remove testng and powermock, add junit and mockito

* Remove AbstractMsalTests and PowerMockTestCase

* Fix mistaken null check

* Properly scope dependency

* Update CIAM tests (#673)

* Bump guava from 31.1-jre to 32.0.0-jre in /msal4j-sdk (#671)

Bumps [guava](https://github.com/google/guava) from 31.1-jre to 32.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Avery-Dunn <[email protected]>

* Delete contributing.md (#667)

Co-authored-by: Avery-Dunn <[email protected]>

* Create Contributing.md (#668)

Co-authored-by: Avery-Dunn <[email protected]>

* Version changes for 1.13.9 (#674)

* Add space between command and arguments when executing linux command to open browser. Refs #682 (#683)

Co-authored-by: Ric Emery <[email protected]>

* Assorted fixes (#684)

* Remove default timeouts and improve exception messages

* Fix NPE for on-prem ADFS scenario

* Log MSAL message but re-throw exception

* Update vulnerable test dependency

* Issue-679: Fix for Account Cache; .contains() was not possible and you had to iterate through all elements as workaround. (#681)

* Version changes for 1.13.10 (#685)

* Move changelog

* Move changelog to root

* Update issue templates (#707)

* Re-add lombok source line (#705)

* Version changes for release 1.13.11 (#714)

* Update bug report

* Delete .github/ISSUE_TEMPLATE/bug_report.md

* Update bug_report.yaml

* Create FeatureRequest.yaml

* Update FeatureRequest.yaml

* Set default throttling time to 5 sec (#721)

Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

* Ensure correlation ID is never null

* Rename MsalRuntimeBroker and add builder pattern for better API consistency

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Bogdan Gavril <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Maximilian Pfeffer <[email protected]>
Co-authored-by: akulyakhtin <[email protected]>
Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

* Version changes for msal4j-brokers 1.0.3-beta and msal4j 1.14.3-beta (#734)

* Ensure correlation ID is never null

* Version changes for msal4j-brokers 1.0.3-beta and msal4j 1.14.3-beta

* Ensure that builder values for supported OS's are used

* Release 1.14.0/1.0.0 version changes (#736)

* Delete codeql.yml

* Test framework update (#672)

* Initial working tests

* Remove CIAM extra query parameter

* Fix failing tests

* Remove duplicate unit tests

* Remove duplicate unit tests

* Update tests with mocking to use Mockito

* Remove testng and powermock, add junit and mockito

* Remove AbstractMsalTests and PowerMockTestCase

* Fix mistaken null check

* Properly scope dependency

* Update CIAM tests (#673)

* Bump guava from 31.1-jre to 32.0.0-jre in /msal4j-sdk (#671)

Bumps [guava](https://github.com/google/guava) from 31.1-jre to 32.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Avery-Dunn <[email protected]>

* Delete contributing.md (#667)

Co-authored-by: Avery-Dunn <[email protected]>

* Create Contributing.md (#668)

Co-authored-by: Avery-Dunn <[email protected]>

* Version changes for 1.13.9 (#674)

* Add space between command and arguments when executing linux command to open browser. Refs #682 (#683)

Co-authored-by: Ric Emery <[email protected]>

* Assorted fixes (#684)

* Remove default timeouts and improve exception messages

* Fix NPE for on-prem ADFS scenario

* Log MSAL message but re-throw exception

* Update vulnerable test dependency

* Issue-679: Fix for Account Cache; .contains() was not possible and you had to iterate through all elements as workaround. (#681)

* Version changes for 1.13.10 (#685)

* Move changelog

* Move changelog to root

* Update issue templates (#707)

* Re-add lombok source line (#705)

* Version changes for release 1.13.11 (#714)

* Update bug report

* Delete .github/ISSUE_TEMPLATE/bug_report.md

* Update bug_report.yaml

* Create FeatureRequest.yaml

* Update FeatureRequest.yaml

* Set default throttling time to 5 sec (#721)

Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

* Version changes for 1.14.0 msal4j and 1.0.0 msal4j-brokers

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Bogdan Gavril <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Maximilian Pfeffer <[email protected]>
Co-authored-by: akulyakhtin <[email protected]>
Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: siddhijain <[email protected]>
Co-authored-by: Bogdan Gavril <[email protected]>
Co-authored-by: Dickson Mwendia <[email protected]>
Co-authored-by: Tamas Csizmadia <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Maximilian Pfeffer <[email protected]>
Co-authored-by: akulyakhtin <[email protected]>
Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>

* Version changes for 1.14.0 msal4j

* Bump org.json:json in /msal4j-sdk/src/samples/msal-obo-sample (#740)

Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20230227 to 20231013.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.json:json in /msal4j-sdk/src/samples/msal-b2c-web-sample (#739)

Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20230227 to 20231013.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.json:json in /msal4j-sdk/src/samples/msal-web-sample (#737)

Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20230227 to 20231013.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Version updates for 1.14.4-beta release

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Bogdan Gavril <[email protected]>
Co-authored-by: akulyakhtin <[email protected]>
Co-authored-by: Kulyakhtin, Alexander (Ext) <[email protected]>
Co-authored-by: siddhijain <[email protected]>
Co-authored-by: Dickson Mwendia <[email protected]>
Co-authored-by: Tamas Csizmadia <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Ric Emery <[email protected]>
Co-authored-by: Maximilian Pfeffer <[email protected]>
Avery-Dunn and others added 22 commits February 26, 2024 17:18
Managed Identity - Logging and exception improvements
Add Managed Identity retry logic
…thentication-library-for-java into avdunn/cert-service-fabric

# Conflicts:
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/HttpHelper.java
Adjust retry policy for Managed Identity flows
Add resource to header in Cloud Shell flow
…tion-library-for-java into nebharg/MSI

# Conflicts:
#	README.md
#	changelog.txt
#	msal4j-sdk/README.md
#	msal4j-sdk/bnd.bnd
#	msal4j-sdk/pom.xml
#	msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/AadInstanceDiscoveryProvider.java
#	msal4j-sdk/src/samples/msal-b2c-web-sample/pom.xml
#	msal4j-sdk/src/samples/msal-obo-sample/pom.xml
#	msal4j-sdk/src/samples/msal-web-sample/pom.xml
@Avery-Dunn Avery-Dunn marked this pull request as ready for review March 25, 2024 22:03
@Avery-Dunn Avery-Dunn self-requested a review March 25, 2024 22:03
@Avery-Dunn Avery-Dunn changed the title Nebharg/msi Managed Identity Support Mar 25, 2024
@Avery-Dunn Avery-Dunn merged commit 36b7490 into dev Mar 25, 2024
4 of 5 checks passed
@Avery-Dunn Avery-Dunn deleted the nebharg/MSI branch July 15, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants