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

[BUG][Workspace] missing workspaces and permissions for saved objects _bulk_get API #7564

Closed
Hailong-am opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@Hailong-am
Copy link
Collaborator

Describe the bug
workspaces and permissions both are missing for saved objects bulk get API. These two fields are useful when doing permission validation

If a bulk get request specify fields in its request, it will not fetch workspaces and permission, that will bypass permission check.

.map(({ value: { type, id, fields } }) => ({
_id: this._serializer.generateRawId(namespace, type, id),
_index: this.getIndexForType(type),
_source: includedFields(type, fields),
}));

.concat('namespace')
.concat('namespaces')

permission check

/**
*
* Checks if the provided saved object lacks both workspaces and permissions.
* If a saved object lacks both attributes, it implies that the object is neither associated
* with any workspaces nor has permissions defined by itself. Such objects are considered "public"
* and will be excluded from permission checks.
*
**/
if (!savedObject.workspaces && !savedObject.permissions) {
return true;
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

OpenSearch Version
Please list the version of OpenSearch being used.

Dashboards Version
Please list the version of OpenSearch Dashboards being used.

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@Hailong-am Hailong-am added bug Something isn't working untriaged labels Jul 30, 2024
@Hailong-am Hailong-am changed the title [BUG][Workspace] missing workspaces and permissions for saved objects bulk get API [BUG][Workspace] missing workspaces and permissions for saved objects _bulk_get API Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant