-
Notifications
You must be signed in to change notification settings - Fork 573
Add no_jwt_patterns to auth.proto #345
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
This becomes another specialized URL map, and you also put the business logic with the map. There are too much business logic connected together here.
Why EndUser is mentioned in the proto spec? Why the auth is not a service account, or a mobile device, or a IoT, or a delegated service, or impersonation? I think we should have an abstraction here. The URL map produce an operation id, and the operation id maps to authentication requirements. The concept of JWT or end user should not be the top level concept.
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.
We will address some of your concerns with this issue
#344
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.
EndUserAuthenticationPolicy can be renamed to auth filter config with #344. There was some previous discussion about treating this matching as authZ problem and handling in the mixer. But that can be inefficient as we end up unconditionally trying to validate all JWT for a host regardless of the path/method. Could an attribute match condition similar to the quotaspec make sense here, or should it be specialized for specific attributes (e.g. api.operation)?
The top-level AuthenticationPolicy (see #335) possibly ought to support this mapping of auth requirements to particular sets of operations (or entire service or maybe even namespace). @diemtvu
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 I understand correctly, this is aligned with the SelectCriteria discussed here, though I haven't fully fleshed out all details. However, our intention is to have that in the AuthN policy.
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.
We should be careful about which level of config we are talking here. This is NOT user level config. This is low-level component level config. Specifically this is the config for Envoy auth filter defined here: https://github.com/istio/proxy/blob/master/src/envoy/auth/config.proto
Auth filter will be upstreamed to Envoy. It should not depended on any Istio proto files. That config proto is just copied from this proto file. So this proto file is the low level Envoy filter config for Mixer Filter and Auth filter.
User level auth config will be defined in @diemtvu PR #335
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.
We can depend on core protos in data-plane-api. If there is no good match, then we can start a discussion to add another core proto. There's value in consolidating proto definitions, instead of copying them from place to place.
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 am a bit confused by the structure of this proto. Pattern matching is a common way for software, and it should looks like this way for most people:
This proto puts the pattern matching inside the action, which is counter intuitive.
Pattern matching on request should be a common function across Envoy and Istio. I strongly prefer we define it in a central place. JWT rule essentially an action that produces the request auth attributes.