User token provisioning
This document explains how users can provide Kubernetes user tokens from CLI, API, and SDK from the client side for Feast authentication.
Overview
Feast supports multiple methods for providing user tokens to authenticate with Kubernetes-based feature stores. This guide covers all the available approaches for different use cases and environments.
Table of Contents
SDK Configuration (Python)
Method 1: Direct Configuration in FeatureStore
Method 2: Environment Variable
Method 3: Configuration File
Create or update your feature_store.yaml:
Feature Store will read the token from config YAML
Note: The KubernetesAuthConfig class is configured to allow extra fields, so the user_token field will be properly recognized when loaded from YAML files.
Then use in Python:
CLI Usage
Method 1: Environment Variable
Method 2: Configuration File
Create or update your feature_store.yaml:
Then use CLI commands:
API Usage (REST/gRPC)
REST API
Method 1: Authorization Header
Method 2: Using requests Session
gRPC API
Method 1: gRPC Metadata
Method 2: gRPC Interceptor
Programmatic SDK Usage
Token from Kubernetes Config
Configuration Priority
The system checks for tokens in this order:
Intra-communication:
INTRA_COMMUNICATION_BASE64(for service-to-service)Direct configuration:
user_tokeninKubernetesAuthConfigor infeature_store.yamlService account token:
/var/run/secrets/kubernetes.io/serviceaccount/token(for pods)Environment variable:
LOCAL_K8S_TOKEN
Troubleshooting
Common Issues
Token Not Found
Solution: Ensure the token is provided through one of the supported methods.
Invalid Token
Solution: Verify the token is valid and not expired.
Permission Denied
Solution: Check that the user has the required groups/namespaces access.
Related Documentation
Last updated
Was this helpful?