-
Notifications
You must be signed in to change notification settings - Fork 11
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
Consider how to incorporate local shield in to the Arcjet SDK #3452
Comments
Right, I was thinking that perhaps "products" should have a different top-level reason. Currently, our only product is If we made the top-level reason "signup protection", I think it makes sense to deconstruct the primitives in rule results since they all contribute to the top-level decision. To be clear Note: Any move from a primitive to a product will be a breaking change but we just need to figure out where it will break and design a solution that won't break as we move into more products. |
If Then you can enable the additional primitives like For example these would be equivalent, maintain backwards compatibility, and be the same behavior as today: rules: [
shield({
mode: "LIVE"
})
] rules: [
shield({
waf: { mode: "LIVE" }
})
] rules: [
waf({ mode: "LIVE" })
] Then for the new functionality as the Shield product rules: [
shield({
waf: { mode: "LIVE" },
detectMysqli: { mode: "LIVE" },
// ...
})
] which can also be configured as primitives: rules: [
waf({ mode: "LIVE" }),
detectMysqli({ mode: "LIVE" }),
] |
@davidmytton except the RuleResult for |
To maintain backwards compatibility we could overwrite the RuleResult if it's not specified like in my first example. But if they specifically use |
I imagine that people are more likely to use |
@e-moran Right, "less" but not none. You need to decide if protectSignup is changed to indicate the product so things stay consistent with shield. And then you need to decide if rule results show the primitives or the product. |
I feel like it should be both, there's still value to being able to filter for specific rules from a product. What if we introduced a new The only downside here is that it would break people currently doing comparisons like |
From our team call yesterday, the leading solution is to consider shield as a product (such as signup protection), made up of multiple primitives (local detection, remote detection)
The main issue that arises from this is that
shield
is currently the name of a rule. Making it a "product" in the current structure of the SDK would be a large breaking change, as the results would be attributable to, for example,"LOCAL_DETECTION"
instead of"SHIELD"
. So any code to handle the results could break.@blaine-arcjet proposed a solution where we allow filtering on products as well as primitives.
The text was updated successfully, but these errors were encountered: