* [npm] Remove babel-plugin-mock-imports
Originally added as part of
https://github.com/elastic/kibana/pull/22695, however, it doesn't appear
to have ever actually been used.
* [npm] Removes gulp-multi-process
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Added when X-Pack was closed-source and
import/no-extraneous-dependencies was implemented. Does not appear to
still be used.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* We have a NP plugin! :celebration:
* Redirecting to login on all 401s
* Adding commented out code for when credentials are omitted
* Fixing types
* Respond 403 when user changes password with incorrect current password
* Adding AnonymousPaths where we ignore all 401s
* Adding anonymous path tests
* Extracted a dedicated SessionExpires class and added tests
* Fixing plugin after refactoring to add SessionExpired
* Beginning to work on the session timeout interceptor
* Fixing UnauthorizedResponseInterceptor anonymous path test
* Removing test anonymous path
* Trying to improve readability
* Displaying session logout warning
* Mocking out the base path
* Revert "Mocking out the base path"
This reverts commit 824086c168.
* Changing coreMock to use a concrete instance of BasePath
* Adding session timeout interceptor tests
* Adding session timeout tests
* Adding more tests for short session timeouts
* Moving some files to a session folder
* More thrashing around: renaming and reorganizing
* Renaming Interceptor to HttpInterceptor
* Fixing some type errors
* Fixing legacy chrome API tests
* Fixing other tests to use the concrete instance of BasePath
* Adjusting some types
* Putting DeeplyMocked back, I don't get how DeeplyMockedKeys works
* Moving anonymousPaths to public core http
* Reading sessionTimeout from injected vars and supporting null timeout
* Doesn't extend session when there is no response
* Updating docs and snapshots
* Casting sessionTimeout injectedVar to "number | null"
* Fixing i18n issues
* Update x-pack/plugins/security/public/plugin.ts
Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>
* Adding milliseconds postfix to SessionTimeout private fields
* Even better anonymous paths, with some validation
* Adjusting public method docs for IAnonymousPaths
* Adjusting spelling of base-path to basePath
* Update x-pack/plugins/security/public/session/session_timeout.tsx
Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>
* Update src/core/public/http/anonymous_paths.ts
Co-Authored-By: Josh Dover <me@joshdover.com>
* Update src/core/public/http/anonymous_paths.ts
Co-Authored-By: Josh Dover <me@joshdover.com>
* AnonymousPaths implements IAnonymousPaths and uses IBasePath
* Removing DeeplyMocked
* Removing TODOs
* Fixing types...
* Now, ever more normal
* Update dependency del to v5
* unify del/rimraf usage with del v5
* update yarn.lock
* update kbn-pm distributable
* remove poorly transformed code
* force some deletes from tmp
* mock less of the fs module
* force tmp deletion in a few more suites
* please make this the last force
This removes the outdated and unused 0.x version of `constate` and instead depends on a recent version. It also removes the aliasing to `constate-latest`.
closes#48606
This package is only being referenced in OSS Kibana, though it was
defined in X-Pack causing issues for OSS builds.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Add file parse chunking, update component on progress
* Clean up clean and validate and redo to process single features
* Add oboe dependency
* Prevent state updates on cancel
* Handle new files added mid-way through parsing another file
* Fix issue where subsequent index name is wiped out when previous file cancelled
* Remove unneeded oboe abort logic
* Dice parsing logic up further for testing
* Clean up
* Revert "Fix issue where subsequent index name is wiped out when previous file cancelled" (covered in separate PR)
This reverts commit 0688e73ffc.
* Update file parse test to focus on different stream states
* Update clean and validate tests to reflect function input/output changes
* Bump up file buffer. Simplify ui update logic, not neceesary to throttle with less frequent callbacks
* Show features parsed on UI rather than percentage
* Remove extra mock reset
* Review feedback. Add localized feature tracking callback
* Review feedback. Add comment explaining progress update throttling. Also, use debounce to throttle
* Remove console log
* Consolidate feature handling into one function passed to oboeStream node
* Abstract oboe logic to separate class and import for use in file parser
* Update file parser test to mock PatternReader import
* Prevent file parse active flag from resetting if another file is in progress
* Don't pass back result if no features found on complete, throw error with feedback. Add clean-up for prev PatternReader
* Use singleton version of jsts reader & writer. Pass back unmodified feature if clean returns nothing
* Make fileHandler function async
* Return null if no geometry
* Handle single features differently. Fixes functional test error
* Update jest test to use unique instances & counts of readers
* Review feedback
* Review feedback
* Review feedback. Add error-handling for null geom
* Fix i18n error
* Clean up handling of cancelled/replaced files to account for changed fileHandler return type
* [Code] use native git to iterate git files
* [Code] use native git to clone/update repository
* [Code] git history using native git
* [Code] use native git to read file tree and file content
* [Code] fix the 'bad file' warning from status api
* [Code] use native git to handle worktree
* [Code] use native git to resolve references
* [Code] use native git to handle blame / diff
* [Code] patch git binaries in kibana build script
* [Code] migrate unit tests to use native git
Add service map tabs on the main APM screen and for individual services.
This is not yet hooked up to work with back-end data, so it always shows the same hard-coded graph.
This is experimental, so you must have x-pack.apm.serviceMapEnabled: true in your Kibana config for it to show up.
Also add "PSF" to the list of allowed licenses since a new dependency added uses this license (it's on the [green list](https://github.com/elastic/open-source/blob/master/elastic-product-policy.md#green-list).)
Fixes#44890Fixes#44853
* adds linter rule to disallow undeclared variables
* adds cypress eslint plugin, remove redundant packages from siem/package.json
* removes comment from json and adds a line about cypress linting to the cypress README
* adds upgraded package back to siem/package.json
* updates cypress run scripts since cypress package is now located in the x-pack/node_modules
* needed to yarn kbn bootstrap after rebasing with master
* use new setScreenshotSize
* change tolerance from 1% to 2% (originally 5%)
* retake baseline without notification dialog
* close add and save notifications
* wait for render complete when going in to FullScreen mode
* add 5 second sleep to see if it ever goes to full screen mode
* add debugging screenshots and sleeps
* try reloading the Kibana index before this test
* 30 iterations with only the first test enabled
* revert multi-run changes
* ran node scripts/build_renovate_config
* fix tslint errors
* fix tslint error
* update xpack dependency to match oss
* update yarn.lock
* revert notifications:lifetime:info change by reducing some other timeouts
* remove commented-out code
* fixed and Unskipped 2nd test
* re-arrange order of dashboard tests to pass :-(
* removed commented-out sleep
Hopefully this won't be an issue
* Add comment about the order of tests
```
loadTestFile(require.resolve('./view_edit'));
// Order of test suites *shouldn't* be important but there's a bug for the view_edit test above
// https://github.com/elastic/kibana/issues/46752
// The dashboard_snapshot test below requires the timestamped URL which breaks the view_edit test.
// If we don't use the timestamp in the URL, the colors in the charts will be different.
loadTestFile(require.resolve('./dashboard_snapshots'));
```
* Update angular related packages
* upgrade jQuery too
* don't delete screenshots in pipeline jobs
* use ng-change so that listener is triggered after ng-model is updated
* match @types/angular versions
* update yarn.lock
* fix test
$routeChangeSuccess is no longer broadcast when resolving a redirect route, so this test has been adjusted to validate that
* Update jest related packages
* use correct type
* adapt spy and describe.each types
* update yarn.lock
* update snapshot
* define types before passing to describe.each
* Add core-only bundle
* Add ApplicationService mounting
* Add LegacyCore{Setup,Start}
* Fix PR comments
* Add functional tests
* Fix PR comments
* Fix PR comments
* Remove other usages of rootRoute
* Use state field notation
* Add support for open in new tab
* Fix PR comments
* Fix pesky await from the dead
* Update docs
* Bump @types/history
* [APM] Adds chart for page load averages by country in RUM page-load view
* [APM] Simplified and refined ChoroplethMap. Added legend labels.
* - Replaced Map legend slices with smooth gradient
- fixed issue with map rendering multiple times
- renamed initial props to start with 'initial'
- added some more code comments
* use correct i18n ids
* - base color progression calc directly on euiColorPrimary
- check that a layer exists before querying features
* Addressed code review feedback
* - fixes issue where min/max was not a finite value
- cleans up mouseover handler, which updates on state changes
- formats doc count for display
- style improvements
* addressed PR feedback & updated renovate.json5
* - Removed the Legend from the ChoroplethMap
- Only render tooltip when there's data
* - fix hover state not clearing properly
- add better typing around Geojson propertier for world countries
* added missing css import
* wip
* sources table working woohoo
* rename table back to n flow
* wired up both source and destination tables
* cleanups
* flows and ips sort
* flows and ips sort
* fix flow sorting
* differentiate tables
* bring back network
* fix tests
* integration tests updated
* add country names to flags, sort by desc on first click
* yarn doing its thing
* correct panel width during initial load
* remove default props
* fix inspect btn placement at small viewport sizes
* reformatting bytes
* used compressed table prop
* fix unit tests bytes
* update header subtext size
* override table cell display flex
* make titles plural
* less distracting empty string
* simplify markup and align numbers right
* improve more items experience
* undo compressed tables…looks bad
* stack tables
* restore compressed and side by side layout
* sentence case for titles
* table cleanup
* force more to separate line
* dnd poc changes
* jest test updates
* TypeScript, i18n, and bean-gen fixes
* fix for filter action color
* single quotes instead of backticks
* use getEmptyValue() instead of static emdash
* remove “ AS” prefix
* address PR concerns
* add space
* first attempt at prop change with matchMedia
* split table display by mediaMatch
* rm comments
* fix type issue
* correct react hook
* lint fix
* fix jest
* update snapshots
* WIP: Adding libs for webgl
* WIP Adding swiftshader libs to chromium
* WIP: Adding missing binaries for webgl in chromium
* Use pipes for communication with chrome to avoid networking snafus
* Bumps puppeteer in prep for new chromium build + types and better @types package
* Remove ignore
* Removing of final @ts-ignore now that we have types
* README updates
* Fixing binding issues
* Fixing maps integration wrt reporting + conditional pipes for puppeteer
* Adding new deps to the windows build
* New s3 builds
* Checksums for updated linux build
* Moving types out of puppeteer file and into core puppeteer module
* launch => puppeteerLaunch
* Maps comment about render loading in reporting
* Clarify how reporting uses hooks and events for viz
* First version of Editor component and integration with the expression editor
* Adding resize detector
* Remove blue border on editor select
* Adding types for the react resize detector
* Adding worker and a few more monaco plugins
* Suggestion completion rework
* Add resize detector types as well as an IE11 full width bug fix
* Adding correct types for function definitions and monaco
* change CSS class names, add border to input
* Adding boolean styling
* Slight refactor of canvas function/arg types and adding first pass of hover
* Fixing hover interaction for functions and arguments
* Namespacing Code monaco css overrides
* Styling cleanup and simple README
* Setting up tests including some storyshots for the ExpressionInput component and Editor component
* Prop documentation for both the ExpressionInput and Editor components
* Adding Editor snapshots
* tiny cleanup
* Moving language registration, adding autocomplete suggestion types, and cleaning up editor
* Some documentation and cleanup from PR feedback
* Fixing types, adding documentation
* clean up editor, remove autocomplete toggle
* More PR cleanup
* Test fix, type fix
* fix issues around errors. code cleanup
- Updates the dragSelect library to 1.13.1. 9221622 updates the library. c9a870b fixes a regression caused by the update.
- Fixes an issue where a timefilter refresh would clear a swimlane selection. 3d1c43d removes a duplicate timefilter subscription and changes the triggered event to REDRAW instead of RELOAD (which triggered a full reload and cleared the selection).
- Fixes an issue with timefilter/datepicker: EuiSuperDatePicker checks isPaused only with componentDidMount() so it might miss changing props. The fix in aa9555d works around that by adding a check on the onRefresh() callback.
* upgrade all babel related modules, and bump lodash minors
* update kbn-pm dist
* update fetch-mock, necessary to use core-js 3
* use regenerator transform in jest tests, as required by EUI
* disable useBuiltIns rather than using regenerator plugin
* remove extra regenerator-runtime import
# [SIEM] Run Cypress Tests Against Elastic Cloud & Cypress Command Line / Reporting (#42804)
This PR contains enhancements to the `Cypress` end-to-end (e2e) testing support in the SIEM app, as discussed with @spalger
Note: this PR depends on test refactorings in https://github.com/elastic/kibana/pull/42766
## New: Run `Cypress` Tests Against Elastic Cloud
Cypress tests may now be run against a remote Elastic Cloud instance
(override `baseUrl`), interactively or via the command line.
Credentials are specified via `kibna.dev.yml` or environment variables.
## New: Run `Cypress` Tests On the Command Line
Run tests on the command line (override `baseUrl` and pass credentials via
the `CYPRESS_ELASTICSEARCH_USERNAME` and `CYPRESS_ELASTICSEARCH_PASSWORD`
environment variables), via command line.
## New: Reporting
Reports are configured to include:
- An HTML report, suitable for e-mail notifications
- Screenshots
- Junit reports (for integration with Kibana CI)
- Videos (optional)
Reports generated when `Cypress` tests are run on the command line are output
to the `target` directory, which follows specific conventions used by the
Kibana CI process:
* Any directory under `target` that begins with `kibana-`, e.g. `kibana-siem` will be uploaded as an artifact to a bucket
* Junit reports are picked up from the `target/junit` directory
The artifacts generated by running `Cypress` tests on the command line conform to the above conventions.
### HTML Reports
An HTML report (e.g. for email notifications) is output to:
```
target/kibana-siem/cypress/results/output.html
```
### Screenshots
Screenshots of failed tests are output to:
```
target/kibana-siem/cypress/screenshots
```
### `junit` Reports
The Kibana CI process reports `junit` test results from the `target/junit` directory.
Cypress `junit` reports are generated in `target/kibana-siem/cypress/results`
and copied to the `target/junit` directory.
### Videos (optional)
Videos are disabled by default, but can optionally be enabled by setting the
`CYPRESS_video=true` environment variable:
```
CYPRESS_video=true yarn cypress:run
```
Videos are (optionally) output to:
```
target/kibana-siem/cypress/videos
```
# Updated `README`
The full details and instructions for running Cypress tests are in the
`siem/cypress/README.md`, which was updated to reflect the changes
in this in this PR, but in a nutshell, you may run tests interactively with
the following (new) environment variables:
```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:open
```
Running the command line version of the tests, which will output
the reports described above, is a similar experence:
```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:run
```
https://github.com/elastic/siem-team/issues/435https://github.com/elastic/siem-team/issues/437
* Upgraded EUI 13.0.0 -> 13.1.0
* Bump to 13.1.1
* Reset MutationObserver polyfill to original operation
* Reset x-pack's MutationObserver polyfill to original operation
* eui 12.4.0
* styled-components ts conflict
* update combobox test service to always open on open call
* Revert "update combobox test service to always open on open call"
This reverts commit 43074e6006.
* scroll combobox into view
* scroll before filter
* Temporary Core workarounds.
* Move files to NP Security Plugin.
* Fix references.
* Migrate to the New Platform.
* Review#1: remove unused `loginAttempt` from provider iterator, rely more on RecursiveReadonly, etc.
* Integrate latest core changes: isTlsEnabled and get rid of legacy ES config.
* Revert `deepFreeze` changes and rely on `src/core/utils`.
* Review#2: do not mutate injectedVars in onInit. Integrate latest upstream changes.
* Use mocks provided by the Core.
* Expect ElasticsearchError instead of Boom errors as 401 Cluster client errors.
* Simplify session handling for `login`.
* Review#3: properly handle session updates for `login`, remove redundant hapi-auth-cookie deps from x-pack package.json, migrate to new core sessionStorage API, integrate latest Kerberos provider changes from upstream
* Do not clear session on login if it does not exist.
* eui 12.3.1
* add data logos
* Fix TS uses, one SCSS use of euiOverflowShadow
* fix overflow shadow mixin in sass
* homepage logos
* refix typo on homepage
* hp snaps
* Addresses an issue where Chromium user-data-dirs aren't cleaned properly, and moves to TS
* Fixing renovate config issues
* Fixing issues with typedef's missing
* Using prior-set typedefs for logger
* Updating to @elastic/lodash to 3.10.1-npm-kibana2
* Updating lodash to 4.17.13
There's a stray dependency to lodash 4.17.11 via cypress which doesn't
use "^". This is a dev dependency, so we can ignore it for a bit while
they update their package.json
* Updating some forgotten references to @elastic/lodash@3.10.1-kibana1
* Updating lodash-es to 4.17.13
* Updating to @elastic/lodash to 3.10.1-npm-kibana3
* Using the root resolutions to update cypress's version of lodash.
Thanks @spalger!!!
* [ts] upgrade to 3.5.2
* [ts] run from cwd so that relative paths are correct
* move eslint-disable-line comment into jsx attribute
* autofix eslint violations
* avoid generic type, it's not necessary and problematic
* make elasticsearch.cluster optional, many instances don't have them
* remove invalid prop
* expand AllowUnknownProperties to cleanly handle arrays
* esfilter values can sometimes be an array of strings
* allow exception objects to have unknown properties
* define accumulator as a boolean
* fix return type
* return a 404 if beat isn't found after update
* use Object.values for better types
* define return type of get() call
* define value type for Set
* define return value of get()
* define State property type
* use less get(), so ts can infer types
* define Set item type
* map state type
* make default_operator optional, since it's not always defined
* remove seemingly unused prop
* define return type of get() fn
* define inner type for state
* don't define base types are objects with index signatues
* regenerate public api docs
* make indices privileges optional too
* remove unnecessary index-signature from Exception interface
* use variadic _arg instead
* [core/plugin] use Record<string, any> rather than {}
* replace a couple more instances of {}
* revert some unnecessary changes
* remove unused types
* [reporting] output, payload, and meta are required properties
* bump to latest patch version
* Add ctags langserver as a dependency and launch it
* Remove extra files in node-ctags when release
* [build] rework platform-specific clean for ctag package
* rename local excludedPath var
* use array.includes
* exclude ctags langserver vendor
* Add file upload x-pack plugin
* Clean up
* Remove unneeded cluster config
* Remove unneeded test
* First pass basic telemetry (not connected).
* Basic telemetry connected
* Review feedback
* Revise telemetry to use savedObjectRepository. Capture metrics on app and file types
* Lots of cleanup, consolidation of logic
* Clean up, reorg
* Update telem tests and telem functions
* Add back import data model
* Clean up and update telemetry tests
* Fix telemetry test issues and update corresponding code
* Up chunk limit to 30 MB
* Add file upload telemetry to saved objects management builder
* Missing space
* Add descriptive comments to dynamic keys in telemetry fields
* [Maps] [File upload] Geojson upload (#36410)
* Client side basics
* File added and default named correctly
* Connect transient layer removal to file import component
* Simplify transient layer removal
* Move file import ui over to new file upload plugin and make more generic
* Add post-processing option to file upload. Make component json-specific
* Add flag for source indexing
* Revise import layer workflow to be separate from add layer workflow
* Differentiate between normal sources and import sources. Add back layer add/next button
* Update indexing boolean in component after file upload & parse
* First pass rough indexing from maps working on specific use cases
* Update parsing logic to handle geojson formats
* Index pattern added following index creation
* Pass onsuccess callback to file_upload to add layer to maps app
* Handle mulltipolygon type in es geo utils
* Add functionality to make es layer permanent and switch to edit panel
* Add to index if exists or create new
* Make plugin API more intuitive. Set up to handle remove action
* Pass transient removal call through to file import
* Clean up layer viewing logic for temp and perm layers
* Remove change source from import screen
* Add option to provide mappings array and pass geo_point and geo_shape to array
* Add support for multiple mappings select and index naming
* Match style of import file button to add layer for now
* Remove duplicate case handling resulting from merge
* Move geo processing logic over to file upload plugin for reuse
* Remove old geo_shape formatting from geo_point code
* Set default index data type. Remove unneeded stringify request logic
* Check for custom processor object which contains function
* Move file picker to separate component
* Some cleaning. Add geojson clean & validate code
* Catch file parsing errors and notify user
* Disable index type if valid file not referenced
* Set error messaging on invalid index name used
* Add index pattern checking logic and error handling
* Dynamically populate geo index options
* Set index data type earlier in the workflow. Don't duplicate requests
* Pass back index ready status from plugin and connect to layer next button
* Increase max bytes to ~50MB
* Don't parse files over max size & warn user. Also, remove toasts and warn similarly to other components
* Uploaded file default label: 'fileToImport' -> 'Import File'
* Expand out feature properties for mapping
* Pass through telemetry data to plugin back-end
* Clean up indexing flow. Separate creation of index patterns. Add new index pattern create callbacks
* Pass back info for indexing failures but don't connect to UI yet
* Fix telemetry test issues and update corresponding code
# Conflicts:
# x-pack/plugins/file_upload/server/telemetry/telemetry.test.ts
* Add file upload telemetry to saved objects management builder
* Missing space
* Add descriptive comments to dynamic keys in telemetry fields
* Divide up the import layer add workflow on the maps side and tweak to avoid layer color change
* Fix bug affecting file preview replacement not updating coordinate index type
* Remove index pattern. Organize effects. General clean up
* preIndexTransform -> transformDetails
* Update proptypes
* Cleaning, organizing
* Add index name guidelines. Show conditionally
* Add file size, type guidance. Filter on file size, not chunk size. Small tweaks to file/index tips
* Zoom to layer extent on preview of imported data
* Revert "Revise import layer workflow to be separate from add layer workflow"
This reverts commit 3b35f5371d.
* Handle import file determination to accomodate add layer flow. Update card wording
* Decompose addLayer component into smaller pieces. Add placeholder import progress component
* Dynamically change footer button text for context
* Move import card to top of sources
* Get basic progress tracking in place
* Allow second layer (indexed layer) to get removed. Reconnect file remove. Small UI tweaks
* Add link to management for further index mods
* Fix i18n failures
* Add file parsing progress indicator & text
* Reset importView on source reset
* Add dynamic chunking to handle fluctuating data sizes common to geo features
* Don't duplicate index request if request in flight
* Modify json upload and import to use JS classes & react class component state
* Transition remaining file_upload components over to class/component structure with state
* Move functions into index_settings class
* Review feedback
* Add fetch with timeout
* Split out import editor into separate component and clean up logic
* Clean up add layer panel/button title logic
* More cleanup
* Tweaks to success and error handling flow
* Handle success/error handling on add/view indexed data
* Jump to indexing complete on error. Handle nothing returned to client app
* Update name/location of source select css file
* Update import source card border color and icon
* Suggest name for index based upon file name
* Add validation to auto-suggested index name/pattern
* Use constants for geo_point and geo_shape in mappings
* Update geojson upload card/description
* Catch-all review feedback
* Fix internationalization syntax errors
* Review feedback
* Get index names and patterns only when needed
* Make addLayer async again to fix zoom to extent issue, waits on just the async syncDataForLayer function (which is async)
* Remove panel description as derived state and shift to function
* Remove geojson fit to extent for now
* Remove unused class selector
* Remove unneeded i18 wrapper for what's already passed in as an i18 element
* Revise import state to be handle via redux. Some json upload args changes
* Review feedback. Some cleanup and bug fixes
* Roll back store actions changes and layer_addpanel changes related to color change
* Follow scss file naming conventions for source_select
* Review feedback
* Restore clobbered layer_control view to master state. Add source_select css
* Update import to use plugin local indexPatternService, not maps'
* Review feedback, mostly i18n. Also add index to scss path
* i18n translation updates
* Assign error message to values rather than error object
* Update getMapColors to filter out transient layer
* Wrap Feature as FeatureCollection in Maps
* Add jest tests for geo processing functions. Add fixes for single feature handling
* i18n
* Review feedback. Test cleanup/fixes
* Update layer add panel footer logic to still show when source not selected
* Fix issue of not recognizing MultiPoint type. Remove throw logic for now
* Update telemetry with newly required placeholder function
* Prevent external modification of nested geojson objects
* i18n translation updates
* Revert "Fix issue of not recognizing MultiPoint type. Remove throw logic for now"
This reverts commit d692f913f8.
* Revert "Prevent external modification of nested geojson objects"
This reverts commit 0ea9fd3336.
* yarn.lock update
* [File upload] Remove dynamic fields from mappings, code and telemetry test (#38902)
* Remove dynamic fields from mappings, code and telemetry test
* Add file-upload-telemetry to spaces and es archiver test mappings
* Don't create telemetry saved object if none exists, create on first update instead
* Back out es archiver mappings update
* Upgarde enzyme to v3.10.0
*update snapshots (React components which are using Memo());
*revert pending test in list_control_editor.test.js;
*replace component.html() and component.text() function calls
which expect null to component.isEmptyRender() for consistency
* [Maps] sybmolize points with maki icons
* add from for selecting symbol
* add from for selecting symbol
* get icons working for static colors
* static icon sizing
* refacto symbol_utils
* timing issue
* use SDF icons
* dynamic iconSize
* set icon-anchor
* display symbol icon in map legend
* add unit tests for VectorIcon
* set icon fill based on dark mode
* remove unused file
* fix jest tests
* set icon-opacity
* use size style to configure icon-image small or large
* fix queryRadius error by just hiding other point layer instead of removing
* remove console statement on error
* use maki icon size constants
* add retry around opening set view popover for flaky test
* Update dependency tinycolor2 to v1.4.1
* Added tests for valid and invalid 4 digit and 8 digit hex colors to ColorDot and ColorManager stories
* Updated storyshots
* Update dependency history to v4.9.0
* importing submodules is deprecated, import root package
* chore: bump history-extra to 5.0.1
compatible with history@^4.9.0
* Convert simple files to TS
* Fix jest tests
* Rename saved_objects_client{.js => .ts}
* WIP saved_objects_client
* saved_objects repository{.js => .ts}
* includedFields support string[] for type paramater
* Repository/saved_objects_client -> TS
* Fix tests and dependencies
* Fix saved objects type errors and simplify
* saved_objects/index saved_objects/service/index -> ts
* Fix saved objects export test after switching to typed mock
* Workaround type error
* Revert "Workaround type error"
This reverts commit de3252267eb2e6bf56a5584d271b55a7afdc1c53.
* Correctly type Server.savedObjects.SaveObjectsClient constructor
* saved_objects/service/lib/index.{js -> ts}
* saved_objects/service/lib/scoped_client_provider{js -> ts}
* Typescriptify scoped_client_provider
* Fix x-pack jest imports
* Add lodash/internal/toPath typings to xpath
* Introduce SavedObjectsClientContract
We need a way to specify that injected dependencies should adhere to the
SavedObjectsClient "contract". We can't use the SavedObjectsClient class
itself since it contains the private _repository property which in TS is
included in the type signature of a class.
* Cleanup and simplify types
* Fix repository#delete should return {}
* Add SavedObjects repository test for uncovered bug
Test for a bug in our previous js implementation that can lead to data
corruption and data loss.
If a bulkGet request is made where one of the objects to fetch is of a type
that isn't allowed, the returned result will include documents which have the
incorrect id and type assigned. E.g. the data of an object with id '1' is
returned with id '2'. Saving '2' will incorrectly override it's data with that
of the data of object '1'.
* SavedObject.updated_at: string and unify saved_object / serializer types
* Cleanup
* Address code review feedback
* Don't mock errors helpers in SavedObjectsClient Mock
* Address CR feedback
* CR Feedback #2
* Add kibana-platform as code owners of Saved Objects
* Better typings for SavedObjectsClient.errors
* Use unknown as default for generic type request paramater
* Bump @types/elasticsearch
* Fix types for isForbiddenError
* Bump x-pack @types/elasticsearch
* Update dependency dragselect to v1.12.2
* deep import the dragselect main file
dragselect's main file is now in a "docs" directory, which gets stripped from the build (for good reason I'd say) so point to the dist dir instead.
* Pin dependencies
* include core-js in babel packages
* specify core-js version when using `useBuiltIns`
* dedupe @babel/types to avoid "range of null" problem
* move charts to separate components
* replace areachart
* apply custom styles
* customize barchart color
* customize color for areachart
* move reusable functions into common
* exchange x & y value in barchart dataset
* replace pure component with react memo and upgrade enzyme adapter
* If it is a new package add it to x-pack/package.json
* If it is a major bump then leave it within the existing package.json
* Remove any duplicates from this package.json and x-pack/package.json
* I ran yarn kbn clean, yarn kbn bootstrap, and saw no differences in yarn.lock
* https://github.com/elastic/ingest-dev/issues/417
* [Code]: Make sure code mocha test could be run on CI
* [Code] fix lsp_service tests
* [Code] fix a problem that process can't exit normal when running gulp
* Ignore cert check for mocha tests
* Don't reuse root
* [Code] Use git worktree to create workspace instead of clone
* [Code] Upgrade nodegit dependency version to alpha.14
* [Code] implement worktree update for workspace
* [APM] Add new kibana package '@kbn/babel-plugin-apm-idx' based on
'babel-plugin-idx' to work with the APM implementation of the deep
object property helper function. Configure it as a babel plugin in the
common babel preset.
* [APM] modified the expanded output code to handle null checking correction for nested properties and added tests.
* [APM] use same versions of babel and jest as core kibana. fixes broken tests.
* [APM] created namespaced package `@kbn/elastic-idx`. Made available the
apm/common/idx and the corresponding babel plugin under this package.
Modified all imports of apm/common/idx to @kbn/elastic-idx.
* [APM] add typescript build to the @kbn/elastic-idx package
* [APM] fix idx import and linting failures
* [APM] make @kbn/elastic-idx/babel plugin detect idx calls as member functions from the bound scope
* Uses Node API's instead of unix commands for Windows support.
* Renames `canvasStorybookDLL` to `canvas_storybook_dll`
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* update snapshot
* UI/API changes to facilitate disabling features within spaces (#24235)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Begin to allow features to be disabled within spaces
typescript fixes
additional cleanup
attempt to resolve build error
fix tests
more ts updates
fix typedefs on manage_spaces_button
more import fixes
test fixes
move user profile into xpack common
Restructure space management screen
fix SASS references
design edits
remove Yes/No language from feature toggles
fix casing
removed unused imports
update snapshot
fix sass reference for collapsible panel
Fix sass reference, take 2
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* extract migration logic into testable unit
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* Design edits (#12)
enables customize avatar popover
update tests, and simplify editing space identifier
remove references to user profile
remove unused test suite
remove unnecessary sass import
removes security's capability_decorator
* fix i18n
* updates toggleUiCapabilities to use new feature definitions
* cleanup and testing
* remove references to old feature interface
* readd lost spacer
* adds feature route testing
* additional i18n
* snapshot update
* copy edits
* fix ml app icon
* add missing export
* remove unnecessary sass import
* attempt to fix build
* fix spaces api tests
* esArchiver mapping updates
* rename toggleUiCapabilities -> toggleUICapabilities
* removes shared collapsible_panel component in favor of plugin-specific components
* some copy and style adjustments
* fix test following rebase
* add lost types file
* design edits
* remove stale export
* feature feedback; fixes cached disabled features
* GAP: Security disables UI capabilities (#25809)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* First, very crappy implementation
* Adding tests for disabling ui capabilities
* All being set to false no longer requires a clone
* Using _.mapValues makes this a lot more readable
* Checking those privileges dynamically
* Fixing some broken stuff when i introduced checkPrivilegesDynamically
* Adding conditional plugin tests
* Renaming conditional plugin to optional plugin
* Fixing type errors
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* Update x-pack/plugins/security/server/lib/authorization/disable_ui_capabilities.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/check_privileges_dynamically.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Disabling all ui capabilities if route is anonymous
* More typescript
* Even more typescript
* Updating snapshot
* Less any
* More safer
* Another one
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Introducing uiCapabilities, removing config providers & user profile (#25387)
## Summary
Introduces the concept of "UI Capabilities", which allows Kibana applications to declare capabilities via the `uiCapabilities` injected var, and then use them client-side via the `ui/capabilities` module to inform their rendering decisions.
* GAP - Actions Restructured and Extensible (#25347)
* Restructure user profile for granular app privs (#23750)
merging to feature branch for further development
* Fixing saved object capability checking
* Beginning to restructure actions to be used for all action building
* Using actions to build ui capabilities
* dropping /read from client-side userprovide ui capabilities
* Adding some actions
* Using different syntax which will hopefully help with allowing apps to
specify the privileges themselves
* Exposing all saved object operations in the capabilities
* Using actions in security's onPostAuth
* Only loading the default index pattern when it's required
* Only using the navlinks for the "ui capabilities"
* Redirecting from the discover application if the user can't access
kibana:discover
* Redirecting from dashboard if they're hidden
* Features register their privileges now
* Introducing a FeaturesPrivilegesBuilder
* REmoving app from the feature definition
* Adding navlink specific ations
* Beginning to break out the serializer
* Exposing privileges from the authorization service
* Restructuring the privilege/resource serialization to support features
* Adding actions unit tests
* Adding features privileges builders tests
* Adding PrivilegeSerializer tests
* Renaming missed usages
* Adding tests for the privileges serializer
* Adding privileges tests
* Adding registerPrivilegesWithCluster tests
* Better tests
* Fixing authorization service tests
* Adding ResourceSerializer tests
* Fixing Privileges tests
* Some PUT role tests
* Fixing read ui/api actions
* Exposing features from xpackMainPlugin
* Adding navlink:* to the "reserved privileges"
* navlink -> navLink | nav_linknavlink -> navLink | nav_linknavlink ->
navLink | nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink |
nav_linknavlink -> navLink | nav_linknavlink -> navLink | nav_link
* Automatically determining navlink based ui capabilities
* Backing out changes that got left behind
* Using ui actions for navlinks
* Adding TODOs
* Ui -> UI
* Deleting unused file
* Removing api: [] as it's not necessary anymore
* Fixing graph saved object privileges
* Privileges are now async
* Pushing the asycnchronicity to the privileges "service"
* Adding TODO
* Providing initial value for reduce
* adds uiCapabilities to test_entry_template
* Adding config to APM/ML feature privileges
* Commenting out obviously failing test so we can get CI greeenn
* Fixing browser tests
* Goodbyyeee
* Adding app actions to the reserved privileges
* update snapshot
* Update x-pack/plugins/security/server/lib/authorization/check_privileges.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/check_privileges.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Fixing type errors
* Only disabling navLinks if a feature is registered for them
* Adding non i18n'ed tooltip
* Making metadata and tooltip optional
* i18n'ing tooltips
* Responding to peer review comments
* GAP - Role API Structure (#26740)
* Updated the role api PUT structure
* Minimum is an array now
* Updating get route to naively support the new structure
* Renaming and removing some serialized methods
* Updating Role PUT api tests
* Fixing PUT jest tests
* Fixing GET tests
* Updating PrivilegeSerializer tests
* Renaming features to feature for the GET, so we're consistent
* Validating features and feature privileges
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/plugins/security/server/lib/authorization/privilege_serializer.test.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Renaming some variables/members of the PrivilegesSerializer
* Fixing privileges serializer tests
* Fixing register privileges with cluster tests
* Fixing the role creation for the api integration tests
* Generalizing regex within the feature registry
* update tests
* [GAP] - Support infra features (#26955)
## Summary
This PR adds the `Infrastructure` and `Logs` apps as toggle-able features via Granular Application Privileges.
* [GAP] - Enables xpack_main to populate UI Capabilities (#27031)
## Summary
Currently, plugins that register features via `xpackMainPlugin.registerFeature({...})` also have to specify their own `uiCapabilities` via `injectDefaultVars`, which is counter-intuitive and cumbersome. We've accepted this complexity for OSS plugins, but x-pack and third-party plugins should not have to concern themselves with such implementation details.
This PR removes that requirement for x-pack and third-party plugins, so all they have to do is register features, and ensure that their feature privileges contain the appropriate UI Capabilities in the `ui` property.
### Notes
This implementation intentionally does not alter UI Capabilities that come in via OSS Kibana. The capabilities defined there should be the source of truth, regardless of which distribution is used.
### Example
<pre>
xpackMainPlugin.registerFeature({
id: 'graph',
name: 'Graph',
icon: 'graphApp',
<b>navLinkId: 'graph',</b>
privileges: {
all: {
app: [],
savedObject: { ... },
<b>ui: ['showWriteControls'],</b>
},
read: {
app: [],
savedObject: { ... },
<b>ui: ['someOtherCapability],</b>
}
}
});
</pre>
Will be translated to the following UI Capabilities:
```
uiCapabilities: {
navLinks: {
graph: true
},
graph: {
showWriteControls: true,
someOtherCapability: true,
}
}
```
xpack_main is **not responsible** for disabling UI capabilities, so this will initialize all capabilities with a value of `true`.
* Hide write controls for the visualization application (#26536)
* Hide write controls for the timelion application (#26537)
* blacklist feature ids (#27493)
* [GAP] - Support management links (#27055)
## Summary
This enables management links to be toggled via UI Capabilities.
## TODO
- [x] Implement spaces controls
- [x] Implement security controls
- [x] Testing
- [ ] (optional) - dedicated display for managing management links?
* Enables the feature catalogue registry to be controlled via uiCapabil… (#27945)
* Enables the feature catalogue registry to be controlled via uiCapabilities
* update snapshot
* xpack_main populates uiCapabilities with the full list of catalogue entries
* builds application privileges using catalogue actions
* prevent 'catalogue' from being registered as a feature id
* fix mocha tests
* fix merge
* update snapshots
* GAP - Discover and NavLinks Functional Testing (#27414)
* Adding very basic Discover tests
* Ensuring discover is visible in both spaces
* Parsing the DOM to determine the uiCapabilities
* Making this.wreck `any` because the type definitions suck
* Specifying auth when requesting ui capabilities
* Beginning architecture to support permutation testing
* Adding documentation of the different configurations we'd like to test
* Fixing type errors
* Beginning to work on the framework to test the combinations
* Adding some factories
* Pushing forward, not a huge fan of what I have right now
* The new-new
* Less weird types
* Revising some things after talking with Larry
* Switching from wreck to axios
* Restructuring some files
* Changing to a space with all features, and a space with no features
* Beginning to add the security only tests
* Adding a navLinksBuilder
* Adding spaces only tests
* Not disabling ui capabilities, or authing app/api access when we
shouldn't be
* Can't get rid of management
* Adding more user types
* More users, this is starting to really suck
* Renaming some things...
* Revising which users we'll test in which ui capabilities "test suite"
* Adding some more user scenarios for the security_only configuration
* Adding security_only user scenarios
* Adding space scenarios
* Fixing type errors
* Udpating the readme for the spaces we're testing with
* Adding global read discover security ui functional tests
* Adding tests to make sure save buttons are shown/hidden
The actual implementation is broken somewhere
* Fixing tests after GIS is added and conflicts happened for infra
* Adding discover ui capability tests
* Fixing navlinks tests
* Adding discover view tests
* Adding UI tests for spaces being disabled
* Fixing tests
* Removing wreck dependency, it's garbage
* Fixing typo
* Updating ui capabilities README.md and adding another user for the
security and spaces ui capability tests
* Updating yarn lock file
* Consolidation some types
* Adding VisualizeDisabledSpace to the scenarios.
* Fixing esArchives with .kibana_2
* Disable features optional again
* Adding ensureCurrentUrl: false
* Fixing space selector tests
* Fixing gis privileges, they use saved objects
* Fixing find's element staleness checks
* Update x-pack/test/functional/es_archives/spaces/disabled_features/data.json
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Generalizing logic to get appNavLinksText
* Removing duplicate license header
* Adding GIS mappingst
* Fixing readme
* We love our future selfs
* Adding GisRead scenario
* Whoops
* Adding note about funky syntax for use with exhaustive switches
* Using a centralized list of features
* Give it some time
* Even more time?
* Space Management - accessibility & i18n improvements (#28195)
## Summary
1) Improves the accessibility for the spaces management screen:
- Customize Space Avatar popover now receives focus when toggled
- Labels are more descriptive, providing context
- Delete Space modal correctly focuses
2) Improves i18n support
- fixed a couple hard-coded strings
3) Adds a "Features" column to the spaces grid page, which shows a brief summary of the number of features enabled for each space:
![image](https://user-images.githubusercontent.com/3493255/50785093-93b78280-127d-11e9-975e-7209d35211ff.png)
Related: https://github.com/elastic/kibana/issues/28184
* Feature Controls - spaces - functional tests (#28213)
* adds tests for /api/features/v1 endpoint
* update failing management test
* Fc/run ui capability tests (#28362)
* Running the UI Capability Tests as part of the normal CI runs
* Adding uptime feature to get these tests passing
* Adding features and sorting
* Adding uptime security_only uiCapability tests, and fixing devTools
* Fixing the docs
* Fixing section panel i18n issue
* Removing unused import
* Updating snapshots
* Feature Controls - The new new role API (#28441)
These changes allow us to build the most recent UI where spaces can be "grouped" and edited at once. This changes the kibana section of the role definition to the following:
```
{
kibana: [
{
base: ['read'],
feature: {
discover: ['all'],
dashboard: ['all']
},
spaces: ['*']
},
{
base: ['read'],
feature: {
discover: ['all'],
dashboard: ['all']
},
spaces: ['marketing', 'sales']
}
]
}
```
If the `spaces` property isn't provided (for example if the user isn't using Spaces) then it'll default to `['*']`.
There are a few other stipulations that we're implementing with this approach.
1. Each "item" can be for 1 to many spaces OR globally. We can't specify both space privileges and global privileges in the same "item" because for Spaces we translate `all` to `space_all`, etc. so we can give them different privileges, and this becomes problematic when trying to serialize/deserialize to ES.
2. Additionally, each space can only appear once. The ES model would allow this, but the role management UI becomes more complicated if we were to allow this when calculating effective privileges.
* Feature Controls - Discover Save Button Test #28500 (#28501)
* Adding some debug logs
* Setting ui settings using the functional services
* Doing the same for the spaces disabled features
* Removing console.log debug statements
* Using save instead of showWriteControls
* Reload when adjusting visible features within the users active space (#28409)
## Summary
Changes to the visible features within a space are not visible until the page is refreshed. Because of this, when a user is editing their active space, their changes are not immediately visible.
This updates the space management screen to force a refresh when updating the visible features inside the active space. It also introduces a modal warning that this will happen:
![image](https://user-images.githubusercontent.com/3493255/50923423-ebd7bb80-141a-11e9-92bd-2779020578a4.png)
* Throwing error if we register a feature after getAll is called (#29030)
* Throwing error if we register a feature after getAll is called
* Fixing some tests
* Fixing feature route tests
* Removing unused imports
* Fixing merge conflict
* Feature Controls - Fixing fallout of removing the legacy fallback (#29141)
* Fixing use of mode.useRbacFoRequest to mode.useRbac
* Fixing ui capability tests
* [Feature Controls] - Fix a11y for customize feature section (#29174)
## Summary
Fixes the displayed and announced text for the "show"/"hide" button of the Customize Visible Features section of the spaces management page.
This was inadvertently broken following a merge from master at some point.
* Feature Controls: Fixing k7's new "nav links" (#29198)
* Fixing k7's new applist for feature controls
* Renaming appSwitcher to appsMenu
* Feature Controls - Dashboard (#29139)
* Using addRouteSetupWork to implement the redirect
* Using centralized addSetupWork
* Fixing dashboard functional feature privileges tests
* Ensuring landing page and create dashboard redirect to the home-page
* Adding more tests to ensure the redirects work properly
* Adding disabled space feature tests for Dashboards
* Update src/ui/public/capabilities/route_setup.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update test/functional/page_objects/common_page.js
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Fixing ui capability tests after adding createNew
* Removing unnecessary `return undefined`
* requireUICapabilities -> requireUICapability
* Updating dashboard ui capability tests
* Fixing issue with the selection column appearing on Dashboards
* Fixing ui capability dashboard space only tests
* [FC] - Move management and catalogue entries out of privilege definition (#28354)
* Moves catalogue and management entries from privilege defintion to base feature definition
* Update new management menu to respect items disabled via UI Capabilities
* add test
* re-add index pattern entries
* re-add advanced settings icon
* fix tests
* remove management and catalogue entries from read-only users
* bring it back now y'all
* catalogue updates for xpack plugins
* Introduces 'grantWithBaseRead' flag
* update privileges from all -> read where necessary
* rename feature builder functions
* catalogue and management items should cascade to privileges when not specified
* add catalogue entry for uptime app
* Simplify feature registrations using inherited catalogue/management entries
* consolidate and fix privilege building logic
* rename variables
* remove debug code
* remove duplicate lodash import
* Update x-pack/plugins/xpack_main/server/lib/feature_registry/feature_registry.ts
Co-Authored-By: legrego <lgregorydev@gmail.com>
* [GAP] - Role Management UI (#26840)
![image](https://user-images.githubusercontent.com/3493255/51063094-72310080-15c7-11e9-9274-debf0e9b84f1.png)
![image](https://user-images.githubusercontent.com/3493255/51063108-8aa11b00-15c7-11e9-92fc-31c922086e05.png)
![image](https://user-images.githubusercontent.com/3493255/51063165-cb992f80-15c7-11e9-894d-630c109211d3.png)
---------
Edge-case scenarios:
1) [x] '*' and spaces in the same "entry"
Handled via `_transform_errors` at the API level. Renders a partial read-only view in the UI.
2) [x] same space appearing in multiple "entries"
Handled via `_transform_errors` at the API level. Renders a partial read-only view in the UI.
3) [x] base and feature privileges being set on the same "entry"
UI does not allow this to be set, but UI is smart enough to display the correct effective privilege in this case.
4) [x] multiple base privileges set in the same "entry"
UI does not allow this to be set, but UI is smart enough to apply the most permissive base privilege when displaying and performing privilege calculations.
5) [x] multiple feature privileges for the same "entry" (ml_all and ml_read)
UI does not allow for this to be set, but UI is smart enough to apply the most permissive base privilege when displaying and performing privilege calculations.
--------
## Summary
This updates the role management UI to allow application privileges to be customized globally and per-space.
## TODO:
- [x] [First Design review](https://github.com/legrego/kibana/pull/13)
- [ ] Second Design review
- [ ] Copy review
- [x] i18n
- [x] Handle deleted/unknown features
- [x] Handle deleted/unknown spaces
- [x] Cleanup & refactoring
- [x] Testing
* [Feature Controls, Spaces] - Don't load bundles for hidden apps (#29617)
## Summary
This enables the spaces plugin to issue a 404 if the requested application is disabled within the users active space.
To enable this functionality, the `app` property was moved to the root feature level, with the option to override at the privilege level. This follows the same logic as `catalogue` and `management` sections.
This will enable automatic app "protections" for those which only specify a single UI application, including:
1) Timelion
2) Canvas
3) Monitoring
4) APM
5) Code (when it merges)
6) GIS
7) Graph
8) ML
* [Feature Controls] - Copy Edits (#29651)
## Summary
Copy edits from today's session
* [Feature Controls] - Rename-a-thon (#29709)
* post-merge cleanup
* [Feature Controls] - fixes from recent merge from master (#29826)
## Summary
this pr will contain any required changes to fix CI from the recent merge from master, which includes the new k7 redesign design and dark mode
* Feature Controls: Adding privileges tooltip for Dev Tools (#30008)
* Adding privileges tooltip for Dev Tools
* appeasing the linter
* [Feature Controls] - Fix displayed space base privilege (#30133)
## Summary
This fixes the displayed space base privilege when a global base privilege is influencing the dropdown control:
1) Add global 'read' privilege
2) Configure space privilege -- note default base privilege of 'read'
3) Change space base privilege to 'custom'
Prior to this fix, the dropdown would not honor the change; it would keep 'read' as the selected option.
* Feature Controls: Adding read privileges for advanced settings and index patterns (#30106)
* Adding read privileges for advanced settings and index patterns
* Fixing the tests and the actual code itself
* Feature Controls - spaces not a security mechanism warning (#29853)
* Changing copy for the spaces not a security mechanism warning
* Using Gail's wording
* [Feature Controls] - Fixes from merging from master (8.0) (#30267)
* improve typings
* fix xpack_main type definitions
* test updates
* Fc/functional test move (#29835)
* Moving dashboard feature control tests to the dashboard application
* Moving more tests around
* Fixing some tests, no longer using uiSettings service, doesn't play
nicely with spaces
* Fixing esarchived issue
* Renaming some files
* [Feature Controls] - Readonly view for Advanced Settings using UICapabilities (#30243)
## Summary
This builds on the work done in https://github.com/elastic/kibana/pull/30106 to enable a read-only mode for the Advanced Settings screen:
- Input fields are disabled
- Save options are not displayed
- "Reset to default" options are not displayed
* Feature Controls: No Wildcards (#30169)
* A poorly named abstraction enters the room
* No more wildcards, starting to move some stuff around
* Splitting out the feature privilege builders
* Using actions instead of relying on their implementation
* We don't need the saved object types any longer
* Explicitly specifying some actions that used to rely on wildcards
* Fixing api integration test for privileges
* Test fixture plugin which adds the globaltype now specifies a feature
* Unauthorized to find unknown types now
* Adding tests for features with no privileges
* Update x-pack/test/saved_object_api_integration/security_and_spaces/apis/find.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Adding back accidentally deleted test
* Using the shared XPackMainPlugin definition
* Fixing privileges
* [Feature Controls] - Readonly mode for Canvas using UICapabilities (#29264)
## Summary
Updates Canvas to respect UICapabilities when determining if a user has read or read/write access to the application:
1) Adds a `showWriteControls` UI Capability to the Canvas's `all` privilege.
2) Removes the `setCanUserWrite` Redux action
3) Sets the initial (and only) state for `state.transient.canUserWrite` based on the UI Capability.
Closes https://github.com/elastic/kibana/issues/27695
* [Feature Controls] - Readonly mode for Maps using UICapabilities (#30437)
## Summary
This updates the maps application to support a read-only mode:
1) Removes selection/delete from Maps listing page
2) Removes "save" option
## TODO:
- [x] Functional UI Tests
* Add typings for x-pack/test to support .html imports (#30570)
We're importing `ui/capabilities` from the x-pack/test project, which
implicitly traverses into typings which are potentially importing .html
files, so we have to teach TypeScript about it.
* [Feature Controls] - Readonly mode for Timelion using UICapabilities (#30128)
## Summary
Updates Timelion to respect UICapabilities when determining if a user has read or read/write access to the application.
A previous PR was responsible for hiding the save controls, but this PR adds testing and the appropriate UICapabilities to the registered privilege definition.
* remove stray debug code
* [Feature Controls] - Updates from src/ui move to src/legacy/ui (#30678)
* dummy commit
* fix import path
* update message identifier
* fix snapshot
* remove unused translations
* Feature Controls: Adding read/write privileges for all applications (#30732)
* Adding read/write privileges for all applications
* Using default for advanced settings, canvas, maps and timelion
* Update x-pack/test/ui_capabilities/security_only/tests/canvas.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/canvas.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/maps.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/maps.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/timelion.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* [Feature Controls] - Readonly mode for Visualize using UICapabilities (#29714)
* enable read-only view, and enable app redirection for visualize app
* Hide 'Edit Visualization' dashboard context menu item if visualizations are not editable
* Hide 'Add new visualization' button if action is not available
* show 'Visualize' button on discover view only if viz app is available
* update tests
* allow visualizations to be created, but not saved for read-only users
* adds functional tests for visualize
* add tests for showing/hiding the visualize button in the discover app
* fix visualize tests following merge from master
* tests for edit viz feature from dashboards
* cleanup
* remove unnecessary call to set ui settings
* remove unused variables
* reduce flakyness of tsvb tests
* renames visualize.showWriteControls => visualize.save
* fix ui capability tests
* fix tests
* fix references to timePicker page object
* fix ts errors
* adds 'editable' property to embeddable metadata instead of hardcoded capability checks
* Remove unnecessary read-only considerations
* revert unnecessary mock changes
* [Feature Controls] - Adds missing uptime icon (#30716)
## Summary
Adds missing feature icon for Uptime application.
Needs https://github.com/elastic/kibana/pull/30678 to merge before this will go green.
* Feature Controls - Fix branch (#31135)
* Updating snapshot
* Switching visualize to use the default branch of the switch
* Fixing esarchive
* Feature Controls - Graph (#30762)
* Adding graph functional tests
* Fixing Privilieges API test
* Adding graph ui capability tests
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_and_spaces/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/security_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Update x-pack/test/ui_capabilities/spaces_only/tests/graph.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Removing hard-coded constants
* Adding Graph delete button
* Fixing ui capability tests
* [Feature Controls] - Fixes page width for spaces management screen (#30723)
## Summary
Fixes the skinny spaces management screen following the redesign of the overall management area.
Needs https://github.com/elastic/kibana/pull/30678 to merge before this will go green.
* Feature Controls - Dev Tools (#30712)
* Adding functional tests
* Addingn Dev_Tools ui capability tests
* Adding some api tests for console's API
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Moving uiCapability definition
* Giving user_1 dashboard access to space_2
* Using the default in the switch for devtools/visualize
* Using forceLogout, maps are leaving us on a 404 page
* Fixing privileges API tests
* Feature Controls- Fix Merge Conflicts (#31651)
* Removing duplicated and outdated tests
* Updating snapshot
* Fixing type script errors
* Getting rid of some double quotes
* Adding saved_object:url access to discover temporarily to fix tests
* Fixing dashboard tests, updating snapshots
* Fixing security only find tests
* Removing reduntant test
* Trying to give it more time
* Fixing it 20 seconds to redirect away from the create new dashboard
* Feature Controls - No more route defaults for dashboards (#31767)
* No more route defaults for dashboards
* Verbose logging...
* Changing some ciGroups to try to narrow down the problem
* Revert "Verbose logging..."
This reverts commit 3198e73b61.
* Revert "No more route defaults for dashboards"
This reverts commit 525cd94dc5.
* Chaning the method in which we do the redirect
* Fixing type issue
* Update index.ts
* Update index.ts
* Feature Controls - Only allowing features to register all and read privileges (#31526)
* Only allowing features to register all and read privileges
* Making all and read optional properties required some existence checks
* Using Aleh's superior solution!
* No more unnecessary `as any`
* Feature Controls - Saved Object Management (#31332)
* Adding savedObject uiCapabilities that mirror the savedobject actions
* Using uiCapabilities to limit which types to search for
* Restricting which saved objects can be deleted based on type
* Hiding "view in app" button when we aren't allowed to
* Filtering the saved objects relationships based on the valid saved
object types
* Using dedicated savedObjectsManagement ui capabilities
* Adding readonly mode of viewing an object
* Displaying View In App if you can actually do so
* No more operations
* Moving saved objects ui capability population to kibana plugin
* Updating x-pack jest tests
* Adding security only saved objects management ui capability tests
* Adding security and spaces tests
* Adding spaces only saved objects managment ui capability tests
* Adding saved object management listing page functional tests
* Adding functional tests for edit visualization
* Consolidating canViewInApp and getInAppUrl into the same file
* Fixing imports
* One more stray import/export
* Adding back esFrom source
* Revert "Adding back esFrom source"
This reverts commit dfb626ace3.
* Updating jest snapshots
* Updating privileges
* Adding some logging
* Back to 10 seconds
* Trying to get more logs...
* Back to normal logging levels
* Fixing ui capability tests
* Putting timeouts back.
* Feature Controls - UI capability API integration tests with fixture plugins (#32086)
* Only testing the foo plugin for security and spaces
* Using the foo plugin with the security_only tests
* Changing spaces only tests to use the foo plugin
* Using list of features from api, and fixing bug with the spaces
interceptor
* Adding catalogue tests, which are alluding to another bug
* saved_objects catalogue aren't driven by ui capabilites presently
* Expanding the coverage for the spaces only catalogue tests
* Fixing some catalogue asserts
* Fixing catalogue tests for spaces_only, I had it backwards
* Adjusting Readme, adding "global read" scenario for security only tests
* Responding to PR feedback
* Adding back saved objects tests I accidentally deleted
* Fixing typescript issues, we can't import EUI on the server
* Fixing eslint error
* Updating Jest snapshots, fixing chrome mock
* Fixing dashboard listing test
* Adding missing await and forcing logout for graph functional tests
* Putting i18n string back
* Fixing type script issue
* Fixing canvas assert because of merge
* Fixing saved object api error assertations
* user-action is now a saved object type
* Fixing typescript error
* Fixing saved object actions as a result of the merge
* Feature Controls - Infrastructure and Logging (#31843)
* hide infra/logs apps if disabled via UICapabilities
* adds tests
* adds UICapability tests for infra and log apps
* update expected privilege/action mapping
* adds feature controls security tests for infraHome
* adds infra spaces feature control tests
* remove debug code
* a sample readonly implementation, ignoring 'logs' privileges
* ts fixes
* fix capability expectations
* Removing RequiresUICapability component, since there are no usages
* Driving the source configuration seperately for logs/infrastructure
* Adding infrastructure feature controls security functional tests
* Adding spaces infrastructure tests
* Adding logs functional tests
* Reworking the ui capability tests to be more consistent
* Fixing privileges API
* Forcing logout
* Fixing comma issue introduced by merge
* Fix merge conflicts and loading/unloading esarchives more consistently
* Removing unnecessary !!
* Fixing saved object management tests
* Fixing more tests
* Using the new context APIs
* Revert "Using the new context APIs"
This reverts commit 4776f1fc86.
* Adding future version of ui capabilities react provider
* Switching the order of the HOC's for infra and making the future the
default
* Applying Felix's PR feedback
* Protecting Infra's GraphQL APIs
* Updating privileges list
* Using the introspection query
* No longer using apollo context library, rephrasing test descriptions
* Fixing issue introduced by merge conflict, I forgot a }
* Putting back missplaced data test subj
* Updating jest snapshots
* Feature Controls - Short URLs (#32418)
* Discover is showing creating short urls properly
* Adding Discover functional tests
* When dashboards show the share menu you can always create short urls
* Visualize now displays the short urls link appropriately
* Dashboard all gets access to saved objects and updating privileges api
test
* Updating and adding short url test to url panel content
* Fixing misspelling
* Updating jest snapshot
* Adding comment why allowShortUrl is always true for Dashboards
* Updating snapshots
* Fixing snapshots, mocking chrome.getInjected
* Feature Controls - Uptime (#32577)
* Adding uptime functional tests
* Enabling feature controls for uptime
* Updating the privileges API's actions
* Using a single access tag for limiting API access
* Revising the behavior of maps read-only mode (#33338)
* Feature Controls - APIs (#32915)
* Using HapiJS's scopes to perform authorization on api endpoints
* Revert "Using HapiJS's scopes to perform authorization on api endpoints"
This reverts commit f73810c22d.
* Switching the syntax of the api tags
* Fixing privileges API
* Typescriptifying some dependencies of the api authorization extensions
* Using dedicated typescript file for api post auth filtering
* Adding tests and restructuring the flow of the api authorization
* Adjusting uptime's usage of privileges and the privileges test
* Integrating PR feedback
* Fixing graph test subject, thanks Joe!
* Consolidating hideWriteControls dashboard listing test
* Reusing maps constants
* Adding type to saved object management ui capability tests
* Feature Controls - Index Pattern Management (#33314)
* Enabling feature controls for index patterns
* Updating privileges API tests
* Fixing saved object management's view index patterns in app logic
* Fixing forgotten canViewInApp tests
* Fixing maps spaces functional tests
* Feature Controls - Differentiating the privileges with the same actions (#32266)
* Differentiating the privileges with the same actions
* The types for the lodash.uniqwith packare aren't right, and we need to
customize the isEqual also, so we're gonna do it ourselves
* Fixing dev tools ui capability
* Removing are equivalent privileges prevention, it's not what we really
need
* Requiring all to be more permissive than read on startup
* Transparently differentiating "all" from "read" feature privileges
* Fixing jest tests
* Adding the allHack: action to the space and global base privileges
* Changing actions to be readonly
* Adding JSDoc's for the Actions class and specifically the `allHack`
action
* Making the import of xpack_main types consistent
* Feature Controls: APM (#32812)
* Adding APM read privilege and adding functional UI tests
* Beginning to validate the APM routes are protected properly
* Protecting APM's APIs
* Specifying CI group
* Fixing privileges
* Adding forgotten apm show ui capability
* Fixing apm's privileges
* Fixing merge-conflict with privileges allHack: and APM
* address canvas feedback (#34269)
* [Feature Controls] - Plugin postInit (#29172)
## Summary
Throwing this up as a straw ~man~ person. If we like it, I can split it out and point the OSS changes against master if we'd prefer.
Introduces a `postInit` plugin hook that is called after all plugins have gone through their `preInit` and `init` phases, which allows the security plugin to call `registerPrivilegesWithCluster` after all plugins have had an opportunity to register their features.
* Feature Controls - Adds bulk toggle for showing/hiding features within a space (#34288)
## Summary
Adds a "Change all" option to the spaces management screen to allow all features to be shown/hidden:
![image](https://user-images.githubusercontent.com/3493255/55344105-85db5d00-547a-11e9-9325-136d1c13f40e.png)
Closes#34184
* Feature Controls - Unregistered Applications Authorization (#34122)
* Converting the app authorization to use typescript
* Adding jest tests
* Only authorizing app routes that are registered for features
* Using ProtectedApplications to lazily get feature applications
* Removing unneeded mocked headers as part of the authorization
* Adding some logging for the app authorization
* Fixing imports, thanks tslint --fix!
* Updating snapshots
* Feature Controls - Disable privilege form until spaces are selected (#34386)
## Summary
This disables the privilege selection until one or more spaces are selected in the role management form:
![image](https://user-images.githubusercontent.com/3493255/55432524-1724ff00-5561-11e9-86f6-1589ba3fa701.png)
* Feature Controls - Visualize read-only create new (#34209)
* Allowing users to create new visualizations, even if they can't be saved
* Fixing privileges and tests
* Updating snapshot
* Removing visualize edit ui capability
* Feature Controls - Actions Version Prefix (#34405)
* Prefixing actions with version
* Updating privileges api integration test
* Update x-pack/plugins/security/server/lib/authorization/actions/saved_object.ts
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Requiring version to be a not empty string
* Updating jest snapshots
* Changing the 403 messages for the saved object client
* Fixing ui/chrome mock
* Feature Controls - Displaying share menu on dashboards when in read-only mode (#34207)
* Displaying share menu on dashboards when in read-only mode
* Fixing test description, thanks Luke!
* Fixing dashboard view mode tests because the share menu is now visible
* migrate from tslint to eslint
* Feature Controls - Reserved Role Apps (#30525)
* Removing feature privileges from ml/monitoring/apm
* Adding monitoring/ml/apm as hard-coded global privileges
* A poorly named abstraction enters the room
* No more wildcards, starting to move some stuff around
* Splitting out the feature privilege builders
* Using actions instead of relying on their implementation
* We don't need the saved object types any longer
* Explicitly specifying some actions that used to rely on wildcards
* Fixing api integration test for privileges
* Test fixture plugin which adds the globaltype now specifies a feature
* Unauthorized to find unknown types now
* Adding reserved privileges tests
* Adding reserved privileges in a designated reserved bucket
* Fixing ui capability tests
* Adding spaces api tests for apm/ml/monitoring users
* Adding more roles to the security only ui capability tests
* You can put a role with reserved privileges using the API
* Adding support to get roles with _reserved privileges
* Adding APM functional tests
* Adding monitoring functional tests
* Fixing typo
* Ensuring apm_user, monitoring_user alone don't authorize you
* Adding ml functional tests
* Fixing test
* Fixing some type errors
* Updating snapshots
* Fixing privileges tests
* Trying to force this to run from source
* Fixing TS errors
* Being a less noisy neighbor
* Forcing logout for apm/dashboard feature controls security tests
* Fixing the security only ui capability tests
* Removing test that monitoring now tests itself
* Fixing some ui capability tests
* Cleaning up the error page services
* Fixing misspelling in comment
* Using forceLogout for monitoring
* Removing code that never should have been there, sorry Larry
* Less leniency with the get roles
* Barely alphabetical for a bit
* Apply suggestions from code review
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
* Removing errant timeout
* No more hard coded esFrom source
* More nits
* Adding back esFrom source
* APM no longer uses reserved privileges, reserved privileges are
pluggable
* Fixing typescript errors
* Fixing ui capability test themselves
* Displaying reserved privileges for the space aware and simple forms
* Removing ability to PUT roles with _reserved privileges.
Removing ability to GET roles that have entries with both reserved and
feature/base privileges.
* Updating jest snapshots
* Changing the interface for a feature to register a reserved privilege to
include a description as well
* Displaying features with reserved privileges in the feature table
* Adjusting the reserved role privileges unit tests
* Changing usages of expect.js to @kbn/expect
* Changing the CalculatedPrivilege's _reserved property to reserved
* Allowing reserved privileges to be assigned at kibana-*
* Updating forgotten snapshot
* Validating reserved privileges
* Updating imports
* Removing --esFrom flag, we don't need it anymore
* Switching from tslint's ignore to eslint's ignore
* Feature Controls - Adds feature registration to plugin generator (#34537)
## Summary
This updates the plugin generator to allow plugin authors to automatically register their feature with the Feature Registry, for control via Spaces/Security.
Running:
```
elastic-mbp:kibana larry$ node scripts/generate_plugin.js test-plugin
? Provide a short description An awesome Kibana plugin
? What Kibana version are you targeting? master
? Should an app component be generated? Yes
? Should translation files be generated? Yes
? Should a hack component be generated? Yes
? Should a server API be generated? Yes
? Should SCSS be used? Yes
```
Generates the following:
```js
import { resolve } from 'path';
import { existsSync } from 'fs';
import { i18n } from '@kbn/i18n';
import exampleRoute from './server/routes/example';
export default function (kibana) {
return new kibana.Plugin({
require: ['elasticsearch'],
name: 'test_plugin',
uiExports: {
app: {
title: 'Test Plugin',
description: 'An awesome Kibana plugin',
main: 'plugins/test_plugin/app',
},
hacks: [
'plugins/test_plugin/hack'
],
styleSheetPaths: [resolve(__dirname, 'public/app.scss'), resolve(__dirname, 'public/app.css')].find(p => existsSync(p)),
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},
init(server, options) { // eslint-disable-line no-unused-vars
const xpackMainPlugin = server.plugins.xpack_main;
if (xpackMainPlugin) {
const featureId = 'test_plugin';
xpackMainPlugin.registerFeature({
id: featureId,
name: i18n.translate('testPlugin.featureRegistry.featureName', {
defaultMessage: 'test-plugin',
}),
navLinkId: featureId,
icon: 'discoverApp',
app: [featureId, 'kibana'],
catalogue: [],
privileges: {
all: {
api: [],
savedObject: {
all: [],
read: ['config'],
},
ui: ['show'],
},
read: {
api: [],
savedObject: {
all: [],
read: ['config'],
},
ui: ['show'],
},
},
});
}
// Add server routes and initialize the plugin here
exampleRoute(server);
}
});
}
```
* Updating core system docs
* Fixing infra's dates with data for the functional tests
* [Feature Controls] - Move UICapabilities to the new platform (#30585)
## Summary
This moves the UI Capabilities service into the new platform, shimming into the old platform in a way that is consistent with the `i18n` service.
* Fixing uptime functional api tests
* Removing .only...
## Summary
(Fixes#33734#33757#33735)
This PR resolves issues with the `mini` color selector, the places the color picker was used, and removes complexity around color selection. It allows for CSS-based color strings while still ruling out duplicates in the color palette, and fixes bugs found recently.
This PR also includes + modifies #33896 and updates Storybook to v5.
![Mar-28-2019 09-18-45](https://user-images.githubusercontent.com/297604/55168267-873a1c00-5140-11e9-93b9-f5ca86e70098.gif)