Add option to pass auth. header to join-server.
Some checks failed
CI / tests (postgres) (push) Has been cancelled
CI / tests (sqlite) (push) Has been cancelled
CI / dist (postgres) (push) Has been cancelled
CI / dist (sqlite) (push) Has been cancelled

This commit is contained in:
Orne Brocaar 2025-04-16 10:55:08 +01:00
parent 75e9106bbb
commit 6d084b3b21
3 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,11 @@ pub async fn setup() -> Result<()> {
tls_key: js.tls_key.clone(),
async_timeout: js.async_timeout,
request_log_sender: stream::backend_interfaces::get_log_sender().await,
authorization: if js.authorization_header.is_empty() {
None
} else {
Some(js.authorization_header.clone())
},
..Default::default()
})?;

View File

@ -797,6 +797,11 @@ pub fn run() {
# #
# # Set this to enable client-certificate authentication with the join-server.
# tls_key="/path/to/tls_key.pem"
# # Authorization header.
# #
# # Optional value of the Authorization header, e.g. token or password.
# authorization_header="Bearer sometoken"
{{#each join_server.servers}}
[[join_server.servers]]
@ -807,6 +812,7 @@ pub fn run() {
ca_cert="{{ this.ca_cert }}"
tls_cert="{{ this.tls_cert }}"
tls_key="{{ this.tls_key }}"
authorization_header="{{ this.authorization_header }}"
{{/each}}

View File

@ -524,6 +524,7 @@ pub struct JoinServerServer {
pub ca_cert: String,
pub tls_cert: String,
pub tls_key: String,
pub authorization_header: String,
}
#[derive(Serialize, Deserialize, Default, Clone)]