Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
x509pop server plugin support for servers trust bundle #5572
x509pop server plugin support for servers trust bundle #5572
Changes from 30 commits
0a9b0d4
38e9850
b03cd79
483d2de
dd8f394
0c9aa54
040e70d
6ea18ad
01e9c3f
2cb1529
44e1cbf
6359989
a881a47
fe5bb17
487100d
4b06fab
d55f40d
c12860b
6ecc0b8
bf95562
cf1cb52
b7f77d0
289ae88
66c21d3
d34d912
4d94054
4c6ee68
21f2075
e476ccf
dbb120d
7a8b778
de1611a
331f003
bed2c85
941236b
bdf284a
037ac50
2f1166d
aab491a
378bdda
b7eea56
9f6b9f7
f1385d4
e4313e3
ee6e679
c599b12
7820d1a
fd6a320
b2c3cdf
78e61eb
40e94ac
1c75f36
238edcb
2b5c884
021a90b
50ebc2b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
SVIDPathSuffix
better implies that a prefix has been stripped?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is not the same error happens in line 80?
may we return here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.... The check here checks if both are configured. The check at 80 ensures at least one is configured. Both are needed I think.
I was thinking status.ReportError was fatal. Is it not? Maybe all the ReportError's here then need retruns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm, it is like if both are configured, you must never get the second one right?
status.Report is not a fatal, but just adding a list of errors, than then are used in configure or verify,
but this approach has a good win than you can get the complete list of errors to resolve all together,
but it makes very hard to follow and see dependency errors...
In any case we are fine for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this happens we'll reject attestations, but it is going to be hard to understand why it is happening (basically we are not going to have a trusted bundle)
May we at least return wartning or error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we log a warning about not currently finding a trust bundle? Its nor fatal as it might show up at some point later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap, I agree but this attestation will fail and mention a verification error
so a warning may help users to understand than that the that attestation failure is cuased by the attestor being unabled to get the trust bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add test case where no trustedbundle is returned?
and how about defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Struggling a bit with how to write the tests....
Seems like I need to create a new cert in ./test/fixture/nodeattestor/x509pop/generate.go with the url based spiffe id to test with? There are some magic numbers in that file. Are they just arbitrary, or are there some reason for the specific numbers chosen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading through it some more, it looks like they just have patterns in it. so rather arbitrary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I have tests for no trust bundle, along with a valid svid, an invalid svid, and a no svid.