Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

FAIRDataTeam/FAIRDataPoint

Open more actions menu

Repository files navigation

FAIR Data Point

GitHub release (latest SemVer) Libraries.io License Docker Pulls Documentation Status DOI

The FAIR Data Point (FDP) provides an HTTP API for creating, storing, and serving FAIR (Findable, Accessible, Interoperable, Reusable) metadata in the form of RDF. The metadata content is generated semi-automatically according to the FAIR Data Point specification.

Usage

More information about the FDP, how to deploy it, and how to use it, can be found in the FDP documentation.

API Documentation

The FAIR Data Point API also comes with embedded OpenAPI documentation based on SwaggerUI. Each FDP serves its own human friendly API documentation at the path /swagger-ui.html, for example, https://app.fairdatapoint.org/swagger-ui.html. In addition, machine readable API docs (JSON) are available at the path /v3/api-docs, for example, https://app.fairdatapoint.org/v3/api-docs.

Development

Technology Stack

The FDP runs on the following technology stack and is typically deployed as a Docker container.

  • Spring-boot
  • Java
  • Maven
  • MongoDB
  • Docker (only required for building a Docker image and running the container)

Build & Run

The FDP requires a MongoDB instance to store its application data, such as user accounts and settings. This can be achieved by running the official mongo docker image.

To configure the FDP to use MongoDB with standard connection (mongodb://localhost:27017/fdp), instruct Spring Boot to use the development profile, as follows:

$ mvn spring-boot:run -Dspring-boot.run.profiles=development

Alternatively, create an application.yml file in the project root with the desired configuration settings, and run:

$ mvn spring-boot:run

Run tests

Tests can be run, from the root of the project, as follows:

$ mvn test

Create a Docker image

To build a Docker image, run this from the project root:

$ docker build -f Dockerfile -t fairdatapoint:local .

Security

Most of the API endpoints allow GET requests without authentication. In contrast, POST, PUT, DELETE, and PATCH requests typically do require authentication. We use JWT Tokens and Bearer Token Authentication. A token can be obtained by posting username and password to the /tokens endpoint. For more details, visit the FDP OpenAPI documentation at /swagger-ui.html.

By default, the FDP sets up the following default users.

Warning

The default users are convenient for local testing, but they must be removed, or modified, before exposing the FDP to the public internet.

  • ADMIN:
    • Username: albert.einstein@example.com
    • Password: password
  • USER:
    • Username: nikola.tesla@example.com
    • Password: password

Running behind a reverse-proxy

When running behind a reverse-proxy, the FDP app gets the actual remote IP from the X-Forwarded-For HTTP header. This remote IP is used for rate limiting when the FDP is configured as an index (instance.index=true). To prevent IP spoofing, your web-facing reverse-proxy should set the X-Forwarded-For header to a trusted value and discard any X-Forwarded-For headers sent by remote clients.

From Mozilla's X-Forwarded-For docs:

If you know that all proxies in the request chain are trusted (i.e., you control them) and are configured correctly, the parts of the header added by your proxies can be trusted. If any proxy is malicious or misconfigured, any part of the header not added by a trusted proxy may be spoofed or may have an unexpected format or contents. If the server can be directly connected to from the internet — even if it is also behind a trusted reverse proxy — no part of the X-Forwarded-For IP list can be considered trustworthy or safe for security-related uses.

Any security-related use of X-Forwarded-For (such as for rate limiting or IP-based access control) must only use IP addresses added by a trusted proxy. Using untrustworthy values can result in rate-limiter avoidance, access-control bypass, memory exhaustion, or other negative security or availability consequences.

Leftmost (untrusted) values must only be used for cases where there is no negative impact from using spoofed values.

Contributing

Interested in contributing to FDP development? Take a look at our contribution guidelines and code of conduct.

Citation

The following paper can be cited as a reference for the FAIR Data Point:

@article{
  10.1162/dint_a_00160,
  author = {Bonino da Silva Santos, Luiz Olavo and Burger, Kees and Kaliyaperumal, Rajaram and Wilkinson, Mark D.},
  title = "{FAIR Data Point: A FAIR-oriented approach for metadata publication}",
  journal = {Data Intelligence},
  pages = {1-21},
  year = {2022},
  month = {08},
  issn = {2641-435X},
  doi = {10.1162/dint_a_00160},
  url = {https://doi.org/10.1162/dint\_a\_00160},
  eprint = {https://direct.mit.edu/dint/article-pdf/doi/10.1162/dint\_a\_00160/2038268/dint\_a\_00160.pdf}
}

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Related GitHub Projects

Releases

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.