Skip to main content

microprofile-jwt-auth

View Github Project

Introduction

Today, the most common solutions involving RESTful and microservices security are based on OpenID Connect (OIDC)OAuth2 and JSON Web Token (JWT) standards.

This specification outlines how the signed JWT tokens issued by OIDC and other trusted providers can be verified and their claims used for Role Based Access Control (RBAC) of microservice endpoints.

Released versions

microprofile-jwt-auth: Javadocs | Spec PDF |Spec html
All changes can be found here.

<dependency>
    <groupId>org.eclipse.microprofile.jwt</groupId>
    <artifactId>microprofile-jwt-auth-api</artifactId>
    <version>2.1</version>
</dependency>

Motivation

For RESTful based microservices, security tokens in a JWT format offer a lightweight and interoperable way to propagate identities across different services, where:

  • Services don’t need to store any state about clients or users

  • Services can verify and introspect the token locally if it follows a JWT format or remotely with the trusted provider.

  • Services can identify the caller and verify a given service is indeed an indended audience of the token.

  • Services can enforce authorization policies based on the information within the token.

  • Services can use the token for both delegation and impersonation of identities.

Documentation

For links to the latest maven artifacts, Javadoc and specification document, see the latest release.

Help optimize Enterprise Java for a microservices architecture.

Join the MicroProfile Google Group, peruse recent topics or create your own, and join in on the conversation. It's that easy!

JOIN THE DISCUSSION