Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: encryption key is not a valid base64 encoding with key_path #2377

Open
thomas-bouvier opened this issue Aug 29, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@thomas-bouvier
Copy link

What did you expect to happen?

Hello,

I set the key_path attribute to a file containing an Atuin key in plain text. When loging to Atuin using atuin login -u ..., and not providing any key path with -k, I expected the key file provided in the config to be read by Atuin.

(I am using NixOS, so the key_path attribute is set by Nix in my case)

I couldn't find in the docs if the encryption key has to be stored in plain text.

What happened?

When setting the key_path attribute to a file containing an Atuin key in plain text, the following error is triggered:

Error: could not load encryption key

Caused by:
   0: encryption key is not a valid base64 encoding
   1: Invalid symbol 32, offset 4.

Location:
    crates/atuin-client/src/encryption.rs:88:10

Here is the throwaway key generated by Atuin to reproduce the issue:

throwaway_key.txt

Is the encryption key expected to be base64-encoded?

Atuin doctor output

The issue also arises with version 18.2.0.


{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "NixOS",
    "arch": "x86_64",
    "version": "24.05",
    "disks": [
      {
        "name": "/dev/disk/by-label/ROOT",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/disk/by-label/ROOT",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sda1",
        "filesystem": "vfat"
      }
    ]
  }
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@thomas-bouvier thomas-bouvier added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant