-
Notifications
You must be signed in to change notification settings - Fork 8
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
Configuration placement is inconsistent through the project #27
Comments
I think the documentation should say, "If you want to define a different path for the configuration files add the parameter" rdapConfigurationUserPath "in the web.xml file" and then put an example of how to put the parameter in the xml file or simply Add in the xml file the parameters to be configured, disabled correctly, to be consistent with the documentation.
My opinion on how to read the settings is as follows.
Keep in mind that if the user sets a path to a directory to read the configuration, the configuration file should no longer be read in the default directory that the documentation indicates. (This is a personal comment, but we can always do that if there is no configuration in the path defined by the user, the rdap-server looks in the default folder defined in the documentation.) The configuration provided by the user will overwrite the values of the default configuration. I.e. If the user only overwrites a single parameter, the other parameters will retain their default values.
I Agree |
There is no doubt that the documentation above is a mess. So, will the user really use that feature? I think this can be kind of confussing.
My opinion is that the behavior should only consist of point 1 and 3 (together), in other words, load the default configuration, and then, rdap-server should read the configuration in the default location defined in the documentation (WEB-INF) looking for overwrited parameters, as @dhfelix said:
I think we should only give the users the option to write their configuration in the folder WEB-INF. |
Really? I was under the impression that you were the one who wanted this feature. Then who was? What was the point?
Yeah, I kind of feel that there is something inherently wrong about mixing the servlet context directory structure and the actual filesystem directory structure, which is what the help loading code is doing by querying the servlet context first and the filesystem second, using the same string. Perhaps an alternate solution would be to define two separate web.xml keys:
And the user would use whichever feels right and ignore the other. But perhaps there is no point in doing this at all. It all comes down to why we wanted to support absolute paths in the first place. Do we have an answer for that? |
Agree.
This will lead to confusion; we don't want to accidentally load values the user is explicitly telling us not to. |
Talking with @pcarana, we conclude that the way the application configuration should be read is as follows:
Users will not be able to configure where the application can read the configuration inside the rdap-server. |
Includes removing the lies detected in #27.
This documentation from "behavior-configuration" seems to be incorrect:
First, because the "rdapConfigurationUserPath" is not commented, this doesn't seem to be valid XML. Secondly, I could not find this code in the predefined web.xml so there was nothing to uncomment. Third, it seems that it was envisioned that the user would be able to enter an absolute path to whatever file anywhere, but this is not working: The code never actually queries the filesystem outside of the classpath and the servlet context.
So this is currently a seemingly pointless feature; one can redefine the configuration file, but only if it still is within the context.
response-privacy largely suffers from the same problems.
I think that this was the original vision for all the configuration:
ClassLoader#getResourceAsStream(String)
) to get default values.ServletContext#getResourceAsStream(String)
), and if that fails, try and fall back to find them elsewhere (Files#newInputStream(Path)
).ServletContext#getResourceAsStream(String)
).On the other hand, from reading the code, it seems like the situation is as follows:
In other words, configuration placement is a bit of a mess right now. We need to first agree on a standard and then follow it.
The text was updated successfully, but these errors were encountered: