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

Possibly implement a jwe hdr subcommand #81

Open
cbiedl opened this issue May 24, 2020 · 0 comments
Open

Possibly implement a jwe hdr subcommand #81

cbiedl opened this issue May 24, 2020 · 0 comments

Comments

@cbiedl
Copy link

cbiedl commented May 24, 2020

The clevis unlockers use the idiom

read -r -d . hdr

to read the heaader of the jwe on stdin, and the header only.

Now I'd like to move that logic to jose since the above way

  • deals with jwe internals that should not be visible on this layer,
  • is therefore not easy to understand, and
  • is a bashism which is really hard to eliminate¹².

As a solution I propose a new subcommand that does the same. The above statement would be rewritten as

hdr="$(jose jwe hdr --input=- --output=-)"

and I consider that an improvement.

¹ Since all solutions that are around slurp the entire input, something I want to avoid at any cost.
² I managed to replace all the other bashsims, you'll find that as an clevis issue soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants