Skip to content

Adds remote tdx provider for development #40

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

Merged
merged 5 commits into from
Jun 5, 2025
Merged

Conversation

Ruteri
Copy link
Collaborator

@Ruteri Ruteri commented Apr 1, 2025

Allows configuring a remote quotes provider.

certFile := cCtx.String("tls-certificate")
keyFile := cCtx.String("tls-private-key")
certFile := cCtx.String("tls-certificate-path")
keyFile := cCtx.String("tls-private-key-path")
Copy link
Contributor

Choose a reason for hiding this comment

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

oh interesting, that's a separate bugfixe!

Copy link
Contributor

Choose a reason for hiding this comment

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

could be it's own PR, seems important as main would be broken 🤔

var issuer atls.Issuer
if clientAttestationTypeFlag == "dummy" && devDummyDcapURL == "" {
return errors.New("dummy client attestation type but remote not specified")
} else if clientAttestationTypeFlag != "dummy" && devDummyDcapURL != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

upgrade string "dummy" to a const

return err
}
var issuer atls.Issuer
if clientAttestationTypeFlag == "dummy" && devDummyDcapURL == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

this if/else block feels error prone, and might be a nice one to structure in a more understandable and readable manner

one idea could be to create helper variables, like

isDummyAttestationType := clientAttestationTypeFlag == "dummy"
hasDummyDcapURL := devDummyDcapURL != ""

using that might feel awkward, but it'd make the code more legible

@metachris
Copy link
Contributor

metachris commented Apr 2, 2025

Looks great, directionally.

Would be good to document the expected dummy dcap server response, and how to run one locally.

@fnerdman
Copy link
Contributor

should we merge this? I was expecting this in main already. Not that I need it at this point, my understanding was just that this is already live.

@Ruteri Ruteri merged commit 4e175a4 into main Jun 5, 2025
2 checks passed
@Ruteri Ruteri deleted the remote-tdx-provider branch June 5, 2025 15:06
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.

3 participants