Bug Fix: Quote parameters to prevent errors when they contain whitespaces#33
Bug Fix: Quote parameters to prevent errors when they contain whitespaces#33cdhunt merged 4 commits intocdhunt:mainfrom
Conversation
|
Hi @cdhunt, The issues with the build checks seems to be related with Testspace, which is unrelated with the submitted code. I'll assume that you will look into it when possible. I am aware of your availability constraints. Thanks, Kind regards, Ben |
|
Yeah, no worries. I'm aware of the build failures. I attempted to get op.exe running in the pipeline so the tests would run, but I could not find a way to authenticate non-interactively. |
|
The 1Password CLI API is meant to be used interactively, through the 1Password Desktop app. Thus, It is not possible to use it with "application permissions" (non-interactively). See the following article for details: https://developer.1password.com/docs/cli/app-integration-security/ Thus, the tests for the SecretManagement.1Password extension are useful while developing to validate changes. Specially useful when doing big changes. Please, consider removing the code that is triggering build failurs as it may prevent us from detecting other real errors. |
|
Hi @cdhunt , Regarding this conversation, you may be interested to have a look to the 1Password Service Accounts feature: 1Password Service Accounts are a sort of application identity that may allow you to run the 1Password CLI with an identity that doesn't trigger the password pop-up. Service accounts work well for shared environments because they provide an authentication method for 1Password CLI that isn't associated with an individual. You control which vaults are accessible and which actions the service account can perform. And you can see what items a service account accesses by creating a usage report. I hope this helps, Kind regads, Ben |
This PR contains a fix that prevent errors when parameters contain whitespaces. More specifically, when the name of a vault in 1Password contains whitespaces, the API requests that target that vault fail because the 1Password CLI see each word as a parameter. This fix surrounds all params with double quotations to prevent this issue going forward.
The release numbers are also updated to allow the PowerShell Gallery to identify the latest version.