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

Np migration sample data #51126

Closed

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Nov 19, 2019

Summary

Migrates sample data to the home plugin.
Addresses: #50675

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

…s api http routes for legacy platform and NP
@kertal kertal self-assigned this Dec 6, 2019
@kertal kertal removed their assignment Dec 6, 2019
@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

@flash1293
Copy link
Contributor

@elastic/kibana-security This PR currently has the test/api_integration/apis/general/prototype_pollution.ts test failing because the sample data api doesn't explicitly reject prototype pollution attacks anymore.

Does this test in the current form still make sense? The tested API in src/plugins/home/server/services/sample_data/routes/install.ts doesn't read the body of the request at all. Or did I use the NP validate API in the wrong way?

@legrego
Copy link
Member

legrego commented Dec 10, 2019

@flash1293

This PR currently has the test/api_integration/apis/general/prototype_pollution.ts test failing because the sample data api doesn't explicitly reject prototype pollution attacks anymore.

Does this test in the current form still make sense? The tested API in src/plugins/home/server/services/sample_data/routes/install.ts doesn't read the body of the request at all. Or did I use the NP validate API in the wrong way?

This test picked an arbitrary LP endpoint to test with. Its purpose is to ensure that the default route payload validation is wired up correctly from end-to-end.

Eventually we'll run out of routes to test with, which is a good thing! In the meantime, we can probably update the test to use the /api/saved_objects/_log_legacy_import route instead of the sample data routes. It looks like this route hasn't been migrated yet.

@flash1293
Copy link
Contributor

Makes sense, thanks @legrego !

@elasticmachine
Copy link
Contributor

💔 Build Failed

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293
Copy link
Contributor

Closing this PR in favor of #52753

@flash1293 flash1293 closed this Dec 11, 2019
@TinaHeiligers TinaHeiligers deleted the NP_migration_sample_data branch October 14, 2020 15:57
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.

5 participants