<div dir="ltr">Hi Tim,<div class="gmail_extra">
<br><div class="gmail_quote">On Mon, Sep 28, 2015 at 12:20 PM, Tim Sutton <span dir="ltr"><<a href="mailto:tim@kartoza.com" target="_blank">tim@kartoza.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi<div><br></div><div>By the way I will use your response and snippets from this thread to create the visual changeling entry. Hope that is ok!</div></div></blockquote><div><br></div><div><div class="gmail_extra">Sure. You can also pilfer the user documentation, as referenced in the QEP [0]. It was the in-house doc for the Boundless version that was focused on PKI, but still gives a pretty good overview of the user's perspective on working with the system. (Oh so snazzy Win 10 screen snaps as well!)</div><div class="gmail_extra"><br></div><div class="gmail_extra">The Authentication section of Options has graphically changed, but that's about it, beyond the screen snap in this thread.</div><div class="gmail_extra"><br></div><div class="gmail_extra">[0] <a href="https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/extras/auth-system/pkiuser.rst">https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/extras/auth-system/pkiuser.rst</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,<br clear="all"><div><div class="gmail_signature"><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div></div></div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Regards</div><span class=""><font color="#888888"><div><br></div></font></span><div><span class=""><font color="#888888">Tim<br></font></span><div><blockquote type="cite"><span class=""><div>On 26 Sep 2015, at 20:51, Larry Shaffer <<a href="mailto:larrys@dakotacarto.com" target="_blank">larrys@dakotacarto.com</a>> wrote:</div><br></span><div><div class="h5"><div><div dir="ltr">Forgot the attachment:<div><a href="http://drive.dakotacarto.com/qgis/auth-edit-authcfg-id.png" target="_blank">http://drive.dakotacarto.com/qgis/auth-edit-authcfg-id.png</a></div><div><br></div><div>That shows editing the auth config ID in the config editing widget, which can also be accessed from an auth config selector widget's Edit button. The selector is what would generally be the only widget needed in plugins or standalone apps for users to access and work with the auth system. You can see the selector embedded in the PostGIS and OWS service connection dialogs.</div><div><br></div><div>Once a plugin has an auth config ID it just calls to QgsAuthManager, passing the ID, to 'expand' the auth config where needed, in a QNetworkRequest object for example. The auth method plugin associated with the config then manages what credentials gets expanded and how, after QgsAuthManager marshals a call to the plugin.</div><div><br></div><div>Looks like I need to get busy finishing the auth system overview Lucidchart diagram I started!  :^)</div><div><div><div class="gmail_extra"><div><div><br></div><div>Regards,</div><div><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div></div>
<br><div class="gmail_quote">On Sat, Sep 26, 2015 at 12:04 PM, Larry Shaffer <span dir="ltr"><<a href="mailto:larrys@dakotacarto.com" target="_blank">larrys@dakotacarto.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Tim,<div class="gmail_extra">
<br><div class="gmail_quote"><span>On Sat, Sep 26, 2015 at 2:33 AM, Tim Sutton <span dir="ltr"><<a href="mailto:tim@kartoza.com" target="_blank">tim@kartoza.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Larry<div><br></div><div><br></div><div>Great to see this new feature make its way into QGIS. One thing I am curious about is what happens when we want to publish a project in QGIS server. What is the standard workflow for that or similar situations (e.g. shared project stored on a network drive?</div></div></blockquote><div><br></div></span><div>For shared project scenarios, including the network drive setup, you can edit the authentication configuration ID to something that is shared across users. (Thanks to Nyall for pointing out that this, and the Handle Bad Layers dialog, needed solved before feature freeze. [0])</div><div><br></div><div>Since the authcfg ID is embedded in the project file, each user just needs to make an auth config that has their specific credentials for that resource, then edit the ID (upon creation or config or after) to the same ID in the project file. Then, when when the resource loads, the same configuration will be queried on everyone's QGIS, just with their respective credentials for the authentication method used.</div><div><br></div><div>With the very last feature I added, for the Handle Bad Layers dialog, users can Add/Edit/Remove auth configs within the dialog and have the data source URI updated to match. So, in the scenario of a shared project, the user could immediately add an appropriate new auth config (and see exactly what shared authcfg ID should be used) upon project loading .</div><div><br></div><div>Also, see the discussion in the PR about other sharing scenarios, and how the unimplemented Resource URL could help here  [1].</div><div><br></div><div>Regarding the QGIS Server launch, I think a good fix would be to add support for passing the master password as an environment variable to a password file, like is done with Postgres and other setups. For example, an env var like QGIS_AUTH_PASSWORD_PATH could be set to a filepath. In QgsAuthManager::instance()->init() the variable could be read, password loaded, then the variable unset in the env. This would also make a great way to allow using Desktop without having to enter your master password every session.</div><div><br></div><div>Similarly, the master password could be in an OS's keychain or keyring and be auto-input in the background on launch if that user's OS key cache is unlocked. See Matthias's suggestion for that [2].</div><div><br></div><div>Currently, the master password auto-set can be set via Python, or by way of a custom C++ plugin, on launch setups using a call to QgsAuthManager::instance()->setMasterPassword( "mypassword", true ). However, I think many of the Python bindings should be blocked for the initial release. So, setting an env variable to a password file path seems like a good start, especially for QGIS Server.</div><div><br></div><div>Note: for Server, you can also use QGIS_AUTH_DB_DIR_PATH to set the path to a qgis-auth.db dir on the server.</div>
<div><br></div><div>[0] <a href="https://github.com/qgis/QGIS/pull/2330#issuecomment-142252072" target="_blank">https://github.com/qgis/QGIS/pull/2330#issuecomment-142252072</a></div><div>[1] <a href="https://github.com/qgis/QGIS/pull/2330#issuecomment-142673812" target="_blank">https://github.com/qgis/QGIS/pull/2330#issuecomment-142673812</a></div><div>[2] <a href="https://github.com/qgis/QGIS/pull/1838#issuecomment-70845116" target="_blank">https://github.com/qgis/QGIS/pull/1838#issuecomment-70845116</a></div><div>[3] <a href="https://github.com/qgis/QGIS/blob/master/src/core/auth/qgsauthmanager.h#L105-L110" target="_blank">https://github.com/qgis/QGIS/blob/master/src/core/auth/qgsauthmanager.h#L105-L110</a></div><div><div><div><br></div><div>Regards,</div><div><br></div><div>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Regards</div><div><br></div><div>Tim</div><div><div><div><br><div><blockquote type="cite"><div>On 25 Sep 2015, at 14:59, Larry Shaffer <<a href="mailto:larrys@dakotacarto.com" target="_blank">larrys@dakotacarto.com</a>> wrote:</div><br><div><div dir="ltr">Hi devs,<div><br></div>As you can see in the PR [0], I've fixed up some things, including adding the ability to edit an authentication ID, which will help with workflows where users need to share projects. I've also cleaned up the interface and moved most PKI-related dialogs out of the main Options view.<br><br>I am working on another widget that can be used for the Handle Bad Layers and the Layers Properties dialogs. That should work for most issues occurring when sharing projects and when users open projects with missing authentication IDs. I've also added feedback in the selector widget when it tries to load a config ID that is missing.<br><br>I should have those bits done today, then it's mostly work on finishing the unit test migration to C++.<br><br>**However, I would like to merge this now, since it is in a very good state for doing so. Does anyone have objections with me merging this?**<div><br><div class="gmail_extra"><br></div><div class="gmail_extra">[0] <a href="https://github.com/qgis/QGIS/pull/2330" target="_blank">https://github.com/qgis/QGIS/pull/2330</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,<br clear="all"><div><div><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div></div><div><br></div>
<br><div class="gmail_quote">On Wed, Sep 23, 2015 at 4:38 AM, Luca Manganelli <span dir="ltr"><<a href="mailto:luca76@gmail.com" target="_blank">luca76@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On Tue, Sep 22, 2015 at 10:02 PM, Régis Haubourg<br>
<<a href="mailto:regis.haubourg@eau-adour-garonne.fr" target="_blank">regis.haubourg@eau-adour-garonne.fr</a>> wrote:<br>
> Wooooh. that's huge work Larry. Will need quite some time to inspect all that<br>
> and give some feedback. Any way , bravo!<br>
> Régis<br>
<br>
</span>+1. The documentation is a MASSIVE job. Compliments!<br>
<div><div>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></div></blockquote></div><br></div></div></div>
_______________________________________________<br>Qgis-developer mailing list<br><a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></blockquote></div><br></div></div><div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><span>—</span></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><span><br></span></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><span><img height="66" width="160"></span><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><br><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center">Tim Sutton</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="text-align:center">Visit <a href="http://kartoza.com/" target="_blank">http://kartoza.com</a> to find out about open source:</div><div style="text-align:center"><br></div><div><div style="text-align:center">* Desktop GIS programming services</div><div style="text-align:center">* Geospatial web development</div><div style="text-align:center">* GIS Training</div><div style="text-align:center">* Consulting Services</div><div style="text-align:center"><br></div><div><div style="text-align:center">Skype: timlinux Irc: timlinux on #qgis at <a href="http://freenode.net/" target="_blank">freenode.net</a></div><div style="text-align:center">Tim is a member of the QGIS Project Steering Committee</div><div style="text-align:center"><br></div><div style="text-align:center">Kartoza is a merger between Linfiniti and Afrispatial</div></div></div></div>
</span></div>
<br></div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div></div></div>
_______________________________________________<br>Qgis-developer mailing list<br><a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></div></div></blockquote></div><div><div class="h5"><br><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><span>—</span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><span><br></span></div><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><span><img height="66" width="160"></span><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><br><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center">Tim Sutton</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-align:center"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="text-align:center">Visit <a href="http://kartoza.com" target="_blank">http://kartoza.com</a> to find out about open source:</div><div style="text-align:center"><br></div><div><div style="text-align:center">* Desktop GIS programming services</div><div style="text-align:center">* Geospatial web development</div><div style="text-align:center">* GIS Training</div><div style="text-align:center">* Consulting Services</div><div style="text-align:center"><br></div><div><div style="text-align:center">Skype: timlinux Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a></div><div style="text-align:center">Tim is a member of the QGIS Project Steering Committee</div><div style="text-align:center"><br></div><div style="text-align:center">Kartoza is a merger between Linfiniti and Afrispatial</div></div></div></div>
</span></div>
<br></div></div></div></div></blockquote></div><br></div></div>