Skip to content

Documentation, JWT Builder Workload Identity and JWK Rotation #8529

Open

Description

@jimmy1wu

Feature epic details

Operating systems

Does the documentation apply to all operating systems?

  • Yes
  • No; specify operating systems: ______

Summary

Provide a concise summary of your feature. What is the update, why does it matter, and to whom? What do 80% of target users need to know to be most easily productive using your runtime update?

Enhance the JWT Builder to be able to set a workload identity claim, generated by the server, in the JWTs that it issues. This claim cannot be modified via the JwtBuilder API to provide attestation.

Also, add the ability to define the rotation interval of the JWKs used for signing and verifying the JWTs issued by the JWT Builder as well as define the maximum number of JWKs retained by the JWK endpoint for verifying JWTs.

Configuration

List any new or changed properties, parameters, elements, attributes, etc. Include default values and configuration examples where relevant:

Example configuration:

<jwtBuilder
    workloadIdentityClaim="workload-identity"
    jwkRotationTime="60m"
    jwkMaxKeys="3"
/>

Updates to existing topics

To update existing topics, specify a link to the topics that are affected. Include a copy of the current text and the exact text to which it will change. For example: Change ABC to XYZ

For additional info/examples to reuse see the beta blog: https://openliberty.io/blog/2026/10/20/26.0.0.11-beta.html#jwt_builder

Create a new topic

To create a topic, specify a first draft of the topic that you want added and the section in the navigation where the topic should go.

Activity

  1. jimmy1wu commented on Oct 7, 2026

    @jimmy1wu
    MemberAuthor

    moving out to 26.0.0.12

  2. Zech-Hein commented on Oct 28, 2026

    @Zech-Hein

    Update Details - Page 1

    Enable workload identity

    To enable workload identity in the JWT Builder, set the workloadIdentityClaim attribute in the jwtBuilder element to your desired claim name. For example:

    <jwtBuilder id="myJwtBuilder" workloadIdentityClaim="workload-identity" />

    When the JwtBuilder API is used to create a JWT, it automatically injects the workload identity into the workload-identity claim. For example:

    JwtBuilder.create("myJwtBuilder")
        .subject("jdoe")
        .audience(List.of("server"))
        .claim("email", "jdoe@example.com")
        .buildJwt();
    

    This code creates a JWT with the following payload:

    {
      "token_type": "Bearer",
      "aud": "server",
      "sub": "jdoe",
      "email": "jdoe@example.com",
      "workload-identity": "myHost,/wlp/usr/,myServer,myApp",
      "iss": "https://localhost:9443/jwt/myJwtBuilder",
      "exp": 1790280039,
      "iat": 1790272839
    }
    
    The format of the workload identity claim’s value is <host-name>,<path-to-usr-dir>,<server-name>,<app-name>. In a containerized environment, you can use the CONTAINER_HOST and CONTAINER_NAME environment variables to customize the <host-name> and <server-name> values.
    
  3. Zech-Hein commented on Oct 28, 2026

    @Zech-Hein

    Update details - Page 2

    By default, after creation, the key is rotated automatically every 12 hours. The maximum number of JWKs is 2 by default.

    To configure the JWK rotation interval and the maximum number of JWKs published on the JWK endpoint, set the jwkRotationTime and jwkMaxKeys attributes in the jwtBuilder element. For example:

    <jwtBuilder jwkRotationTime="30m" jwkMaxKeys="4" />

    In this example, the JWKs are rotated every 30 minutes and the JWK endpoint publishes a maximum of 4 JWKs.

  4. Zech-Hein commented on Oct 28, 2026

    @Zech-Hein

    Update details - Page 3

    In the second procedure 2.

    Configure the JWT builder by modifying the jwtBuilder element.
    
    For information about jwtBuilder attributes that you can configure, see [JWT Builder (jwtBuilder)](https://www.ibm.com/docs/en/SSAW57_liberty/com.ibm.websphere.liberty.autogen.nd.doc/ae/rwlp_config_jwtBuilder.html).
    

    Add a link to the OL docs, say
    Additional Information in Open Liberty Docs -
    https://openliberty.io/docs/latest/reference/feature/jwt-1.0.html

    And then after the step about

    If the JWT token is signed by using the RS256 algorithm, you can configure the JWT builder to sign the JWT token with JSON Web Key (JWK) by setting jwkEnabled="true". When JWK is enabled, the JWT builder dynamically generates key pairs and signs the JWT token with the private key. To validate the signature, the JWT consumer can retrieve the key from the JWK API, which has the following format:
    
    https://<host_name>:<ssl_port>/jwt/ibm/api/<jwtBuilder_configuration_id>/jwk
    

    Add Additional Information in Open Liberty Docs -
    https://openliberty.io/docs/latest/json-web-token.html

  5. Zech-Hein commented on Oct 28, 2026

    @Zech-Hein

    Update Details - Page 4

    Add a new section at the bottom called "JWT Workload Identity"
    to say

    Consumers of the workload identity must ensure that the server issuing
    the JWT has the workload identity feature enabled to guarantee that
    the workload identity is generated by Liberty and not by the Java API.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions