Coder Social home page Coder Social logo

azurekeyvaultexplorer's Introduction

bigKey Azure Key Vault Explorer

Azure Key Vault Explorer - be productive when working with secrets!

Authors: Eli Zeitlin, Gokhan Ozhan, Anna Zeitlin
Contact: [Azure Key Vault Explorer Developers](mailto:Azure Key Vault Explorer Developers [email protected]>)

Table of Contents

Key features

  • Best user experience for authentication, you will be prompted at most once to enter your credentials
  • All types of authentications are supported: Certificate, Secret and User based with 2FA (including PHX or GME)
  • One click activation, just run this: https://aka.ms/ve?vault://[ENTER HERE YOUR VAULT NAME]
  • Support single or dual vaults
  • Upload and download certificate (.pfx, .p12 and .cer) files
  • Import and export certificates to user or machine stores in just few clicks
  • Support both secret based certitifactes and new Azure Key Vault Certificates, for more details see here: http://aka.ms/kvssl
  • Secret compression, to allow secrets which are bigger than 25 KB limit
  • Drag and Drop of certificates and secrets to / from Windows Explorer or another instance of Vault Explorer
  • Copy secret to clipboard for a configurable short time, just hit Ctrl + C
  • Share certificate or secret in a safely manner, by copying link (Ctrl + Shift + C) to the item and pasting it anywhere (email, IM, desktop, etc.)
  • Export all or selected items to .tsv file for future analysis or reporting
  • Favorite items per vault
  • Explore your vaults and access policy from your subscriptions
  • Open PowerShell session with currently selected vaults and quickly automate things
  • Fast regex based search to quickly find the secret by any metadata
  • Customizable regex based secret kinds to verify secret name and value and auto extract non-secret info to Tags, plus guide use with secret value template
  • Custom required and optional tags per secret
  • Custom tags as columns in the list view (Right click on columns header bar)
  • Syntax highlight for well-known formats, such as: json, xml, config
  • Build it auditing for all operations
  • Disable or expiry item in a click of a button
  • Default and maximum expiration per seceret kind and different coloring based on expiration period left
  • Certificate and secret revision control, rollback to previous value with just a click
  • Quickly detects duplication of secrets
  • Generate secure password, new guid or new api key as a secret value with single click
  • Usage telemetry and diagnostic instrumentation
  • Auto update of the bits

How to add or open new vaults

There are 4 ways how you can make Vault Explorer to work with your vaults:

  1. In case Vault Explorer is not installed on the box, you may just run: https://aka.ms/ve?vault://[ENTER HERE YOUR VAULT NAME]
  2. In case Vault Explorer already installed on the box, you can just hit Win+R type vault://[ENTER HERE YOUR VAULT NAME] and hit Enter
    • Note: The above two methods do NOT allow for alternative account login
  3. Run Vault Explorer, open vault combo box, select last item "Pick vault from subscription..."
  4. Below is the recommended way, as it gives you a full control around vaults, aliases, access and secret kinds.
    Just complete the below fairly easy manual steps once:
  • Run Vault Explorer
  • Click on Settings, then go to About tab, and hit Install Location.
  • Copy Vaults.json, SecretKinds.json, CustomTags.json and VaultAliases.json (see below in the Configuration section what these files are)
  • Put all four files in some local folder let say "C:\Users<YourAlias>\My Documents\VaultExplorerConfig" or some share folder which will be accessible to your team
  • Edit each file accordingly, read the Configuration section below
  • Go back to Options tab in the Settings dialog, and change "Root location" from .\ to point to where you put all four files
  • Hit OK button

Keyboard and mouse shortcuts

  • Drag with Left mouse button - initiate drag & drop operation with basic item information (name and value only)
  • Drag with Ctrl + Left mouse button - initiate drag & drop operation with all item information (name, value, tags, attributes)
  • Drag with Ctrl + Shift + Left mouse button - initiate drag & drop operation as a link to the item (also known as shortcut)
  • F1 - open help
  • F5 - refresh list
  • Insert - add new item
  • Delete - delete item(s)
  • Enter - edit item
  • Ctrl + A - select all items
  • Ctrl + C - copy item value to clipboard for some time (configurable)
  • Ctrl + Shift + C - copy link to the selected item in the following format: https://aka.ms/ve?vault://vaultName/collection/itemName/version
  • Ctrl + D - add item to favorites / remove item from favorites
  • Ctrl + E - edit item
  • Ctrl + F - find items
  • Ctrl + R - refresh list
  • Ctrl + S - save item to file

Configuration

There are five configuration files which controls Vault Explorer behaviour.

Vaults.json

Defines a dictionary of vault names and how access is gained. This is especially useful if the account that is running Vault Explorer does not have access to certain vaults. Customize this file to add credentials for specific vaults. Otherwise, editing this file is optional if the current account has access to the specified vault. Vault names are used later in VaultAliases.json. Vault Explorer uses only ReadWrite access. Supported Vault Access types are:

  • VaultAccessClientCertificate - client id (application id) in AzureAD will be selected with right certificate thumbprint (sha1) of the application's principal to get the access
  • VaultAccessClientCredential - client id and client secret will be used to get the access
  • VaultAccessUserInteractive - client id (powershell app id) and user credentials will be used to get the access. By default [your alias]@microsoft.com is used, in case you would like to use another domain (for example gme.gbl), just add the key "DomainHint": "gme.gbl", if you would like to use an alternate account to login, add the key "UserAliasType": "Alt"

In case of dual vaults (primary and secondary) use $id and $ref to avoid duplication. Here an example for dual vault configuration.

{
  "myVault": {
    "$id": "1",
    "ReadOnly": [
      {
        "$type": "Microsoft.Vault.Library.VaultAccessClientCertificate, Microsoft.Vault.Library",
        "ClientId": "00000000-0000-0000-aaaa-aaaaaaaaaaaa",
		"CertificateThumbprint": "0000000000000000000000000000000000000000"
      }
    ],
    "ReadWrite": [
      {
        "$type": "Microsoft.Vault.Library.Vault.VaultAccessClientCertificate, Microsoft.Vault.Library",
        "ClientId": "00000000-0000-0000-aaaa-aaaaaaaaaaaa",
        "CertificateThumbprint": "0000000000000000000000000000000000000000"
      },
      {
        "$type": "Microsoft.Vault.Library.VaultAccessClientCredential, Microsoft.Vault.Library",
        "ClientId": "00000000-0000-0000-aaaa-aaaaaaaaaaaa",
        "ClientSecret": "aXRoIEJhc2U2NCBmb3Jtsdfsdf5534YXQ/IFRoZW4="
      },
      {
        "$type": "Microsoft.Vault.Library.VaultAccessUserInteractive, Microsoft.Vault.Library",
        "DomainHint": "xxx.yyy",
        "UserAliasType": "Alt" 
      }
    ]
  },
  "myVault": {
    "$ref": "1"
  }
}

VaultAliases.json

Defines a list of vault aliases that can be used to quickly access certain vaults. VaultNames do not need to be defined in Vaults.json. Each vault alias is a simple class with the following properties:

  • Alias - nice alias for the vault(s)
  • VaultNames - array with single or dual vault names that may be defined in Vaults.json, specifying the vault in Vaults.json is not required if the current account has access to the vault(s).
  • SecretKinds - array with at least one secret kind which are defined in SecretKinds.json, this controls which secret kinds are allowed for the vault(s)

Here an example for vault alias element in the array:

  {
    "Alias": "Test Alias",
    "VaultNames": [ "myVault1", "myVault2" ],
    "SecretKinds": [ "Custom", "Service.Secret" ]
  },

Here is an example of a single vault not defined in Vaults.json

  {
    "Alias": "DEV",
    "VaultNames": [ "TestKeyVault" ]
  }

vaultalises

SecretKinds.json

Defines a dictionary of different secret kinds. Secret kind names can be used in VaultAliases.json to limit the types of secrets available in a certain vault. Selecting a Secret Kind will also add a SecretKind custom tag to the secret that can be referenced by external programs and scripts. By default, any new Secret is a Custom secret and the SecretKind tag will not be populated. Secret Kind is a simple class with the following properties:

  • Alias - secret kind alias, presented in the secret kind list in New/Edit secret dialog.
  • Description - secret kind description, used as a tool tip in the secret kind list and link in New/Edit secret dialog.
  • NameRegex - valid secret name regular expression (case sensitive). NameRegex must be a "subset" of the following regex ^[0-9a-zA-Z-]{1,127}$
  • ValueRegex - valid secret value regular expression (case sensitive). Each named group value will be auto-extracted to appropriate Tag of the secret (tag name will the the group name and tag value will be the matched string in this group). ValueRegex can be longer than 25KB, if one wants to allow secret compression ContentType = application/x-json-gzb64
  • ValueTemplate - optional field, which guides the user how the secret should look like. Will be used during new secret flow.
  • RequiredCustomTags - optional field, which contain array of required custom tags that must be present as part of the secret kind, see CustomTags.json
  • OptionalCustomTags - optional field, which contain array of optional custom tags that may be present as part of the secret kind, see CustomTags.json
  • DefaultExpiration - optional field. Controls default expiration interval for the new secret.
  • MaxExpiration - optional field. Controls maximum allowed expiration interval for the secret.

Here an example for storage account secret kind:

  "My.StorageAccount": {
    "Alias": "Storage Account",
    "Description": "Azure storage account connection string in the following format: DefaultEndpointsProtocol=[http|https];AccountName=<myAccountName>;AccountKey=<myAccountKey>",
    "NameRegex": "^sa-(?<AccountName>[0-9a-z]{3,24})(?<Region>|-cus|-eus|-eus2|-ugi|-ugv|-ncu|-scu|-wus|-neu|-weu|-eas|-sas|-ejp|-wjp|-sbr|-eau|-sau|-all)$",
    "ValueRegex": "^DefaultEndpointsProtocol=(http|https);AccountName=(?<AccountName>[0-9a-z]{3,24});AccountKey=((?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?)$",
    "ValueTemplate": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...",
    "RequiredCustomTags": [ "MyTag" ],
    "OptionalCustomTags": [ "MyOptionalTag" ],
    "DefaultExpiration": "180.00:00:00",
    "MaxExpiration":  "180.00:00:00"
  },

Note: Total number of RequiredCustomTags and OptionalCustomTags must be less than 15 for any secret kind.

secretkinds

CustomTags.json

Defines a dictionary for different secret custom tags. Custom tags must be added to SecretKinds.json in the 'RequiredCustomTags' or 'OptionalCustomTags' sections. Each cutom tag is a simple class with the following properties:

  • Name - the custom tag name, must be less than 256 chars
  • DefaultValue - default value for the tag, for no value just put ""
  • ValueRegex - valid tag value regular expression (case sensitive), must be no longer 256 chars
  • ValueList - (optional) an array of strings or numbers that will be shown in a dropdown

Here are examples for couple of custom tags:

{
  "MyTag": {
    "Name": "Tag",
    "DefaultValue": "foo",
    "ValueRegex": ".{0,256}",
    "ValueList": [
      "foo",
      "bar"
    ]
  },
  "MyOptionalTag": {
    "Name": "Description",
    "DefaultValue": "",
    "ValueRegex": ".{0,256}"
  }
}

customtags

User.config

XML file which controls user settings, will be created only if user changed the default values via Settings dialog and clicked OK button. Here an example for location of the file:

%LocalAppData%\Apps\2.0\Data\2310EVQO.1C1\Q6P3APKG.HY4\vaul..tion_7446cb71d1187222_07e0.03f5_fc3133cd208276e1\Data\2016.1013.1742.39\user.config

Telemetry

By default Azure Key Vault Explorer collects and sends aggregated telemetry to Application Insights about usage of the tool. Telemetry includes only the following:

  • Type of user actions - which button / menu item was clicked
  • Action duration – how long time particular action took (for example: action to save a secret)
  • Exceptions – only in case action failed, for diagnostic purposes only exception information is collected

