News
New Open Source PASETO Library Offers JWT Alternative
- By John K. Waters
- July 28, 2020
Authentication solution provider Okta has launched a new Java developer library designed to streamline the use of Platform Agnostic Security Tokens (PASETOs) and provide an alternative to JSON Web Tokens (JWT) to authenticate end users.
Okta's new JPaseto open-source Java-based developer library "aims to be the easiest to use and understand library for creating and verifying PASETO tokens on the Java Virtual Machine (JVM)," the GitHub description reads. It's designed specifically to make working with PASETOs in current applications easier, and generally, to increase adoption of security tokens, without adding additional work for developers.
PASETOs, which were developed by Scott Arciszewski, a senior security engineer in AWS's Cryptography group, provide a cryptographically secure, compact, and URL-safe representation of claims that may be transferred between two parties. The claims are encoded in JavaScript Object Notation (JSON), version-tagged, and either encrypted using shared-key cryptography or signed using public-key cryptography.
PASETO's are designed to reduce the scope of the JavaScript Object Signing and Encryption (JOSE) family of specifications, which includes JWT, while continuing to provide the functionality needed to secure applications. They were developed to improve upon the "cryptographic resilience" of JWTs, and provide a simpler design.
The PASETOs spec defines two types of tokens: local and public. Local tokens are always symmetrically encrypted with a shared secret key, which means no one can view the contents of a local PASETO unless he or she has the correct secret key. Public tokens are readable by anyone and are validated with a public key.
Okta developed JPaseto to make it even easier to work with PASETOs, explained Brian Demers, a developer advocate at Okta and a PMC member for the Apache Shiro project, in a blog post. "We took everything we loved and learned from the popular JJWT project and put it into JPaseto," said
Â
JJWT is among the most popular JWT libraries for Java developers. It's a pure Java implementation its developers created to be "the easiest to use and understand library for creating and verifying JWTs on the Java Virtual Machine (JVM) and Android."
The problem with JWTs, Demers said, is that their complexities make them easy to misuse, "which results in the large number of JWT vulnerabilities we've seen lately. While many of these vulnerabilities are specific to a given JWT implementation, part of the fault lies with the JWT specification itself."
Among the of the most common JWT exploits, Demers, pointed out, are authentication bypass attacks, in which an attacker is able to edit or forge a JWT and disable the token's cryptographic verification. He points to a famous 2018 post by Arciszewski that detail the cryptographic and spec-related issues in the JWT spec. JPaseto, which has many of the same functions as JJWT,
These issues matter, Demers said, because JWTs have become a critical part of web authentication. "They're used in nearly every modern Web application to secure user sessions," he said. "Their widespread adoption paired with their inherent security issues has caused a perfect storm of widespread vulnerabilities."
JPaseto is available now on Maven Central.
About the Author
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at [email protected].