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

Cargo Delivery Authorisation issuer isn't rotated #571

Closed
gnarea opened this issue Feb 25, 2022 · 2 comments · Fixed by #593
Closed

Cargo Delivery Authorisation issuer isn't rotated #571

gnarea opened this issue Feb 25, 2022 · 2 comments · Fixed by #593
Assignees
Labels
bug Something isn't working released

Comments

@gnarea
Copy link
Member

gnarea commented Feb 25, 2022

I forgot to call this out explicitly in the issues: We should rotate the self-issued certificate used in Cargo Delivery Authorisations.

Right now, we can only have exactly one as it's stored in a file that's generated the first time the app starts (and there's no rotation):

internal const val CDA_CERTIFICATE_FILE_NAME = "cda_local_gateway.certificate"

Instead, we should do what we've been doing with the other certificates:

We probably want to reuse our FileCertificateStore and introduce a second instance to manage CDA issuers only. I think that'd require changing the FileCertificateStore class to take a path prefix (under the existing root), so that we avoid overriding files.

@gnarea gnarea added the bug Something isn't working label Feb 25, 2022
@gnarea gnarea changed the title Cargo Delivery Authorisation certificate isn't rotated Cargo Delivery Authorisation issuer isn't rotated Feb 25, 2022
gnarea added a commit to relaycorp/relaynet-core-js that referenced this issue Feb 26, 2022
To avoid making this mistake in the JS implementation: relaycorp/relaynet-gateway-android#571
kodiakhq bot pushed a commit to relaycorp/relaynet-core-js that referenced this issue Feb 26, 2022
@sdsantos
Copy link
Collaborator

sdsantos commented Mar 1, 2022

Tasks:

  • Start using new version of FileCertificateStore
  • Switch from regular FileStore to FileCertificateStore for storing CDAs
  • Generate new CDA when we don't have any, or the one we have stored is about to expire
  • Method to return the latest valid CDA and use it in all signature-producing operations
  • Method to return all valid CDAs and use it in all signature-verification operations

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

🎉 This issue has been resolved in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants