-
following #4262 and the recent issues we had with workload Identity and token rotation
looking forward to hear your opinion. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey!
Yeah, sadly the golang SDKs iaren't like dotnet SDK. ServiceBus is the first one which uses the azidentity SDK, that's why we have multiple implementations around the same code, because we try to the maximum amount of code that we can. Azure-sdk-for-go is growing and I hope that soon more serivices will be avilable using that SDK.
Yes, this is true for an app with a single authentication, but KEDA supports multiple authentication at the same time. That's why we require the knowledge about the authentication method. If we follow the approach for regular apps, a single identity can be used with a single authentication mechanism. For example, the issue about using different MSIs wouldn't have solution if KEDA hadn't known about the pod identity mechanism because that was the issue indeed, KEDA used the first successfully method.
The only wrap that we use is for msi and is because they recommended us to do it. We needed to reduce the authentication timeout like they do "magically" with DefaultAzureCredential, but they modify and internal property. We asked them and that's their suggestion, wrapping their code to apply the timeout. The other cases are the full implementation of the auth mechanism because it wasn't supported and we wanted to support pod identities even thought the old SDKs don't do it, eg: https://github.com/kedacore/keda/blob/main/pkg/scalers/azure/azure_aad_podidentity.go#L42
This code isn't used in ServiceBus scaler, is used in other scalers which don't use azindeity SDK, so we need to handle the token. BTW, we aren't saving them into files, we are reading the projected volume with the service account token
We cannot use
I think this is already answered, for new SDKs with azidentity support, we don't handle the token at all.
I think this is already answered, we need to do it because otherwise KEDA is attached to a single identity with a single mechanism. This means that the use case that you have with some scalers with AAD-pod-identity and some scalers with WI wouldn't be possible, the first match would be used. KEDA isn't a single app where you can limit the access easily. From administration POV, not having the option to defined identities or authentication mechanism could mean a lot of permission stacked in the same identity with arbitraty access from people in the cluster (the same identity would have to be used for all the teams because
This is exactly the reason. Old SDKs don't support azidenity SDK
Agreed. That's why we check azure-sdk-for-go and we want to update all the scalers with the new SDK once it has support for them and that's why we actively check the new support. IMO, the new approach using azindentity is the correct approach. It's the same that MSFT uses in other languages like dotnet, but currently the ecosystem is too much heterogeneous, that's the reason for having all that code. Now, my opinion about this: The identity management in golang is a mess, in general, the support for azure in golang is really poor, luckily, it has been becoming better during the last months, but it's terrible. I'd like to unify all the scalers around azindetity SDK, but that means to remove the working code and create new code wrapping the azidentity code, which IMO doesn't add any value because I'd need to adapt the new code to the old SDKs, adding new possibilities of bugs during the process. I hope this has clarified a bit the situation |
Beta Was this translation helpful? Give feedback.
-
Got It ! |
Beta Was this translation helpful? Give feedback.
Hey!
There are good questions, and I'm going to try to answer them :)
Yeah, sadly the golang SDKs iaren't like dotnet SDK. ServiceBus is the first one which uses the azidentity SDK, that's why we have multiple implementations around the same code, because we try to the maximum amount of code that we can. Azure-sdk-for-go is growing and I hope that soon more serivices will be avilable using that SDK.