Skip to main content

Posts

Showing posts with the label authentication

Securing Websited Hosted with Apache Web Server

In my previous article about Creating or Updating Users in htpasswd File, we saw how to create, update and remove user from htpasswd file. In this article, we will see how we can configure this file in Apache web server so that users will be prompts to provide credentials for accessing the web sites hosted with Apache web server. Follow my previous article and setup the users. Next, go to httpd and open the file which has virtual host configurations for your web site. Update the virtual host entry, it should looks something like this: Note that AuthType , AuthName , AuthUserFile and Require are important. Make sure to remove " Require all granted " from the virtual host entry (if you have it already). Otherwise, your website will be accessible without any authentication. That's it. Restart you Apache Web Server and now you will be prompted to provide credentials when you try to access the web site. P.S. Click here to access my other posts.

LDAP Users and Groups for API Authentication and Authorization

Today, API security has become one of the most important thing. It is a vast field with many approaches and meanings. Most commonly, people refer API security as Authentication and Authorization . Encryption can also be included in this space, but lets keep that aside for separate discussion. For this article, lets just focus on how to use LDAP for API Authentication and Authorization. There are many frameworks like Spring, etc. which can be used to connect your application with LDAP for Authentication. LDAP does not handle Authorization piece but it can return "Groups" and based on that you application can either authorize or deny the request. In this article, we will see following: How to create a user in LDAP How to create a group in LDAP How to assign user to the group in LDAP Refer this link if you wish to setup OpenLDAP on your MAC. I had used JXplorer before but for this article I am going to use Apache Directory Studio . Moreover, I am going to use Apa...