Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpricethesecond committed Apr 19, 2024
1 parent 6742ad2 commit b12b482
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tapis/flaskbase:1.5.0
FROM tapis/flaskbase:1.6.3

ADD requirements.txt /home/tapis/requirements.txt
RUN pip install -r /home/tapis/requirements.txt
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version: "3.5"

services:
globus-proxy:
# image: tapis/globus-proxy
build: .
volumes:
- ./configschema.json:/home/tapis/configschema.json
- ./config-local.json:/home/tapis/config.json
- ./service.log:/home/tapis/service.log
- ../gpsettings.json:/home/tapis/gpsettings.json
image: tapis/globus-proxy:1.4.0
# build: .
# volumes:
# - ./configschema.json:/home/tapis/configschema.json
# - ./config-local.json:/home/tapis/config.json
# - ./service.log:/home/tapis/service.log
# - ../gpsettings.json:/home/tapis/gpsettings.json
container_name: globus-proxy
networks:
- tapis
Expand Down
2 changes: 2 additions & 0 deletions service/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ def log_before():
def log_after(response):
# logger.debug(f'request complete with status:: {response.data['status']}')
logger.debug(f'request complete with status:: {response.status}\n')
if response.status == '500 INTERNAL SERVER ERROR':
print(f'its all messed up')
return response
6 changes: 5 additions & 1 deletion service/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def authn_and_authz():
:return:
"""
# skip_sk = False
logger.debug(f'in authn and authz for tapis')
authentication()
#authorization(skip_sk)

Expand All @@ -28,7 +29,7 @@ def authentication():
# authorization.
# we always try to call the primary tapis authentication function to add authentication information to the
# thread-local. If it fails due to a missing token, we then check if there is a public endpoint
logger.debug(request.headers)
logger.debug(f'in tapis authentication with {request.headers}')
try:
tapisflask.auth.authentication()
logger.debug(f"Threadlocal tenant id: "+str(conf.tenant[g.tenant_id]))
Expand All @@ -46,6 +47,9 @@ def authentication():
g.tenant_id = request.args.get('tenant')
logger.debug(f"Threadlocal tenant id: "+str(g.tenant_id))
return True
except Exception as e:
logger.error(e)
print(e)

# this is the Tapis client that tenants will use for interacting with other services, such as the security kernel.
Tenants = TenantCache()
Expand Down

0 comments on commit b12b482

Please sign in to comment.