<div dir="ltr">Hi, <div><br></div><div>sorry for the delay: I missed the thread<div><br></div><div><br></div><div>the QGIS auth system was designed to work with the server, this comment in the code explains how to configure it, I'm not sure if this is documented somewhere else, if not, we should add a paragraph in the docs:</div><div><br></div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Initialize</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">authentication</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">system</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">creates</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">or</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">uses</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">qgis-auth.db</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">~/.qgis3/</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">or</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">directory</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">defined</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">by</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">QGIS_AUTH_DB_DIR_PATH</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">env</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">variable</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">set</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">master</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">password</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">as</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">first</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">line</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">of</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">file</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">defined</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">by</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">QGIS_AUTH_PASSWORD_FILE</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">env</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">variable</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">(QGIS_AUTH_PASSWORD_FILE</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">variable</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">removed</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">from</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">environment</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">after</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">accessing)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div><div><br></div><div>Hope this helps.<br><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 6, 2018 at 8:34 PM Andreas Neumann <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Thomas,</p>
<p>Does it work now?</p>
<p>It might also be a different issue. It might be an authentication
issue. If you used authentication manager and don't store the
login and password in the QGIS project file, there may be issues.
In that case you also have to do something (I don't know exactly
what) to enable authentication manager on QGIS server to read the
credentials. I also wonder how to handle such cases. For that
reason, I still store the login name and password in the qgs
project files, instead of using the authentication manager.</p>
<p>If this is the case, maybe Alessandro can help?</p>
<p>Greetings,</p>
<p>Andreas<br>
</p>
<br>
<div class="m_1049297965647496868moz-cite-prefix">Am 06.09.2018 um 15:32 schrieb Etienne
Trimaille:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">Either use PGSERVICEFILE or put it
/etc/postgresql-common/pg_service.conf. It's working well for
me with QGIS 2.18.23.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">Le jeu. 6 sept. 2018 à 07:55, Jürgen E. Fischer
<<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Thomas,<br>
<br>
On Thu, 06. Sep 2018 at 13:44:40 +0200, Thomas Schüttenberg
wrote:<br>
> Yes, I did that. The environment variable PGSYSCONFDIR is
set also on the<br>
> server machine, it points to the same connection file and
it works: QGIS on<br>
> the server pc can load layers with this service
parameter.<br>
<br>
PGSERVICEFILE? <br>
<br>
<br>
Jürgen<br>
<br>
-- <br>
Jürgen E. Fischer norBIT GmbH Tel.
+49-4931-918175-31<br>
Dipl.-Inf. (FH) Rheinstraße 13 Fax.
+49-4931-918175-50<br>
Software Engineer D-26506 Norden <a href="http://www.norbit.de" rel="noreferrer" target="_blank">http://www.norbit.de</a><br>
QGIS release manager (PSC) Germany IRC:
jef on FreeNode<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
</div>
<br>
<fieldset class="m_1049297965647496868mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Qgis-user mailing list
<a class="m_1049297965647496868moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
List info: <a class="m_1049297965647496868moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="m_1049297965647496868moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>