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

Change of the API key resource #2369

Closed
11 tasks done
curquiza opened this issue May 4, 2022 · 7 comments · Fixed by #2438
Closed
11 tasks done

Change of the API key resource #2369

curquiza opened this issue May 4, 2022 · 7 comments · Fixed by #2438
Assignees
Labels
enhancement New feature or improvement impacts cloud This issue involves changes for the Meilisearch's cloud team impacts docs This issue involves changes in the Meilisearch's documentation impacts integrations This issue involves changes in the Meilisearch's integrations impacts mini-dashboard This issue involves changes in the Meilisearch's mini-dashboard v0.28.0 PRs/issues solved in v0.28.0
Milestone

Comments

@curquiza
Copy link
Member

curquiza commented May 4, 2022

Specificiation

Changes

Refine keys API

  • Update test
  • It is possible to create a deterministic key value by specifying an uid field at creation. uid is a uuidv4. If omitted, Meilisearch generates it.
  • Error message when uid is invalid
  • Error message when uid already exists
  • /get of a key only possible specifying the uid (/GET - /keys/:uid).
  • Adds a name field to give a human-readable name to ease API key retrieval in a list at the convenience of the user.
  • The master key is only dedicated to API keys management, it can't be used for other endpoints. Making Meilisearch more secure by design and thus preventing users from introducing a security vulnerability.
  • Updating a key only allows the name and description fields.
  • Add keys.get, keys.create, keys.update and keys.delete.
  • /get of a key possible specifying the complete key (?) (/GET - /keys/:uid_or_key)
  • Replace sha256 by a better hash function sha256 is now wrapped in an HMAC algorithm.
  • Manage dump patch for API keys
@curquiza curquiza added enhancement New feature or improvement impacts docs This issue involves changes in the Meilisearch's documentation impacts integrations This issue involves changes in the Meilisearch's integrations labels May 4, 2022
@curquiza curquiza added this to the v0.28.0 milestone May 4, 2022
@curquiza
Copy link
Member Author

curquiza commented May 5, 2022

Pinging @meilisearch/docs-team and @meilisearch/integration-team
The spec is still in progress regarding some points, I will keep you informed here about any changes. I also encourage everyone following the spec which is the source of truth 😇

@curquiza curquiza changed the title Change the API key management behavior Change of the API key resource May 5, 2022
@curquiza curquiza added the impacts cloud This issue involves changes for the Meilisearch's cloud team label May 17, 2022
@curquiza
Copy link
Member Author

Pinging @meilisearch/cloud-team 😇

@curquiza
Copy link
Member Author

curquiza commented Jun 1, 2022

Pinging @mdubus for the mini-dashboard! 😇

@curquiza curquiza added the impacts mini-dashboard This issue involves changes in the Meilisearch's mini-dashboard label Jun 1, 2022
@curquiza
Copy link
Member Author

curquiza commented Jun 1, 2022

Hello everyone here!
Finally, the master key will NOT be restricted, nothing will change. More info here.

@ManyTheFish I let you update the issue accordingly to this decision 😇

Guillaume wrote:

In the meantime, a suggestion would be to push the guide on securing a Meilisearch instance in the documentation quick-start to let users know more easily that the master key should absolutely not be used on the client-side, and as little as possible.

@meilisearch/docs-team WDYT? We indeed got multiple issues where the users use the master key in front-end. We cannot prevent 100% of the cases, but maybe could we do more?

@curquiza
Copy link
Member Author

curquiza commented Jun 1, 2022

Also @meilisearch/integration-team, maybe the README could be changed to not use the master key in the getting started, see here

Capture d’écran 2022-06-01 à 18 06 25

bors bot added a commit that referenced this issue Jun 2, 2022
2438: Refine keys api r=ManyTheFish a=ManyTheFish

waiting for #2410 and #2444 to be merged.

fix #2369 

Co-authored-by: ManyTheFish <[email protected]>
@bors bors bot closed this as completed in 08d72e3 Jun 2, 2022
@brunoocasali
Copy link
Member

@curquiza I think we can remove the item The master key is only dedicated to API keys management, it can't be used for other endpoints. Making Meilisearch more secure by design and thus preventing users from introducing a security vulnerability. or just make it The master key is only dedicated to API keys management, it can't be used for other endpoints. Making Meilisearch more secure by design and thus preventing users from introducing a security vulnerability.

in the issue description :)

@curquiza
Copy link
Member Author

curquiza commented Jun 8, 2022

Thank you @brunoocasali! I changed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement impacts cloud This issue involves changes for the Meilisearch's cloud team impacts docs This issue involves changes in the Meilisearch's documentation impacts integrations This issue involves changes in the Meilisearch's integrations impacts mini-dashboard This issue involves changes in the Meilisearch's mini-dashboard v0.28.0 PRs/issues solved in v0.28.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants