Skip to content

Sign ssh key not in home directory #13279

@rninov

Description

@rninov

Describe the bug
When I try to sign a ssh key not located in home directory (setting absolute path) I get error

To Reproduce

  1. As root: cat /home/romeo/.ssh/id_rsa.pub
    work fine
  2. As root: vault write ssh-client-signer/sign/my-role public_key=/home/romeo/.ssh/id_rsa.pub
    get error:
Error writing data to ssh-client-signer/sign/my-role: Error making API request.

URL: PUT http://127.0.0.1:8200/v1/ssh-client-signer/sign/my-role
Code: 400. Errors:

* failed to parse public_key as SSH key: illegal base64 data at input byte 12
  1. as user romeo:
 vault write -field=signed_key ssh-client-signer/sign/my-role     public_key=@$HOME/.ssh/id_rsa.pub
ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2Et
<snip>

Expected behavior
TO be able to sign key independently of the directory where it is located

Environment:

  • Vault Server Version (retrieve with vault status): Version 1.9.0
  • Vault CLI Version (retrieve with vault version): Vault v1.9.0
  • Server Operating System/Architecture: Red Hat Enterprise Linux Server release 7.9 , x64

Vault server configuration file(s):

Standard run of Vault server as dev w/o any additional configurations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions