Skip to content

1Password Secret Adapter Returning Invalid JSON #1633

@mike-weiner

Description

@mike-weiner

While following https://kamal-deploy.org/docs/commands/secrets/, I'm seeing unexpected behavior. It appears like Kamal is returning what I would call "over-escaped" JSON, which just isn't valid.

weiner ~ % SECRETS=$(kamal secrets fetch --adapter 1password --account $ACCOUNT_ID --from Private/Kamal username)
weiner ~ % 
weiner ~ % 
weiner ~ % echo $SECRETS
\{\"Private/KAMAL/username\":\"kamal-username\"\}
weiner ~ % 
weiner ~ % 
weiner ~ % kamal secrets extract username $SECRETS
  ERROR (JSON::ParserError): unexpected character: '\{\"Private/KAMAL/username\":\"k' at line 1 column 1
weiner ~ % op item get KAMAL --format json --fields label=username
{
  "id": "username",
  "type": "STRING",
  "purpose": "USERNAME",
  "label": "username",
  "value": "kamal-username",
  "reference": "op://Private/KAMAL/username"
}
weiner ~ % op -v
2.32.0

This shows the content of the dummy credentials inside of 1Password:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions