Skip to content

Conversation

@aysiu
Copy link
Contributor

@aysiu aysiu commented Jan 2, 2026

Details of PR

This obviously isn't necessary for core functionality, but it is just more interesting information to get back when escrowing a key (is it a new key, or are you just escrowing the old one again?).

Testing Done

First time escrowing returns true for newly_created:

NAMEOFHOST:~$ curl -d "serial=ACTUALSERIALNUMB&secret_type=recovery_key&recovery_password=NEWRECOVERYKEY2&username=ACTUALUSERNAME"  http://localhost:8000/checkin/
{"serial": "ACTUALSERIALNUMB", "username": "ACTUALUSERNAME", "rotation_required": false, "newly_created": true}

Subsequent escrows return false:

NAMEOFHOST:~$ curl -d "serial=ACTUALSERIALNUMB&secret_type=recovery_key&recovery_password=NEWRECOVERYKEY2&username=ACTUALUSERNAME"  http://localhost:8000/checkin/
{"serial": "ACTUALSERIALNUMB", "username": "ACTUALUSERNAME", "rotation_required": false, "newly_created": false}
NAMEOFHOST:~$ curl -d "serial=ACTUALSERIALNUMB&secret_type=recovery_key&recovery_password=NEWRECOVERYKEY2&username=ACTUALUSERNAME"  http://localhost:8000/checkin/
{"serial": "ACTUALSERIALNUMB", "username": "ACTUALUSERNAME", "rotation_required": false, "newly_created": false}

Same happens for another key:

NAMEOFHOST:~$ curl -d "serial=ACTUALSERIALNUMB&secret_type=recovery_key&recovery_password=NEWRECOVERYKEY3&username=ACTUALUSERNAME"  http://localhost:8000/checkin/
{"serial": "ACTUALSERIALNUMB", "username": "ACTUALUSERNAME", "rotation_required": false, "newly_created": true}
NAMEOFHOST:~$ curl -d "serial=ACTUALSERIALNUMB&secret_type=recovery_key&recovery_password=NEWRECOVERYKEY3&username=ACTUALUSERNAME"  http://localhost:8000/checkin/
{"serial": "ACTUALSERIALNUMB", "username": "ACTUALUSERNAME", "rotation_required": false, "newly_created": false}

In total, only two key entries:
Screenshot 2026-01-01 at 23 01 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant