File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1414ANTHROPIC_API_KEY = os .environ ["ANTHROPIC_API_KEY" ]
1515OPENAI_API_KEY = os .environ ["OPENAI_API_KEY" ]
1616HUGGING_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
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 )
Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ ENV ANTHROPIC_API_KEY .anthropic_api_key
99ENV OPENAI_API_KEY .openai_api_key
1010ENV HUGGING_FACE_TOKEN .hugging_face_token
1111ENV 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
1713WORKDIR /app
1814
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212import httpx
1313
1414from 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 """
You can’t perform that action at this time.
0 commit comments