Cache web authentication results

Add a short-lived, HMAC-keyed cache for validated principals and
invalidate entries when principals become stale. Improve duplicate SSH
key
errors and enable Ed25519 streaming verification.
This commit is contained in:
2026-08-30 12:02:44 +02:00
parent b7999043ca
commit c7d0d59f3e
5 changed files with 143 additions and 2 deletions
+8 -1
View File
@@ -356,7 +356,14 @@ static int add_key(const char *username)
secure_wipe(blob, sizeof(blob));
secure_wipe(line, sizeof(line));
if (error != ESP_OK) {
printf("Could not add SSH key: %s\n", esp_err_to_name(error));
if (error == USER_DATABASE_ERR_DUPLICATE_SSH_KEY) {
printf("Could not add SSH key: that public key is already assigned to an account.\n");
} else if (error == ESP_ERR_NO_MEM) {
printf("Could not add SSH key: the account already has %u keys.\n",
USER_DATABASE_MAX_SSH_KEYS_PER_USER);
} else {
printf("Could not add SSH key: %s\n", esp_err_to_name(error));
}
return 1;
}
revoke_user_network_sessions(username);