microsoft / azure-load-testing

MIT License
22 stars 2 forks source link

[BUG] Azure load test with keyvault : error "Keystore file not found, loading empty keystore" #74

Closed AL1055188 closed 2 years ago

AL1055188 commented 2 years ago

I've tried using KeyVault in Azure Load Testing, following the steps described at https://docs.microsoft.com/en-us/azure/load-testing/how-to-parameterize-load-tests#secrets, but the test run was stuck in Executing Status.

I have tried running a jmx file with no Secret parameter and it works fine with no issues.

Steps To Reproduce

Enabled the user assigned managed identity for my Load Testing resource Create a KeyVault with a secret Added the UMI to the KeyVault Access Policies with all Secret Permissions

I add on my https request a token = ${__GetSecret(......)}

Actual Result: the error is "Keystore file not found, loading empty keystore"

Sachid26 commented 2 years ago

Thank you for reporting this issue. We are looking into this and inform back once we have something.

ninallam commented 2 years ago

Hi @AL1055188 can you please share the test run ID for us to debug further? You can find that in the share URL in the Azure portal as shown below. Can you also help us understand if your JMX needs a key store file and what are you trying to do with this? image

AL1055188 commented 2 years ago

Hi @ninallam I share with you the link of the test : Link I don't want to use key store file. I really want to implement this part : https://docs.microsoft.com/en-us/azure/load-testing/how-to-parameterize-load-tests#akv_secrets

ninallam commented 2 years ago

@AL1055188 Thanks for this. Are you able to see test results in the dashboard? Is the test run still stuck in executing?

AL1055188 commented 2 years ago

It is always the same error 401 unauthorized image

ninallam commented 2 years ago

We will get back on this.

ninallam commented 2 years ago

@AL1055188 can you please confirm if you have added the correct secret URL while configuring the load test?

AL1055188 commented 2 years ago

I confirm : image

ninallam commented 2 years ago

@AL1055188 We could not find Get Secret Function in your JMX script. Can you confirm if you have added that? Is it possible to share the JMX script?

ninallam commented 2 years ago

Hi @AL1055188 can you please confirm the above? Are you using Get Secret in the JMX as mentioned here?https://docs.microsoft.com/en-us/azure/load-testing/how-to-parameterize-load-tests#jmeter_secrets

AL1055188 commented 2 years ago

Yes I confim that I use GetSecret method. We find a way. When there was no oauth2, it works fine ! the problem came from oauth2 which had to configure the calls to retrieve the token and launch the test.