All collected telemetry is stored for no more than 90 days. Telemetry can be disabled in the Settings dialog. Set Disable telemetry to True, hit OK button and restart the application.

Screen shots

Main window

mainwindow

Search and copy secret to clipboard

searchSecretAndCopy

Edit secret

editSecret

Rollback to specific secret version

editSecretVersions

Edit secret tags

secretTagsEditor

Edit Key Vault certificate

editSecret

Settings window

settings

azurekeyvaultexplorer's People

Contributors

andhesky avatar christbian1 avatar elize1979 avatar gozhan avatar kevand900 avatar kevin-msft avatar microsoft-github-policy-service[bot] avatar rahulpnath avatar zbraasch avatar zedy-wj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azurekeyvaultexplorer's Issues

Vault Explorer doesn't see a change from CRLF to LF as a change, and doesn't update the secret

I have a secret, with type application/json.
By accident, I added a pretty-printed json that uses CRLF characters to define a newline.
When I tried replacing it with the exact same json (using LF instead of CRLF), Vault Explorer doesn't see it as a change, and doesn't upload a new version of the secret.

My downstream application can't handle CRLF, so I first have to change the secret value to something unrelated, and then to the corrected json.

Doesn't work for usgovcloud keyvaults

When attempting to connect to a keyvault hosted inside a Gov Cloud tenant, KE will give an error. KE is using the public cloud URI, not the gov cloud URI. Can this be an option added to the configuration in Vaults.json?

Application cannot be started

I have a VaultExplorer.application file on my desktop and when I click on it now I get message box:
Cannot Start Application
Application cannot be started. Contact the application vendor.

Details:
Deployment Provider url : https://elize.blob.core.windows.net/vaultexplorer/VaultExplorer.application
Server : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
Following failure messages were detected:
+ The deployment identity at the deployment provider is not the same as the original deployment identity.

Following errors were detected during this operation.
* [5/1/2019 9:49:22 AM] System.Deployment.Application.InvalidDeploymentException (SubscriptionSemanticValidation)
- The deployment identity at the deployment provider is not the same as the original deployment identity.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

Service Principal access not working

I configured my vaults.json file to have something like the following:

{
  "{vault-name}": {
    "$id": "1",
    "ReadOnly": [
      {
        "$type": "Microsoft.Vault.Library.VaultAccessClientCredential, Microsoft.Vault.Library",
        "ClientId": "{aad-app-client-id}",
        "ClientSecret": "{aad-app-key}"
      }
    ],
    "ReadWrite": [
      {
        "$type": "Microsoft.Vault.Library.VaultAccessClientCredential, Microsoft.Vault.Library",
        "ClientId": "{aad-app-client-id}",
        "ClientSecret": "{aad-app-key}"
      }
    ]
  }
}

but i never get to see any vault listed in the vault drop down. Am I doing something wrong?

image

I don't get any error

T4Transform task failed

Hi

Really want to try and use this tool as it looks a good password manager and stores credentials in Azure Key Vault.

I think it would be really useful to have an install guide for this solution as I've had and are still having issues getting the solution to build

I've run the init.cmd file to get the nuget packages installed (although I wonder why nuget package manager was not used to do this) I also had to add nuget package for ICSharpCode.TextEditor which added references to the Applicaiton insights and Azure Key Vault

Currently when I build the solution it is now complaining that the T4Transform task failed!

Any advice from people that have managed to build this would be appreciated

I'm using Windows 10 using VS 2017

Opening vault://myvault from Chrome results in a file not found exception

When I try to open vault://myvault from Chrome (after installing the ClickOnce app) I get an application error.

The following exception report is provided.

PLATFORM VERSION INFO
	Windows 			: 10.0.18363.0 (Win32NT)
	Common Language Runtime 	: 4.0.30319.42000
	System.Deployment.dll 		: 4.8.3752.0 built by: NET48REL1
	clr.dll 			: 4.8.4180.0 built by: NET48REL1LAST_B
	dfdll.dll 			: 4.8.3752.0 built by: NET48REL1
	dfshim.dll 			: 10.0.18362.1 (WinBuild.160101.0800)

SOURCES
	Deployment url			: file:///C:/Users/caveld/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/Microsoft%20Corporation/VaultExplorer.appref-ms%7Cvault://myvault/

ERROR SUMMARY
	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of C:\Users\caveld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft Corporation\VaultExplorer.appref-ms|vault://myvault/ resulted in exception. Following failure messages were detected:
		+ Could not find file 'C:\Users\caveld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft Corporation\VaultExplorer.appref-ms'.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
	No transaction error was detected.

WARNINGS
	There were no warnings during this operation.

OPERATION PROGRESS STATUS
	* [12-8-2020 15:01:50] : Activation of C:\Users\caveld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft Corporation\VaultExplorer.appref-ms|vault://myvault/ has started.

ERROR DETAILS
	Following errors were detected during this operation.
	* [12-8-2020 15:01:50] System.IO.FileNotFoundException
		- Could not find file 'C:\Users\caveld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft Corporation\VaultExplorer.appref-ms'.
		- Source: mscorlib
		- Stack trace:
			at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
			at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
			at System.IO.FileInfo.CopyTo(String destFileName)
			at System.Deployment.Application.ApplicationActivator.CleanApplicationReInstall(Boolean isShortcut, Uri deploymentUri, Uri activationUri, BrowserSettings browserSettings, String textualSubId, String errorPageUrl, String deploymentProviderUrlFromExtension, String shortcutFilePath)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
	No transaction information is available.

Software signing certificate expired

Hi guys,

The certificate used to sign the code has expired past 03/06/2020. Trying to install the app on a Windows 10 machine, renders a untrusted application from security and prevents install.

Cannot add VaultAliases.json entry w/o corresponding entry in Vaults.json

If I have a default Vaults.json file (empty), the documentation states that I should be able to add a simple Vault entry to the dropdown by adding the following to VaultAliases.json (using default AAD auth). I assume this behavior is likely true for any entry in VaultAliases.json without a corresponding entry in Vaults.json:

[
  {
    "Alias": "MyVault",
    "VaultNames": [ "MyVault" ]
  }
]

But when I do, it throws the following exception:

System.Collections.Generic.KeyNotFoundException: MachineTranslationInt is not found in C:\Users\aaburke\OneDrive - Microsoft\AKVExplorer\Vaults.json
   at Microsoft.Vault.Library.Vault.<>c__DisplayClass19_0.<CreateKeyVaultClientEx>b__0(String authority, String resource, String scope)
   at Microsoft.Azure.KeyVault.KeyVaultCredential.<PreAuthenticate>d__8.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.Azure.KeyVault.KeyVaultCredential.<ProcessHttpRequestAsync>d__10.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.Azure.KeyVault.KeyVaultClient.<GetSecretsWithHttpMessagesAsync>d__61.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.Azure.KeyVault.KeyVaultClientExtensions.<GetSecretsAsync>d__39.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.Vault.Library.Vault.<ListSecretsAsync>d__23.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.Vault.Explorer.MainForm.<>c__DisplayClass32_1.<<uxMenuItemRefresh_Click>b__1>d.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.Vault.Explorer.UxOperation.<>c__DisplayClass12_1.<<Invoke>b__0>d.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.Vault.Explorer.UxOperation.<Invoke>d__12.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.Vault.Explorer.MainForm.<uxMenuItemRefresh_Click>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Adding the following to Vaults.json fixes the issue:

[
  {
    "Alias": "MyVault",
    "VaultNames": [ "MyVault" ]
  }
]

This is in contrast to the documentation, which states:

Here is an example of a single vault not defined in Vaults.json

  {
    "Alias": "DEV",
    "VaultNames": [ "TestKeyVault" ]
  }

Azure Keyvault secret auto rotation and notification before expiry

We are following the answer provided in stackoverflow and trying to automate the secret expiry notification of our key vaults and enable auto rotation of secrets using azuredevops pipelines.

We are getting "No such host is known" error while we are trying to invoke the azuredevops server pipeline hosted in on premise from the azure runbook automation script.

param
(
[Parameter (Mandatory = $false)]
[object] $WebhookData
)

#If runbook was called from Webhook, WebhookData will not be null.
if ($WebhookData) {
#Run Azure DevOps REST API to trigger the pipeline
$token = "xxxxxxxxxxxxxxxxxxxxx"
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($token)"))
$url = "https://myado.com/devops/myorganization/myproject/_apis/build/builds?api-version=6.0"
$body = @"
{
    `"definition`":  {
                       `"id`":  xxxxx
                   }
}
"@
$head = @{ Authorization =" Basic $token" }
Invoke-RestMethod -Uri $url -Method Post -Headers $head -Body $body -ContentType application/json
}
else
{
# Error
write-Error "No input data found." 
}

Many versions of a secret give slow performance

We are using the VaultExplorer with several types of secrets, one of them having a new rotating token every 10 minutes that is automatically updated to the Azure KeyVault. This means, a new version of such a secret is registered 6 times per hour. When I want to open only the current version of this secret in the VaultExplorer, it can take minutes. I assume it is collecting all the previous versions, hundreds of them, before showing the window that shows the current value. Is there a possibility to only request the previous versions when a previous version is actually selected, and when I want to show or edit the current value of this secret, this can be done more quickly? Thanks for your answers!

Please add proxy support

Hey,
when I try to open a keyvault from behind a corporate proxy with NTLM authentication, the application crashes with HTTP status 407 (Proxy authorisation required)

Would be great, if I could configure the proxy from within the application.

Best regards

Unhandled exception of type System.Net.Soclets.SocketException

When I use the option "pick vault from subscription" I am presented with the following error:
image

Already tried several things like changing the authority and domain hints but nothing seem to help.
Or I am doing the above things wrong offcourse.

Any help would be greatly appreciated.

Certificate (.cer) files are encoded as JSON

Thanks for providing the Azure Key Vault Explorer tool – it’s quite handy.

I came across an unexpected behavior today when adding public certificate (.cer) files to a key vault. It seems that the tool wraps the contents of the certificate in a JSON structure like the following:

{ Data: “….” }

Why is that? And is it something I can disable?

TLS 1.2 Support

Hi All,

Due to Azure Key Vault phasing out support for TLS 1.0 and 1.1 our beloved application will stop working.
Do you guys know of any fixes/workarounds to use the application?
It looks like it doesnt yet support TLS 1.2 yet.

Thank you!

Error I already get:

Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: {"error":"invalid_request","error_description":"AADSTS1002016: You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated to improve the security posture of Azure AD

..is it possible to open a Vault per Default?

Hi,
very cool tool - thanks for that!

one question: is it possible to make a vault as "default" ? - this vault should be openened after starting the tool without choosing one of the vaults in drop-down-menu...

would be great having this option.

thanks and greets,
Markus

Cannot build solution in VS2017

I downloaded the master branch code. When I open the solution in VS 2017 and attempt to build the solution I get the following:
1>------ Skipped Rebuild All: Project: Core, Configuration: Debug x64 ------
1>Project not selected to build for this solution configuration
2>------ Skipped Rebuild All: Project: ClearClipboard, Configuration: Debug x64 ------
2>Project not selected to build for this solution configuration
3>------ Skipped Rebuild All: Project: VaultLibrary, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Rebuild All: Project: VaultExplorer, Configuration: Debug x64 ------
4>Project not selected to build for this solution configuration
========== Rebuild All: 0 succeeded, 0 failed, 4 skipped ==========

How do I get this to build and or publish so I can use it again?

Operation to access keyvault denied

When trying to open a vault from a subscription I am presented with the error:
image

Operation to access redacted (redacted) denied.
You are probably missing a certificate in CurrentUser\My or LocalMachine\My stores, or you are not part of the appropriate security group.

Others in my team with the same permissions are able to open vaults fine with no errors.

Manually setting up a vault in Vaults.json using a ClientId and ClientSecret works and am able to connect.

Authentication Fails Despite entering right password

Using Key Vault explorer on a company laptop. The Default account picked is a @microsoft.com address.

Upon changing it to a different tenant viz my-company.onmicrosoft.com or to simply [email protected]

Authentication blatantly fails. Just says incorrect password despite it being the right password.

Unable to select vault due to System.Security.Cryptography.CryptographicException

When selecting "pick vault from subscription", I'm getting the exception below.
Same happens with directly picking a KeyVault

Oops... Unhandled exception of type System.Security.Cryptography.CryptographicException has occurred: Key not valid for use in specified state. To ignore this error just click Continue, otherwise click Quit.

System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at Microsoft.Vault.Library.FileTokenCache.BeforeAccessNotification(TokenCacheNotificationArgs args)
at Microsoft.Vault.Library.FileTokenCache..ctor(String domainHint)
at Microsoft.Vault.Explorer.AccountItem..ctor(String domainHint)
at Microsoft.Vault.Explorer.SubscriptionsManagerDialog..ctor()
at Microsoft.Vault.Explorer.MainForm.SetCurrentVaultAlias()
at Microsoft.Vault.Explorer.MainForm.uxComboBoxVaultAlias_DropDownClosed(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ComboBox.OnDropDownClosed(EventArgs e)
at System.Windows.Forms.ToolStripComboBox.ToolStripComboBoxControl.OnDropDownClosed(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Support Vaults in other Azure Environments/sovereign clouds

Vault Explorer should have an option to support connecting to non-Public Azure Environments. This includes AzureGov, and other sovereign clouds. Ideally this would be supported in the vault.config and other vault config options so I can quickly connect to other vaults across tenants.

Can't Login

I don't have a corporate account, I have a personal account and there's no login option for that.

The client and server cannot communicate, because they do not possess a common algorithm

Hello,

I've just downloaded and started AzureKeyVaultExplorer. It's empty. When I choose "Pick vault from subscription", I get an exception "System.ComponentModel.Win32Exception (0x80004005): The client and server cannot communicate, because they do not possess a common algorithm".
Details:
"System.ComponentModel.Win32Exception (0x80004005): The client and server cannot communicate, because they do not possess a common algorithm
at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, X509Certificate2 selectedCert, Flags flags)
at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)
at System.Net.ConnectStream.WriteHeaders(Boolean async)"

Windows version:

  • Edition Windows 10 Enterprise
  • Version 21H2
  • Installed on ‎3/‎16/‎2021
  • OS build 19044.1586
  • Experience Windows Feature Experience Pack 120.2212.4170.0

Does the app work for non-microsoft users?

I used to use this while working at MS. Now I can't seem to make it work with my new user ID/Azure subs.
Not sure if this is supported or the app needs to be updated to support TLS 1.2

image

KeyVault require presense of vaultname in vaults.json when run as vault://<vaultName>

I'm going to share access to my vault through VaultExplorer, but realized that every user have to setup configuration.
When I run it from Start+R-> vault://, I have an error " is not found in configfile".

Looks like the application always hits this line when started.
So I always have to add mention of vault I'm going to use to Vaults.json:
{ "<vaultname>": { "$id": "1", "ReadOnly": [ { "$type": "Microsoft.Vault.Library.VaultAccessUserInteractive, Microsoft.Vault.Library" } ], "ReadWrite": [ { "$type": "Microsoft.Vault.Library.VaultAccessUserInteractive, Microsoft.Vault.Library" } ] } }
Is there any way to run vault:// with UserInteractive Auth by default?

The application installs itself under a different folder than it's expected by the application itself

I have noticed that at least on Windows 10 the one-click application installer installs VaultExplorer at a different folder than it's expected by the application itself (there's a hardcoded path in the code which nowadays does not match to the fact installation directory).

string appref_ms = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs", "Microsoft Corporation", "VaultExplorer.appref-ms");

I. e.
When you run the application using vault:// protocol, the error is being thrown and it states that it cannot find the file in
AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft Corporation\VaultExplorer.appref-ms
however it installs automatically under
AppData\Romaing\Microsoft\Windows\Start Menu\Programs\VaultExplorer\VaultExplorer.appref-ms
instead.

I troubleshoot this exact error via editing the registry. I simply set the path which is saved in the Registry correctly at least in Windows 10 making the vault:// protocol to work properly:

REG ADD HKCU\Software\Classes\vault\shell\open\command /t REG_EXPAND_SZ /d "\"C:\windows\system32\rundll32.exe\" C:\windows\system32\dfshim.dll, ShOpenVerbShortcut %APPDATA%\Microsoft\Windows\Start Menu\Programs\VaultExplorer\VaultExplorer.appref-ms|%1" /F

I did not make a pull request just yet because I am not quite sure if changing the hardcoded path to a new one is sufficient enough, therefore a more in depth look would be really appreciated. I assume that ideally it should grab the installation path of itself dynamically.

Upgrade to Azure.Security.KeyVault.* packages

Microsoft.Azure.KeyVAult will be deprecated soon in favor of the new Azure SDK libraries, such as Azure.Security.KeyVault.Secrets. Along with Azure.Core, Azure.Identity, and Azure.ResourceManager.KeyVault (the latter is in preview currently), these provide a number of benefits and bug fixes over the older SDKs and are being unified (though still idiomatic) across supported languages. See https://aka.ms/azsdk/valueprop and https://aka.ms/azsdk/intro for more details.

The main difference when migrating is that certificates, keys, and secrets all got their own clients - though share a single HttpClient by default - instead of everything together in one monolithic KeyVaultClient. The methods are conceptually the same, but I'm happy to provide more details as needed.

Operation to vault denied. You are probably missing a certificate

I became a value configuration and after i set the root location i tried to log in with the wrong liveid.

Now i have the problem that i can not change that account.

Everytime i want to open the vault i get the error message
Operation to vault denied. You are probably missing a certificate in CurrentUser/My or LocalMachine\My stores, or you are not part of the appropiate security group.

What can i do so i can open the vault?
I am not able to change the login anymore.

What excatly is happening here?

Regards
Andre

Support for SoftDelete/NoPurge - EX: "Rename" a secret name by changing case - deletes old secret and fails to create new one

Scenario - a vault with soft delete / no purge and "rename" a secret with only a case change (likely one of the many scenarios that fail with nopurge/softdelete)

Create a secret "test2" , then try to rename to "Test2".

image

The rename appears to succeed in GUI, but if you try to view the secret it fails.

If you try to then recreate a secret with same name (in any case):

Microsoft.Azure.KeyVault.Models.KeyVaultErrorException: Secret test2 is currently in a deleted but recoverable state, and its name cannot be reused; in this state, the secret can only be recovered or purged.

Enhancement Request: VaultExplorer to be defensive about operations that are known to cause issues with Soft Delete

Custom tags not reset on SecretKind change

When I change the secret kind in secret dialog, and selected secret kind has custom tags defined which are not yet added to the secret, those tags are added in the editor.
When I then change the secret kind again, to a kind without those custom tags, I would expect them to be removed (as if I never selected the previous kind), but they are not. Due to this also any value regex errors do not disappear.

What is status of this project?

Is this project maintained? It does not seems like it is, so please archive this repo and turn read-only to make its status clear, so users don't waste their time.

Apart from the not user-friendly configuration via numerous JSON files, this application seems far from being usable:

Failures

Vault drop-down list > Pick vault from subscription

image


then, hit Continue and

Account > Add New Account

image


Account > How to add new domain hint here...

image

but there is no Domain hints property:

image

Multi directory support

When I login, I can only see subscriptions from the directory the account is connected to. How can I change to other directories?

Is there a way to save vaults added from a subscription

When I use pick vault from subscription, I have to select the subscription , then the vault, then enter in my username & password each time, and with the inactivity timeouts, I end up having to do this at least once each day, sometimes more depending on how my lunch break lines up with the timeouts. I would love to be able to save the handful vaults I always use as defaults so that I don't have to go through that process each time. It would be really helpful; if there was a way to either have a copy pasteable version of the vaults.json information needed or to be able to just select something like save to vaults.json right in the app

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.