Keyvault client fails to get secret after migrating keyvault to another tenant #6818
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
KeyVault
Service Attention
Workflow: This issue is responsible by Azure service team.
We recently migrated our subscription and all resources including keyvault to another tenant. We did setup all necessary permissions but keyvault fails to get secret with below exception.
Operation execution on the AcisRuntime failed.
Error while retrieving key vault certificate. Identifier:MetadataServiceClientAdminCertificate. Path:https://dummyPath/secrets/Dummycert. Error: System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to authenticate to AAD using certificate thumbprints: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Microsoft.Azure.KeyVault.KeyVaultClient.d__cb.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.WindowsAzure.Wapd.Acis.AcisCommon.Secrets.KeyVaultHelper.d__11.MoveNext() in d:\dbs\sh\easl\0616_191330\cmd\2\src\acis\aciscommon\Secrets\KeyVaultHelper.cs:line 120
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.WindowsAzure.Wapd.Acis.AcisCommon.Secrets.KeyVaultHelper.TryGetCertificate(String path, String& base64Cert, String& errorMessage) in d:\dbs\sh\easl\0616_191330\cmd\2\src\acis\aciscommon\Secrets\KeyVaultHelper.cs:line 48
---> (Inner Exception #0) System.Exception: Failed to authenticate to AAD using certificate thumbprints: 2FDAA5F17076A0A28B2A126391513B819A95483B
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Microsoft.Azure.KeyVault.KeyVaultClient.d__cb.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.WindowsAzure.Wapd.Acis.AcisCommon.Secrets.KeyVaultHelper.d__11.MoveNext() in d:\dbs\sh\easl\0616_191330\cmd\2\src\acis\aciscommon\Secrets\KeyVaultHelper.cs:line 120<---
.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.WindowsAzure.Wapd.Acis.SME.Runtime.IAcisRuntimeController.PrepareExtension(String extensionName, String packageIdentifier, String packagePath, String tempCopiedPath, String outputPath, String packageTemp, String endpointName, Boolean isLpuDisabledForExtension, Boolean isSslValidationDisabled, Boolean isPackageUpload, Boolean shouldInstallCert, Boolean shouldValidateExtension, Boolean isSecretLoadScopedToEndpoint)
at Microsoft.WindowsAzure.Wapd.Acis.SME.AcisRuntimeManager.CreateFromStorage(String extensionName, String extensionIdentifier, String endpointName, Boolean createLocalRuntime, String jobId) in d:\dbs\sh\easl\0616_191330\cmd\3\src\acis\acissme\RuntimeManager\AcisRuntimeManager.cs:line 565
at Microsoft.WindowsAzure.Wapd.Acis.SME.AcisRuntimeManager.LoadRuntime(String extensionName, String packageIdentifier, String endpointName, String jobId) in d:\dbs\sh\easl\0616_191330\cmd\3\src\acis\acissme\RuntimeManager\AcisRuntimeManager.cs:line 250
at Microsoft.WindowsAzure.Wapd.Acis.AcisJobManager.GetRuntime(String extensionName, String packageIdentifier, String endpointName, String& runtimeId, String& uniqueJobId) in d:\dbs\sh\easl\0616_191330\cmd\3\src\acis\acissme\RuntimeManager\AcisJobManager.cs:line 242
at Microsoft.WindowsAzure.Wapd.Acis.AcisJobManager.ExecuteOperation(IAcisSMEUser user, String operationId, String extensionName, String packageIdentifier, MetaEndpoint endpoint, String operationFlags, MetaOperation operation, List`1 paramValues, Int32 batchOpIndex, AcisRuntimeStats& stats, Boolean isRhcOperation) in d:\dbs\sh\easl\0616_191330\cmd\3\src\acis\acissme\RuntimeManager\AcisJobManager.cs:line 110
Once we restart all nodes it starts fetching correct authority from path and able to get token.
We tried to force refresh AAD token like below.
still does not work as it looks like KeyvaultClient itself caches the authority extracted from path and I do not see a way to force clear authority cache in KeyvaultClient.
The text was updated successfully, but these errors were encountered: