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

Return expired root.json if keys are offline #255

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Conversation

simao
Copy link
Contributor

@simao simao commented Jan 22, 2020

Without this change, a user cannot garage-sign root pull as
keyserver always returns an error since it tries to refresh the role,
but the keys to do so are offline.

With this change the expired root.json is returned and is up to the
client to validate it according to the tuf/update spec.

I don't like that I am quite explicitly using an exception for control
flow, but the other alternative would be to return a
Future[ResultType], and then have a dedicated ResultType for this,
but I think it's too complex to use something like that.

Signed-off-by: Simão Mata [email protected]

Without this change, a user cannot `garage-sign root pull` as
keyserver always returns an error since it tries to refresh the role,
but the keys to do so are offline.

With this change the expired root.json is returned and is up to the
client to validate it according to the tuf/update spec.

I don't like that I am quite explicitly using an exception for control
flow, but the other alternative would be to return a
`Future[ResultType]`, and then have a dedicated `ResultType` for this,
but I think it's too complex to use something like that.

Signed-off-by: Simão Mata <[email protected]>
@jochenschneider
Copy link
Contributor

Ah that fixes the issue Raigi was having?

@simao
Copy link
Contributor Author

simao commented Jan 23, 2020

Yes, hopefully

@simao simao merged commit 94f52d1 into master Jan 23, 2020
@simao simao deleted the bugfix/OTA-4321 branch January 23, 2020 11:18
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.

2 participants