Class NoAuthTokenPlatformClient
java.lang.Object
io.confluent.kafka.odyssey.auth.NoAuthTokenPlatformClient
- All Implemented Interfaces:
TokenPlatformClient, AutoCloseable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the client and releases any resources (e.g., gRPC channels).issueTokenAsync(TokenRequestContext context, Executor executor) Issues a Logical Access Token (LAT) for the specified context asynchronously.
-
Constructor Details
-
NoAuthTokenPlatformClient
public NoAuthTokenPlatformClient()
-
-
Method Details
-
issueTokenAsync
Description copied from interface:TokenPlatformClientIssues a Logical Access Token (LAT) for the specified context asynchronously.This method uses non-blocking retry delays scheduled via the provided executor.
- Specified by:
issueTokenAsyncin interfaceTokenPlatformClient- Parameters:
context- the token request context containing principal and target informationexecutor- 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:TokenPlatformClientCloses the client and releases any resources (e.g., gRPC channels). This method is idempotent - calling it multiple times has no additional effect.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTokenPlatformClient
-