Skip to content

Commit 6ca6e5d

Browse files
authored
Revert "Add Auth0 client_credentials auth to simulation gateway calls (#3471)" (#3473)
This reverts commit ddf4649.
1 parent 5df2ef8 commit 6ca6e5d

7 files changed

Lines changed: 1 addition & 669 deletions

File tree

.github/workflows/push.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ jobs:
113113
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
114114
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
115115
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
116-
GATEWAY_AUTH_ISSUER: ${{ secrets.GATEWAY_AUTH_ISSUER }}
117-
GATEWAY_AUTH_AUDIENCE: ${{ secrets.GATEWAY_AUTH_AUDIENCE }}
118-
GATEWAY_AUTH_CLIENT_ID: ${{ secrets.GATEWAY_AUTH_CLIENT_ID }}
119-
GATEWAY_AUTH_CLIENT_SECRET: ${{ secrets.GATEWAY_AUTH_CLIENT_SECRET }}
120116
docker:
121117
name: Docker
122118
runs-on: ubuntu-latest

gcp/export.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
ANTHROPIC_API_KEY = os.environ["ANTHROPIC_API_KEY"]
1515
OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
1616
HUGGING_FACE_TOKEN = os.environ["HUGGING_FACE_TOKEN"]
17-
GATEWAY_AUTH_ISSUER = os.environ["GATEWAY_AUTH_ISSUER"]
18-
GATEWAY_AUTH_AUDIENCE = os.environ["GATEWAY_AUTH_AUDIENCE"]
19-
GATEWAY_AUTH_CLIENT_ID = os.environ["GATEWAY_AUTH_CLIENT_ID"]
20-
GATEWAY_AUTH_CLIENT_SECRET = os.environ["GATEWAY_AUTH_CLIENT_SECRET"]
2117

2218
# Export GAE to to .gac.json and DB_PD to .dbpw in the current directory
2319

@@ -39,14 +35,6 @@
3935
dockerfile = dockerfile.replace(".anthropic_api_key", ANTHROPIC_API_KEY)
4036
dockerfile = dockerfile.replace(".openai_api_key", OPENAI_API_KEY)
4137
dockerfile = dockerfile.replace(".hugging_face_token", HUGGING_FACE_TOKEN)
42-
dockerfile = dockerfile.replace(".gateway_auth_issuer", GATEWAY_AUTH_ISSUER)
43-
dockerfile = dockerfile.replace(".gateway_auth_audience", GATEWAY_AUTH_AUDIENCE)
44-
dockerfile = dockerfile.replace(
45-
".gateway_auth_client_id", GATEWAY_AUTH_CLIENT_ID
46-
)
47-
dockerfile = dockerfile.replace(
48-
".gateway_auth_client_secret", GATEWAY_AUTH_CLIENT_SECRET
49-
)
5038

5139
with open(dockerfile_location, "w") as f:
5240
f.write(dockerfile)

gcp/policyengine_api/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ ENV ANTHROPIC_API_KEY .anthropic_api_key
99
ENV OPENAI_API_KEY .openai_api_key
1010
ENV HUGGING_FACE_TOKEN .hugging_face_token
1111
ENV CREDENTIALS_JSON_API_V2 .credentials_json_api_v2
12-
ENV GATEWAY_AUTH_ISSUER .gateway_auth_issuer
13-
ENV GATEWAY_AUTH_AUDIENCE .gateway_auth_audience
14-
ENV GATEWAY_AUTH_CLIENT_ID .gateway_auth_client_id
15-
ENV GATEWAY_AUTH_CLIENT_SECRET .gateway_auth_client_secret
1612

1713
WORKDIR /app
1814

policyengine_api/libs/gateway_auth.py

Lines changed: 0 additions & 191 deletions
This file was deleted.

policyengine_api/libs/simulation_api_modal.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
import httpx
1313

1414
from policyengine_api.gcp_logging import logger
15-
from policyengine_api.libs.gateway_auth import (
16-
GatewayAuthTokenProvider,
17-
GatewayBearerAuth,
18-
_require_all_or_none_gateway_auth_env,
19-
)
2015

2116

2217
@dataclass
@@ -52,24 +47,7 @@ def __init__(self):
5247
"SIMULATION_API_URL",
5348
"https://policyengine--policyengine-simulation-gateway-web-app.modal.run",
5449
)
55-
self._token_provider = GatewayAuthTokenProvider()
56-
_require_all_or_none_gateway_auth_env()
57-
auth = (
58-
GatewayBearerAuth(self._token_provider)
59-
if self._token_provider.configured
60-
else None
61-
)
62-
if auth is None:
63-
logger.log_struct(
64-
{
65-
"message": (
66-
"SimulationAPIModal initialised without gateway auth; "
67-
"all GATEWAY_AUTH_* env vars are unset."
68-
),
69-
},
70-
severity="WARNING",
71-
)
72-
self.client = httpx.Client(timeout=30.0, auth=auth)
50+
self.client = httpx.Client(timeout=30.0)
7351

7452
def run(self, payload: dict) -> ModalSimulationExecution:
7553
"""

0 commit comments

Comments
 (0)