You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+103Lines changed: 103 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,109 @@ to add `OPENAI_API_KEY="My API Key"` to your `.env` file
71
71
so that your API key is not stored in source control.
72
72
[Get an API key here](https://platform.openai.com/settings/organization/api-keys).
73
73
74
+
### Workload Identity Authentication
75
+
76
+
For secure, automated environments like cloud-managed Kubernetes, Azure, and Google Cloud Platform, you can use workload identity authentication with short-lived tokens from cloud identity providers instead of long-lived API keys.
77
+
78
+
#### Kubernetes (service account tokens)
79
+
80
+
```python
81
+
from openai import OpenAI
82
+
from openai.auth import k8s_service_account_token_provider
0 commit comments