Reproducing the issue with the dockerized environment of the HTTP-API
,
using the 'debug' mode
.
A simple guide step-by-step.
# 1. Install Docker and check if it's running
docker ps
# 2. Clone the HTTP-API repo
git clone https://github.com/EUDAT-B2STAGE/http-api.git
# 3. Install the rapydo controller and init the current project
cd http-api
sudo -H data/scripts/prerequisites.sh
rapydo init
# 4. Configure the repository to use B2ACCESS
# NOTE: the debug mode is already set to use B2ACCESS development instance
vi projects/b2stage/project_configuration.yaml
# edit B2ACCESS_ACCOUNT and B2ACCESS_SECRET
# 5. Start containers and launch the server in debug mode
rapydo start
rapydo shell backend
# vvv this is inside the backend container
restapi launch
# ^^^ produces a lot of logs from VERY_VERBOSE log level
# 6. Login to B2ACCESS with the browser
open http://localhost:8080/auth/askauth
# NOTE: you need existing credentials in
# https://unity.eudat-aai.fz-juelich.de:8443/home/
# 7. Copy the token from above and use it to access data
TOKEN='thisisyourtokentakenfromthewebpage'
http localhost:8080/api/registered/tempZone/home/eudat \
Authorization:"Bearer $TOKEN"
At this point you should have the error already. Now to investigate further, a part from reading the HTTP-API server logs
# open a new shell inside the irods B2SAFE server container
rapydo shell icat
# check the obtained certificate
ls /opt/certificates/*/userproxy.crt
# check the current authorities
ls /etc/grid*/certificates/*
# check the logs from iRODS
tail -f /var/lib/irods/log/rodsLog*
Hope this helps.
p.s. to remove all of docker from the HTTP-API project:
rapydo clean --rm