Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for auth
Browse files Browse the repository at this point in the history
NotChristianGarcia committed Nov 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3ad4fef commit 06874f0
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions service/api_pods_podid_func.py
Original file line number Diff line number Diff line change
@@ -369,6 +369,8 @@ async def pod_auth(pod_id_net, request: Request):

oauth2_url = f"https://{tapis_domain}/v3/oauth2/authorize?client_id={client_id}&redirect_uri={auth_callback_url}&response_type=code"

return JSONResponse(content = f"tenant_id: {g.request_tenant_id}, beep: {t.base_url}", status_code = 302)

# Create tapis client or update tapis client if needed
try:
res, td = t.authenticator.create_client(
@@ -378,7 +380,7 @@ async def pod_auth(pod_id_net, request: Request):
display_name = client_display_name,
description = client_description,
_x_tapis_tenant = g.request_tenant_id,
_x_tapis_user = "pods",
_x_tapis_user = "_tapis_pods",
_tapis_debug = True
)
except BadRequestError as e: # Exceptions in 3 shouldn't have e.message (only e.args), but this one does.
@@ -392,7 +394,7 @@ async def pod_auth(pod_id_net, request: Request):
display_name = client_display_name,
description = client_description,
_x_tapis_tenant = g.request_tenant_id,
_x_tapis_user = "pods",
_x_tapis_user = "_tapis_pods",
_tapis_debug = True
)
# Assuming you want to return a success response after updating
2 changes: 1 addition & 1 deletion service/health_central.py
Original file line number Diff line number Diff line change
@@ -254,7 +254,7 @@ def main():
Main function for health checks.
"""
# Try and run check_db_pods. Will try for 60 seconds until health is declared "broken".
logger.info("Top of health. Checking if db's are initialized.")
logger.info("Top of health central. Checking if db's are initialized.")
idx = 0
while idx < 12:
try:

0 comments on commit 06874f0

Please sign in to comment.