Project

General

Profile

action #1798

Bootstrap/install process

Added by ancorgs over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
Start date:
2014-03-05
Due date:
% Done:

100%

Estimated time:
6.00 h
Difficulty:

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.

History

#1 Updated by ancorgs over 8 years ago

  • Priority changed from Normal to High

#2 Updated by ancorgs over 8 years ago

  • Priority changed from High to Urgent

#3 Updated by alarrosa over 8 years ago

  • Target version set to Sprint 04

#4 Updated by alarrosa over 8 years ago

  • Target version changed from Sprint 04 to Sprint 05

#5 Updated by alarrosa over 8 years ago

  • Assignee set to _miska_

#6 Updated by lnussel over 8 years ago

what is the exact plan here? I suppose a local script that accesses the database directly is the safest choice?

#7 Updated by _miska_ over 8 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.

#8 Updated by _miska_ over 8 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.

#9 Updated by _miska_ over 8 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.

https://github.com/openSUSE-Team/openQA/pull/43

#10 Updated by _miska_ over 8 years ago

  • Status changed from Feedback to Resolved

#11 Updated by _miska_ over 8 years ago

  • % Done changed from 0 to 100

#12 Updated by lnussel over 8 years ago

  • Status changed from Resolved to In Progress

test case missing

#13 Updated by _miska_ over 8 years ago

Rewrote based on comments, will play with test case

#14 Updated by _miska_ over 8 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 :-/

#15 Updated by ancorgs over 8 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?

#16 Updated by _miska_ over 8 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.

Also available in: Atom PDF