Basic authentication
An HTTP authentication scheme in which a client sends a username and password as Base64-encoded credentials in an Authorization header.
Spring Security in Action, Second Edition
HTTP Basic authentication is an HTTP authentication scheme that transmits a username and password using an Authorization header value containing Base64-encoded credentials.
- How it is used
- Secures REST endpoints by requiring clients to send username-and-password credentials in each Basic-authenticated request.
- How deep it goes
- Explains the header format, Base64 limitation, Spring defaults, endpoint rules, HTTPS, realms, and custom 401 handling.
- Examples
- Demonstrates a protected /hello REST endpoint, curl credential forms, Base64 encoding, generated passwords, realms, and custom 401 headers.
- What you can do after
- Operate and configure Spring Security Basic authentication, test protected endpoints, require or permit access, and customize failed responses.
Read how Spring Security in Action, Second Edition explains basic authentication →
Acing the CCNA Exam: Volume 2 Advanced Networking and Security
Basic authentication is an HTTP authentication method that transmits a username and password in an HTTP header, typically encoded but not inherently encrypted.
- How it is used
- Authenticates REST API requests with a username and password carried in an HTTP header.
- How deep it goes
- Defines the request mechanism and security limitation, but stops short of implementation commands or protocol internals.
- Examples
- Uses API requests with HTTP-header credentials and HTTPS-protected transmission as concrete illustrations.
- What you can do after
- Apply it to authenticate REST API requests while protecting credentials with HTTPS.
Logs and Telemetry
Basic authentication is an HTTP authentication scheme that transmits a username and password in an encoded authorization header.
- How it is used
- Secures HTTP output destinations against unauthorized or unwanted event data.
- How deep it goes
- Explains plugin settings, header encoding, and HTTPS implications, but does not detail credential-management approaches.
- Examples
- Uses Fluent Bit, WireMock, an authentication configuration, and an observed Authorization header.
- What you can do after
- Operate Fluent Bit HTTP output with username-password authentication and verify the resulting authorization header.
Also covered in
- Data Pipelines with Apache Airflow, Second Edition
- Spring AI in Action
- Azure Security
- Go in Practice, Second Edition
What to know first
- HTTPHTTP is an application-layer protocol that defines request-and-response communication for transferring resource representations and related metadata between networked systems.
- 401 unauthorizedHTTP 401 Unauthorized is a response status indicating that a request lacks valid authentication credentials for the requested resource.
- HTTPSHTTPS is HTTP carried over TLS to provide encrypted communication and authentication between network endpoints.
- JSONJSON is a language-independent text-based data-interchange format that represents structured values using objects, arrays, strings, numbers, booleans, and null.
Related concepts
- OAuthalternative to · OAuth is an authorization framework that enables a client to obtain limited, delegated access to protected resources without receiving the resource owner's credentials.
- Actuator endpointconfigures · An Actuator endpoint is a Spring Boot Actuator management interface that exposes operational data or operations through supported communication mechanisms.
- bearer authenticationcontrasts with · Bearer authentication is an authentication scheme in which presenting a bearer token is sufficient to use the access or authorization granted by that token.
- HTTPSuses · HTTPS is HTTP carried over TLS to provide encrypted communication and authentication between network endpoints.
- password authenticationuses · Password authentication is a method of verifying a claimed identity or access by checking a supplied secret password, often alongside a user identifier.
- RESTused by · REST is an architectural style for distributed systems that organizes interactions around identifiable resources and their representations, using a uniform interface and constraints such as statelessness and cacheability.
Questions about basic authentication
What is basic authentication?
An HTTP authentication scheme in which a client sends a username and password as Base64-encoded credentials in an Authorization header.
Which Manning books explain basic authentication?
Spring Security in Action, Second Edition, Acing the CCNA Exam: Volume 2 Advanced Networking and Security and Logs and Telemetry.
What should I know before learning basic authentication?
Manning books that teach basic authentication usually introduce HTTP, 401 unauthorized, HTTPS and JSON first.
What is the difference between basic authentication and OAuth?
An HTTP authentication scheme in which a client sends a username and password as Base64-encoded credentials in an Authorization header. OAuth is an authorization framework that enables a client to obtain limited, delegated access to protected resources without receiving the resource owner's credentials.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


