-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add unusual rolename tests #138
Add unusual rolename tests #138
Conversation
Use "-vvv" to do debug logging. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
We can't 100% know what filenames the client uses: so tests can't always ask "is this role trusted?" but have to look at whole list. Signed-off-by: Jussi Kukkonen <jkukkonen@google.�com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This matches metadata_statstics in repository simulator. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
I did not change the existing uses yet but I think trusted_roles() looks ok to me now -- it's the same as RepositorySimulator.metadata_statistics, except it's not sorted by time: mtime did not seem accurate enough since the files are written very quickly. So it is sorted by alpha. |
These tests are useful in codifying some expectations on how to handle weird rolenames. I wouldn't be surprised if some clients want to skip this test but the
"../delegatedrole"
case comes from an actual security issue we've had (file traversal when storing the metadata).This also enables #137 although I did not replace usage of
_file_exist()
yet -- I'm not sure if the newtrusted_roles(self)
is the right API?