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

Real local dev #14

Merged
merged 8 commits into from
Feb 5, 2021
Merged

Real local dev #14

merged 8 commits into from
Feb 5, 2021

Conversation

bengerman13
Copy link
Contributor

Changes proposed in this pull request:

  • Add a local cluster for testing. This uses docker-compose to spin up a 2-node ODfE elasticsearch cluster and a kibana instance.
  • Add pipeline steps for building and pushing test instances. This will allow us to push these containers as CF apps, which is how I plan to run the e2e tests
  • Fix bugs identified while testing
    • handle br compression, which flask doesn't understand
    • allow all methods on proxy route so Kibana/Elasticsearch can decide what to do with them
    • allow unauthenticated access to one weird path that browsers don't send cookies to somehow?????
    • rename session cookie
    • configure cf url

Security considerations

  • There is some risk in this image - it has hard-coded passwords, but the image is made only for testing and its name (hopefully) makes that clear
  • The bypassed path is just favicons, but it feels really weird that it doesn't send cookies
  • Allowing all methods is kind of scary, but we're just proxying them, and it's required because Kibana actually makes use of some/all of the verbs

@bengerman13 bengerman13 requested a review from a team February 4, 2021 22:41
Copy link
Contributor

@apburnes apburnes left a comment

Choose a reason for hiding this comment

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

I like the setup and super easy to get going. I wasn't able to pass all the tests locally but there maybe some env variable I am missing. test_app_filters_headers (AssertionError: assert 'x-proxy-user' != 'x-proxy-user') and test_session_refreshes (KeyError: 'session') in tests/unit/test_app.py.

dev Outdated Show resolved Hide resolved
docker/docker-compose.yml Show resolved Hide resolved
@bengerman13
Copy link
Contributor Author

I wasn't able to pass all the tests locally but there maybe some env variable I am missing. test_app_filters_headers (AssertionError: assert 'x-proxy-user' != 'x-proxy-user') and test_session_refreshes (KeyError: 'session') in tests/unit/test_app.py.

there's a very good explanation for that:
I broke the tests

@bengerman13 bengerman13 merged commit d2a9b62 into main Feb 5, 2021
@bengerman13 bengerman13 deleted the real-local-dev branch February 5, 2021 20:34
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.

None yet

2 participants