Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

I'm not able to see which branch is for latest version of V3 version (3.7.5) #379

Open apescione opened 3 years ago

apescione commented 3 years ago

It's not a bug, but I'm not able to find out the branch where is the code for version 3.7.5 (latest https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmos/3.7.5)

I need to create a pull request to provide an enhancement for this library (already present on V4), because I cannot adopt the v4 at the moment in my project.

kushagraThapar commented 3 years ago

@apescione - We really recommend using the latest Cosmos V4 SDK. v3 has not been maintained for a while now. It has many issues, which all of them have already been resolved on V4. I would strongly push for V4 migration, rather v3 update. Also, most of the public surface area is similar in V3 and V4. And this migration guide can help you too with the upgrade - https://docs.microsoft.com/en-us/azure/cosmos-db/migrate-java-v4-sdk?tabs=java-v4-async

apescione commented 3 years ago

Hi @kushagraThapar , I'd like to migrate to V4, but in this release, many APIs (so feature) that we are using have become internal, so I cannot use them anymore. One of this is com.azure.cosmos.implementation.CosmosAuthorizationTokenResolver, for security reasons, it's fundamental for me and so that, I'm not able to upgrade. Could you move this in public APIs? Anyway, where is the branch of 3.7.5 ?

kushagraThapar commented 3 years ago

@apescione - CosmosAuthorizationTokenResolver is deprecated and removed in V4. Instead we introduced the functionality of AAD, which has also been exposed for spring-data-cosmos. @milismsft can you please provide more information on AAD usage ?

@apescione - regarding cosmos V3 SDK - this is the branch we use for hotfix releases - which are not being done any more. In case you want to look up for specific code piece or any implementation details - here it is - https://github.com/Azure/azure-sdk-for-java/tree/release/cosmos_v3

milismsft commented 3 years ago

@apescione please take a look at https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac The documentation in the link above provides you with steps on how to set specific roles and access permissions for your account containers.

apescione commented 3 years ago

Hi @milismsft, I already saw and tried the new feature, but it's still in preview, so it's not still possible to use in production. When do you think it will be General Availability?

@kushagraThapar, as you can see, I'm in the middle ground, I can't improve the old one, either migrate to the new one. But, it's different if I could create a pull request on this branch: https://github.com/Azure/azure-sdk-for-java/tree/release/cosmos_v3

Let me know if this approach can be fine for you.

milismsft commented 3 years ago

@apescione The Cosmos DB AAD feature will be GA very soon, couple months from now at most and the chances we will make any changes into the feature between now and GA are very slim. IMHO it's best to start by migrating your code to V4 version of the CosmosDB Java SDK, incorporate the AAD authentication and test your code to make sure everything works as expected.