What is an Authentication Server
An authentication server is used to verify credentials when a person or another server needs to prove who they are to an application.
To better understand what an authentication server is, let's look at what it does by taking a peek into what happens when an authentication request is made.
Day in the Life of an Authentication Server
Authentication, in short, is the process of identifying a person or computer to make sure they are who they say they are.
An application or device may ask for several different identifiers to verify this. Each identifier generally falls in one of these three categories:
Something you know — Usually something like a username and password or PIN. It is the most common identification method.
Something you have — This covers physical things that you possess, such as a smartphone, key, etc.
Something you are — This category involves verifying through biometric methods, such as a fingerprint or retinal scan.
There are several different types of authentication, but for brevity, we'll go through what happens in two scenarios: single-factor authentication and multi-factor authentication.
Single-factor authentication
Single-factor authentication is the process of verifying an identity using only one factor. The different factors generally fall into one of the categories above: something you know, something you have, or something you are. The most common form of single-factor authentication is simply a username and password.
Let's look at what happens when a user authenticates with a username and password.
User:Navigates to a website and types in username and password
Authentication Server:
Whoa, what's this? Who are you??
Authentication Server:puts on glasses
Authentication Server:
Ahh yes, bobbysmith3. Let me verify that your secret password is correct.
User:Waiting
Authentication Server:
I have run my checks, and I can confirm you are indeed bobbysmith3! Welcome!
In this scenario, what was the authentication server checking for when the user entered their username and password? Here's the more in depth flow about what happened behind the scenes while the user was waiting to be authenticated:
- The username and hashed password are sent to the server.
- The server accesses its database of users that holds the username and hashed/salted password.
- It checks the provided username and hashed password against the one in the database.
- If the credentials match, the user's identity is verified, and the application decides what's next.
- If not, a generic error message is returned.
Note: The error message should not reveal too much information about why the request failed. For example, messages such as "This username does not exist" can also be used by an attacker to determine if a username does exist, as they would get a different error message if they try a valid username.
While this may seem like a foolproof method of verifying a user's identity, there's a lot left to be desired. What happens if someone figures out your password?
Over the years, there has been a huge increase in the number of credential stuffing attacks. When a data breach occurs, and usernames/passwords are leaked, they're compiled into huge lists that attackers can use to try to sign into several different websites. Since password reuse is so common, there's a decent chance that some of the usernames and passwords leaked from one application may be valid for another.
Tweet This
This is where multi-factor authentication comes into play. Unlike single-factor, which relies on just one form of identification, multi-factor authentication requires more than one identifier to verify a user.
Multi-factor authentication
Let's look at what happens when an authentication request is made using two identification factors.
User:Navigates to a website and types in username and password
Authentication Server:
Ahh, it's you again, bobbysmith3! Let me check that your password matches the one I have on file.
Authentication Server:
Well, it checks out. But I'm still skeptical. I'm sending a code to the phone number I have on file. Please type in the code once you receive it.
User's phone:DING!
User:Receives a text message and types in the code
Authentication Server:
The code matches! Since you have bobbysmith3's password and phone on hand, I'm confident that you are indeed bobbysmith3! Welcome!
One of the most common forms of multi-factor authentication is a username and password combined with something sent to a device or account you own.
For example, you have probably signed into an application with your username and password, and then received a text message or email with a code that you have to provide back to the application to be authenticated. This code is called a one-time password (OTP).
The process for authenticating a user with username/password and an OTP is the same as above, but there's an additional step — the authentication server must send the OTP to the user's registered device and verify that the code is correct.
To do this, the authentication server must perform the following actions:
- Generate the OTP.
- Send it to the application where the user is attempting to sign in.
- Once the application sends the OTP back that the user submitted, verify that it's correct.
- If so, the user is authenticated.
- If not, return an error and allow them to regenerate another OTP. To prevent brute force attacks, there should be a limit to how many times a new OTP can be requested before the user is blocked.
With this additional requirement, an attacker's attempt to fake their identity is greatly stunted! Let's revisit the question that was posed with single-factor username/password authentication.
What happens if someone figures out your password?
In this case, simply having someone's password isn't enough. The attacker must also gain access to the real user's OTP to verify the identity.
As you can see, multi-factor authentication greatly reduces the chances of an attacker impersonating a user.
What an Authentication Server Doesn't Do
An authentication server does a lot of work in the background, but it's also important to understand what it's not responsible for doing.
Authentication vs. authorization
In the examples so far, the authentication server has taken steps to verify a user's identity and return it to the requesting application. What happens next is up to the application.
Once the application knows who the user is, it usually has to decide what the user can access. This is known as authorization.
Authorization — Authorization refers to the process of verifying what a user has access to.
Authentication — Authentication refers to the process of confirming identity.
It's easy to confuse authentication and authorization, but it's important to understand the difference. The authentication process does not determine what a user can access.
Tweet This
The authentication server simply verifies the identity of the user and then passes that information back to the application. The application then uses this identity information to determine what the current user can access.
To manage access control, an authorization server will issue access tokens to the client that lists what permissions the current user has. If you'd like to learn more about access tokens, please check out the free ebook below. It goes in-depth about a popular web token standard, JSON Web Token (JWT).
Interested in getting up-to-speed with JWTs as soon as possible?
So even though these two terms have entirely different meanings, the authorization process depends on authentication. Authorization cannot be granted unless the identity of the user is verified.
Because these two processes go hand-in-hand, it's common to see a solution that can handle both ends: authentication and authorization. Auth0, for example, is an all-in-one solution that serves as both an authentication server and an authorization server.
About Auth0
Auth0 by Okta takes a modern approach to customer identity and enables organizations to provide secure access to any application, for any user. Auth0 is a highly customizable platform that is as simple as development teams want, and as flexible as they need. Safeguarding billions of login transactions each month, Auth0 delivers convenience, privacy, and security so customers can focus on innovation. For more information, visit https://auth0.com.
Conclusion
Although the authentication process may seem simple to an end-user, what goes on behind the scenes is very complex. Every time you sign in to a website, there's a lot happening behind the scenes to verify that you are who you say you are.
Hopefully, this article was able to shed a little bit of light on some of the major tasks an authentication server performs, as well as tasks that it isn't responsible for performing.
Thank you for reading and reach out below if you have any questions or if you'd like to learn more about using Auth0 as your authorization and authentication service!
Holly Guevara
Former Developer Content Manager
Holly Guevara
Former Developer Content Manager
More like this
Follow the conversation
Powered by the Auth0 Community. Sign up now to join the discussion. Community links will open in a new window.
# Аутентификации
Работает это по следующему принципу: в веб-приложение включается HTML-форма, в которую пользователь должен ввести свои username/password и отправить их на сервер через HTTP POST для аутентификации. В случае успеха веб-приложение создает session token, который обычно помещается в browser cookies. При последующих веб-запросах session token автоматически передается на сервер и позволяет приложению получить информацию о текущем пользователе для авторизации запроса.
# Аутентификация по сертификатам
Сертификат представляет собой набор атрибутов, идентифицирующих владельца, подписанный certificate authority (CA).
# Аутентификация по одноразовым паролям
Аутентификация по одноразовым паролям обычно применяется дополнительно к аутентификации по паролям для реализации two-factor authentication (2FA). В этой концепции пользователю необходимо предоставить данные двух типов для входа в систему:
# Аутентификация по ключам доступа
Этот способ чаще всего используется для аутентификации устройств, сервисов или других приложений при обращении к веб-сервисам. Здесь в качестве секрета применяются ключи доступа (access key, API key) — длинные уникальные строки, содержащие произвольный набор символов, по сути заменяющие собой комбинацию username/password.
# Аутентификация по токенам
Такой способ аутентификации чаще всего применяется при построении распределенных систем Single Sign-On (SSO), где одно приложение (service provider или relying party) делегирует функцию аутентификации пользователей другому приложению (identity provider или authentication service). Типичный пример этого способа — вход в приложение через учетную запись в социальных сетях. Здесь социальные сети являются сервисами аутентификации, а приложение доверяет функцию аутентификации пользователей социальным сетям.
# Форматы токенов
Simple Web Token (SWT) — наиболее простой формат, представляющий собой набор произвольных пар имя/значение в формате кодирования HTML form. Стандарт определяет несколько зарезервированных имен: Issuer, Audience, ExpiresOn и HMACSHA256. Токен подписывается с помощью симметричного ключа, таким образом оба IP- и SP-приложения должны иметь этот ключ для возможности создания/проверки токена.
JSON Web Token (JWT) — содержит три блока, разделенных точками: заголовок, набор полей (claims) и подпись. Первые два блока представлены в JSON-формате и дополнительно закодированы в формат base64. Набор полей содержит произвольные пары имя/значения, притом стандарт JWT определяет несколько зарезервированных имен (iss, aud, exp и другие). Подпись может генерироваться при помощи и симметричных алгоритмов шифрования, и асимметричных. Кроме того, существует отдельный стандарт, отписывающий формат зашифрованного JWT-токена.
Security Assertion Markup Language (SAML) — определяет токены (SAML assertions) в XML-формате, включающем информацию об эмитенте, о субъекте, необходимые условия для проверки токена, набор дополнительных утверждений (statements) о пользователе. Подпись SAML-токенов осуществляется при помощи ассиметричной криптографии. Кроме того, в отличие от предыдущих форматов, SAML-токены содержат механизм для подтверждения владения токеном, что позволяет предотвратить перехват токенов через man-in-the-middle-атаки при использовании незащищенных соединений.
# Стандарты OAuth и OpenID Connect
OpenID — позволяет сайту удостовериться, что его пользователь владеет неким персональным URL (своим сайтом, блогом, профилем). Этого факта достаточно для того, чтобы использовать уникальный URL для узнавания того же самого пользователя в следующий раз. И всё. Все остальные вещи — заведение аккаунта, получение email’а и других данных, разрешение какой-то активности на сайте — остаётся на усмотрение сайта. Другими словами, OpenID — это чистая аутентификация: вы знаете, кто к вам пришёл, но вольны делать с этим знанием всё, что угодно.
OAuth — позволяет программе (на вебе или локальной) получить от пользователя права на использование какого-то конкретного API. Права обозначаются токеном, свойства которого никак не определены: он может быть одинаковым для разных пользователей, может быть разным для одного в разное время. Всё, что гарантируется — это что программа в обмен на токен сможет выполнять какие-то действия на каком-то сервисе. Другими словами, OAuth — это чистая авторизация: вы обладаете конкретными правами, но не можете в общем случае по ним определить, кому они принадлежат.
- OpenID — для проверки учетных данных пользователя (identification & authentication).
- OAuth — про то, чтобы получать доступ к чему-то.
- OpenID Connect — и про и то, и про другое одновременно.
OpenID Connect возможности OAuth 2.0 уже интегрированы с самим протоколом.
Аналогия. OpenID — это ваш паспорт: он говорит, кто вы, но что он даёт, зависит от места, куда вы с ним пришли. OAuth — ключи от вашей машины: с ними можно ездить на вашей машине, даже не зная, как вас зовут.
Аналогия. "Вход через OAuth" — это ключи от машины, в которой по случаю оказались ещё и именные документы владельца.
Аутентификация сервера что это
5G isn’t a single flavor of cellular technology; it’s three flavors, and each one can enable advanced capabilities, such as .
To understand 5G, delve into the terminology that shapes the technology. This glossary of 14 5G keywords explains what 5G is and .
Quantum networking, which is based on quantum physics, offers secure, high-speed communication. Challenges of quantum networking .
Gartner’s forecast points to rising cloud and services spend. Generative AI is yet to strongly influence IT budgets, but IBM and .
Who needs to be on a digital transformation team? Metrigy’s Robin Gareiss lists the key positions of an effective digital .
U.S. businesses investing in the Middle East should engage in contingency planning if the Israel-Hamas war leads to the .
The Intune management extension provides new capabilities for Windows admins, including the ability to track and analyze logs .
DEX technologies focus on ensuring users have the tools and high-performing technology they need. But is it a good idea to rely .
Intune and PowerShell have a lot of unique management actions they can take, but with the help of the Intune management extension.
Amazon CloudWatch and AWS CloudTrail help cloud administrators view configuration history and set up predictive monitoring alerts.
Amazon SageMaker Canvas is a useful machine learning tool for both technical and nontechnical professionals. This tutorial shows .
AI and ML tools support several use cases in cloud operations, such as security, fault correlation and latency. These best .
In spite of failing to meet roll-out targets, millions of smart meters are not working, and some will break once 3G and 2G .
A study by Pluralsight has looked at the risks of building a team of “star developers” and instilling a competitive culture
Olivier Klein, chief technologist for Asia-Pacific and Japan at Amazon Web Services, dives deeper into the technology stack the .
HTTP authentication
HTTP provides a general framework for access control and authentication. This page is an introduction to the HTTP framework for authentication, and shows how to restrict access to your server using the HTTP «Basic» schema.
The general HTTP authentication framework
RFC 7235 defines the HTTP authentication framework, which can be used by a server to challenge a client request, and by a client to provide authentication information.
The challenge and response flow works like this:
- The server responds to a client with a 401 (Unauthorized) response status and provides information on how to authorize with a WWW-Authenticate response header containing at least one challenge.
- A client that wants to authenticate itself with the server can then do so by including an Authorization request header with the credentials.
- Usually a client will present a password prompt to the user and will then issue the request including the correct Authorization header.
The general message flow above is the same for most (if not all) authentication schemes. The actual information in the headers and the way it is encoded does change!
Warning: The «Basic» authentication scheme used in the diagram above sends the credentials encoded but not encrypted. This would be completely insecure unless the exchange was over a secure connection (HTTPS/TLS).
Proxy authentication
The same challenge and response mechanism can be used for proxy authentication. As both resource authentication and proxy authentication can coexist, a different set of headers and status codes is needed. In the case of proxies, the challenging status code is 407 (Proxy Authentication Required), the Proxy-Authenticate response header contains at least one challenge applicable to the proxy, and the Proxy-Authorization request header is used for providing the credentials to the proxy server.
Access forbidden
If a (proxy) server receives invalid credentials, it should respond with a 401 Unauthorized or with a 407 Proxy Authentication Required , and the user may send a new request or replace the Authorization header field.
If a (proxy) server receives valid credentials that are inadequate to access a given resource, the server should respond with the 403 Forbidden status code. Unlike 401 Unauthorized or 407 Proxy Authentication Required , authentication is impossible for this user and browsers will not propose a new attempt.
In all cases, the server may prefer returning a 404 Not Found status code, to hide the existence of the page to a user without adequate privileges or not correctly authenticated.
Authentication of cross-origin images
A potential security hole (that has since been fixed in browsers) was authentication of cross-site images. From Firefox 59 onwards, image resources loaded from different origins to the current document are no longer able to trigger HTTP authentication dialogs (Firefox bug 1423146), preventing user credentials being stolen if attackers were able to embed an arbitrary image into a third-party page.
Character encoding of HTTP authentication
Browsers use utf-8 encoding for usernames and passwords.
Firefox once used ISO-8859-1 , but changed to utf-8 for parity with other browsers and to avoid potential problems as described in Firefox bug 1419658.
WWW-Authenticate and Proxy-Authenticate headers
The WWW-Authenticate and Proxy-Authenticate response headers define the authentication method that should be used to gain access to a resource. They must specify which authentication scheme is used, so that the client that wishes to authorize knows how to provide the credentials.
The syntax for these headers is the following:
Here, <type> is the authentication scheme («Basic» is the most common scheme and introduced below). The realm is used to describe the protected area or to indicate the scope of protection. This could be a message like «Access to the staging site» or similar, so that the user knows to which space they are trying to get access to.
Authorization and Proxy-Authorization headers
The Authorization and Proxy-Authorization request headers contain the credentials to authenticate a user agent with a (proxy) server. Here, the <type> is needed again followed by the credentials, which can be encoded or encrypted depending on which authentication scheme is used.
Authentication schemes
The general HTTP authentication framework is the base for a number of authentication schemes.
IANA maintains a list of authentication schemes, but there are other schemes offered by host services, such as Amazon AWS.
Some common authentication schemes include:
See RFC 7617, base64-encoded credentials. More information below.
See RFC 6750, bearer tokens to access OAuth 2.0-protected resources
See RFC 7616. Firefox 93 and later support the SHA-256 algorithm. Previous versions only support MD5 hashing (not recommended).
See RFC 7486, Section 3, HTTP Origin-Bound Authentication, digital-signature-based
See AWS docs. This scheme is used for AWS3 server authentication.
Schemes can differ in security strength and in their availability in client or server software.
The «Basic» authentication scheme offers very poor security, but is widely supported and easy to set up. It is introduced in more detail below.
Basic authentication scheme
The «Basic» HTTP authentication scheme is defined in RFC 7617, which transmits credentials as user ID/password pairs, encoded using base64.
Security of basic authentication
As the user ID and password are passed over the network as clear text (it is base64 encoded, but base64 is a reversible encoding), the basic authentication scheme is not secure. HTTPS/TLS should be used with basic authentication. Without these additional security enhancements, basic authentication should not be used to protect sensitive or valuable information.
Restricting access with Apache and basic authentication
To password-protect a directory on an Apache server, you will need a .htaccess and a .htpasswd file.
The .htaccess file typically looks like this:
The .htaccess file references a .htpasswd file in which each line consists of a username and a password separated by a colon ( : ). You cannot see the actual passwords as they are hashed (using MD5-based hashing, in this case). Note that you can name your .htpasswd file differently if you like, but keep in mind this file shouldn’t be accessible to anyone. (Apache is usually configured to prevent access to .ht* files).
Restricting access with Nginx and basic authentication
For Nginx, you will need to specify a location that you are going to protect and the auth_basic directive that provides the name to the password-protected area. The auth_basic_user_file directive then points to a .htpasswd file containing the encrypted user credentials, just like in the Apache example above.
Access using credentials in the URL
Many clients also let you avoid the login prompt by using an encoded URL containing the username and the password like this: