action #1798
closedBootstrap/install process
Description
In order to the system to be completely functional an operator user with a valid API key is needed in the database. We should probably provide a first-run wizard/script/whatever to setup everything.
Updated by alarrosa almost 11 years ago
- Target version changed from Sprint 04 to Sprint 05
Updated by lnussel almost 11 years ago
what is the exact plan here? I suppose a local script that accesses the database directly is the safest choice?
Updated by _miska_ almost 11 years ago
That is the fallback solution, my original plan was to detect first run of the application with uninitialized database and instead of script do web wizard setting stuff up - mainly as opportunity to figure out how Mojo works, also would be more convenient.
Updated by _miska_ almost 11 years ago
Ok, couldn't figure out how to tap into the web thing and discovered how ugly Perl is, so giving up for now, going with the simple script.
Updated by _miska_ almost 11 years ago
- Status changed from New to Feedback
Ok, implemented. First who logs into OpenQA while it doesn't have any Admin will became Admin.
Updated by _miska_ almost 11 years ago
- Status changed from Feedback to Resolved
Updated by lnussel almost 11 years ago
- Status changed from Resolved to In Progress
test case missing
Updated by _miska_ almost 11 years ago
Rewrote based on comments, will play with test case
Updated by _miska_ almost 11 years ago
To create the test, I would need to simulate OpenID. Tried playing with it, nothing usefull that I could decipher from OpenID package test-suite. Option would be to start slightly modified OpenID server on localhost and try to authenticate against it and make it part of the tests, but sounds like an overkill :-/
Could move check somewhere else but running it just after successful authentication makes sense. Elsewhere it would get run multiple times. Other option would be refactoring whole login process and moving account creation and permission setup out of OpenID handle. That would help us with testing, but not sure whether it is worth complicating things so much :-/
Updated by ancorgs almost 11 years ago
Now, the first user logging in gets admin superpowers. That partially fix the problem, but several manual steps in the web interface are still required to get a fully functional system (promoting a user to be operator, creating an API key, copying the key and secret in the proper file...). Can we really consider to issue to be 100% done?
Updated by _miska_ almost 11 years ago
- Status changed from In Progress to Resolved
Sent pull request for better version including tests. Newly created admin is operator as well. What is left is API key for which I will create an easy task (as discussed). So currently we can consider this done.