kafkaflow
kafkaflow copied to clipboard
Feature - Allow admin commands consumers without producers or asp.net endpoints
Hey!
I'm doing a small POC on a personal project (I'm also using KafkaFlow
in a production project).
As part of the POC I'll be spinning up a number of services using KafkaFlow
. I'd like to gather telemetry and be able to control them using the Admin Dashboard.
Current state
Each service with calling EnableTelemetry("kafka-flow.admin")
enables both producers and consumers for telemetry.
Also, each project having webApi and a reference to KafkaFlow.Admin.WebApi
will automagically get the administration controllers as well.
Suggestion
Separate the Admin control (Dashboard and APIs) and production (AdminProducer
) from the consuming part. To allow to spin a standalone administration command and control from the actual services.
Pros
- ensure control logic is separate from the business logic
- decrease API surface from "worker services"
- least privilege, the "worker services" should not be able to expose cluster-wide C&C functionality
- easily hide controllers (and dashboard?) behind authorization
Cons
- more stuff to handle and maintain
Thoughts? =)
Eugene.
Hi @EugeneKrapivin,
We (Douglas and I) thought about this feature in the past and we still believe that it makes sense.
We planned two different methods, like EnableTelemetryRead and EnableTelemetryWrite. The AdminProducer is no longer public and now we use the IConsumerAdmin interface with simplified methods, due to changes in how the Dashboard interacts with the application (it no longer uses the WebAPi project).