Skip to content

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

@tschifftner

Description

@tschifftner

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",
    }
  },
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions