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
Add extra layer on top of RBAC Engine #4576
Add extra layer on top of RBAC Engine #4576
Changes from 21 commits
6201082
3345452
c6f6c7c
d2fdd85
31301be
73d9c40
11acf73
153fbb6
16002a5
72311a2
d60b45b
cbd8112
9ff3255
4fe746b
9ea7103
ae0e62c
8b9ebee
16273d7
0cb3455
2aad5fb
8b6ee2f
e5c1f30
570c834
6ff2216
6e25747
21d0121
3279ee5
f86087e
abc2d77
3b55e0f
0f87719
7922256
a35e19b
00b24c2
79fe896
e2e15cf
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.
Hmm ... I don't think I understand this comment.
What is the relationship between a certificate provided and the user being authenticated or not?
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.
I think this is correct. https://github.com/envoyproxy/envoy/blob/0fae6970ddaf93f024908ba304bbd2b34e997a51/source/extensions/filters/common/rbac/matchers.cc#L166 simply checks for a connection that was authenticated. In a stateful TLS conneciton, the downstream will have to provide a cert to authenticate their identity. Thus, logically, if a certificate is present, it means the connection was authenticated. Reworded the comment.
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 this question directed to one of the reviewers?
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.
No, in case this encounters problems later, this might give an insight into why? Perhaps I should delete this comment?
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.
Yes, you should try to get an answer to this question by raising it with whoever knows more about this topic, and have the TODO addressed.
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.
I believe this to be correct. Deleted this TODO.
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.
Here we are looping through chain of certificates. But if you look through envoy code, the evaluation is done only with leaf certificate. We may want to update this accordingly.
https://source.corp.google.com/piper///depot/google3/third_party/envoy/src/source/extensions/transport_sockets/tls/ssl_handshaker.cc;rcl=384056464;l=170
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.
Ah, similar to grpc-java: (https://github.com/grpc/grpc-java/blob/c8ba60152958cb0f37d0e9a32ae406ce8d5f1ff0/xds/src/main/java/io/grpc/xds/internal/rbac/engine/GrpcAuthorizationEngine.java#L280). Thanks for pointing this out, and sorry for the delay in answering. Envoy seems to persist a singular cert, where as in grpc we persist a list. Rather than loop through all the certificates, I only checked the first certificate.