Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sources): add custom auth strategy for components with HTTP server #22236

Merged
merged 16 commits into from
Feb 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update all docs based on suggestions
esensar committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 622c81d4dcf82a96a2c6be9838a5c492558b7e06
4 changes: 2 additions & 2 deletions src/common/http/server_auth.rs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ use super::ErrorMessage;

/// Configuration of the authentication strategy for server mode sinks and sources.
///
/// HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an
/// Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an
/// HTTP header without any additional encryption beyond what is provided by the transport itself.
#[configurable_component]
#[derive(Clone, Debug, Eq, PartialEq)]
@@ -30,7 +30,7 @@ use super::ErrorMessage;
pub enum HttpServerAuthConfig {
/// Basic authentication.
///
/// The username and password are concatenated and encoded via [base64][base64].
/// The username and password are concatenated and encoded using [base64][base64].
///
/// [base64]: https://en.wikipedia.org/wiki/Base64
Basic {
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ base: components: sources: heroku_logs: configuration: {
"""
}
}
user: {
username: {
description: "The basic authentication username."
relevant_when: "strategy = \"basic\""
required: true
6 changes: 3 additions & 3 deletions website/cue/reference/components/sources/base/http.cue
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ base: components: sources: http: configuration: {
description: """
Configuration of the authentication strategy for server mode sinks and sources.

HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an
Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an
HTTP header without any additional encryption beyond what is provided by the transport itself.
"""
required: false
@@ -59,7 +59,7 @@ base: components: sources: http: configuration: {
basic: """
Basic authentication.

The username and password are concatenated and encoded via [base64][base64].
The username and password are concatenated and encoded using [base64][base64].

[base64]: https://en.wikipedia.org/wiki/Base64
"""
@@ -70,7 +70,7 @@ base: components: sources: http: configuration: {
"""
}
}
user: {
username: {
description: "The basic authentication username."
relevant_when: "strategy = \"basic\""
required: true
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ base: components: sources: http_server: configuration: {
description: """
Configuration of the authentication strategy for server mode sinks and sources.

HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an
Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an
HTTP header without any additional encryption beyond what is provided by the transport itself.
"""
required: false
@@ -59,7 +59,7 @@ base: components: sources: http_server: configuration: {
basic: """
Basic authentication.

The username and password are concatenated and encoded via [base64][base64].
The username and password are concatenated and encoded using [base64][base64].

[base64]: https://en.wikipedia.org/wiki/Base64
"""
@@ -70,7 +70,7 @@ base: components: sources: http_server: configuration: {
"""
}
}
user: {
username: {
description: "The basic authentication username."
relevant_when: "strategy = \"basic\""
required: true
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ base: components: sources: prometheus_pushgateway: configuration: {
description: """
Configuration of the authentication strategy for server mode sinks and sources.

HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an
Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an
HTTP header without any additional encryption beyond what is provided by the transport itself.
"""
required: false
@@ -69,7 +69,7 @@ base: components: sources: prometheus_pushgateway: configuration: {
basic: """
Basic authentication.

The username and password are concatenated and encoded via [base64][base64].
The username and password are concatenated and encoded using [base64][base64].

[base64]: https://en.wikipedia.org/wiki/Base64
"""
@@ -80,7 +80,7 @@ base: components: sources: prometheus_pushgateway: configuration: {
"""
}
}
user: {
username: {
description: "The basic authentication username."
relevant_when: "strategy = \"basic\""
required: true
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ base: components: sources: prometheus_remote_write: configuration: {
description: """
Configuration of the authentication strategy for server mode sinks and sources.

HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an
Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an
HTTP header without any additional encryption beyond what is provided by the transport itself.
"""
required: false
@@ -59,7 +59,7 @@ base: components: sources: prometheus_remote_write: configuration: {
basic: """
Basic authentication.

The username and password are concatenated and encoded via [base64][base64].
The username and password are concatenated and encoded using [base64][base64].

[base64]: https://en.wikipedia.org/wiki/Base64
"""
@@ -70,7 +70,7 @@ base: components: sources: prometheus_remote_write: configuration: {
"""
}
}
user: {
username: {
description: "The basic authentication username."
relevant_when: "strategy = \"basic\""
required: true