Skip to content

SSH format parameter not recognized in client.secrets.resolve method #153

@coneillpj

Description

@coneillpj

Scenario & Reproduction Steps

Steps

  1. generate ssh key
  2. create service account token that can read vault item
  3. then run the following with onepassword-sdk==0.1.7 installed
import asyncio
from onepassword import Client

async def main():
  client = await Client.authenticate(
          auth=<service_token>,
          integration_name="test",
          integration_version="v1.0.0",
      )
  
  await client.secrets.resolve('op://<vault>/<item_of_ssh_type>/private key?ssh-format=openssh')

if __name__ == '__main__':
    asyncio.run(main())

# Works fine:
# await client.secrets.resolve('op://<vault>/<item_of_ssh_type>/private key')

Actual Behavior

When specifying the ssh-format parameter, an exception is thrown:

Exception: error resolving secret reference: the secret reference could not be parsed: secret reference has invalid query parameter key

Expected Behavior

According to https://developer.1password.com/docs/cli/secret-reference-syntax/#ssh-format-parameter, I would expect to be able to resolve the secret with the ssh-format paramter

SDK version

0.1.7

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions