Skip to content

Commit 22f0d53

Browse files
committed
chore: fix key names for agent
1 parent 4e54f35 commit 22f0d53

File tree

6 files changed

+18
-19
lines changed

6 files changed

+18
-19
lines changed

.env.example

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ATLAN_START_TO_CLOSE_TIMEOUT_SECONDS=7200 # 2 hours
2424
# if you plan to deploy the app in customer environment, below is a sample environment variables you need to set
2525
ATLAN_WORKFLOW_HOST="tenant-temporal.atlan.com"
2626
ATLAN_WORKFLOW_PORT="443"
27-
ATLAN_WORKFLOW_AUTH_ENABLED="true"
27+
ATLAN_AUTH_ENABLED="true"
28+
ATLAN_AUTH_URL="https://tenant.atlan.com/auth/realms/default/protocol/openid-connect/token"
29+
ATLAN_WORKFLOW_TLS_ENABLED="true"
2830
ENABLE_ATLAN_UPLOAD="true"
2931

3032
# Storage:
@@ -34,10 +36,6 @@ UPSTREAM_OBJECT_STORE_NAME="atlan-storage"
3436
# Secret Store
3537
SECRET_STORE_NAME="aws-secrets"
3638

37-
# atlan external fields
38-
ATLAN_DEPLOYMENT_NAME="agent"
39-
ATLAN_WORKFLOW_TLS_ENABLED=False
40-
ATLAN_WORKFLOW_AUTH_ENABLED=False
41-
ATLAN_AUTH_URL=""
42-
client_id=""
43-
client_secret=""
39+
# Client ID/Secret key fields, the value is the name of the key in the secret store
40+
ATLAN_AUTH_CLIENT_ID_KEY="ATLAN_AUTH_CLIENT_ID"
41+
ATLAN_AUTH_CLIENT_SECRET_KEY="ATLAN_AUTH_CLIENT_SECRET"

application_sdk/clients/atlan_auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ def clear_cache(self) -> None:
197197
"""
198198
# we are doing this to force a fetch of the credentials from secret store
199199
self.credentials = None
200-
self.auth_url = None
201200
self._access_token = None
202201
self._token_expiry = 0
203202

application_sdk/constants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@
115115

116116
# Deployment Secret Store Key Names
117117
#: Key name for OAuth2 client ID in deployment secrets (can be overridden via ATLAN_AUTH_CLIENT_ID_KEY)
118-
WORKFLOW_AUTH_CLIENT_ID_KEY = os.getenv("ATLAN_AUTH_CLIENT_ID_KEY", "client_id")
118+
WORKFLOW_AUTH_CLIENT_ID_KEY = os.getenv(
119+
"ATLAN_AUTH_CLIENT_ID_KEY", "ATLAN_AUTH_CLIENT_ID"
120+
)
119121
#: Key name for OAuth2 client secret in deployment secrets (can be overridden via ATLAN_AUTH_CLIENT_SECRET_KEY)
120122
WORKFLOW_AUTH_CLIENT_SECRET_KEY = os.getenv(
121-
"ATLAN_AUTH_CLIENT_SECRET_KEY", "client_secret"
123+
"ATLAN_AUTH_CLIENT_SECRET_KEY", "ATLAN_AUTH_CLIENT_SECRET"
122124
)
123125

124126
# Workflow Constants

application_sdk/services/secretstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def get_deployment_secret(cls, key: str) -> Any:
252252
253253
Examples:
254254
>>> # Get a specific deployment configuration value
255-
>>> auth_url = SecretStore.get_deployment_secret("atlan_auth_url")
255+
>>> auth_url = SecretStore.get_deployment_secret("ATLAN_AUTH_CLIENT_ID")
256256
>>> if auth_url:
257257
... print(f"Auth URL: {auth_url}")
258258
>>> # Get deployment name

components/atlan-storage.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ spec:
1414
value: https://{{tenant}}.atlan.com/api/blobstorage
1515
- name: accessKey
1616
secretKeyRef:
17-
name: client_id
18-
key: client_id
17+
name: ATLAN_AUTH_CLIENT_ID
18+
key: ATLAN_AUTH_CLIENT_ID
1919
- name: secretKey
2020
secretKeyRef:
21-
name: client_secret
22-
key: client_secret
21+
name: ATLAN_AUTH_CLIENT_SECRET
22+
key: ATLAN_AUTH_CLIENT_SECRET
2323
- name: forcePathStyle
2424
value: "true"
2525
auth:

docs/docs/concepts/temporal_auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The authentication system uses a Dapr secret store component that can be configu
5959
```bash
6060
# Authentication settings
6161
ATLAN_AUTH_ENABLED=true
62-
ATLAN_AUTH_URL=https://your-oauth-provider.com/oauth/token
62+
ATLAN_AUTH_URL=https://tenant.atlan.com/auth/realms/default/protocol/openid-connect/token
6363

6464
# Secret store component configuration
6565
ATLAN_DEPLOYMENT_SECRET_COMPONENT=deployment-secret-store
@@ -329,7 +329,7 @@ dapr invoke --app-id your-app --method get-secret --data '{"key": "atlan-deploym
329329
**Symptom**: Token refresh failures
330330
```bash
331331
# Verify auth URL accessibility
332-
curl -X POST $ATLAN_WORKFLOW_AUTH_URL \
332+
curl -X POST $ATLAN_AUTH_URL \
333333
-d "grant_type=client_credentials&client_id=...&client_secret=..."
334334

335335
# Check credential validity in secret store
@@ -508,7 +508,7 @@ spec:
508508
```bash
509509
# Authentication settings
510510
ATLAN_AUTH_ENABLED=true
511-
ATLAN_WORKFLOW_AUTH_URL=https://your-oauth-server.com/oauth/token
511+
ATLAN_AUTH_URL=https://tenant.atlan.com/auth/realms/default/protocol/openid-connect/token
512512

513513
# Secret store configuration
514514
ATLAN_DEPLOYMENT_SECRET_COMPONENT=deployment-secret-store

0 commit comments

Comments
 (0)