Skip to content

Document an example of programatically generating asymmetric jwt signing keys #794

@michaelfortunato

Description

@michaelfortunato

It would be good to document examples of generating asymmetric signing keys for jwts. The main reason is that you want developers to use best practices when generating such keys (secure key length, right algorithm etc, and these concepts can be foreign to us).

Currently there is one solid resource (a gist) documenting this: https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9
To quote ygotthilf/:

ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
 openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub

Documentation for doing this programatically, say as part of a key rotation is even more sparse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions