-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable filtering with HTTP properties configured through yaml #11
Comments
Would it make sense to forward the whole HTTP request "as-is" (as much as that is possible) as an option to provide OPA with all data available there? |
I guess we can provide an array of http properties that users can request in their config file, also JWT. opa.filter.request-include:
jwt: encrypted (/decrypted)
http:
method: true
path: true
headers: [Content-Type, Origin] So that would be the default implementation and it could be overridden or extended to add some custom data to the request. What do you think? |
The reason to filter out attributes from the original request would be to keep the payload size low? I'm not sure I find the special treatment of JWTs necessary - checking for its presence in the headers inside a policy is trivial anyway, no? And there should probably be an option to include the body. at least given some content types. Besides that, I like it :) |
Yes, also some of those might be sensitive and they don't necessarily have to be sent to localhost, OPA instance might be remote.
You're right, I don't know why I fixated on this :)
Of course, properties I've posted above are only an example.
I'm glad to hear that! |
So for the first version of this feature I'll go with the following: ---
opa.filter.data.http:
method:
include: all # or none - by default
except:
- OPTIONS
path:
include: all # or none - by default
except:
- /setPassword # because the password is sent in query params
headers:
include: all # or none - by default
except:
- Content-Type
- Origin
- Authorization
- bla # any string really
sessionId.include: true # false by default
cookies:
include: all # or none - by default
except:
- secretToken
queryParams.include: true # false by default
body.include: true # false by default |
Looks great. Is include also a list or can you only say all and blacklist? |
Yeah, the idea is to have two ways: include: all
except:
- something and include: none
except:
- something |
Awesome! |
Currently, we're always using path, method and JWT to make queries to OPA. We should allow for better elasticity.
The text was updated successfully, but these errors were encountered: