HTTP Basic Authentication

Source: Internet
Author: User
Tags http authentication

Certification concept:
The server needs some way to understand the user's identity, once the server knows the user's identity, it can be determined that the user can access the transaction and resources, usually through the user name and password;
HTTP Response/Authentication framework
HTTP Authentication Model:

Challenge/Response Certification framework

Two official authentication protocols for http: Basic authentication and Digest authentication
Four Steps to Certification:
Request: The client initiates a request, and the first request does not have an authentication message;
Challenge: The server challenges the client, returns a 401 unauthorized response, and explains how and where to authenticate in the www-authenticate header ; generally specifies which security domain to authenticate;
Authorization: the client receives 401 challenge, pops up the dialog box, asks the user name and the password, after the user enters the user name and the password, the client uses a colon to connect it, encodes "the scrambling code" the Base-64 representation, It is then put back in the authorization header;
success: The server decodes the user name and password, verifies their correctness, and returns the requested message with an HTTP OK message;

Basic Authentication Example

Basic Certification Header
Base-64 Code:A 8-bit byte sequence is divided into 6-bit chunks, with each 6-bit block selected in a special alphabetical table of 64 characters.

code example
Security Domain:The protected documents are organized into a security domain, each security domain can have a different set of authorized users, and the Realm command will be included in the www-authenticate header;

Security domains on the server

Challenge Response with security domain
Agent Certification
Through the intermediary proxy server to achieve the server internal resources and documents unified access control;

Differences from the Web server
Status code: 407
Header: Proxy
security flaws in Basic authentication:
BASE-64 security is not high, easy to decrypt, use SSL encrypted channel, use Digest authentication;

HTTP Basic Authentication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.