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

update peerpod daemon.json path #401

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading