JOSE-JWK-USE(1)
π jose-jwk-use(1) β the manual page, bestie edition
okay so this is the jose-jwk-use(1) page and honestly it's lowkey one of the most useful little gremlins in the whole jose toolbox. it's all about asking a key politely (or not so politely) whether it's allowed to do a thing. let's get into it π
β¨ NAME β¨
jose-jwk-use β validates a key for the specified use(s). that's it. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
jose jwk use -i JWK [-a] [-r] -u OP
π¦ OVERVIEW π¦
okay so picture this: the jose jwk use command validates one or more JWK(Set) inputs for a given set of usages. and how does it validate them, you ask? it checks them against the "use" and "key_ops" properties of each JWK. that's the whole assignment. π
by default, if a JWK has no restrictions, an operation will be allowed. like, no rules means no problem, the key is just out here living its life freely. β¨ however β and this is the important part, bestie, don't skip it β if you specify the -r option, you can ensure that a JWK will not be allowed unless it explicitly permits the option. so instead of "no restrictions = sure go ahead", it becomes "no explicit permission = absolutely not, ma'am." π
ββοΈ
in normal operation, jose jwk use will fail if any of the JWKs do not validate. like, the whole thing just gives up. π but! if the -o option is used, jose jwk use will instead write a JWK(Set) containing all of the input keys that validate. it's like a little bouncer at the club, checking IDs and only letting the valid ones inside. ποΈ and if no JWKs validate? the command will fail. empty club, party's over, lights on. π
π OPTIONS π
-i JSON,--input=JSONβ parse JWK(Set) from JSON. you're handing it the actual JSON right there on the command line, no file needed bestie π-i FILE,--input=FILEβ read JWK(Set) from FILE. the classic. the standard. the "i saved it to disk like a responsible person" move π-i -,--input=-β read JWK(Set) from standard input. that lil-means stdin, iykyk π«Ά-u sign,--use=signβ validate the key for signing βοΈ-u verify,--use=verifyβ validate the key for verifying π-u encrypt,--use=encryptβ validate the key for encrypting π-u decrypt,--use=decryptβ validate the key for decrypting π-u wrapKey,--use=wrapKeyβ validate the key for wrapping π-u unwrapKey,--use=unwrapKeyβ validate the key for unwrapping π-u deriveKey,--use=deriveKeyβ validate the key for deriving keys π±-u deriveBits,--use=deriveBitsβ validate the key for deriving bits β‘-a,--allβ succeeds only if all operations are allowed. all of them. every single one. no stragglers. π-r,--requiredβ operations must be explicitly allowed. like we said up top, no explicit permission means no deal π«-o FILE,--output=FILEβ filter keys to FILE as JWK(Set). only the survivors get written out πΎ-o -,--output=-β filter keys to standard output as JWK(Set). yep,-again, this time it's stdout π¬-s,--setβ always output a JWKSet. no matter what. set energy only. π§Ί
π EXAMPLES π
here's what success and failure look like, using a private key and a public key. watch the exit codes, they're the whole story ngl π
$ jose jwk gen -i '{"alg":"ES256"}' -o prv.jwk
$ jose jwk pub -i prv.jwk -o pub.jwk
$ jose jwk use -i prv.jwk -u sign
$ echo $?
0
$ jose jwk use -i pub.jwk -u sign
$ echo $?
1
see that? the private key said "yes bestie, i can sign" and gave us 0. the public key said "absolutely not, i'm the public one" and gave us 1. iconic behaviour from both of them honestly πβ¨
π AUTHOR π
Nathaniel McCallum <npmccallum@redhat.com> β the main character who wrote this π«Ά
β SEE ALSO β
okay that's the whole page, you ate that, periodt. π§ this was jose-jwk-use(1), dated 06/09/2026, and you can find it filed under the JOSE-JWK-USE(1) manual. mwah, go validate some keys πππ¦
π¦ where this page comes from
- arch rolling: jose 15-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms