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

Is the method of store masterkey safe #28

Closed
kulame opened this issue Apr 8, 2022 · 3 comments
Closed

Is the method of store masterkey safe #28

kulame opened this issue Apr 8, 2022 · 3 comments
Labels
security Address a security vulnerability

Comments

@kulame
Copy link

kulame commented Apr 8, 2022

We write the master key in the JS page. If the master key is stolen by hackers, will the whole search engine be attacked?

@brunoocasali
Copy link
Member

Hi, @kulame I'll let @bidoubiwa answer you in more detail if needed, I'm just stepping in because she is on holiday.

⚠️ ⚠️ PLEASE, DO NOT PUT YOUR MASTER KEY IN YOUR FRONT END!! ⚠️ ⚠️

Yes, if your master key was "stolen" by anyone the search engine will be accessible by the person with the key. We don't recommend using the master key for searching in the front-end, you could generate a new key that fulfills this purpose and does not expose your meilisearch instance.

You could read more here:
https://docs.meilisearch.com/learn/security/master_api_keys.html#protecting-a-meilisearch-instance

@brunoocasali brunoocasali added the security Address a security vulnerability label Apr 8, 2022
@bidoubiwa
Copy link
Contributor

Hey @kulame, to emphasis @brunoocasali: you should never use the master key in your front end. User can add documents, delete indexes, etc..

Was there a specific place in the documentation that used the maskerKey in the code example? Do you think we should emphasis more on which key to use?

Thanks a lot for you feedback :)

@bidoubiwa
Copy link
Contributor

I'm closing the issue due to inactivity. Feel free to answer if you'd like to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Address a security vulnerability
Projects
None yet
Development

No branches or pull requests

3 participants