1Password / op-vscode

1Password for VS Code
https://marketplace.visualstudio.com/items?itemName=1Password.op-vscode
MIT License
209 stars 11 forks source link

VSCode: settings.json and REST client not supported #188

Open tschifftner opened 7 months ago

tschifftner commented 7 months ago

Your environment

op-vscode version: v1.0.4

VS Code version: October 2023 (version 1.84)

CLI version: 2.23.0

OS: Mac OS

Steps to reproduce

  1. First I tried to add secret reference to settings.json

    "rest-client.environmentVariables": {
    "$shared": {
      "version": "v1",
      "basicAuth": ""
    },
    "1Password test": {
      "username": "test",
      "password": "op://Vault/uns2wilfuzxoh4n7nedihyaavu/password",
    }
    },
  2. Then I tried direct usage in test.http file, one single value at a time

    
    @host = https://example.com/api
    @password = "op://Vault/uns2wilfuzxoh4n7nedihyaavu/password",

login

@name postLogin

POST {{ host }}/oauth/v1/token Authorization: Basic op://Vault/uns2wilfuzxoh4n7nedihyaavu/token Content-Type: application/json

{ "grant_type": "password", "username": "op://Vault/uns2wilfuzxoh4n7nedihyaavu/username", "password": "{{password}}" }



REST plugin can be found here: https://marketplace.visualstudio.com/items?itemName=humao.rest-client

## What happened?

The secret values were not used

## What did you expect to happen?

I expected to work with the passwords from 1password

## Notes & Logs

<!-- Paste any logs here that may help with debugging.
Remember to remove any sensitive information before sharing! -->
jodyheavener commented 1 month ago

Hi @tschifftner, doing some issue triage here. I don't believe this is a bug, but rather more suitable as a feature request. It will take some work to make this extension compatible with the one you've noted. Thank you for bringing it to our attention!

kuiperonit commented 1 week ago

@jodyheavener I am currently going to make a pull request to add the REST Client extension. I need to use 1Password with REST Client for a product of mine, thanks!

Best Regards, kuiperonit (Austin Riddolls)