neicnordic / ega-data-api Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ega-archive/ega-data-api
License: Apache License 2.0
This project forked from ega-archive/ega-data-api
License: Apache License 2.0
Review existing log messages in order to have better and more meaningful messages for debugging and production monitoring.
Such logs are not ok:
log.info("NO!!");
Logs have information that is meaningful for debugging and monitoring purposes.
Peer review, Unit tests log output.
We need to have the option to enable HTTP or HTTPS traffic between services.
DataEdge and RES are the main ones.
We need to see the changes and add an option to enable HTTP or HTTPS, We can work with profiles in JAVA.
Integration tests pass for both HTTP and HTTPS
We want to process ELIXIR AAI JWT tokens that contain the user information in the sub
claim. The minimal information needed currently in a token is:
{
"sub": "<user_id_hash>@elixir-europe.org",
"authorities": [
"EGAD00010000919"
]
}
We want to have logs that contain that information:
User [email protected] attempt successfully to download file DownloadEntry [downloadLogId=0, clientIp=172.23.0.1, server=file, [email protected], fileId=EGAF00000000014, downloadSpeed=0.005708738814952762, downloadStatus=success, encryptionType=plain, startCoordinate=0, endCoordinate=0, bytes=1287, created=2019-10-17 05:35:22.152, TokenSource=EGA]
Dataedge accepts JWT tokens but can only read the user only from tokens that are formated as:
{
"user_name": "<user_id_hash>@elixir-europe.org",
"authorities": [
"EGAD00010000919"
]
}
When using sub
instead of user_name
we get no user in the logs:
User attempt successfully to download file DownloadEntry [downloadLogId=0, clientIp=172.23.0.1, server=file, email=, fileId=EGAF00000000014, downloadSpeed=0.005267720365728943, downloadStatus=success, encryptionType=plain, startCoordinate=0, endCoordinate=0, bytes=1287, created=2019-10-17 06:11:09.613, TokenSource=EGA]
Notice the user
is null
These lines should override the default parameter:
https://github.com/neicnordic/ega-data-api/blob/master/ega-data-api-dataedge/src/main/java/eu/elixir/ega/ebi/dataedge/config/MyUserAuthenticationConverter.java#L43-L44
but changing it to it does not yeild any result.
So the issue must be somewhere else ๐
docker build -t ega-data-api/ega-dataedge --file Dockerfile.dataedge .
docker build -t ega-data-api/ega-res --file Dockerfile.res .
docker build -t ega-data-api/ega-keyserver --file Dockerfile.keyserver .
docker build -t ega-data-api/ega-filedatabase --file Dockerfile.filedatabase .
docker build -t ega-data-api/ega-postgres --file extras/postgresdb/Dockerfile .
cd extras && source ./variables.sh
docker-compose up -d
export TOKEN=<give_token>
curl -k -vvvv -H "Authorization: Bearer $TOKEN" "https://localhost:9058/files/EGAF00000000014"
Logging needs to be in place.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.