Overview
Authenticate API requests securely using HTTP Basic Authentication standard. Perform identity verification by decoding username and password information sent in requests with base64.What is its Purpose?
- Authenticate API requests securely using HTTP Basic Authentication standard. Perform identity verification by decoding username and password information sent in requests with base64.
- Connect to centralized authentication infrastructure with Secret Manager, LDAP, database, or external API integrations. Verify user information securely through Identity/Role Group services.
- Provide access control at endpoint or method level by checking user’s roles and permissions. Guarantee that only authorized users can access specific APIs with Authorization configuration.
- Transmit authenticated user information (username, user ID, etc.) to backend services with special header. Enable backend to perform operations in user context.
- Provide multi-layered security by adding advanced security layers such as IP address control, clear auth, and error message customization.
Working Principle
- Request Arrival: For each HTTP/HTTPS request arriving at API Gateway, the request’s
Authorizationheader is checked and base64 encoded credentials (username:password) withBasicprefix are searched. - Policy Check: If Base64 Authentication policy is active, the system checks in the following order:
- Is a condition defined? If so, is the condition met?
- Is the policy active (active=true)?
- Is a variable used or is Apinizer default used?
- Authentication Check: Authorization header is decoded and username/password are extracted. Credentials are verified with Identity Role Group service (Secret Manager, LDAP, Database, or API). If
checkClientIpAddressis active, client IP address is also checked. - Decision Making:
- Authentication Successful: If user is verified, authorization (role check) is optionally performed. If
addUserToHeaderis active, user information is transmitted to backend with special header. IfclearAuthis active, Authorization header is not sent to backend. - Authentication Failed: If user credentials are invalid or user has no permission, HTTP 401/403 error is returned.
- Authentication Successful: If user is verified, authorization (role check) is optionally performed. If
- Error Handling: Customizable HTTP status code and error message are returned for requests that do not comply with policy rules.
Features and Capabilities
Basic Features
- HTTP Basic Authentication Support: Authentication in base64 encoded username:password format compliant with RFC 7617 standard. Automatic decode and credential extraction from Authorization header.
- Identity/Role Group Integration: Centralized identity management with Secret Manager, LDAP, Database, or external API services. Secure verification of user information and retrieval of role information.
- Username Variable Support: Writing authenticated username to Apinizer variables. Access to user information throughout policy chain and ability to transfer to backend.
- Active/Passive Status Control: Easily change policy’s active or passive status (active/passive toggle). Policy is not applied in passive state but its configuration is preserved.
- Condition-Based Application: Determine when the policy will be applied by creating complex conditions with Query Builder (e.g., only for specific endpoints or header values).
Advanced Features
- Authorization (Authorization) Configuration: Method-based access control (GET, POST, PUT, DELETE, etc.). Role-based authorization and credential role list definition. Transmitting roles to backend as header (addRolesToHeader).
- IP Address Control: Client IP address verification in addition to user credentials in Secret Manager mode. Two-factor security layer.
- Clear Auth and Header Manipulation: Not sending Authorization header to backend (clearAuth). Transmitting authenticated user information to backend with special header (addUserToHeader). Customizing header name (userHeaderName).
- Export/Import Feature: Export policy configuration as ZIP file. Import to different environments (Development, Test, Production). Version control and backup capability.
- Policy Group and Proxy Group Support: Manage multiple policies within Policy Group. Bulk policy assignment to Proxy Groups. Centralized updates and deploy operations.
- Deploy and Versioning: Deploy policy changes to live environment. See which API Proxies use it (Policy Usage). Proxy Group and Policy Group usage reports.
Usage Scenarios
Configuring Policy Parameters
In this step, users can create a new policy or configure existing policy parameters to define access rules. Defined parameters directly affect how the policy works (e.g., which IPs will be allowed, geographical restrictions, conditional activations, etc.). This allows the policy to be customized according to organization-specific requirements and managed centrally.Creating New Base64 Authentication Policy

Configuration Steps
For descriptions of Conditions and Error Message Customization panels, you can review the Conditions and Error Message Customization (Error Message Customization) sections on the What is Policy? page.
For a complete guide on all layers, priority order and scenario examples of the error message configuration system, see the Error Message Configuration Guide page.

