[opensuse-factory] openQA what authorization for /usr/share/openqa/script/client
I previously installed openQA in a ppc64le host as per doc in (1) and was able to trigger jobs with the /usr/share/openqa/script/client BUT this is only working for session of "_openqa-worker" id If I try to issue the command with my default owner id, then it failed as reported in (2) What is expected setup to have an id to be authorized to use the client script ? (1) https://github.com/os-autoinst/openQA/blob/master/docs/GettingStarted.asciid... https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc (2) failure with my onwer id: === [michel@abanc:] /var/lib/openqa/script/client isos post ISO=openSUSE-Tumbleweed-DVD-ppc64-Snapshot20160917-Media.iso DISTRI=opensuse VERSION=Tumbleweed FLAVOR=DVD ARCH=ppc64 BUILD=20160917 missing apisecret and/or apikey at /var/lib/openqa/script/client line 144. ERROR: 403 - Forbidden { error => "no api key" } === -- Michel Normand -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi Mormand
On 30 September 2016 at 11:07, Normand
I previously installed openQA in a ppc64le host as per doc in (1) and was able to trigger jobs with the /usr/share/openqa/script/client BUT this is only working for session of "_openqa-worker" id
If I try to issue the command with my default owner id, then it failed as reported in (2)
What is expected setup to have an id to be authorized to use the client script ?
All openQA clients need to have their /etc/openqa/client.conf documented just as we have in the workers section of https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc. The relevant section is copied below: "You need to log into openQA as operator and create a pair of API key and secret. Once you are logged in, follow the link manage API keys in the top right corner. Click the create button to generate key and secret. There is also a script available for creating an admin user and an API key+secret pair non-interactively, /usr/share/openqa/script/create_admin, which can be useful for scripted deployments of openQA. Copy and paste the key and secret into /etc/openqa/client.conf on the machine(s) where the worker is installed. Make sure to put in a section reflecting your webserver URL. In the simplest case, your client.conf may look like this: [localhost] key = 0123456789ABCDEF secret = 0123456789ABCDEF " Hope this helps
(1) https://github.com/os-autoinst/openQA/blob/master/docs/GettingStarted.asciid... https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc
(2) failure with my onwer id: === [michel@abanc:] /var/lib/openqa/script/client isos post ISO=openSUSE-Tumbleweed-DVD-ppc64-Snapshot20160917-Media.iso DISTRI=opensuse VERSION=Tumbleweed FLAVOR=DVD ARCH=ppc64 BUILD=20160917 missing apisecret and/or apikey at /var/lib/openqa/script/client line 144. ERROR: 403 - Forbidden { error => "no api key" } ===
-- Michel Normand
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Friday 30 September 2016 11:16:36 Richard Brown wrote:
Hi Mormand
On 30 September 2016 at 11:07, Normand
wrote: I previously installed openQA in a ppc64le host as per doc in (1) and was able to trigger jobs with the /usr/share/openqa/script/client BUT this is only working for session of "_openqa-worker" id
If I try to issue the command with my default owner id, then it failed as reported in (2)
What is expected setup to have an id to be authorized to use the client script ?
All openQA clients need to have their /etc/openqa/client.conf […]
The recommended way is actually to have a personalized configuration file. It seems the documentation is lacking in this regard. Please see my proposal here: https://github.com/os-autoinst/openQA/pull/915 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On pátek 30. září 2016 11:07:19 CEST Normand wrote: > I previously installed openQA in a ppc64le host as per doc in (1) and > was able to trigger jobs with the /usr/share/openqa/script/client > BUT this is only working for session of "_openqa-worker" id > > If I try to issue the command with my default owner id, then it failed > as reported in (2) > > What is expected setup to have an id to be authorized to use the client > script ? 1) Using openQA WebUI create API keys - this you probably already did. 2) put those keys to either /etc/openqa/client.conf or ~/.config/openqa/ client.conf in format [$host] key = $your_key secret = $your_secret Do note that you need to use the same $host in client.conf and client script. ie. if you use '[openqa.somedomain.ex]', you need to use `--host openqa.somedomain.ex` in client script call. In your example you didn't provide --host option to client script thus it assumed host to be "localhost" -> You need to have [localhost] section in client.conf with appropriate keys. > > (1) > https://github.com/os-autoinst/openQA/blob/master/docs/GettingStarted.asciid > oc > > https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc > > (2) failure with my onwer id: > === > [michel@abanc:] > /var/lib/openqa/script/client isos post > ISO=openSUSE-Tumbleweed-DVD-ppc64-Snapshot20160917-Media.iso > DISTRI=opensuse VERSION=Tumbleweed FLAVOR=DVD ARCH=ppc64 BUILD=20160917 > missing apisecret and/or apikey at /var/lib/openqa/script/client line 144. > ERROR: 403 - Forbidden > { error => "no api key" } > ===
On 30/09/2016 11:23, Ondrej Holecek wrote: > On pátek 30. září 2016 11:07:19 CEST Normand wrote: >> I previously installed openQA in a ppc64le host as per doc in (1) and >> was able to trigger jobs with the /usr/share/openqa/script/client >> BUT this is only working for session of "_openqa-worker" id >> >> If I try to issue the command with my default owner id, then it failed >> as reported in (2) >> >> What is expected setup to have an id to be authorized to use the client >> script ? > 1) Using openQA WebUI create API keys - this you probably already did. > 2) put those keys to either /etc/openqa/client.conf or ~/.config/openqa/ > client.conf in format > > [$host] > key = $your_key > secret = $your_secret Thank you Ondrej, the second point was my missing part. > > Do note that you need to use the same $host in client.conf and client script. > ie. if you use '[openqa.somedomain.ex]', you need to use `--host > openqa.somedomain.ex` in client script call. > > In your example you didn't provide --host option to client script thus it > assumed host to be "localhost" -> You need to have [localhost] section in > client.conf with appropriate keys. Yes, I understand, my current tests are basic ones, using same host for server and workers. > >> >> (1) >> https://github.com/os-autoinst/openQA/blob/master/docs/GettingStarted.asciid >> oc >> >> https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc >> >> (2) failure with my onwer id: >> === >> [michel@abanc:] >> /var/lib/openqa/script/client isos post >> ISO=openSUSE-Tumbleweed-DVD-ppc64-Snapshot20160917-Media.iso >> DISTRI=opensuse VERSION=Tumbleweed FLAVOR=DVD ARCH=ppc64 BUILD=20160917 >> missing apisecret and/or apikey at /var/lib/openqa/script/client line 144. >> ERROR: 403 - Forbidden >> { error => "no api key" } >> === > -- Michel Normand -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (4)
-
Normand
-
Oliver Kurz
-
Ondrej Holecek
-
Richard Brown