heartbeat icon indicating copy to clipboard operation
heartbeat copied to clipboard

Multiple token support

Open 5HT2 opened this issue 4 years ago • 6 comments

Possible, some way to configure a token for each device. As mentioned in #10

5HT2 avatar Sep 29 '21 02:09 5HT2

Idea on how to implement: New DB field, "authkeys", and is stored as follows

{
    "deviceName": "sha512 hash of key, salted with device name",
    "etc": "etc"
}

Would be easy enough to implement API calls to insert and remove devices, and you could avoid keeping any actual keys in the database in case it gets compromised.

Not-Super-Nova avatar Jan 07 '22 10:01 Not-Super-Nova

Should just be done as part of rust rewrite? Re: @karaiwulf

5HT2 avatar Dec 18 '22 10:12 5HT2

The rust rewrite is very much incomplete, but it's located here. Basically, most of the endpoints, while defined, are little nothing's. And there's no database connection. I ended up losing hyperfocus on it while deciding what I wanted to use for the database connection.

But yes I agree, multiple token support should be implemented. And as a later thing, probably some sort of pgp or ssh key signature mechanism as well.

karaiwulf avatar Dec 18 '22 15:12 karaiwulf

I'd like to switch to postgresql, see #31. I'll probs end up rewriting heartbeat in rust myself or fork your version

5HT2 avatar Dec 18 '22 17:12 5HT2

I hadn't actually checked the issues to know that, but I was absolutely gonna use psql as the backend, since I've been having issues with the redis persistence on the illumos platform.

karaiwulf avatar Dec 18 '22 17:12 karaiwulf

I'm glad you're not the only one struggling with persistence rofl It's been so fucking annoying honestly

5HT2 avatar Dec 19 '22 14:12 5HT2