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

[#597] feat: add submission tool backend to validate metadata #599

Conversation

MSzalowski
Copy link
Contributor

List of changes

  • add minimal backend application that:
    • validates hash and metadata URL using /validate-metadata endpoint
    • provides submission tool app API documentation using swagger
    • uses docker to containerize application
    • uses health checks to make sure that application is up & running

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

} catch (error) {
throw new HttpException(
ValidationError.INVALID_JSONLD,
HttpStatus.BAD_REQUEST,
Copy link
Contributor

Choose a reason for hiding this comment

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

i think its not bad request :D from FE side but not valid metadata or json

Copy link
Contributor Author

@MSzalowski MSzalowski Apr 2, 2024

Choose a reason for hiding this comment

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

Hmm, make sense. I'll return 200with object containing validation status

@Sworzen1
Copy link
Contributor

Sworzen1 commented Apr 1, 2024

Why rxjs only for do request and catch error :D ?, you can do the same using axios. Will we want to build more complicated chains ?

@MSzalowski
Copy link
Contributor Author

Why rxjs only for do request and catch error :D ?, you can do the same using axios. Will we want to build more complicated chains ?

HttpService by default returns Observable and it is recommended in docs to use the rxjs to handle that. Moreover rxjs is typically the default approach for any observables. As this code is to be owned by community I do not want to create some custom solutions where we have well-documented solutions

@MSzalowski MSzalowski merged commit ae71275 into develop Apr 2, 2024
@MSzalowski MSzalowski deleted the feat/597-create-metadata-validation-service-that-would-allow-to-bypass-csp-protection-rule branch April 2, 2024 13:53
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.

Create metadata validation service that would allow to bypass CSP protection rule
2 participants