Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Dec 1, 2022

This PR introduces the wildcards at the end of the index names when identifying indexes in the API Keys and tenant tokens. It fixes #2788 and fixes #2908. This PR is based on @akhildevelops' work.

Note that when a tenant token filter is chosen to restrict a search, it is always the most restrictive pattern that is chosen. If we have an index pattern prod* that defines filter1 and p* that defines filter2, the engine will choose filter1 over filter2 as it is defined for a most restrictive pattern, prod*. This restrictiveness is defined by 1. is it exact, without * 2. the length of the pattern.

It is a continuation of work that has already started and should close #2869.

@Kerollmops Kerollmops force-pushed the temp-wildcard branch 2 times, most recently from f93b288 to d7ec9aa Compare December 1, 2022 15:27
@Kerollmops Kerollmops marked this pull request as ready for review February 9, 2023 12:16
@Kerollmops
Copy link
Member Author

Hey @ManyTheFish and @irevoire,

Could you review this PR, please? It adds the possibility to specify an API Key and a Tenant Token with a pattern that can optionally end with a *. I advise you to review the first commits first and only the final merge commit at the end.

@Kerollmops Kerollmops added this to the v1.1.0 milestone Feb 9, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Uffizzi Preview Environment Deploying

☁️ https://app.uffizzi.com/github.com/meilisearch/meilisearch/pull/3174

⚙️ Updating now by workflow run 4165988804.

The meilisearch preview environment contains a web terminal from where you can run the
meilisearch command. You should be able to access this instance of meilisearch running in
the preview from the link Meilisearch Endpoint link given below.

Web Terminal Endpoint :
Meilisearch Endpoint : /meilisearch

irevoire
irevoire previously approved these changes Feb 9, 2023
Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Nice PR and nice tests! 🦔

I left a few questions that are not critical. I don't know if we want to do something about it

irevoire
irevoire previously approved these changes Feb 13, 2023
Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Good for me 🍗
Let's wait for the error_code thingy before merging though 👍

Copy link
Contributor

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

perfect, thanks 🐙

bors merge

@Kerollmops Kerollmops dismissed ManyTheFish’s stale review February 14, 2023 16:12

Fixed, we use the InvalidIndexUid code

@bors
Copy link
Contributor

bors bot commented Feb 14, 2023

Build succeeded:

@bors bors bot merged commit f3b5433 into main Feb 14, 2023
@bors bors bot deleted the temp-wildcard branch February 14, 2023 16:51
@meili-bot meili-bot added the v1.1.0 PRs/issues solved in v1.1.0 released on 2023-04-03 label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.1.0 PRs/issues solved in v1.1.0 released on 2023-04-03
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow wildcard (*) at the end of the index names when creating tenant tokens Use wildcard (*) at the end of the index names when creating API keys
5 participants