So micro-segmentation seems a bit of a buzz-word, but it helps in painting the picture of how to better do security in a network. Basically from what I understand divide the network into a bunch of small chunks, and at every connection point do some sort of authentication/authorization.
What I'm wondering though is how you go about adding code to the network to do this kind of zero-trust micro-segmentation architecture. I am a Node.js/JavaScript developer and don't really see how, for example, I could add a token-based authentication system in the interface between a printer and a server. I don't understand if I should be somehow adding code to the printer directly, or if all my code lives on my custom servers, or if there is an intermediate layer where I add the custom code. By custom code I mean any security/auth logic.
Basically I would like to know to what devices do I add custom security/auth code, if it's just servers, or maybe there is a way to add custom code/logic to managed switches or routers or printers or other devices to which I have yet to encounter in learning about this.
Sorry if this is a basic or confusing question, I am just trying to understand how the pieces fit together currently.