[SecuritySolution] Update file validation because the file type is empty on windows#199791
Merged
machadoum merged 6 commits intoelastic:mainfrom Nov 14, 2024
Merged
[SecuritySolution] Update file validation because the file type is empty on windows#199791machadoum merged 6 commits intoelastic:mainfrom
machadoum merged 6 commits intoelastic:mainfrom
Conversation
7cab308 to
db38e69
Compare
db38e69 to
dcfd2f1
Compare
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Contributor
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
hop-dev
approved these changes
Nov 13, 2024
Contributor
hop-dev
left a comment
There was a problem hiding this comment.
Code looks good, can we just trust you that this one works? :D
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
cc @machadoum |
Contributor
|
Starting backport for target branches: 8.16, 8.x |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 14, 2024
…pty on windows (elastic#199791) ## Summary Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 . I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types, `.tsv`. So, when the mime type checks fail, it will accept any files with the `tsv` extension. I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works. ### How to test it? * ON A WINDOWS MACHINE * Open the security solution app and navigate to the entity store page * Drag a TSV file created on a Windows machine; the file should be accepted * Click on the "select file" button and select a TSV file created on a Windows machine * Both methods should allow you to select the file, and you should be able to proceed with the bulk upload #### Do I need to checkout your code and start kibana? If you are a lazy person like me, you can test the feature using the cloud deployment [here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store). You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials. #### What if I don't have a Windows machine? Buy one. I am kidding. 🤡 You can follow [this tutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup) to deploy it to gcloud, and connect to it using RDP. But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials. _Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac._ ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) (cherry picked from commit ac32a05)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 14, 2024
…pty on windows (elastic#199791) ## Summary Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 . I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types, `.tsv`. So, when the mime type checks fail, it will accept any files with the `tsv` extension. I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works. ### How to test it? * ON A WINDOWS MACHINE * Open the security solution app and navigate to the entity store page * Drag a TSV file created on a Windows machine; the file should be accepted * Click on the "select file" button and select a TSV file created on a Windows machine * Both methods should allow you to select the file, and you should be able to proceed with the bulk upload #### Do I need to checkout your code and start kibana? If you are a lazy person like me, you can test the feature using the cloud deployment [here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store). You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials. #### What if I don't have a Windows machine? Buy one. I am kidding. 🤡 You can follow [this tutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup) to deploy it to gcloud, and connect to it using RDP. But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials. _Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac._ ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) (cherry picked from commit ac32a05)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
This was referenced Nov 14, 2024
wayneseymour
pushed a commit
to wayneseymour/kibana
that referenced
this pull request
Nov 18, 2024
…pty on windows (elastic#199791) ## Summary Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 . I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types, `.tsv`. So, when the mime type checks fail, it will accept any files with the `tsv` extension. I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works. ### How to test it? * ON A WINDOWS MACHINE * Open the security solution app and navigate to the entity store page * Drag a TSV file created on a Windows machine; the file should be accepted * Click on the "select file" button and select a TSV file created on a Windows machine * Both methods should allow you to select the file, and you should be able to proceed with the bulk upload #### Do I need to checkout your code and start kibana? If you are a lazy person like me, you can test the feature using the cloud deployment [here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store). You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials. #### What if I don't have a Windows machine? Buy one. I am kidding. 🤡 You can follow [this tutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup) to deploy it to gcloud, and connect to it using RDP. But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials. _Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac._ ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Nov 18, 2024
…pty on windows (elastic#199791) ## Summary Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 . I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types, `.tsv`. So, when the mime type checks fail, it will accept any files with the `tsv` extension. I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works. ### How to test it? * ON A WINDOWS MACHINE * Open the security solution app and navigate to the entity store page * Drag a TSV file created on a Windows machine; the file should be accepted * Click on the "select file" button and select a TSV file created on a Windows machine * Both methods should allow you to select the file, and you should be able to proceed with the bulk upload #### Do I need to checkout your code and start kibana? If you are a lazy person like me, you can test the feature using the cloud deployment [here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store). You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials. #### What if I don't have a Windows machine? Buy one. I am kidding. 🤡 You can follow [this tutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup) to deploy it to gcloud, and connect to it using RDP. But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials. _Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac._ ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Nov 18, 2024
…pty on windows (elastic#199791) ## Summary Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 . I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types, `.tsv`. So, when the mime type checks fail, it will accept any files with the `tsv` extension. I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works. ### How to test it? * ON A WINDOWS MACHINE * Open the security solution app and navigate to the entity store page * Drag a TSV file created on a Windows machine; the file should be accepted * Click on the "select file" button and select a TSV file created on a Windows machine * Both methods should allow you to select the file, and you should be able to proceed with the bulk upload #### Do I need to checkout your code and start kibana? If you are a lazy person like me, you can test the feature using the cloud deployment [here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store). You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials. #### What if I don't have a Windows machine? Buy one. I am kidding. 🤡 You can follow [this tutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup) to deploy it to gcloud, and connect to it using RDP. But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials. _Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac._ ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
Contributor
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
kibanamachine
added a commit
that referenced
this pull request
Nov 19, 2024
… is empty on windows (#199791) (#200189) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Update file validation because the file type is empty on windows (#199791)](#199791) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2024-11-14T13:55:21Z","message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.17.0","v8.16.1"],"title":"[SecuritySolution] Update file validation because the file type is empty on windows","number":199791,"url":"https://github.com/elastic/kibana/pull/199791","mergeCommit":{"message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199791","number":199791,"mergeCommit":{"message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
Contributor
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
kibanamachine
added a commit
that referenced
this pull request
Nov 19, 2024
…e is empty on windows (#199791) (#200188) # Backport This will backport the following commits from `main` to `8.16`: - [[SecuritySolution] Update file validation because the file type is empty on windows (#199791)](#199791) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2024-11-14T13:55:21Z","message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.17.0","v8.16.1"],"title":"[SecuritySolution] Update file validation because the file type is empty on windows","number":199791,"url":"https://github.com/elastic/kibana/pull/199791","mergeCommit":{"message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199791","number":199791,"mergeCommit":{"message":"[SecuritySolution] Update file validation because the file type is empty on windows (#199791)\n\n## Summary\r\n\r\nBug: On Windows, we can't select TSV files or drag them to the file\r\npicker. This error happens because we have a validation for the file\r\ntype, and for some reason, on Windows, it is an empty string 🤡 .\r\n\r\nI updated the file validation logic to allow empty strings for file\r\ntypes and added one extra value to the acceptable types, `.tsv`. So,\r\nwhen the mime type checks fail, it will accept any files with the `tsv`\r\nextension.\r\n\r\n\r\nI desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it\r\nworks.\r\n\r\n### How to test it?\r\n* ON A WINDOWS MACHINE\r\n* Open the security solution app and navigate to the entity store page\r\n* Drag a TSV file created on a Windows machine; the file should be\r\naccepted\r\n* Click on the \"select file\" button and select a TSV file created on a\r\nWindows machine\r\n* Both methods should allow you to select the file, and you should be\r\nable to proceed with the bulk upload\r\n\r\n#### Do I need to checkout your code and start kibana?\r\nIf you are a lazy person like me, you can test the feature using the\r\ncloud deployment\r\n[here](https://kibana-pr-199791.kb.us-west2.gcp.elastic-cloud.com/app/security/entity_analytics_entity_store).\r\nYou can get the login/password using Vault. The instructions are on the\r\nlatest Cloud Deployment link, or ask me for credentials.\r\n\r\n#### What if I don't have a Windows machine?\r\nBuy one. I am kidding. 🤡 \r\nYou can follow [this\r\ntutorial](https://github.com/elastic/security-team/blob/main/tools/sec-eng-prod/sep-vms/README.md#setup)\r\nto deploy it to gcloud, and connect to it using RDP.\r\nBut If you are lazy like me, you can ask me for my Windows 11 cloud\r\ndeployment credentials.\r\n\r\n_Obs. You need an app to access the cloud deployment via RDP. The\r\n\"Windows App\" can be easily downloaded from the App Store on Mac._\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)","sha":"ac32a056ef6897d0b685da8b444c399294a5e53e"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Bug: On Windows, we can't select TSV files or drag them to the file picker. This error happens because we have a validation for the file type, and for some reason, on Windows, it is an empty string 🤡 .
I updated the file validation logic to allow empty strings for file types and added one extra value to the acceptable types,
.tsv. So, when the mime type checks fail, it will accept any files with thetsvextension.I desk-tested it on Windows-edge, Windows-chrome, Mac-chrome and it works.
How to test it?
Do I need to checkout your code and start kibana?
If you are a lazy person like me, you can test the feature using the cloud deployment here.
You can get the login/password using Vault. The instructions are on the latest Cloud Deployment link, or ask me for credentials.
What if I don't have a Windows machine?
Buy one. I am kidding. 🤡
You can follow this tutorial to deploy it to gcloud, and connect to it using RDP.
But If you are lazy like me, you can ask me for my Windows 11 cloud deployment credentials.
Obs. You need an app to access the cloud deployment via RDP. The "Windows App" can be easily downloaded from the App Store on Mac.
Checklist
Delete any items that are not applicable to this PR.