Skip to main content

Posts

Authentication System : Basic Design

Being a system administrator, it is our main concern to protect users' data from theft and corruption. Regarding theft, we focus in building a sophisticated but secure authentication system which can fulfill all the basic needs we discussed in the last article . In the previous 2 articles, we learned about authentication and authorization. Also we understood the complications in building a secure system which can prevent tresspassing. But we have not code anything yet to build something. So in this article we will be designing an authentication system which will provide the functionalities we want and which will help us understand how the tech giants like google have taken security to another level. We will be writing code in php but the same applies to other languages also. What we'll be using Blueprint Building the system Running the system Additional Care What we'll be using Lets see what are the languages we will be using and database plus som...

Authentication: A step to security

Here we are, continuing our discussion on authorization and authentication. If you have red my previous article then you would have known by now how important these concepts are and why these need to be implemented efficiently. But in the previous article, we only talked about them and didn't look at how to actually implement them. Cybersecurity is so vast field that we can't understand all of its complexities in one article but what we can do is we can start with some pretty basic stuff and move along to provide our application some sort of security. So in this article we'll see how can we implement authentication checks in server-client systems and specifically in web applications. But for other type of applications like desktop apps, mobile apps you can follow the same procedure although the technology would be different. Lets have a look what we are gonna learn today:- Our Goal General Procedure Answers to some General Questions Cookie Theft Our Goa...

Authentication and Authorization

Authentication and Authorization are 2 independent concepts both of which are constituents of security. Authentication , in a vague manner, means to recognize someone and Authorization depicts to give that person some permissions. To understand it more better, a really simple example would be to know these concepts regarding to operating systems. When we log into our computer the OS checks whether our credentials match to any user of the computer. That is what we call authentication. Once the OS finds a match, it logs us into the computer. Now if we want to open a file then the operating system checks whether we have permission to do so or not. This is the time when the OS is authorizing us. If we have permission then OS will open the file for us otherwise it won't. So in this post we'll see how can we implement these features in any system and take safety measures to prevent intrusions. This post can be a bit boring but its actually a building block of what we'll learn i...

MVC: At Its Core

Designing an application requires a lot of effort And without a proper structure there are chances that your application may fail during some operations. That is the reason of choosing a framework to accomplish the task of building an application. A framework enforces you to use the defined application structure and methods so that you can easily maintain your code and refactor it if needed. MVC , short form for Model View Controller is a designing pattern in which an application is divided into 3 components i.e. Models, Views and Controllers. (The word Application infers to all type of applications like mobile apps, desktop apps, web apps etc.). A framework which follows the MVC pattern is known as a MVC framework and there are a lot of frameworks for each type of application written in most of the languages. Normally people start learning about the framework without understanding the concept behind them. Each MVC framework follows the same pattern i.e. the MVC pattern. So if we ...

Debugging with gdb

Debugging a program is a real tedious job which can consume time more than you took to write the program. And if you are not on the right track of debugging then you are probably gonna end up writing the whole program again. If you have red my previous article on debugging ( The Art of Debugging ) then you already have an idea of the debugging process and what are some basic methods to do it. We also talked about how are those basic techniques not gonna help us with larger and trickier programs. To make our job easy with those programs, there is a debugging tool : GNU Debugger or simply gdb. GDB is a powerful debugging tool with all the features you require while debugging your program. There are some basic set of features which are available in every debugging tool so if you want to use some other debugger then you'll find it easy to use after you get to know about gdb. There is some great stuff we'll be studying today so sit tight. Let's have a look at the index we'l...

The Art of Debugging

Writing unorganised code for something to work is an easy task, just put anything anywhere and see if the result is coming or not. If the result comes out in first attempt then you are really lucky but normal people like me are not. Then what we should do to check where the problem is occuring, we put some print statements (or console.log) to check the result in various places and observe where the output is deviating from its path. Well, it itself is a good practise of debugging the code but it does not work always especially not with large projects. So what should we do then ? According to me, we should give debugger a chance to find the bugs in our program. Debugging is an important part of writing programs because it teaches you to write unit tests for the parts of the program where it can fail. To perform debugging, we need a debugger and thankfully we have one, gdb (GNU debugger). In this article we will start by seeing some basic debugging techniques which involves logging the...

Understanding Python Decorators

If you have ever wondered what those @something mean above a python function or method then you are going to have your answers now. This @something line of code is actually called a decorator. I have red from various articles about them but some of them were not able to clarify the concept of a decorator and what we can achieve with them. So in this post we'll learn a lot about python decorators. Here is a list of topics we'll be covering. What is python decorator Understanding the concept Multiple decorators on same function class method decorator Where can we use decorators What is python decorator A python decorator is nothing but a function which accepts your given function as a parameter and returns a replacement function. So its like something this def decorator(your_func): def replacement(your_func_args): #do some other work return replacement @decorator your_func(your_func_args): #your_func code Now when your_func gets called then...