getsecret: have separate field for options #7

Closed
opened 2020-07-27 10:58:01 +02:00 by ni · 1 comment
ni commented 2020-07-27 10:58:01 +02:00 (Migrated from git.w21.org)

For now, the one implemented option, b64, is put as {b64} in front of the (base64-encoded) secret. That makes it impossible to have a clear-text secret that begins with {b64}. While this is unlikely to have practical consequences, it is not impossible, so options should be handled differently.

Current idea: have not one, but two significant colons in the file, with tag:options:secret, and depending on the option(s), the secret can be encoded in some way. Options can be short strings (like "b64"), seperated by comma if necessary. If we use another encoding besides b64, having both in the options field would mean the secret is encoded with both encodings in the order of appearance. Example:

jnic/AD:zip,b64:eJwLyC/IzwkrzdBxLcpLLS7JBwA0qQZK

(Note: this is an actual password I had in use, but no longer.)

For transition, getsecret should fall back to the old form with just one field if there are no two colons or the text between the (first) two colons does not comprise valid options.

For now, the one implemented option, `b64`, is put as `{b64}` in front of the (base64-encoded) secret. That makes it impossible to have a clear-text secret that begins with `{b64}`. While this is unlikely to have practical consequences, it is not impossible, so options should be handled differently. Current idea: have not one, but two significant colons in the file, with `tag:options:secret`, and depending on the option(s), the secret can be encoded in some way. Options can be short strings (like "b64"), seperated by comma if necessary. If we use another encoding besides `b64`, having both in the options field would mean the secret is encoded with both encodings in the order of appearance. Example: `jnic/AD:zip,b64:eJwLyC/IzwkrzdBxLcpLLS7JBwA0qQZK` (Note: this is an actual password I had in use, but no longer.) For transition, getsecret should fall back to the old form with just one field if there are no two colons or the text between the (first) two colons does not comprise valid options.
ni commented 2020-07-29 08:59:48 +02:00 (Migrated from git.w21.org)

closed via commit 9b4efa8d89

closed via commit 9b4efa8d8935c4eae7c96585c30509acf74da53d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
w21/jpylib#7
No description provided.