From 18696a2a85856a6879dbad2585866525c3e59e7c Mon Sep 17 00:00:00 2001 From: Ramon Medina <56440448+Ramon-LibertyPumps@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:04:34 -0400 Subject: [PATCH] Added sorting by name when displaying the folder view. --- Dynamic Folder/Keeper/Keeper (Powershell Core).rdfe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dynamic Folder/Keeper/Keeper (Powershell Core).rdfe b/Dynamic Folder/Keeper/Keeper (Powershell Core).rdfe index f750591..1d48ae9 100644 --- a/Dynamic Folder/Keeper/Keeper (Powershell Core).rdfe +++ b/Dynamic Folder/Keeper/Keeper (Powershell Core).rdfe @@ -1 +1 @@ -{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"Keeper (Powershell Core)","Description":"Get dynamic credentials from Keeper Secrets Manager","Notes":"\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t

\r\n\t\t\tKeeper (Powershell) Dynamic Folder

\r\n\t\t

\r\n\t\t\tVersion: 1.0.0
Author
: https://github.com/WillEllis

\r\n\t\t

\r\n\t\t\tHow to use

\r\n\t\t

Ensure you set the RoyalTS script interpreter as Powershell Core. E.g. "C:\\Program Files\\PowerShell\\7\\pwsh.exe"

\r\n\t\t\tCreate a Keeper application

\r\n\t\t

You will need to create an application in Keeper and get a one time access token. Follow the quick start guide here: Keeper Create an Application

\r\n\t\t\tCreate a Keeper application

\r\n\t\t

Setup Keeper Secrets Manager for Powershell (in Powershell core) following this guide Keeper Powershell Plugin - Installation

\r\n\t\t\tConnect Dynamic Folder to Powershell Keeper Vault

\r\n\t\t

\r\n\t\t\tIf you've done the above then you'll have a Powershell Vault in place for Keeper. Simply set the name of the vault and the password (if set) within the custom properties of this Dynamic folder.

\r\n\t\t

 

\r\n\r\n","CustomProperties":[{"Name":"PowerShell Vault Name","Type":"Text","Value":"TODO"},{"Name":"PowerShell Vault Password","Type":"Protected","Value":"TODO"}],"Script":"$ErrorActionPreference = 'Stop'\r\n\r\nif ('$CustomProperty.PowerShellVaultName$' -eq '') {\r\n throw 'Vault Name needed'\r\n}\r\nif ('$CustomProperty.PowerShellVaultPassword$' -eq '') {\r\n throw 'Vault password needed'\r\n}\r\n\r\n$Secure = ConvertTo-SecureString -String '$CustomProperty.PowerShellVaultPassword$' -AsPlainText -Force\r\nUnlock-SecretStore -Password $Secure\r\n\r\n$results = Get-SecretInfo -Vault '$CustomProperty.PowerShellVaultName$'\r\n$credentials = @()\r\nforeach ($item in $results) {\r\n $ID,$name = $item.Name -split ' ',2\r\n $credentials += [pscustomobject]@{\r\n Type = 'DynamicCredential'\r\n Name = $name\r\n Username = ''\r\n Password = ''\r\n ID = $ID\r\n }\r\n}\r\n\r\n$final = [pscustomobject]@{\r\n Objects = $credentials\r\n}\r\n$final | ConvertTo-Json -Depth 100 | Write-Output","ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"powershell","DynamicCredentialScript":"$ErrorActionPreference = 'Stop'\r\n\r\nif ('$CustomProperty.PowerShellVaultName$' -eq '') {\r\n throw 'Vault Name needed'\r\n}\r\nif ('$CustomProperty.PowerShellVaultPassword$' -eq '') {\r\n throw 'Vault password needed'\r\n}\r\n\r\n$Secure = ConvertTo-SecureString -String '$CustomProperty.PowerShellVaultPassword$' -AsPlainText -Force\r\nUnlock-SecretStore -Password $Secure\r\n\r\n$results = Get-Secret '$DynamicCredential.EffectiveID$' -AsPlainText\r\n$results | Select-Object @{Name='username';Expression={$_.login}},password | ConvertTo-Json -Depth 100 | Write-Output"}]} \ No newline at end of file +{"Name":"Dynamic Folder Export","Objects":[{"Type":"DynamicFolder","Name":"Keeper (Powershell Core)","Description":"Get dynamic credentials from Keeper Secrets Manager","Notes":"\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t

\r\n\t\t\tKeeper (Powershell) Dynamic Folder

\r\n\t\t

\r\n\t\t\tVersion: 1.0.0
Author
: https://github.com/WillEllis

\r\n\t\t

\r\n\t\t\tHow to use

\r\n\t\t

Ensure you set the RoyalTS script interpreter as Powershell Core. E.g. "C:\\Program Files\\PowerShell\\7\\pwsh.exe"

\r\n\t\t\tCreate a Keeper application

\r\n\t\t

You will need to create an application in Keeper and get a one time access token. Follow the quick start guide here: Keeper Create an Application

\r\n\t\t\tCreate a Keeper application

\r\n\t\t

Setup Keeper Secrets Manager for Powershell (in Powershell core) following this guide Keeper Powershell Plugin - Installation

\r\n\t\t\tConnect Dynamic Folder to Powershell Keeper Vault

\r\n\t\t

\r\n\t\t\tIf you've done the above then you'll have a Powershell Vault in place for Keeper. Simply set the name of the vault and the password (if set) within the custom properties of this Dynamic folder.

\r\n\t\t

 

\r\n\r\n","CustomProperties":[{"Name":"PowerShell Vault Name","Type":"Text","Value":"TODO"},{"Name":"PowerShell Vault Password","Type":"Protected","Value":"TODO"}],"Script":"$ErrorActionPreference = 'Stop'\r\n\r\nif ('$CustomProperty.PowerShellVaultName$' -eq '') {\r\n throw 'Vault Name needed'\r\n}\r\nif ('$CustomProperty.PowerShellVaultPassword$' -eq '') {\r\n throw 'Vault password needed'\r\n}\r\n\r\n$Secure = ConvertTo-SecureString -String '$CustomProperty.PowerShellVaultPassword$' -AsPlainText -Force\r\nUnlock-SecretStore -Password $Secure\r\n\r\n$results = Get-SecretInfo -Vault '$CustomProperty.PowerShellVaultName$'\r\n$credentials = @()\r\nforeach ($item in $results) {\r\n $ID,$name = $item.Name -split ' ',2\r\n $credentials += [pscustomobject]@{\r\n Type = 'DynamicCredential'\r\n Name = $name\r\n Username = ''\r\n Password = ''\r\n ID = $ID\r\n }\r\n}\r\n\r\n$final = [pscustomobject]@{\r\n Objects = ($credentials | Sort-Object Name)\r\n}\r\n$final | ConvertTo-Json -Depth 100 | Write-Output","ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"powershell","DynamicCredentialScript":"$ErrorActionPreference = 'Stop'\r\n\r\nif ('$CustomProperty.PowerShellVaultName$' -eq '') {\r\n throw 'Vault Name needed'\r\n}\r\nif ('$CustomProperty.PowerShellVaultPassword$' -eq '') {\r\n throw 'Vault password needed'\r\n}\r\n\r\n$Secure = ConvertTo-SecureString -String '$CustomProperty.PowerShellVaultPassword$' -AsPlainText -Force\r\nUnlock-SecretStore -Password $Secure\r\n\r\n$results = Get-Secret '$DynamicCredential.EffectiveID$' -AsPlainText\r\n$results | Select-Object @{Name='username';Expression={$_.login}},password | ConvertTo-Json -Depth 100 | Write-Output"}]}