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

Add config option frontends_uri to specify allowed frontend addresses for Orion Web API #811

Merged
merged 8 commits into from
Feb 24, 2022

Conversation

notoraptor
Copy link
Collaborator

@notoraptor notoraptor commented Feb 23, 2022

Description

Hi @bouthilx ! This is a pull request to wrap all changes related to CORS handling for Orion Web API. I will close other related pull requests so that we can focus only on this one.

This PR adds option frontends_uri to list allowed frontend addresses and add falcon-cors dependencies for PYPI (using original package) and conda (using conda package I built from PYPI package and uploaded on my anaconda repo)

Changes

Checklist

Tests

  • I added corresponding tests for bug fixes and new features. If possible, the tests fail without the changes
  • All new and existing tests are passing ($ tox -e py38; replace 38 by your Python version if necessary)

Documentation

  • I have updated the relevant documentation related to my changes

Quality

  • I have read the CONTRIBUTING doc
  • My commits messages follow this format
  • My code follows the style guidelines ($ tox -e lint)

Further comments

Please include any additional information or comment that you feel will be helpful to the review of this pull request.

@bouthilx
Copy link
Member

Thanks! Ideally the conda packaging of falcon-cors should be integrated in our packaging pipeline to make sure we update it properly over time. However we should not expect to much changes in falcon-cors since last updates were 2 years ago. That leads me to another question; Is it a good idea to depend on this package, which does not seam maintained anymore, to address security concerns? I'm not sure...

@notoraptor
Copy link
Collaborator Author

@bouthilx Indeed, it's an old package.

Maybe I could just copy the code (with citation) directly into orion, as it's a matter of 2 classes (CORS + CORSMiddleware), so that we won't need any dependency anymore?

@bouthilx
Copy link
Member

For reference, after discussion with @notoraptor we decided to fork falcon-cors into @mila-iqia to maintain it ourselves. The code itself is not expected to evolve a lot since it is mostly just related to the CORS standard, but the tests may needs adjustments based on changes in falcon.testing.TestCase. We will also publish falcon-cors in the mila-iqia forge.

@notoraptor
Copy link
Collaborator Author

@bouthilx PR updated, and conda package falcon-cors copied into mila-iqia channel: https://anaconda.org/mila-iqia/falcon-cors

However, it seems I don't have rights on github mila-iqia organization to fork falcon-cors repo into.

@notoraptor
Copy link
Collaborator Author

falcon-cors is forked into mila-iqia @bouthilx ! https://github.com/mila-iqia/falcon-cors

Copy link
Member

@bouthilx bouthilx left a comment

Choose a reason for hiding this comment

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

All good for this PR then, thanks!

@bouthilx bouthilx merged commit f0c3af5 into Epistimio:develop Feb 24, 2022
@notoraptor notoraptor deleted the orion-server-config-frontends branch March 1, 2022 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants