Replies: 4 comments
-
Maybe you can help me. I'm having trouble accessing access by ip address. It seems that everything gets through pattern I use. This is in the web.xml under web-inf.
|
Beta Was this translation helpful? Give feedback.
-
@tmcmanamey In what servlet is this code ? (javamelody has a monitoring filter, which is often automatically installed without declaration in web.xml, but in general, javamelody has no servlet by itself) Perhaps you want to write instead: <context-param>
<param-name>javamelody.allowed-addr-pattern</param-name>
<param-value>10\.212\..*\..*</param-value>
</context-param> (note |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
@fredissy the authorized-users javamelody parameter or spring-security are probably more often used than the allowed-addr-pattern parameter. I understand that a CIDR range may be needed in your case to restrict to 32 allowed addresses and not to 1, 2 or 256 allowed addresses and that you need a list of CIDR ranges. The PR is probably ok for CIDR ranges as you need. But I don't think that it is worth the change in general, given complexity and maintenance added. |
Beta Was this translation helpful? Give feedback.
-
Hello,
We use Javamelody in my company's products, and we are happy about it.
However, the current implementation of access restriction regarding clients' IP adresses use a regexp mechanism. It works quite well for simple case, but we needed more fine grained setup here.
For example, I have to allow access to IP in range XX.92.109.0/27 (i.e. XX.92.109.0 to XX.92.109.31) among others. It might be possible to achieve it with a regular expression, but it's not that trivial. Hence I started working on a fork of Javamelody, that replaces the big regexp as input for allowed-addr-pattern by a list of IP or CIDR notation ranges.
I had opened a pull request some weeks ago for this feature, in addition to the current regexp mechanism, but it was quite confusing of having both settings available, so I closed it to rework the feature, only keeping the new setting.
What do you think about replacing the regexp mechanism in the original Javamelody with this new behaviour ?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions