-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for Envoy's Ext Authz Dynamic Metadata #138
Comments
A more concrete implementation idea for this: To define a new (final) phase for the auth pipeline called After The wristband issuer would become a type of evaluator of the type ResponseConfig struct {
Name string `yaml:"name"`
Wristband *response.WristbandIssuer `yaml:"wristband,omitempty"`
DynamicMetadata *response.DynamicMetadata `yaml:"dynamicMetadata,omitempty"`
} with type DynamicMetadata struct {
Name string
Value struct {
Static string
FromJSON string
}
}
type AuthResult struct {
Code rpc.Code
Message string
Headers []map[string]string
DynamicMetadata interface{} // or perhaps `map[string]interface{}`
} OTB, this implementation would enable having multiple wristbands issued at the end of an auth pipeline instead of just one (if that even makes sense for any use case), as well as multiple “dynamic metadata” objects (probably to be merged into a single one before responding back to Envoy). Something that would make this even more interesting would be modifying the authorino/pkg/service/auth_pipeline.go Line 338 in 7612c49
So the |
Right now, the only way to retrieve information from the auth pipeline is through the Festival Wristbands and their support for custom claims. This will probably not play well for the Envoy feature for emiting "dynamic metadata" from the external authorization to be consumed by other filters (e.g. rate limit). See External Authorization Dynamic Metadata for more info.
Ideas for the implementation
To introduce a new phase to the auth pipeline, to be defined by the user in the CR. This phase will build a JSON (
map[string]string
) with entries declared in the CR and dynamically resolved in the auth pipeline, similarly to how it's done for wristband custom claims. Seeauthorino/pkg/config/wristband.go
Lines 67 to 70 in 7612c49
authorino/pkg/config/wristband.go
Lines 125 to 132 in 7612c49
Another possible implementation could be by continuing relying on the wristband to be the vessel but setting a different location for it to be passed back (#113), perhaps enhanced with additional support for non-signed and non-encoded wristbands issued. I'm afraid that this might be an overuse of the wristband feature though.
The text was updated successfully, but these errors were encountered: