Title: [SecretManagement] ArgumentCompleter / cached secret info · Issue #87 · PowerShell/Modules · GitHub
Open Graph Title: [SecretManagement] ArgumentCompleter / cached secret info · Issue #87 · PowerShell/Modules
X Title: [SecretManagement] ArgumentCompleter / cached secret info · Issue #87 · PowerShell/Modules
Description: #Implement an argument completer for the SecretManagement module. Currently if you want to use the cmdlet, you need to know your secrets / vault name. The Get-SecretInfo cmdlet is super useful for that. That being said, it could be imple...
Open Graph Description: #Implement an argument completer for the SecretManagement module. Currently if you want to use the cmdlet, you need to know your secrets / vault name. The Get-SecretInfo cmdlet is super useful for ...
X Description: #Implement an argument completer for the SecretManagement module. Currently if you want to use the cmdlet, you need to know your secrets / vault name. The Get-SecretInfo cmdlet is super useful for ...
Opengraph URL: https://github.com/PowerShell/Modules/issues/87
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[SecretManagement] ArgumentCompleter / cached secret info","articleBody":"#Implement an argument completer for the SecretManagement module.\r\n\r\nCurrently if you want to use the cmdlet, you need to know your secrets / vault name. \r\nThe `Get-SecretInfo` cmdlet is super useful for that.\r\n\r\nThat being said, it could be implemented directly into the module using an argument completer for the vaults and secrets name\r\n\r\n# Proposed technical implementation details (optional)\r\n\r\nHere's a simple example that work with cmdlets for the Vault parameters and secrets parameters. \r\n```\r\n\r\nRegister-ArgumentCompleter -CommandName Get-Secret, Set-Secret, Get-SecretInfo -ParameterName Vault -ScriptBlock {\r\n Get-SecretVault | Select -ExpandProperty Name | foreach-object {\r\n [System.Management.Automation.CompletionResult]::new($_)\r\n }\r\n}\r\n \r\nRegister-ArgumentCompleter -CommandName Get-Secret, Remove-Secret -ParameterName Name -ScriptBlock {\r\n param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\r\n \r\n $VaultNameFilter = $fakeBoundParameter.Vault\r\n (Get-SecretInfo -Vault $VaultNameFilter ) | Select -ExpandProperty Name | foreach-object {\r\n [System.Management.Automation.CompletionResult]::new($_)\r\n }\r\n}\r\n```\r\nThe only drawback is that relying on **Get-SecretInfo** as it is means that you have to wait on remote vault querying, which can add a couple of seconds. (But since the value completion is not triggered automatically, that shouldn't be a problem)\r\n\r\nStill, for the Vault parameter, it is perfect.\r\nFor the Name, I think it make sense anyway (value completion must be manuall triggered so it's a choice of whether you enter your name manually (if you know it) or trigger the value completion, which is the equivalent of running a `Get-SecretInfo` in the console then copy/paste the name. \r\n\r\n\r\n\r\n","author":{"url":"https://github.com/itfranck","@type":"Person","name":"itfranck"},"datePublished":"2020-06-10T08:54:31Z","url":"https://github.com/PowerShell/Modules/issues/87"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46ddebc7-063f-b0a0-755b-74200ff2a5ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C470:3B38CF:23853EF:3188634:6AFD35D1 |
| html-safe-nonce | 2becef79c8fbe15c622689c71d559bab031a454f5cc03740554076a6ce3e9692 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDcwOjNCMzhDRjoyMzg1M0VGOjMxODg2MzQ6NkFGRDM1RDEiLCJ2aXNpdG9yX2lkIjoiNTc3NDAzMDQzODI2MzUwMjI4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9914bdfcf20dbc41d4e709986bdaa4c18ca123a539ef80146085796514267388 |
| hovercard-subject-tag | issue:636065230 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/Modules/87/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be18d1459899af8ce9d01a056e4bdb6b0c23755023dcc89074fb624568dd00f7/PowerShell/Modules/issues/87 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be18d1459899af8ce9d01a056e4bdb6b0c23755023dcc89074fb624568dd00f7/PowerShell/Modules/issues/87 |
| og:image:alt | #Implement an argument completer for the SecretManagement module. Currently if you want to use the cmdlet, you need to know your secrets / vault name. The Get-SecretInfo cmdlet is super useful for ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | itfranck |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/Modules git https://github.com/PowerShell/Modules.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 197814114 |
| octolytics-dimension-repository_nwo | PowerShell/Modules |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 197814114 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/Modules |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width