Skip to content

Commit

Permalink
update peerpod daemon.json path
Browse files Browse the repository at this point in the history
This is moved to /run.

Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen authored and fitzthum committed Dec 6, 2023
1 parent 20ef805 commit dec7f10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions attestation-agent/lib/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
use std::path::Path;
use tokio::fs;

const PEER_POD_CONFIG_PATH: &str = "/peerpod/daemon.json";
const PEER_POD_CONFIG_PATH: &str = "/run/peerpod/daemon.json";

#[derive(Serialize)]
struct Message {
Expand All @@ -20,7 +20,7 @@ struct Message {
pub(crate) async fn get_kbs_token() -> Result<Vec<u8>> {
let evidence_provider = Box::new(NativeEvidenceProvider::new()?);

// Check for /peerpod/daemon.json to see if we are in a peer pod
// Check for /run/peerpod/daemon.json to see if we are in a peer pod
// If so we need to read from the agent-config file, not /proc/cmdline
let kbc_params = match Path::new(PEER_POD_CONFIG_PATH).exists() {
true => get_kbc_params_from_config_file().await?,
Expand Down
4 changes: 2 additions & 2 deletions confidential-data-hub/kms/src/plugins/kbs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use tokio::sync::Mutex;

use crate::{Annotations, Error, Getter, Result};

const PEER_POD_CONFIG_PATH: &str = "/peerpod/daemon.json";
const PEER_POD_CONFIG_PATH: &str = "/run/peerpod/daemon.json";

enum RealClient {
#[cfg(feature = "kbs")]
Expand All @@ -37,7 +37,7 @@ enum RealClient {

impl RealClient {
async fn new() -> Result<Self> {
// Check for /peerpod/daemon.json to see if we are in a peer pod
// Check for /run/peerpod/daemon.json to see if we are in a peer pod
// If so we need to read from the agent-config file, not /proc/cmdline
let (kbc, _kbs_host) = match Path::new(PEER_POD_CONFIG_PATH).exists() {
true => get_aa_params_from_config_file().await?,
Expand Down

0 comments on commit dec7f10

Please sign in to comment.