Skip to content

Commit 08f1bc7

Browse files
committed
bug: rsa keys are passed with a 0 length
1 parent 5eda81c commit 08f1bc7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/daemon/launch_daemon.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ impl Daemon {
218218
.merge(("port", config.visualization.port))
219219
.merge(("log_level", LogLevel::Normal));
220220

221+
// Add RS256 keys to figment
222+
if !config.visualization.rs256_public_key.is_empty() && !config.visualization.rs256_private_key.is_empty() {
223+
debug!("RS256 keys found in configuration");
224+
figment = figment
225+
.merge(("rs256_public_key", config.visualization.rs256_public_key.clone()))
226+
.merge(("rs256_private_key", config.visualization.rs256_private_key.clone()));
227+
}
228+
221229
// Configure TLS if certificates are provided
222230
if let (Some(cert), Some(key)) = (&config.visualization.cert, &config.visualization.key) {
223231
debug!("SSL certificates found in configuration, enabling TLS");

src/visualization/oidc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ fn generate_openid_configuration(base_url: &str, state: &OxideState) -> OpenIdCo
8383
let mut signing_algs = vec!["HS256".to_string()];
8484

8585
// If we have RS256 keys configured, add RS256
86+
log::debug!("RS256 public key length: {}", state.rs256_public_key.len());
87+
log::debug!("RS256 private key length: {}", state.rs256_private_key.len());
88+
8689
if !state.rs256_public_key.is_empty() && !state.rs256_private_key.is_empty() {
8790
// Add RS256 if we have keys, regardless of whether decoding succeeds
8891
signing_algs.push("RS256".to_string());
8992
log::debug!("RS256 signing algorithm added to OpenID configuration");
93+
} else {
94+
log::warn!("RS256 keys are not properly configured - public key empty: {}, private key empty: {}",
95+
state.rs256_public_key.is_empty(), state.rs256_private_key.is_empty());
9096
}
9197

9298
OpenIdConfiguration {

0 commit comments

Comments
 (0)