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

Enable/Disable consumers on demand #1725

Closed
logronoide opened this issue Oct 9, 2016 · 5 comments
Closed

Enable/Disable consumers on demand #1725

logronoide opened this issue Oct 9, 2016 · 5 comments

Comments

@logronoide
Copy link

Summary

The platform allows to identify the end users (consumers) of the API thanks to the 'Consumer' entity. There are several use cases for a 'enabled/disabled' flag linked to each Consumer:

  • Temporally deny access to upstream resources if the consumer has abused of the service (technically or legally). This allows a middle step before terminating the account of the consumer.
  • If the consumer pays for the use of the upstream service, if the consumer stops paying for the service, disabling the account as a first step is a must.
  • Fast response of platform admins to bad/poor ACL configuration. Disable consumer account and check what is going on.

Hence, it would be great to implement a new 'enabled' flag for each consumer to control if the consumer is allowed to access the upstream service or not. May be the change sounds simple, but obviously it needs a database model modification to persist the new flag.

@thibaultcha
Copy link
Member

This definitely has some value indeed. Before jumping to an implementation, we would need to discuss how disabled account should be handled in the system (especially by authentication plugins), and if they are simply considered as non-existing, vs "disabled" (but still present), which would send different error messages back to the user - unless that is not desired, all points to be discussed.

@Tieske
Copy link
Member

Tieske commented Feb 13, 2017

Wouldn't this be solved by #2023 ? Attach a plugin to a consumer that returns any specified status code and response. 503 service unavailable for example.

If you want the consumer to become non-existent as mentioned by @thibaultcha you can delete it.

@Tieske
Copy link
Member

Tieske commented Apr 14, 2017

considering that the difference between "unavailable" and "disabled" does not apply to consumers, then #2328 does implement this request.

hence closing this.

@Tieske Tieske closed this as completed Apr 14, 2017
@jack9ye
Copy link

jack9ye commented May 7, 2017

I've tried #2328 but got http 400 "No consumer can be configured for that plugin". And i saw a line of "no_consumer = true" in schema.lua of this plugin. I'm new to Kong so is there anything i missed?

@Tieske
Copy link
Member

Tieske commented May 15, 2017

No, you are correct, that setting seems to be bad.

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

No branches or pull requests

4 participants