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

Admin API Key should not be used when Write API Key is enough #194

Open
epnb opened this issue Mar 15, 2024 · 1 comment
Open

Admin API Key should not be used when Write API Key is enough #194

epnb opened this issue Mar 15, 2024 · 1 comment
Assignees

Comments

@epnb
Copy link

epnb commented Mar 15, 2024

Hello,
I'm wondering why an Admin API Key is required while the Write API Key is enough to create and update an index. At least we should be able to use a Write API Key if enough for our specific use case.

This requires to lower the access rights required in Algolia_Send_Products::can_connect_to_algolia()
Instead of using
self::$algolia->listApiKeys();
we could use
self::$algolia->listIndices();

Thank your for your comments.

@w3bdesign w3bdesign self-assigned this Mar 15, 2024
@w3bdesign
Copy link
Owner

Hello, I'm wondering why an Admin API Key is required while the Write API Key is enough to create and update an index. At least we should be able to use a Write API Key if enough for our specific use case.

This requires to lower the access rights required in Algolia_Send_Products::can_connect_to_algolia() Instead of using self::$algolia->listApiKeys(); we could use self::$algolia->listIndices();

Thank your for your comments.

Hi,

You might be right.
I haven't done any active work on this plugin for a few years, but I will take a look when I have time.

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

When branches are created from issues, their pull requests are automatically linked.

2 participants