-
Notifications
You must be signed in to change notification settings - Fork 20
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
How to control which service and subscribe one particular event type #20
Comments
https://developer.ibm.com/opentech/2017/05/31/kafka-acls-in-practice/ Still, you are using Zookeeper, so I think this could be the core point for config to be distributed with both services and kafka broker instances. So the security is built-in the core config component. |
Framework use the annotation to control the service to subscribe particular event type. @EventEntity(entity="com.networknt.eventuate.account.command.account.Account") The entity is the aggregation type. Account event handler will subscribe and process the events in the topic only. |
:-)) this is nice, but... I think in banking environment it is not about preventing someone to try connect, but about preventing the system from those who are not authorized to connect to. This code of yours is "just" a mapping between object name and source name (where the object is available), but this doesn't prevents me from subscribe from command line to topic. And this is probably the core requirement: RESTRICT ACCESS TO TOPICS TO AUTHORIZED ONLY SERVICES/CLIENTS I can imagine that there are available sometimes sensitive data. Another story is to encrypt the data before submission into kafka distributed world. I just finished AMQP based project here within Energy market data and actually we implemented highly secure messaging platform which uses PKI. This has of course side effect that the message can be only decrypted by single peer in network. If you would like to send same message to multiple subscribers, you need to do this 4 times (each encrypted with specific key). But in our case this overhead is not a problem as we don't have millions of messages per minute... Other solution to managing public/private keys is not to generate them per instance/service, but make a link between event and key, so you then only distribute the key with services which are authorized to receive such event. Again you will need management UI as well where you manage event <-> key mapping, revocation, etc. But I think doable. Access Restriction vs Data Encryption Byt it depends on other security factors, I think in the end you will need possibly mixture of ACL and encryption depending on nature of data. NOTE: i understand that in Banking domain it might not be an option or something not considered by your project, but I worked on AES implementation on GPU chips. These beasts (Tesla V100, etc.) can encrypt/decrypt gigabytes/s from/to kafka streams.... |
Thanks for the comments. For the Access Restriction to the event store(Kafka), We don't have access control in the framework. I think it will be controlled by bank domain security setting. For the Data Encryption, thanks for the suggestion, we will take a look and will try to implement it for next release.. |
I mean I really don't need such feature in the moment, I also think it is quite lot of work, I just provided comments to requirement by Steve as possible suggestions. Regarding the bank security internal system, still it will be good maybe to think about common interface to control this and either it will be finally manual or integrated via API work... but requires definitely more brainstorming.... |
@archenroot Thanks for all the great ideas. This is just like a brain storm session on the internet. As you know we have light-oauth2 which is an OAuth 2.0 provider but with a lot of enhancements to support microservices. One of the feature is public key certificate distribution API to allow different services to go to central location to get public certificate with a kid. It is the foundation for data confidentiality and integrity. To protect data flow in Kafka or any message broker, we need to ensure that the data can be encrypted if necessary and we need to ensure that data can be signed so that it is not modified along the way. Both can be done with PKI as you have mentioned but encryption is a little bit different due performance issue. We are planning to implement something like TLS protocol to exchange the public key cert in a handshake and use an symmetric key to encrypt data. TLS is used to security the channel but for us we are using it to secure the payload only. This is very useful in our light-hybrid-4j framework as we are not using anything in http but only the body stream for communication. I am very interested in these discussions but sometimes cannot respond in a timely fashion. Last week we had three days training session for designer and couldn't do anything but focus on that. This is a beauty of forum like discussion, it can last several days or weeks:) Let the good idea flow... |
Nice, so the key building block already exists...
Totally agree, that is why even when channel is only encrypted we use TLS interceptors frontend from where the channel doesn't need to be encrypted. I understand, you use PKI to encrypt deivery of something like AES-256 CBC keys, which application will be much faster by default, on top you have hardware support on the CPU via hardware instruction set: Yes, that's it. Really thanks for this discussion here guys, we put light on many aspects! |
special instruction set on Intel or AMD CPUs as well as GPU encryption should be considered with plugin modules and injected as per instance configuration with service module (our in-house IoC). Yes. we've touched a lot of areas and these need to be address in mid-term. |
For security reason in banking application and this is actually a bigger topic as how to control Kafka access from all the services.
The text was updated successfully, but these errors were encountered: