-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Trusted Apps signer API. #83661
Trusted Apps signer API. #83661
Conversation
…rals and to add possibility to return OS specific parts of trusted app object in type safe manner.
x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts
Show resolved
Hide resolved
I took a quick look at this seems fine, although I'm not sure what the changes for signer are, it seems that most changes are refactoring, am I right? I can take a closer look once it comes out of draft |
Umm, I would say majority of the changes are about the signer just I had to introduce some more granular types to achieve type safety in solution (and remove some @tslint-ignores), that had a bit of effect on some other files also in frontend. Maybe one change that was no directly related was separating out service layer. |
…bala/signer-api
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it's mostly separating out a service layer and organizing the schema. Makes sense since we have a new requirement to allow the Signer field only for Windows 👍
@@ -0,0 +1,79 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: move this service to .../server/endpoint/services/
directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR walkthrough!
…bala/signer-api
…bala/signer-api
…se it (each place has own needs to the ordering).
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Separated out service layer for trusted apps. * Improved the type structure a bit to avoid using explicit string literals and to add possibility to return OS specific parts of trusted app object in type safe manner. * Added support for mapping of trusted app to exception item and back. * Changed schema to support signer in the API. * Renamed utils to mapping. * Exported some types in lists plugin and used them in trusted apps. * Added tests for mapping. * Added tests for service. * Switched deletion to use exceptions for not found case. * Added resetting of the mocks in service layer tests. * Added handlers tests. * Refactored mapping tests to be more granular based on the case. * Restored lowercasing of hash. * Added schema tests for signer field. * Removed the grouped tests (they were split into tests for separate concerns). * Corrected the tests. * Lowercased the hashes in the service test. * Moved the lowercasing to the right location. * Fixed the tests. * Added test for lowercasing hash value. * Introduced OperatingSystem enum instead of current types. * Removed os list constant in favour of separate lists in places that use it (each place has own needs to the ordering). * Fixed the missed OperatingSystem enum usage.
…bana into add-metadata-to-node-details * 'add-metadata-to-node-details' of github.com:phillipb/kibana: [APM] ML anomaly detection integration: Displaying anomaly job results in the Transaction duration chart is not as intended (elastic#84415) Support for painless language autocomplete within monaco (elastic#80577) [Lens] Time scale ui (elastic#83904) removing beta callouts (elastic#84510) [Lens] (Accessibility) add aria-label to chart type icon (elastic#84493) Trusted Apps signer API. (elastic#83661) increase stdout max listeners for legacy logging (elastic#84497) [APM] Service overview: Add throughput chart (elastic#84439) [Discover] Unskip main functional tests (elastic#84300) Uptime overview overhaul (elastic#83406) [APM] Adjust time formats based on the difference between start and end (elastic#84470) [ML] Renaming saved object repair to sync (elastic#84311) [UsageCollection] Remove `formatBulkUpload` and other unused APIs (elastic#84313) [Visualizations] Adds visConfig.title and uiState to build pipeline function (elastic#84456) [Elasticsearch Migration] Update docs re UsageCollection (elastic#84322) TSVB field list performance issue on using annotations (elastic#84407) [Security Solution] Exceptions Cypress tests (elastic#81759) [ML] Fix spaces job ID check (elastic#84404) [Security Solution][Detections] Handle dupes when processing threshold rules (elastic#83062)
* Separated out service layer for trusted apps. * Improved the type structure a bit to avoid using explicit string literals and to add possibility to return OS specific parts of trusted app object in type safe manner. * Added support for mapping of trusted app to exception item and back. * Changed schema to support signer in the API. * Renamed utils to mapping. * Exported some types in lists plugin and used them in trusted apps. * Added tests for mapping. * Added tests for service. * Switched deletion to use exceptions for not found case. * Added resetting of the mocks in service layer tests. * Added handlers tests. * Refactored mapping tests to be more granular based on the case. * Restored lowercasing of hash. * Added schema tests for signer field. * Removed the grouped tests (they were split into tests for separate concerns). * Corrected the tests. * Lowercased the hashes in the service test. * Moved the lowercasing to the right location. * Fixed the tests. * Added test for lowercasing hash value. * Introduced OperatingSystem enum instead of current types. * Removed os list constant in favour of separate lists in places that use it (each place has own needs to the ordering). * Fixed the missed OperatingSystem enum usage.
* master: (25 commits) [Alerting] fixes buggy default message behaviour (elastic#84202) [Graph] Use new ES client and change license API (elastic#84398) [DOCS] Adds redirect to known plugins page (elastic#84001) Update IndexPatternSelect to get fields from indexPatternService instead of savedObject attributes (elastic#84376) Adding timestamps to created events so the sorting is stable (elastic#84515) [DOCS] Redirects for drilldown links (elastic#83846) [Fleet] Support for showing an Integration Detail Custom (UI Extension) tab (elastic#83805) [Enterprise Search] Migrate shared Schema components (elastic#84381) [Discover] Unskip date_nanos and shard links functional tests (elastic#82878) [APM] ML anomaly detection integration: Displaying anomaly job results in the Transaction duration chart is not as intended (elastic#84415) Support for painless language autocomplete within monaco (elastic#80577) [Lens] Time scale ui (elastic#83904) removing beta callouts (elastic#84510) [Lens] (Accessibility) add aria-label to chart type icon (elastic#84493) Trusted Apps signer API. (elastic#83661) increase stdout max listeners for legacy logging (elastic#84497) [APM] Service overview: Add throughput chart (elastic#84439) [Discover] Unskip main functional tests (elastic#84300) Uptime overview overhaul (elastic#83406) [APM] Adjust time formats based on the difference between start and end (elastic#84470) ...
Summary
Support for signer condition in trusted apps config for windows in API.
In addition to implementing the feature separated out the service layer in the server implementation for trusted apps and introduced more granular types that helped making the transformation/mapping code type safe and remove tslint/eslint directives to ignore problems. New structures leads to testing separate layers separately.
Checklist