Closed wainersm closed 1 year ago
And the keysset:
$ mysql -u ${KBS_DB_USER} -p${KBS_DB_PW} -D ${KBS_DB} -e "SELECT * FROM keysets;"
mysql: [Warning] Using a password on the command line interface can be insecure.
+----+----------+-----------+-------+
| id | keysetid | kskeys | polid |
+----+----------+-----------+-------+
| 10 | KEYSET-1 | [key_id1] | NULL |
+----+----------+-----------+-------+
I restarted simple-kbs but still getting the same error.
Hmmm it was a unfortunate copy/paste of the key which is invalid:
$ echo $ENC_KEY
”7JOQd6TASVf9xL6h9AbmBz6Cn/RozUfl/VBD/QPEsCk=”
$ echo $ENC_KEY | base64 -d
base64: invalid input
But maybe simple-kbs should gentile log an error instead of panic at https://github.com/confidential-containers/simple-kbs/blob/main/src/request.rs#L166
Ah yeah. Error logging is a bit weak for simple-kbs in general. Let me see if there is an easy fix to this, though.
And we should take a close look at all the .unwrap()
s we have in the code (except the tests).
And we should take a close look at all the
.unwrap()
s we have in the code (except the tests).
True. calling unwrap()
is not the proper way to handle error because it simply doesn't handle the error :) (Non-Rust expert speaking)
Yeah this one snuck in because I implementing into_bytes
and I wanted to mirror the method that String provides. This was a mistake since base64 -> string is fundamentally fallible.
We should comb through the other unwraps.
The agent doesn't get the key:
The new secret: