Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 10, 2023

What changes were proposed in this pull request?

This PR aims to support user-provided OAuthTokenProvider implementations to refresh tokens throughout the life of the spark app.

spark.kubernetes.authenticate.submission.oauthTokenProvider=<token>
spark.kubernetes.authenticate.driver.oauthTokenProvider=<token>
spark.kubernetes.authenticate.oauthTokenProvider=<token>

OAuthTokenProvider interface has been stable for two years.

public interface OAuthTokenProvider {
  /**
   * Returns a Bearer token used for authorization between a client
   * and a kubernetes cluster. The token will be injected into an Authorization header.
   *
   * @return oauth token
   */
  String getToken();
}

Why are the changes needed?

Alpha Beta GA
1.13 1.21 1.22
  • EKS Service Account with 90 Days Expiration

    For Amazon EKS clusters, the extended expiry period is 90 days. Your Amazon EKS cluster's Kubernetes API server rejects requests with tokens that are greater than 90 days old.

Does this PR introduce any user-facing change?

No, this is a framework to support new features. In the future, we may need proper built-in provider implementations for public cloud environments like EKS/GKE/AKS.

How was this patch tested?

N/A

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-27997][K8S] Support OAuth Token Provider [SPARK-27997][K8S] Support user-provided OAuth Token Providers Aug 10, 2023
@dongjoon-hyun dongjoon-hyun marked this pull request as draft August 10, 2023 15:37
@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review August 10, 2023 16:06
@dongjoon-hyun dongjoon-hyun closed this by deleting the head repository Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants