Skip to content

Add measurement enforcing mode#99

Merged
labbott merged 3 commits into
mainfrom
enforcing_mode
Feb 2, 2026
Merged

Add measurement enforcing mode#99
labbott merged 3 commits into
mainfrom
enforcing_mode

Conversation

@labbott

@labbott labbott commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Eventually this will not be configurable but for now let certain test configurations require full attestation

Eventually this will not be configurable but for now let certain
test configurations require full attestation
@labbott labbott requested review from andrewjstone and flihp January 30, 2026 19:53

@andrewjstone andrewjstone left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks good. But in the interest of echoing @jgallagher's comments to me on many PRs, I think it's fairly hard to read code that passes bools. I would recommend instead taking a custom enum rather than a bool and checking that instead. Something like

enum ConnectionPolicy {
    EnforceMeasurementVerification,
    AllowMeasurementFailure
}

I'm not going to hold up the review for this, so do with it what you will.

@labbott

labbott commented Feb 1, 2026

Copy link
Copy Markdown
Contributor Author

This looks good. But in the interest of echoing @jgallagher's comments to me on many PRs, I think it's fairly hard to read code that passes bools. I would recommend instead taking a custom enum rather than a bool and checking that instead. Something like

enum ConnectionPolicy {
    EnforceMeasurementVerification,
    AllowMeasurementFailure
}

I'm not going to hold up the review for this, so do with it what you will.

I think it's a good suggestion. I made the change and I do think it's cleaner. I'll give you a chance to bikeshed before I merge it.

Comment thread tls/examples/client.rs Outdated
roots: args.roots,
resolve,
enforce: if args.enforce {
MeasurementConnectionPolicy::Enforce

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like these names a lot. But since you asked for bike shedding, I"d name this one Enforced so that they are both adjectives.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🚲

@labbott labbott merged commit 846d961 into main Feb 2, 2026
8 checks passed
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