8000 feat: add JWT decoding script for MDS3 format by tjsilver · Pull Request #575 · guardian/janus-app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add JWT decoding script for MDS3 format #575

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tjsilver
Copy link
Contributor

What is the purpose of this change?

This pull request introduces a new script, decode_jwt.sh, to decode JWT tokens in MDS3 format. The script validates the JWT file, decodes the payload, formats it as JSON, and saves it to a specified output file. It also includes error handling for invalid JWT formats and missing dependencies.

Key changes:

New script for JWT decoding:

  • Added script/decode_jwt.sh to decode JWT tokens in MDS3 format. The script:
    • Validates the existence and content of the JWT file.
    • Splits the JWT into header, payload, an 8254 d signature parts and checks for proper formatting.
    • Decodes the base64url-encoded payload and formats it as JSON using jq.
    • Provides a fallback to save raw decoded payload if jq is unavailable or fails.

User feedback and output:

  • Displays error messages for missing files, empty content, or invalid JWT formats.
  • Saves the decoded payload to a specified file and provides a preview of the first 10 lines of the decoded content.

What is the value of this change and how do we measure success?

This should come in useful when we want to use the Fido Metadata Service to provide the type of key to users. We can look up the AAGUID to find the type.

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

Successfully merging this pull request may close these issues.

1 participant
0