fnox values don't understand 1Passwors sections #760
Replies: 1 comment
|
It's not really about sections, it's that the shorthand parser only knows one and two segment values. From let parts: Vec<&str> = value.split('/').collect();
match parts.len() {
1 => Ok(format!("op://{}/{}/password", ...)),
2 => Ok(format!("op://{}/{}/{}", ...)),
_ => Err(FnoxError::ProviderInvalidResponse { ... }),
}
So the workaround for now is just to write it out: QSTASH_CURRENT_SIGNING_KEY = { provider = "op", value = "op://env-vars/UPSTASH/local/QSTASH_CURRENT_SIGNING_KEY" }which makes the For the actual fix the minimal version is one more arm: 3 => Ok(format!(
"op://{}/{}/{}/{}",
self.vault.as_ref().unwrap(),
parts[0],
parts[1],
parts[2]
)),but the whole match collapses, since everything other than the bare item case is just the vault glued onto the value unchanged: match parts.len() {
1 => Ok(format!("op://{}/{}/password", self.vault.as_ref().unwrap(), value)),
_ => Ok(format!("op://{}/{}", self.vault.as_ref().unwrap(), value)),
}That loses the error arm, which I'd argue is the right call regardless. |
Uh oh!
There was an error while loading. Please reload this page.
1Password can define a section inside an item, here called "local":
Accessing the secret in a section using a secret reference works
op://env-vars/UPSTASH/local/QSTASH_CURRENT_SIGNING_KEY, but using a shorthand fails:Error:
All reactions