-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support Spring Boot 2.4 (generally, but especially for AzureAD authentication) #18121
Comments
Hi, @chrisburrell , now the After #17808 merged, we will release a new GA version, then the problem will be fixed. Next GA version will be released before the end of 2021.01. |
@chenrujun as ticket which you mentioned is probably not valid (those versions are incompatible) do you have some workaround for now how to use spring-boot 2.4.x with azure spring boot (we are using currently azure-spring-boot-bom 2.3.5)? |
@bilak , we just released
We will release Refs: https://repo.maven.apache.org/maven2/com/azure/spring/azure-spring-boot-starter-active-directory/ |
@chenrujun I've just write to this issue because It has in name general spring boot 2.4 and I want to upgrade to spring boot 2.4. It's shame that I can't, even when spring boot 2.4 is out for more than 2 months 👎 |
Sorry that we faced some problem when upgrade to spring boot 2.4.0. You can choose one of the options:
|
Hi,
Best regards, |
Hi, @Tcharl .
Do you mean you are using Web on Reactive Stack? We do not support reactive for our starters now. |
However, I succeed to use spring-boot-oauth2-client instead of azad dedicated library (what's the added value of the microsoft one?). App Insight sdk is the last problematic one... |
We support other functions like:
Refs:
|
+1 on this. Spring Boot 2.4.2 with Azure SDK results in the following classnotfound exception (oidc version used in Azure is too old):
Please upgrade the following dependencies: <dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
<version>${oauth2-oidc-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
</dependency> Got it working by using the following versions: (both spring oauth2 AND Azure SDK work in this case)
Hope you guys will update this quickly as it's a dirty hack / difficult to maintain to have discrepancies in maven dependencies. |
@jloisel . |
Thanks! You can upgrade to Spring Boot |
@jloisel
They are just patch version update. It's easy to us to update patch version. |
@chenrujun any news with release compatible with spring boot 2.4.x? |
If everything goes well, we will release new version with compatible with spring-boot 2.4.x at the end of this month. Here are more details:
|
reactor-core |
@jloisel This month's regular release have finished for some modules in this repo. So we can not support spring-boot 2.4.x until next month's regular release. |
@chenrujun so we have next month, what is the status please? Are we going to wait next mont? :D |
@bilak |
@chenrujun what about other libraries? |
@bilak other libraries will be released, too. For spring-boot 2.4. |
Hey @chenrujun, are you folks still on target for a March release or are we looking at mid-April now? |
@raniemi , on March release. |
Looks like 3.3.0 was released 🎉 |
Closing this issue because 3.3.0 is released, which support spring-boot:2.4.3. |
This is not solved as other azure artifacts rely on adal4j: Which in turn is still depending on an old version of |
Sorry I can't get your point. |
Standalone Azure client still does depend on it: We're using Azure client: <dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.40.0</version>
</dependency> And it still transitively depends on adal4j, which in turn depends on old versions of oidc and nimbus. A simple search shows there is still some code depending on adal4j in various locations: I've spend some time trying to understand which dependency to use to start / stop vms on Azure, but it's really puzzling given how many artifacts there are. The migration guide doesn't explicit which dependencies to use either, it just contains some code. EDIT: Found some samples: Seems like we need to use client 2.x. |
Hi, @jloisel Why are you using
Do you mean now you want to use |
Hi, We thought it was the right client to use, but we were wrong. I have migrated our codebase to use We use Azure client to start / stop instances on Azure automatically based on our client needs. |
Hi, @saragluna . Do we have track 2 library to start / stop instances on Azure? |
Is the |
We used track 1 library until now. That's why we had issues with nimbus / oidc conflicts in Spring boot: @Override
public AzureClient newClient(final AzureAccount account) {
final ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(
account.getClientId(),
account.getTenantId(),
account.getClientSecret(),
ENVS.getOrDefault(account.getEnvironment(), AZURE));
final Authenticated auth = Azure.authenticate(credentials);
final Azure c = auth.withSubscription(account.getSubscriptionId());
return new ImmutableAzureClient(
c.disks(),
c.networks(),
c.virtualMachines(),
c.publicIPAddresses(),
c.networkInterfaces(),
c.galleries()
); Now we use track 2 client: @Override
public AzureClient newClient(final AzureAccount acc) {
final TokenCredential credential = new ClientSecretCredentialBuilder()
.clientId(acc.getClientId())
.clientSecret(acc.getClientSecret())
.tenantId(acc.getTenantId())
.build();
final AzureEnvironment env = ENVS.getOrDefault(acc.getEnvironment(), AZURE);
final AzureProfile profile = new AzureProfile(acc.getTenantId(), acc.getSubscriptionId(), env);
final ComputeManager compute = ComputeManager
.configure()
.withLogLevel(BASIC)
.authenticate(credential, profile);
final NetworkManager network = NetworkManager
.configure()
.withLogLevel(BASIC)
.authenticate(credential, profile);
return new ImmutableAzureClient(
compute.disks(),
network.networks(),
compute.virtualMachines(),
network.publicIpAddresses(),
network.networkInterfaces(),
compute.galleries()
); We switched from using |
@jloisel |
It's working fine now. 👍 |
Rebase Microsoft.SQL in Main Branch (Azure#18428) * Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview * Updates readme * Updates API version in new specs and examples * update sql default tag to composite-v5 (Azure#17143) * Updated Blob Auditing API Files (Azure#17355) * Updated Blob Auditing API Files * Fixed new property name case * fixing x-ms-enum lint warning Co-authored-by: Mukesh Dogra <[email protected]> * Adding swagger for endpoint certificates (Azure#17156) * Adding swagger for endpoint certificates * Fix the year * Fix build error on the pull request * Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (Azure#17881) * Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs * Fix to Swagger ModelValidation failures * Removing the 201 from Database Upsert operation since it is not a long running operation. * Change the name of the API to AdvancedThreatProtectionSettings * Fix to the renaming to AdvancedThreatProtectionSettings * Remove old files * Adding ManagedServerDnsAliases API endpoints (Azure#18008) * change * Update readme.md * error 201 * Revert "Update readme.md" This reverts commit ceff39a406eefda1ed38c6188fd9d2eb271053ab. * Revert "error 201" This reverts commit 759fa4f92e9967d72060485aa36d7a1b62a9d227. * Fixed bad reverts Co-authored-by: Ji Wang <[email protected]> * Add 201 response example so SQL clients can work correctly (Azure#18121) * Add examples for cross sub restore (Azure#18135) * Release Microsoft.sql 2021 11 01 preview (Azure#18005) * update swagger files and example files * update readme.md * address the pipeline error. * update the reference. * address the pipeline error * address x-ms-secret comments * update error message * revert the deleted legacy files; avoid breaking changes. * remove example files and reference. * remove secret * Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview * Updates readme * Updates API version in new specs and examples * update sql default tag to composite-v5 (Azure#17143) * Updated Blob Auditing API Files (Azure#17355) * Updated Blob Auditing API Files * Fixed new property name case * fixing x-ms-enum lint warning Co-authored-by: Mukesh Dogra <[email protected]> * Adding swagger for endpoint certificates (Azure#17156) * Adding swagger for endpoint certificates * Fix the year * Fix build error on the pull request * Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (Azure#17881) * Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs * Fix to Swagger ModelValidation failures * Removing the 201 from Database Upsert operation since it is not a long running operation. * Change the name of the API to AdvancedThreatProtectionSettings * Fix to the renaming to AdvancedThreatProtectionSettings * Remove old files * update swagger files and example files * update readme.md * address the pipeline error. * resolove the conflict * address the pipeline error * address x-ms-secret comments * update error message * revert the deleted legacy files; avoid breaking changes. * remove example files and reference. * remove secret Co-authored-by: Zhenglai Zhang <[email protected]> Co-authored-by: msdogra <[email protected]> Co-authored-by: Mukesh Dogra <[email protected]> Co-authored-by: srmarkov <[email protected]> Co-authored-by: Uriel Cohen <[email protected]> Co-authored-by: Marko Nikolic <[email protected]> Co-authored-by: Andrija Cicovic <[email protected]> Co-authored-by: Ishan Rajesh Madan <[email protected]>
hi all, sorry I might be missing something here but I am facing same issue with spring boot 2.6.6. Could anyone please summarize whats the fix ? |
Hi, @rahul-mb . |
Hi
I'm upgrading my app to Spring Boot 2.4.1 but have unfortunately hit a dependency issue.
I've downgraded the nimbus library to 7.1 as per other posts, but it seems that spring security itself is relying on a different version. There wasn't a ticket about this per-se and keen to see if there's an easy resolution whilst (#17808 or #17986 are being worked on). I wasn't sure that #17808 definitely fixes the problem - but is there a solution in the meantime?
Relevant parts from my pom files:
The app now starts up (didn't without the downgrade to 7.9 nimbus) but it now fails on the authentication/authorisation process:
The text was updated successfully, but these errors were encountered: