Authentication¶
Basic authentication¶
Prefer explicit credentials; they do not require URL encoding:
<authentication
class="com.agido.logback.elasticsearch.config.BasicAuthentication">
<username>myuser</username>
<password>p@ss€word#123</password>
</authentication>
Credentials embedded in the URL remain supported for migration, but special characters must be URL-encoded:
<url>http://user:p%40ssword@yourserver/_bulk</url>
<authentication
class="com.agido.logback.elasticsearch.config.BasicAuthentication"/>
Avoid committing credentials to source control. Prefer environment-based Logback substitutions or another secrets-injection mechanism.
AWS Signature Version 4¶
com.agido.logback.elasticsearch.config.AWSAuthentication signs requests using
the AWS SDK v2 AwsV4HttpSigner. The project declares
software.amazon.awssdk:auth, software.amazon.awssdk:regions, and
software.amazon.awssdk:http-auth-aws with provided scope, so applications
using this authentication class must supply those modules. Credentials and
region are resolved through the AWS SDK default provider chains.
The default SigV4 service name is es, which is correct for provisioned Amazon
OpenSearch Service domains. OpenSearch Serverless collections require aoss:
<authentication
class="com.agido.logback.elasticsearch.config.AWSAuthentication">
<serviceName>aoss</serviceName>
</authentication>