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

Uppercase keyids throw off reference implementation #330

Open
trishankatdatadog opened this issue Nov 15, 2019 · 1 comment
Open

Uppercase keyids throw off reference implementation #330

trishankatdatadog opened this issue Nov 15, 2019 · 1 comment

Comments

@trishankatdatadog
Copy link
Member

trishankatdatadog commented Nov 15, 2019

Description of issue or feature request:

If an integrator accidentally passes uppercase keyids in the public keys given for a step, the reference implementation does not realize that they should be the same as lowercase keyids.

Current behavior:

An uppercase keyid in the pubkeys for a step will break verification, even if that files with the lowercase keyid exist.

Expected behavior:

All keyids should be normalized internally, so that uppercase == lowercase keyids (unless I'm missing some subtle security attack, which I don't see right now).

@trishankatdatadog trishankatdatadog changed the title Uppercase keyids throws off reference implementation Uppercase keyids throw off reference implementation Nov 15, 2019
@lukpueh
Copy link
Member

lukpueh commented Nov 18, 2019

Thanks for filing the issue, @trishankatdatadog. Does "throw off" mean that in-toto treats keyids in a case-sensitive manner? To me this sounds like expected behavior.

For comparison, step names are also case sensitive. E.g. a step in a layout with name "foo" and authorized pubkeys [8ba69b87d43be294f23e812089a2ad3c07d962e8] will only accept a link file with filename "foo.8ba69b87.link" which has a signature with a keyid "8ba69b87d43be294f23e812089a2ad3c07d962e8", with no variation in case allowed.

I do, however, agree that there is a slight inconsistency with gpg keyids, which are treated in a case insensitive manner when passed to in_toto_run as link signing key, or in_toto_verify as layout verification key. The reason is that these keyids are passed on to the gpg command line tool, which is pretty lenient in what it accepts to identify a key.

@SantiagoTorres, how do you think keyid case should be handled?

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