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

Missing types for role_descriptors #2304

Open
ceifa opened this issue Jul 4, 2024 · 0 comments
Open

Missing types for role_descriptors #2304

ceifa opened this issue Jul 4, 2024 · 0 comments

Comments

@ceifa
Copy link

ceifa commented Jul 4, 2024

🐛 Bug Report

Based on that documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-security.html
image

There is a restriction property inside the role_descriptor, but latest version doesn't seem to have the type definitions for it.

To Reproduce

Steps to reproduce the behavior:

const apikey = await this.elastic.value.security.createApiKey({
    name: botIdentifier,
    expiration: '7d',
    // filter_path
    role_descriptors: {
        read_access: {
            indices: [
                {
                    names: [this.contactsIndex, this.messagesIndex],
                    privileges: ['read'],
                },
            ],
            // Error: No overload matches this call.
            restriction: {
                workflows: ['search_application_query'],
            },
        },
    },
})

Expected behavior

No errors

Your Environment

  • node version: 20
  • @elastic/elasticsearch version: 8.14.0
  • os: Windows
@JoshMock JoshMock self-assigned this Jul 8, 2024
@JoshMock JoshMock removed their assignment Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants