Skip to content

Let Coordinator serve monotonic counters to Marbles#741

Merged
thomasten merged 4 commits intomasterfrom
t/count
Oct 9, 2024
Merged

Let Coordinator serve monotonic counters to Marbles#741
thomasten merged 4 commits intomasterfrom
t/count

Conversation

@thomasten
Copy link
Copy Markdown
Member

This adds monotonic counters managed by the Coordinator, which Marbles can obtain via the client API.
A counter is bound to Marble type and UUID, as well as a name defined by the Marble developer.

Proposed changes

  • Add Marble type as extension to Marble certificate so that the client API can obtain it
  • Add monotonic-counter endpoint to Coordinator
  • Add function to Go API
  • Add EStore example with monotonic counter

@netlify
Copy link
Copy Markdown

netlify bot commented Oct 7, 2024

Deploy Preview for marblerun-docs canceled.

Name Link
🔨 Latest commit c194077
🔍 Latest deploy log https://app.netlify.com/sites/marblerun-docs/deploys/6706427f9fb7c5000864f598

Comment on lines +162 to +168
// Add Coordinator root cert to env so that Marbles can use the Coordinator client API
coordinatorRootCert, err := getCoordinatorRootCertAsPEM(txdata)
if err != nil {
c.log.Error("Couldn't retrieve Coordinator root certificate", zap.Error(err))
return nil, status.Errorf(codes.Internal, "retrieving Coordinator root certificate: %s", err)
}
params.Env[globalconstants.MarbleEnvironmentCoordinatorRootCA] = coordinatorRootCert
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do this in customizeParameters where we already add other certificates to env variables

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you prefer passing txdata to customizeParameters or passing coordinatorRootCert and moving just the last line into customizeParameters?

Copy link
Copy Markdown
Member

@daniel-weisse daniel-weisse Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently use the reservedSecrets struct to pass around marble and (intermediate) root certificates, lets add it there.
That would also allow us to reference the "true" root certificate in the manifest through {{ .MarbleRun.<certName> }}

not entirely sure what to call the cert yet, since we also reserved RootCA for the Marble Root certificate.
Maybe CoordinatorRoot could work here

@thomasten thomasten merged commit f829c77 into master Oct 9, 2024
@thomasten thomasten deleted the t/count branch October 9, 2024 08:52
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