You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by calavera <gi...@git.apache.org> on 2016/06/22 17:22:50 UTC
[GitHub] trafficserver pull request #732: [TS-4270] Make stats_over_http a remap plug...
GitHub user calavera opened a pull request:
https://github.com/apache/trafficserver/pull/732
[TS-4270] Make stats_over_http a remap plugin.
I'm opening this Pull Request to get feedback about the current remap behavior.
I'd like to restrict all access to the stats over http using remap rules, like this one:
map /_stats /_stats @plugin=stats_over_http.so @action=allow @src_ip=127.0.0.1
However, the remap action is validated after a plugin is loaded. This is problematic for plugins that intercept the server request, because they can send a response before this validation happen, like it's the case of stats_over_http.
I modified RemapProcessor to call `PerformACLFiltering` before a plugin is loaded, but I don't know if that's the right way to solve this problem. Specifically, because with this change, that filtering happens twice, before and after loading the plugin.
I'd really appreciate some feedback to solve this problem.
Signed-off-by: David Calavera <da...@gmail.com>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/calavera/trafficserver stats_remap_plugin
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/732.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #732
----
commit 4266a6a880cb5cccaebe0ea4532f6794298a654f
Author: David Calavera <da...@gmail.com>
Date: 2016-06-22T16:58:52Z
[TS-4270] Make stats_over_http a remap plugin.
Validate ACL before calling the plugin, so it can apply action rules.
For example:
map /_stats /_stats @plugin=stats_over_http.so @action=allow @src_ip=127.0.0.1
Signed-off-by: David Calavera <da...@gmail.com>
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #732: [TS-4270] Make stats_over_http a remap plugin.
Posted by calavera <gi...@git.apache.org>.
Github user calavera commented on the issue:
https://github.com/apache/trafficserver/pull/732
I'll try following the generator example to see if I can make this better.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request #732: [TS-4270] Make stats_over_http a remap plug...
Posted by calavera <gi...@git.apache.org>.
Github user calavera closed the pull request at:
https://github.com/apache/trafficserver/pull/732
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #732: [TS-4270] Make stats_over_http a remap plugin.
Posted by calavera <gi...@git.apache.org>.
Github user calavera commented on the issue:
https://github.com/apache/trafficserver/pull/732
Sorry, I dropped the ball here. I'm currently really busy and I don't know when I'll have time to pick this up again. I'm going to close it to avoid having something open forever.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #732: [TS-4270] Make stats_over_http a remap plugin.
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:
https://github.com/apache/trafficserver/pull/732
@calavera Let me know if I can help with anything.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #732: [TS-4270] Make stats_over_http a remap plugin.
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:
https://github.com/apache/trafficserver/pull/732
I'd have to think about this. Fwiw, the way I had envisioned to rewrite this is to change it to a TxnServer intercept, instead of a Txn intercept. If you look at e.g. the generator plugin (which works as a remap plugin), you can see how that works. You basically add the server intercept only per remap basis, and no longer a global intercept.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---