Sunday, October 4, 2020

Network engineering continued

This is a continuation of the earlier posts starting with this one: http://ravinote.blogspot.com/2020/09/best-practice-from-networking.html

Tracers: The network usage by a given workload may not always be known. In such cases, it is better for the  networking server to inject markers or tracers to view the data path. 

User versus system boundary: Many security vulnerabilities manifest themselves when the code gets executed with user context rather than with system context. The execution of code in system context is privileged and maintains a few assumptions including one that it is the source of truth. Therefore, the switching from user to system context is required wherever we can demarcate the boundary. If the context switching is missing then it is likely that the code can be executed with user context.

Lines of control – even when the code path for admission into the system has a clear user and system context defined, the user context is established only when the execution traverses the lines of authentication and authorization Consequently all user facing entry points need to guarantee proper exception handling to minimize security risks from the line of control

Impersonation – Usually identities are not switched by the system because most of the system code is executed with its own identity. However, there are cases when code is executed in user context in which case a system thread may need to use the security context of the user. Impersonation opens up a new dimension for tests when identities are switched between two user accounts and is generally best avoided.

Routines at the user-system boundary- When the boundary between user and system is clearly demarcated and secured, it facilitates the execution of common routines such as auditing, logging, exception handling and translations, resetting contexts and so on. In fact, the user-system context boundary is a convenient way to enforce security as well as collect data on the traffic.

Data Types: There are some universally popular data types such as integers, float, date and string that are easy to recognize even on the wire and most network facing api also see them as ways of packing bytes in a byte sequence. However, network facing apis could do with more data types such as files, Json, Xml and plain old objects improves encapsulation within a request. Log indexes for example ingest data without user interaction.  Most products work largely by inferring fields rather than types within the data because it gives them a way to allow users to search and analyze using tags that are familiar to them. If types could be recognized, looking up fields together as types only adds a little bit more logic on the server side while improving the convenience to the users



No comments:

Post a Comment