-
Notifications
You must be signed in to change notification settings - Fork 10
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
Access PWS slots by name #155
Comments
This patch adds the pws-cache core extension that allows accessing the PWS slots by their name instead of the slot index. Fixes d-e-s-o#155.
Oh, interesting. My preference would be 3), as that's basically how we envisioned extensions to begin with (at least that was one of the take aways from the discussion that I had). However, that then would again mean that we should have some kind of stable output first. Perhaps now would be the time to get that done? |
I agree. I’ll have a look at the If we have |
I'll have to look at your branch again, too. I recall that I wasn't very fond of a few things, but also didn't have better ideas :-|
I think for one I was not sure whether we really should have data structures for the output. I was more thinking along the lines of invoking a couple of functions and switching out the functions based on the desired format. (I don't know how feasible that is, but it was my initial thought) Even if we decide to have data structures, I'd just keep them local to We could have a crate for data structures shared between extensions if really multiple core extensions want to parse the same output, but I'd rather we think of it as sharing common functionality between extensions only, without any direct connection between I hope that makes some sense. I'll see if I can take a closer look at Edit: Basically, I think of |
Okay, let’s take a step back. Do you agree that the machine-readable output format should be part of the public API and therefore subject to the stability guarantee?
Definitely – I’ve created #165 and #166 for this discussions. |
Yep, in the sense that we say that we are producing, for example, a nested JSON object with these keys & values. Not in the sense that we provide the infrastructure for parsing it in any shape or form. |
But if we guarantee that there is a JSON object with some fields, what is the downside to publishing a Rust data structure with the same fields? Isn’t it just a different view of the same information? |
It's a concrete implementation. Now we have to maintain two versioned interfaces: the definition of the interface itself as well as some implementation that we came up with. |
We have to maintain both (= the code and the specification/documentation) anyway. The only difference is whether we publish it separately or not. |
Similar to #83, we also want to access PWS slots by name. But we need the user PIN to read the slots (while we were able to read the OTP slots without authentication). So this leaves us with these options:
pinentry
module fromnitrocli
tonitrocli-ext
, use it to query the user PIN and then usenitrokey-rs
to access the PWS.pinentry
module fromnitrocli
tonitrocli-ext
(and makenitrocli
depend onnitrocli-ext
).nitrocli pws status
and parse its output.@d-e-s-o What do you think?
The text was updated successfully, but these errors were encountered: