Skip to content

Commit 241d371

Browse files
committed
Fix secret
Signed-off-by: tpmccallum <[email protected]>
1 parent b17bf20 commit 241d371

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

examples/vault-variable-test/Cargo.lock

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/vault-variable-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
anyhow = "1"
13-
spin-sdk = { git = "https://github.com/fermyon/spin", tag = "v2.1.0" }
13+
spin-sdk = { path = "../../sdk/rust" }
1414

1515
[workspace]

examples/vault-variable-test/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ vault server -dev -dev-root-token-id root
1515
```bash
1616
export VAULT_TOKEN=root
1717
export VAULT_ADDR=http://127.0.0.1:8200
18-
vault kv put secret/password value="test_password"
19-
vault kv get secret/password
18+
vault kv put secret/secret value="test_password"
19+
vault kv get secret/secret
2020
```
2121

2222
4. Build the application:

examples/vault-variable-test/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ use spin_sdk::{
77

88
#[http_component]
99
fn handle_vault_variable_test(req: Request) -> Result<impl IntoResponse> {
10-
let password = std::str::from_utf8(req.body().as_ref()).unwrap();
10+
let attempt = std::str::from_utf8(req.body().as_ref()).unwrap();
1111
let expected = variables::get("password").expect("could not get variable");
12-
let response = if expected == password {
12+
let response = if expected == attempt {
1313
"accepted"
1414
} else {
1515
"denied"

0 commit comments

Comments
 (0)