Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Data Distribution API into the Vitro codebase #484

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

litvinovg
Copy link
Member

VIVO GitHub issue

  • Other Relevant Links (Mailing list discussion, related pull requests, etc.)

What does this pull request do?

Added the Data Distribution API and report generation into Vitro codebase.

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Interested parties

@chenejac @hauschke @brianjlowe

Reviewers' expertise

Candidates for reviewing this PR should have some of the following expertises:

  1. Java
  2. HTML, CSS, JavaScript
  3. FreeMarker
  4. SPARQL
  5. Ontologies
  6. Natural language knowledge
    1. English
    2. German
    3. Spanish
    4. French
    5. Portuguese
    6. Russian
    7. Serbian

Reviewers' report template

Please update the following template which should be used by reviewers.

General comment

A reviewer should provide here comments and suggestions for requested changes if any.

Testing

A reviewer should briefly describe here how it was tested

Code reviewing

A reviewer should briefly describe here which part was code reviewed

@litvinovg litvinovg requested a review from chenejac January 16, 2025 09:57
@hauschke
Copy link
Member

@markuskotte agreed to review German language parts, when and if necessary.

Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litvinovg thanks for nice and significant contribution. I have posted a couple of comments.

Comment on lines 132 to 133
log.debug("Setting CORS header for every request.");
resp.setHeader("Access-Control-Allow-Origin", "*");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might consider to offer some control over CORS, maybe it is not needed at the level of a single endpoint, but at least at the VIVO instance level. For instance, to have a runtime property defining value for Access-Control-Allow-Origin.

We don't have any control over access to an API endpoint at the moment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would even make sense to define that values for each distributor?
I am not even sure we have to set it to * for current use cases. Maybe just remove it for now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this for now.

Also, please add access rights for API endpoints. The idea is to threat endpoint as a class or object and to offer via UI to define which role has access to that. Operation might be "execute", if it is too complicate to add new operation, we might use some already existing (e.g. "display")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed default CORS

Copy link
Contributor

@chenejac chenejac Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add access rights for API endpoints. The idea is to threat endpoint as a class or object and to offer via UI to define which role has access to that. Operation might be "execute", if it is too complicate to add new operation, we might use some already existing (e.g. "display")

@litvinovg this part has not beet addressed yet, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add access rights for API endpoints. The idea is to threat endpoint as a class or object and to offer via UI to define which role has access to that. Operation might be "execute", if it is too complicate to add new operation, we might use some already existing (e.g. "display")

@litvinovg this part has not beet addressed yet, right?

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also generate those labels for other languages?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed not to add other languages within this PR, we will do that for all new features in a release in one specific PR for this purpose.

Comment on lines 132 to 133
log.debug("Setting CORS header for every request.");
resp.setHeader("Access-Control-Allow-Origin", "*");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this for now.

Also, please add access rights for API endpoints. The idea is to threat endpoint as a class or object and to offer via UI to define which role has access to that. Operation might be "execute", if it is too complicate to add new operation, we might use some already existing (e.g. "display")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed not to add other languages within this PR, we will do that for all new features in a release in one specific PR for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving Data Distribution API into the Vitro codebase
3 participants