Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove privs api and hardcoded privs list #3

Merged
merged 2 commits into from
Sep 6, 2018

Conversation

legrego
Copy link

@legrego legrego commented Sep 5, 2018

Copy link
Owner

@kobelb kobelb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@legrego
Copy link
Author

legrego commented Sep 6, 2018

cool, feel free to merge at will! I can't merge into your branch

@kobelb kobelb merged commit 14d9058 into kobelb:spaces/securing-api-tests Sep 6, 2018
kobelb added a commit that referenced this pull request Sep 10, 2018
commit 23515b1
Author: kobelb <brandon.kobel@elastic.co>
Date:   Mon Sep 10 06:57:58 2018 -0400

    Adding more users to the spaces tests

commit 4bbde73
Author: kobelb <brandon.kobel@elastic.co>
Date:   Mon Sep 10 06:09:35 2018 -0400

    Adding not space aware get tests

commit 5d11bef
Author: kobelb <brandon.kobel@elastic.co>
Date:   Sat Sep 8 14:06:20 2018 -0400

    Adding not space aware test to find

commit f9383fd
Author: kobelb <brandon.kobel@elastic.co>
Date:   Sat Sep 8 13:49:04 2018 -0400

    Adding bulk create tests and testing non space aware type with bulkGet

commit 5388b5a
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 16:18:04 2018 -0400

    Adding bulk create test

commit 0674263
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 15:58:21 2018 -0400

    Ignoring some modules

commit 6b011d3
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 15:55:58 2018 -0400

    Making the users match for saved objects security and spaces

commit de2f994
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 14:18:53 2018 -0400

    Making the space suites define their own test expectations

commit 5407866
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 13:15:46 2018 -0400

    Removing redundant spaces folder

commit 9913923
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 13:14:45 2018 -0400

    Removing unneeded objects from the esarchive

commit bc602b1
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 13:08:12 2018 -0400

    Moving some tests around

commit 7fec308
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 12:38:23 2018 -0400

    Deleting rbac_api_integration tests, they've been migrated elsewhere

commit 29c018e
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 10:01:16 2018 -0400

    Importing SuperTest where needed

commit 38d2e74
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 08:44:53 2018 -0400

    Removing the "saved_objects" folder

commit 70eada4
Merge: 1b2708f 9023431
Author: Brandon Kobel <brandon.kobel@gmail.com>
Date:   Fri Sep 7 10:04:03 2018 -0400

    Merge pull request #4 from legrego/spaces-api-tests

    Initial round of spaces api testing

commit 9023431
Merge: 6410f72 1b2708f
Author: Larry Gregory <larry.gregory@elastic.co>
Date:   Fri Sep 7 09:37:57 2018 -0400

    Merge remote-tracking branch 'kobelb/spaces/securing-api-tests' into spaces-api-tests

commit 1b2708f
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 08:17:25 2018 -0400

    Even more typescript

commit 369a429
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 08:08:28 2018 -0400

    Typescriptifying Get

commit f53f2ab
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 08:01:48 2018 -0400

    Typescriptifying Find

commit f707e03
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 07:55:10 2018 -0400

    Typescriptifying Create

commit 485d983
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 07:31:54 2018 -0400

    Changing the namespace agnostic type name

commit 71c2122
Author: kobelb <brandon.kobel@elastic.co>
Date:   Fri Sep 7 07:25:15 2018 -0400

    Adding update tests

commit f60e953
Author: kobelb <brandon.kobel@elastic.co>
Date:   Thu Sep 6 15:53:34 2018 -0400

    Delete tests

commit 94682e5
Author: kobelb <brandon.kobel@elastic.co>
Date:   Thu Sep 6 12:07:39 2018 -0400

    Adding get security and spaces tests

commit 481943f
Author: kobelb <brandon.kobel@elastic.co>
Date:   Thu Sep 6 11:58:42 2018 -0400

    Generalizing bulk get

commit 14d9058
Merge: 6627127 fc5f7fa
Author: Brandon Kobel <brandon.kobel@gmail.com>
Date:   Thu Sep 6 10:46:07 2018 -0400

    Merge pull request #3 from legrego/remove-privs-api

    Remove privs api and hardcoded privs list

commit 6410f72
Author: Larry Gregory <larry.gregory@elastic.co>
Date:   Thu Sep 6 09:35:30 2018 -0400

    add missing superagent type

commit 4afacc0
Author: Larry Gregory <larry.gregory@elastic.co>
Date:   Wed Sep 5 20:19:15 2018 -0400

    initial round of spaces api testing

commit 6627127
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 17:29:37 2018 -0400

    Adding GET test suite

commit 68a5537
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 13:32:49 2018 -0400

    Copying find to security and spaces

commit fc5f7fa
Author: Larry Gregory <larry.gregory@elastic.co>
Date:   Wed Sep 5 12:36:30 2018 -0400

    move es privilege tests to api_integration

commit 189fbe6
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 12:24:41 2018 -0400

    Switching approach to dynamically enabling security

commit c72200f
Author: Larry Gregory <larry.gregory@elastic.co>
Date:   Wed Sep 5 11:57:26 2018 -0400

    remove get privileges api

commit 1607f80
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 11:47:19 2018 -0400

    Dynamically supplying users so we reduce some duplication

commit 9deec1b
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 09:32:36 2018 -0400

    Security and Spaces create tests

commit a8232dd
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 07:22:10 2018 -0400

    Using a create "test suite"

commit f07f668
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 05:54:46 2018 -0400

    Using the spaces esArchive always now

commit b2021ad
Merge: d3babea 7b4575b
Author: kobelb <brandon.kobel@elastic.co>
Date:   Wed Sep 5 05:43:48 2018 -0400

    Merge branch 'spaces/securing' into spaces/securing-api-tests

commit d3babea
Author: kobelb <brandon.kobel@elastic.co>
Date:   Tue Sep 4 17:43:38 2018 -0400

    Moving over the spaces only saved objects tests

commit 94054a2
Author: kobelb <brandon.kobel@elastic.co>
Date:   Tue Sep 4 17:26:43 2018 -0400

    Copying over the security only saved object api tests
kobelb pushed a commit that referenced this pull request Sep 18, 2018
* Update to EUI 0.0.53

* Remove input vis specific styling

* remove double close button in dashboard add panel flyout (#2)

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
kobelb pushed a commit that referenced this pull request Mar 12, 2019
* Prepare control flow to use embeddable factories in add panel

* Rewrite saved object finder and add tests

* Fix usages of new saved object finder

* fix test failures

* fix some functional tests and re-introduce makeUrl

* fix tests

* remove direct hrefs in saved_object_lists

* PR review fixes

* update snapshot

* overwrite width of viz dialog

* Update src/legacy/core_plugins/kibana/public/dashboard/top_nav/add_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/embeddable/search_embeddable_factory.ts

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/top_nav/open_search_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* fix tests

* review fixes #1

* review fixes #2

* dont use classname in functional test

* remove call to action button prop

* align buttons correctly

* fix tests

* remove debugging statement

* Update src/legacy/core_plugins/kibana/public/dashboard/top_nav/add_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/top_nav/open_search_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* review fixes #3

* improve filter behavior and enable it for search wizard

* adjust functional tests for new filter behavior

* Change translation id due to string change

* Update Jest snapshot
kobelb pushed a commit that referenced this pull request Mar 13, 2019
* Prepare control flow to use embeddable factories in add panel

* Rewrite saved object finder and add tests

* Fix usages of new saved object finder

* fix test failures

* fix some functional tests and re-introduce makeUrl

* fix tests

* remove direct hrefs in saved_object_lists

* PR review fixes

* update snapshot

* overwrite width of viz dialog

* Update src/legacy/core_plugins/kibana/public/dashboard/top_nav/add_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/embeddable/search_embeddable_factory.ts

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/top_nav/open_search_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/visualize/wizard/search_selection/search_selection.tsx

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* fix tests

* review fixes #1

* review fixes #2

* dont use classname in functional test

* remove call to action button prop

* align buttons correctly

* fix tests

* remove debugging statement

* Update src/legacy/core_plugins/kibana/public/dashboard/top_nav/add_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* Update src/legacy/core_plugins/kibana/public/discover/top_nav/open_search_panel.js

Co-Authored-By: flash1293 <email@johannes-reuter.de>

* review fixes #3

* improve filter behavior and enable it for search wizard

* adjust functional tests for new filter behavior

* Change translation id due to string change

* Update Jest snapshot
kibanamachine pushed a commit that referenced this pull request Oct 6, 2021
… Synchronization section (elastic#113982)

* Rename method

We have to set the source from the sync logic file and this naming makes more sense

* Wire up Enable Synchronization toggle

* Remove sync controls from source settings

* Refactor to pass in contentSource as prop

Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with #3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.

* Add logic for Objects and assets view

* Add content to Objects and assets view

* Add fallback for `nextStart` that is in the past

This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”

* reduce -> map

From previous PR feedback

* Fix casing on i18n ID
kobelb pushed a commit that referenced this pull request Jan 31, 2022
* First very draft version

* Added validation, clean up code

* Some fixes

* Adapt components to the new UI design

* Some fixes

* Fix validation

* Fix lint errors

* Fix metric vis for new color stop UI

* Fix problems with keeping state of auto detecting max/min value

* Add tests

* Fix CI

* Fix tests

* Fix some lint problems

* Fix CI

* Fix min/max behavior for heatmap

* Fix checks.

* Fix auto value when we add new color range

* Fix check task

* Fix some issues

* Some fixes

* Fix functional tests

* small fix for heatmap

* Fix test

* Update comment-description

* fix PR comments

* do some refactoring (work in progress)

* do some refactoring (work in progress)

* some cleanup

* some cleanup

* wp: fix validation

* wip: fix validation

* push some refactoring

* do some refactoring

* add useDebounce

* add useReducer

* remove autoValue

* fix validation

* update validation logic

* revert getStopsForFixedMode

* some updates

* update EuiColorPaletteDisplay palette arg

* push some logic

* push some logic

* update validation messages

* push some updates

* fix some logic

* fix some cases

* fix JES

* fix CI

* reset continuity

* fix functional tests

* fix issue with -infinite/+infinite

* fix CI

* push some updates

* Update x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_reducer.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* Update x-pack/plugins/lens/public/shared_components/coloring/color_ranges/color_ranges_validation.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* fix some comments

* make color ranges crud methods "immutable"

* fix Max. value input size

* fix PR comment

* fix tests

* Fix edit/min/max buttons behavior

* Fix entering decimal values and max/min value behavior

* Fix lint

* Fix getNormalizedValueByRange for case when min == max

* Fix table cell coloring

* add warning messages

* Move color ranges reducer upper to palette_configuration (#3)

* Move color ranges reducer upper to palette_configuration

* Remove from local state unnecessary params

* Fix some cases

* Fix lint

* use one dataBounds type across palette configuration

* cleanup

* Fix some behavior

* Fix checks

* Some clean up

* Some fixes

* Some fixes

* Fix validation

* Fix CI

* Add unit tests for color_ranges_crud util

* Fix unit test

* Add unit tests for color ranges utils.ts

* Add allowEditMinMaxValues props and fix validation

* Fix CI

* Rename allowEditMinMaxValues to disableSwitchingContinuity

* Add unit tests for color_ranges_validation

* Add unit tests for updateRangeType and changeColorPalette functions

* Add unit tests for color_ranges_extra_actions

* Fix checks

* Clean up code

* Some fixes

* Fix unit-tests

* Fix comments

* Some changes

* Fix tests

* Fix all comments

* Fix Checks

* Fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
kobelb pushed a commit that referenced this pull request Mar 3, 2022
* Client side execution app level context propagation

* context$ + apm rum integration

* invert the context parent \ child relationship (cc @mikhail)
move more things to top level context

* Pass down context to apm on server

* types

* eslint

* parent <> child

* docs + eslint + jest

* execution context mock

* eslint

* jest

* jest

* server jest

* check

* jest

* storybook

* jest

* report the current space

* fix server side context container

* Remove spaces for now

* docssss

* jest

* lint

* test

* docs

* revert file

* doc

* all context params are optional

* clear on page change

* lint

* ts

* skipped test again

* testing fixes

* oops

* code review #1

* code review #2

* getAsLabels

* maps inherit dashboard context

* docs

* ts

* Give common context to all vis editors

* fix test

* ts \ es \ tests

* labels

* missing types

* docsy docs

* cr #3

* improve jest

* Use editor name

* Update src/plugins/visualizations/public/visualize_app/components/visualize_editor.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* fix maps context

* jest tests for maps

* cr

* docs

* Update execution_context.test.ts

* docs

* lint

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
kobelb pushed a commit that referenced this pull request Dec 14, 2022
## Summary

Related to elastic#144161

Found that on a bulk update tags task failure, the task didn't stop
after 3 retries (should be over in less then a minute), the retries kept
happening for 2 hours.
This change removes the retry task if 3 retries are reached.

Also testing in cloud deployment to see if the tags error can be
reproduced with this fix.
I could reproduce the reported error locally, and seeing it goes away
with this fix.

To verify:
- Add at least 50k agents with the `create_agents` script in kibana repo
- open Kibana, select the 50k agents, and open Actions / Add tags
- Try this in a few seconds: add 2 new tags, and remove one of them
- Wait about 30s, the agents should reflect the changes
- Check the logs to see that the tasks are removed after 3rd retry is
reached or successful.
- Check that there are no more running tasks. Any running task can be
found in Kibana Console by running this query: `GET
.kibana_task_manager/_search?q=task.taskType:"fleet:update_agent_tags:retry"`

Locally simulated an error to test that the retry (and check) task is
removed:

```
[2022-12-07T15:52:16.415+01:00][ERROR][plugins.fleet] Retry #3 of task fleet:update_agent_tags:retry:848984ab-c11d-4ebe-8d1f-606143dd656b failed: failing task
[2022-12-07T15:52:16.416+01:00][WARN ][plugins.fleet] Stopping after 3rd retry. Error: failing task
[2022-12-07T15:52:16.416+01:00][INFO ][plugins.fleet] Removing task fleet:update_agent_tags:retry:check:848984ab-c11d-4ebe-8d1f-606143dd656b
[2022-12-07T15:52:16.416+01:00][INFO ][plugins.fleet] Removing task fleet:update_agent_tags:retry:848984ab-c11d-4ebe-8d1f-606143dd656b
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants