Daniel Wisnewski opened 8 years ago
|
|
%kobit Which option we should use? Or maybe we should protect this page in other way? |
|
Summary of discussion from MUC room. We need to:
|
|
I reworked this authentication mechanism, however I slightly changed our decisions as I found that protection mechanism was implemented in task #2101. So I merged our ideas from both tasks. Here is how it will work:
Value is stored in entry with key
I decided to support this as code was already in place. Default username is %kobit Do you agree on this mechanism or I should change it? If you agree pass this task to %daniel so he could test it and update documentation. |
|
Looks good to me, Daniel please proceed with documentation for this. |
|
Hi Andrezej, I want to run a few things by, the setup is not 100%, unless we want to change our approach. A few scenarios I ran with the new system. Scenario 1: Setup Page access is granted to admin created during DB setup: This works OK, however I do get an error from Tigase:
This occurs regardless if correct or incorrect password is set. Scenario 2: Admin chooses to use a different user to give setup access, like config@domain.com. Setup page shows no errors. However log shows the following error:
Oddly even with this error, I can still connect using those credentials, and the user is in fact made. Scenario 3: init.properties is set to use a different user not in datbase
This scenario works just fine with or without database setup. It works, but seems a bit messy since the logs get jammed up a tad. Also, this one is for you and %kobit Do we want to highlight/mention the init.properties property at all? |
|
As for scenarios 1 and 2: This is same exception. I lowered log level of this exception from SEVERE to FINEST as it is properly handled. So there will be no entries like that. In case of usage user/admin credentials from database then user in database should already exist and to login you need to pass user bare jid - not just username as username. In scenario 2 you stated:
So user which was added to admins list was not in database before? If so how it was created? It should not be created. You also stated:
How log is jammed? with this exceptions reported above? If so, this will be fixed in next snapshot build. %daniel If for scenario 1 and 2 there will be any additional things to fix, please provide me with step by step, ie. I added user as admin by adding it to list of admins in setup page. As right now I'm not sure how you did few things, but I'm sure my current changes will fix issues reported (at least some of them) |
|
%andrzej.wojcik it looks like I had some of the intentions wrong, let me clarify. I had guessed (without reading) that the setup page access screen would provide for the creation of a new JID on the server. As you said this is incorrect. The errors are cleaned up, so that looks good. Is the setup access page intended to edit the init.properties file and add http/setup/admin-credentials=user:pass? If that is the case, the default username and password is removed, but the line is not added back with appropriate or any credentials. init.properties after setup shows following:
|
|
I think none of setup pages was intended to modify content of file directly, however modification on last page should work. This line should be added when you fill credentials with non empty and non default values in one of last steps (@Setup security@ if memory serves me right). In other cases line will be removed. |
|
The line is only removed, nothing is added regardless of what I put in the Setup Security Page. |
|
Ok, finally I've found cause of this issue. As I tested I had this line in my init.properties file with non-default values and in this case data was properly stored. However when I removed this line I simulated your case in which credentials where not added to init.properties file. Found cause of this issue and fixed it. Fix will be part of next snapshot build. |
|
functions as intended. Closing issue. |
Type |
Task
|
Priority |
Major
|
Assignee | |
RedmineID |
4272
|
Currently, the setup page is available after first-setup, allowing for possible configuration changes from unauthorized users.
We should provide a means to protect the /setup/ pages after new server setup.
Possible options:
Allowing access only from localhost, however this could cause some setup issues.
Use ad-hoc commands to open/close access.
Allow any entity to use setup pages, but lock access to localhost after first setup is finished.
Require API-Key or additoinal parameter to access page after first setup.
set a flag in init.properties, allow locking from option in /setup/.
other restrictions allowing only certain logins/names to access.