Skip to content

Conversation

felixfontein
Copy link
Contributor

Right now SOPS does not support timestamps (see also #944), and trying to encrypt a YAML document containing one exits at encryption time (and not load time).

This has the consequence that if you sops edit a YAML file and happen to enter a timestamp, then save and exit to let SOPS encrypt it, then it will successfully load the edited file, thus exit the edit loop, but then fail to encrypt, and exit. Thus you won't get back to the editor with a chance to quote the timestamp.

Changing this to a load-time error ensures that you stay in the edit loop and can fix the timestamp in the editor.

(The other formats don't support timetstamps either, so nothing is lost.)

One potential drawback: if the timestamp is not encrypted (due to one of the many options to not encrypt certain values), loading and storing it did work before. (See #944 (comment).) This makes this potentially a breaking change. WDYT?

@felixfontein
Copy link
Contributor Author

An alternative approach would be to convert timestamps to strings before encryption. I don't like that solution either, though, since it is a destructive conversion of content.

Maybe the best solution is to implement encryption and decryption of timestamps?

@felixfontein
Copy link
Contributor Author

Alternative: #1759.

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