Class NoAuthTokenPlatformClient

java.lang.Object
io.confluent.kafka.odyssey.auth.NoAuthTokenPlatformClient
All Implemented Interfaces:
TokenPlatformClient, AutoCloseable

public class NoAuthTokenPlatformClient extends Object implements TokenPlatformClient
Token Platform client for local development that bypasses authentication.

This client returns a fixed token that recipient will accept when authentication is disabled (the default for local development). It does not require SPIRE agent or any external authentication service.

WARNING: This client is for local development and testing ONLY. It must NEVER be used in production environments. The factory logs a WARNING when this client is instantiated.

To use this client, configure the broker with:

confluent.token.platform.endpoint=local://noauth
See Also:
  • Constructor Details

    • NoAuthTokenPlatformClient

      public NoAuthTokenPlatformClient()
  • Method Details

    • issueTokenAsync

      public CompletableFuture<String> issueTokenAsync(TokenRequestContext context, Executor executor)
      Description copied from interface: TokenPlatformClient
      Issues a Logical Access Token (LAT) for the specified context asynchronously.

      This method uses non-blocking retry delays scheduled via the provided executor.

      Specified by:
      issueTokenAsync in interface TokenPlatformClient
      Parameters:
      context - the token request context containing principal and target information
      executor - executor for scheduling retry delays
      Returns:
      a future that completes with the token or fails with TokenPlatformException
    • close

      public void close()
      Description copied from interface: TokenPlatformClient
      Closes the client and releases any resources (e.g., gRPC channels). This method is idempotent - calling it multiple times has no additional effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface TokenPlatformClient