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

[Synthetics] Sub-feature for managing private locations !! #201100

Merged
merged 35 commits into from
Dec 2, 2024

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Nov 21, 2024

Summary

Fixes #200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow managing private locations ,

with role API it will be with

{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
image

Create/delete actions on UI will be disabled

image

Release note

If you have already modified sub feature for the synthetics/uptime feature to disable user access for using elastic managed location, addition of this feature means, they will also will not be able to manage(add/delete) private locations. Though this will not impact usage of private locations in monitors. If you want those users to have ability to add/delete new private locations, you can enable that by toggle this feature in role ui or via api.

@shahzad31 shahzad31 added release_note:feature Makes this part of the condensed release notes backport:version Backport to applied version labels labels Nov 21, 2024
@shahzad31 shahzad31 marked this pull request as ready for review November 21, 2024 17:49
@shahzad31 shahzad31 requested a review from a team as a code owner November 21, 2024 17:49
@shahzad31 shahzad31 requested a review from drewpost November 21, 2024 17:50
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Nov 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@shahzad31 shahzad31 requested a review from a team as a code owner November 21, 2024 18:47
@drewpost
Copy link

This looks great. A small feature with big customer benefit. LGTM

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

LGTM, using the saved object API to update the private locations is not possible anymore (can still read though)

@@ -63,7 +63,7 @@ const canManagePrivateLocationsPrivilege: SubFeaturePrivilegeGroupConfig = {
includeIn: 'all',
savedObject: {
all: [privateLocationSavedObjectName, legacyPrivateLocationsSavedObjectName],
read: [],
read: [privateLocationSavedObjectName, legacyPrivateLocationsSavedObjectName],
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these since the parent feature all list them under savedObject.read as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't, i think you reviewed outdated, i have already remove those

Copy link
Contributor

@SiddharthMantri SiddharthMantri left a comment

Choose a reason for hiding this comment

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

Privilege changes LGTM.

Couple of questions:

  • This is a breaking change for users with the previous privileges already assigned, right? Answered in release note section
  • Can the button to create locations be hidden if a user doesn't have access to do so?

cc: @azasypkin

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 2, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: ca3e126
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-201100-ca3e12644edb

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #68 / lens serverless - group 1 - subgroup 6 lens logsdb smoke testing functions support Scenarios with changing stream type LogsDB downgraded to regular data stream scenarios LogsDB stream with no additional stream/index and no host.name field should visualize a date histogram chart

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
synthetics 1.1MB 1.1MB +254.0B

History

@shahzad31 shahzad31 merged commit 93eedff into elastic:main Dec 2, 2024
8 checks passed
@shahzad31 shahzad31 deleted the private-loc-sub-feature branch December 2, 2024 14:53
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12121902833

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
…01100)

## Summary

Fixes elastic#200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow
managing private locations ,

with role API it will be with
```
{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
```

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6">

Create/delete actions on UI will be disabled

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75">

## Release note
If you have already modified sub feature for the synthetics/uptime
feature to disable user access for using elastic managed location,
addition of this feature means, they will also will not be able to
manage(add/delete) private locations. Though this will not impact usage
of private locations in monitors. If you want those users to have
ability to add/delete new private locations, you can enable that by
toggle this feature in role ui or via api.

(cherry picked from commit 93eedff)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
…1100) (#202496)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Synthetics] Sub-feature for managing private locations !!
(#201100)](#201100)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T14:53:26Z","message":"[Synthetics]
Sub-feature for managing private locations !! (#201100)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/200899\r\n\r\nAdded Synthetics
Sub-feature for managing private locations !!\r\n\r\nUser can configure
a sub feature in a role under synthetics to allow\r\nmanaging private
locations ,\r\n\r\nwith role API it will be with \r\n```\r\n{\r\n
kibana: [\r\n {\r\n feature: {\r\n uptime: [\r\n 'minimal_all',\r\n
'can_manage_private_locations',\r\n ],\r\n },\r\n spaces: ['*'],\r\n
},\r\n ],\r\n }\r\n```\r\n\r\n\r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6\">\r\n\r\nCreate/delete
actions on UI will be disabled \r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75\">\r\n\r\n##
Release note\r\nIf you have already modified sub feature for the
synthetics/uptime\r\nfeature to disable user access for using elastic
managed location,\r\naddition of this feature means, they will also will
not be able to\r\nmanage(add/delete) private locations. Though this will
not impact usage\r\nof private locations in monitors. If you want those
users to have\r\nability to add/delete new private locations, you can
enable that by\r\ntoggle this feature in role ui or via
api.","sha":"93eedff53c8b9c3ebe55dfdb71029336c03542f0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:breaking","v9.0.0","release_note:feature","ci:project-deploy-observability","Team:obs-ux-management","backport:version","v8.18.0"],"title":"[Synthetics]
Sub-feature for managing private locations
!!","number":201100,"url":"https://github.com/elastic/kibana/pull/201100","mergeCommit":{"message":"[Synthetics]
Sub-feature for managing private locations !! (#201100)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/200899\r\n\r\nAdded Synthetics
Sub-feature for managing private locations !!\r\n\r\nUser can configure
a sub feature in a role under synthetics to allow\r\nmanaging private
locations ,\r\n\r\nwith role API it will be with \r\n```\r\n{\r\n
kibana: [\r\n {\r\n feature: {\r\n uptime: [\r\n 'minimal_all',\r\n
'can_manage_private_locations',\r\n ],\r\n },\r\n spaces: ['*'],\r\n
},\r\n ],\r\n }\r\n```\r\n\r\n\r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6\">\r\n\r\nCreate/delete
actions on UI will be disabled \r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75\">\r\n\r\n##
Release note\r\nIf you have already modified sub feature for the
synthetics/uptime\r\nfeature to disable user access for using elastic
managed location,\r\naddition of this feature means, they will also will
not be able to\r\nmanage(add/delete) private locations. Though this will
not impact usage\r\nof private locations in monitors. If you want those
users to have\r\nability to add/delete new private locations, you can
enable that by\r\ntoggle this feature in role ui or via
api.","sha":"93eedff53c8b9c3ebe55dfdb71029336c03542f0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201100","number":201100,"mergeCommit":{"message":"[Synthetics]
Sub-feature for managing private locations !! (#201100)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/200899\r\n\r\nAdded Synthetics
Sub-feature for managing private locations !!\r\n\r\nUser can configure
a sub feature in a role under synthetics to allow\r\nmanaging private
locations ,\r\n\r\nwith role API it will be with \r\n```\r\n{\r\n
kibana: [\r\n {\r\n feature: {\r\n uptime: [\r\n 'minimal_all',\r\n
'can_manage_private_locations',\r\n ],\r\n },\r\n spaces: ['*'],\r\n
},\r\n ],\r\n }\r\n```\r\n\r\n\r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6\">\r\n\r\nCreate/delete
actions on UI will be disabled \r\n\r\n<img width=\"1728\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75\">\r\n\r\n##
Release note\r\nIf you have already modified sub feature for the
synthetics/uptime\r\nfeature to disable user access for using elastic
managed location,\r\naddition of this feature means, they will also will
not be able to\r\nmanage(add/delete) private locations. Though this will
not impact usage\r\nof private locations in monitors. If you want those
users to have\r\nability to add/delete new private locations, you can
enable that by\r\ntoggle this feature in role ui or via
api.","sha":"93eedff53c8b9c3ebe55dfdb71029336c03542f0"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Shahzad <[email protected]>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
…01100)

## Summary

Fixes elastic#200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow
managing private locations ,

with role API it will be with 
```
{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
```



<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6">

Create/delete actions on UI will be disabled 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75">

## Release note
If you have already modified sub feature for the synthetics/uptime
feature to disable user access for using elastic managed location,
addition of this feature means, they will also will not be able to
manage(add/delete) private locations. Though this will not impact usage
of private locations in monitors. If you want those users to have
ability to add/delete new private locations, you can enable that by
toggle this feature in role ui or via api.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…01100)

## Summary

Fixes elastic#200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow
managing private locations ,

with role API it will be with 
```
{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
```



<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6">

Create/delete actions on UI will be disabled 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75">

## Release note
If you have already modified sub feature for the synthetics/uptime
feature to disable user access for using elastic managed location,
addition of this feature means, they will also will not be able to
manage(add/delete) private locations. Though this will not impact usage
of private locations in monitors. If you want those users to have
ability to add/delete new private locations, you can enable that by
toggle this feature in role ui or via api.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…01100)

## Summary

Fixes elastic#200899

Added Synthetics Sub-feature for managing private locations !!

User can configure a sub feature in a role under synthetics to allow
managing private locations ,

with role API it will be with 
```
{
      kibana: [
        {
          feature: {
            uptime: [
              'minimal_all',
              'can_manage_private_locations',
            ],
          },
          spaces: ['*'],
        },
      ],
    }
```



<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/f842da22-9c82-43d0-ad34-c6e19ea187c6">

Create/delete actions on UI will be disabled 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/1a164d85-357b-42f3-ae15-0682b2db6c75">

## Release note
If you have already modified sub feature for the synthetics/uptime
feature to disable user access for using elastic managed location,
addition of this feature means, they will also will not be able to
manage(add/delete) private locations. Though this will not impact usage
of private locations in monitors. If you want those users to have
ability to add/delete new private locations, you can enable that by
toggle this feature in role ui or via api.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:breaking release_note:feature Makes this part of the condensed release notes Team:obs-ux-management Observability Management User Experience Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] Limit the private location creation privileges !!
7 participants