Skip to content

Commit 002a9e2

Browse files
committed
Incorporated OIDC for authenticating towards Azure in GH Action
1 parent 1ac8bdb commit 002a9e2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"start": "react-scripts start",
19-
"build": "react-scripts build",
19+
"build": "GENERATE_SOURCEMAP=false react-scripts build",
2020
"test": "react-scripts test",
2121
"eject": "react-scripts eject"
2222
},

hvalfangst_function/function_app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def validate_jwt(token: str, audience: str) -> bool:
7777
@app.blob_output(arg_name="outbound", path="hvalfangstcontainer/in/input.csv", connection="AzureWebJobsStorage")
7878
def upload_csv(req: func.HttpRequest, outbound: func.Out[str]) -> str:
7979
try:
80+
logging.info("Received HTTP request to upload CSV")
8081

82+
# Validate JWT token
8183
token = req.headers.get("Authorization").split(" ")[1] # Extract Bearer token
8284
if not validate_jwt(token, audience=os.environ.get("FUNCTION_APP_CLIENT_ID")):
8385
return func.HttpResponse("Unauthorized", status_code=401)

0 commit comments

Comments
 (0)