From the course: GitHub Foundations: Privacy, Security, and Administration

Introduction to authentication and security - GitHub Tutorial

From the course: GitHub Foundations: Privacy, Security, and Administration

Introduction to authentication and security

Let's explore Authentication and Security Concepts. First, we have the user interface layer. The idea here is that this is the topmost layer that a user interacts with. In the context of a platform like GitHub, it could include both the web interface and the command line interface as well. You could think about how proper authentication starts even before a user would make a critical operation. And this is from the UI layer. Now next, we have the API endpoint and service, and this layer is responsible for handling the HTTP request made from the UI. At this point, it's the API tokens or the SSH key that are verified. So this is where you would authenticate, for example, if you're using GitHub to clone a repo. That authentication process is in that endpoint layer. There are some other things to consider. For example, a first line of defense like rate limiting or IP filtering, like if a particular band of IP addresses maybe from a particular cloud vendor is doing a lot of abuse, you could limit that IP from accessing the API endpoints or you could even do rate limiting as well. So there's lots of techniques here at that layer. Next up, we have authentication and authorization middleware. So this is a specialized set of services responsible for verifying a user's identity, authentication, and the permissions, which would be the authorization. So a good way to think about this would be the role of two-factor authentication or 2FA and access control lists at this layer. So in this case, what you're doing is you're adding another layer of security so that, for example, if there was some kind of middleman attack where there's a hijacked request, they also wouldn't be able to log in because there's a separate physical device that's necessary for that authentication to occur. And in terms of backend data storage, this is where a user would provide credentials and their permissions are stored. And this could be, let's say, a database, a distributed ledger. It could be a version control system, depends on the architecture of the system. But in this case, you would need strong encryption to make sure that this data is safeguarded because it's sensitive data. So in the case of, let's say, an accidental configuration error that exposed some of that data, if it's encrypted, it doesn't matter because the encrypted data would not be able to be decrypted. So it's just another layer of security when you're building an authentication and security system. We also have logging and auditing, and this is really the final layer here, and this is something that is often overlooked, but it's critical for maintaining security. It would log the authentication and authorization attempts and actions. So why would you care about this? Well, it's for forensic analysis. And also it can help you identify and cure security breaches. So if you see some unusual behavior occurring, for example, you know, outlier-type requests where you're getting hundreds of requests per second, there's something going on, and you would use this to investigate that security incident.

Contents