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

[Cases] Make size limit and allowed file types configurable #151935

Closed
jonathan-buttner opened this issue Feb 22, 2023 · 2 comments · Fixed by #154013
Closed

[Cases] Make size limit and allowed file types configurable #151935

jonathan-buttner opened this issue Feb 22, 2023 · 2 comments · Fixed by #154013
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@jonathan-buttner
Copy link
Contributor

These configurations should work for on-prem and cloud

  • Allow the user to configure the file limit for files attached to cases
  • Allow the user to configure the supported file types attached to cases
@jonathan-buttner jonathan-buttner added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature labels Feb 22, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

jonathan-buttner added a commit that referenced this issue Apr 3, 2023
Fixes: #151935

This PR allows the mime types and max file size for the files
functionality within cases to be configured through the kibana.yml. We
set the defaults maxSize to be 100 mb and if it is not set by the user
we also restrict images to be 10 mb. If the `maxSize` is set by the user
we use it for all mime types including images (or whatever the user has
specified in `allowedMimeTypes`).

The file service changes are just mocks to help with testing some of the
configuration options.

New fields

```
{
  files: {
    allowedMimeTypes: string[]
    maxSize: positive number (minimum 0) <-- exposed to the browser
  }
}
```

## Release Notes
Cases added two configuration options to allow users to control which
files mime types are allowed to be attached to cases and the approved
max size of a file being upload.

`xpack.cases.files.allowedMimeTypes` - An array of strings representing
the allowed mime types to be attached to a case.
`xpack.cases.files.maxSize` - A number representing the file size limit
for files being attached to a case (in bytes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants