-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Allow wildcards at the end of index names for API Keys and Tenant tokens #3174
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
Conversation
f93b288
to
d7ec9aa
Compare
d7ec9aa
to
184b8af
Compare
eb67ecf
to
d563ed8
Compare
77a8231
to
c690c4f
Compare
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 |
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 Web Terminal Endpoint : |
There was a problem hiding this 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
Co-authored-by: Many the fish <[email protected]>
There was a problem hiding this 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 👍
There was a problem hiding this 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
Fixed, we use the InvalidIndexUid
code
Build succeeded:
|
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.