Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple URLs with the same identities cause duplicated recipients in age encrypted secrets #437

Open
Ma27 opened this issue Jan 29, 2024 · 4 comments

Comments

@Ma27
Copy link
Member

Ma27 commented Jan 29, 2024

Consider secret config like this:

[batou]
secret_provider = age
members =
    https://my.flyingcircus.io/rg/2342/sshkeys/login/blub/keys
    https://my.flyingcircus.io/rg/2343/sshkeys/login/blub/keys

Now, if I'm allowed to log into both RGs, there are two recipients with the same ssh key.
My expectation would be that for each user, only one recipient is added to age_keys.txt.

It's not a big deal in practice, but still a little odd.

@elikoga
Copy link
Member

elikoga commented Feb 29, 2024

age_keys.txt is there to give batou the ability to notify the user if the web-fetched key files change, as well as providing a plain-text-readable file with the recipients for the repository.
Since we are fetching the public keys from the internet during encryption-time, we need to allow the user to notice changes in the public-key sources.

I'm not sure how to de-duplicate public-keys while also making sure that both properties are preserved.

@Ma27
Copy link
Member Author

Ma27 commented Mar 3, 2024

So, perhaps I'm missing some context or not seeing a case you have in mind, but: what's wrong with only notifying if there's an actual change? I.e. only if one key was actually added or removed rather than duplicated or deduplicated?

If a member was added/removed to/from a RG (I've only used it with the keys feature of my.flyingcircus.io so far) it doesn't seem too interesting to me unless I now encrypt the secrets for someone new or someone loses access to the secrets from now on.

@Ma27
Copy link
Member Author

Ma27 commented Mar 4, 2024

Just noticed that the https://my.flyingcircus.io/rg/2342/sshkeys/type/X/keys URLs don't have a stable order for their keys which means that batou warns me every time I edit an age encrypted secrets file.

@elikoga
Copy link
Member

elikoga commented Mar 4, 2024

Just noticed that the https://my.flyingcircus.io/rg/2342/sshkeys/type/X/keys URLs don't have a stable order for their keys which means that batou warns me every time I edit an age encrypted secrets file.

Looking into this since this obviously interferes with the usecase of having the keys in a lockfile

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

No branches or pull requests

2 participants