[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 125641: Allow PAM unlocking of a running wallet
From:       "Valentin Rusu" <valir () kde ! org>
Date:       2015-11-06 22:19:52
Message-ID: 20151106221952.24343.83752 () mimi ! kde ! org
[Download RAW message or body]

--===============6527089751498638780==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125641/#review88114
-----------------------------------------------------------

Ship it!


Ship It!

- Valentin Rusu


On Oct. 16, 2015, 4:52 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125641/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2015, 4:52 p.m.)
> 
> 
> Review request for KDE Frameworks and Valentin Rusu.
> 
> 
> Repository: kwallet
> 
> 
> Description
> -------
> 
> A use-case: kwallet gets locked with lockscreen, eg. on Plasma Mobile, unlocking \
> the screen would also unlock kwallet through PAM. 
> Another use-case: automatic login that shows lockscreen after booting, unlocking \
> that session would also unlock kwallet through PAM. 
> This requires a small change in kwallet-pam.
> 
> Now to the patch itself. When a user authenticates via lockscreen, PAM can start \
> the kwalletd process and pass the auth hash token to it. In case the kwalletd \
> process is already running, this patch would check if the wallet is opened and if \
> not, it would pass the PAM hash token over dbus to the running kwallet instance \
> which would unlock the running wallet. If it is unlocked, nothing would happen. 
> I originally didn't want to pass it over dbus, but in the end it doesn't matter \
> because as soon as the session is unlocked (at this point the hash is sent), the \
> wallet would be unlocked and a possible attacker would have access to its data \
> anyway. But I'm open to suggestions on improvements. 
> 
> Diffs
> -----
> 
> src/runtime/kwalletd/main.cpp fbab58d 
> 
> Diff: https://git.reviewboard.kde.org/r/125641/diff/
> 
> 
> Testing
> -------
> 
> I've created a special PAM profile which has
> 
> auth   optional        pam_kwallet5.so lockscreen kwalletd=/opt/kde5/bin/kwalletd5
> 
> ran kcheckpass -c myprofile and kwallet5 got started and unlocked. Then I locked \
> the wallet using kwalletmanager5, ran kcheckpass -c myprofile again and the running \
> kwallet5 instance got unlocked. 
> 
> Thanks,
> 
> Martin Klapetek
> 
> 


--===============6527089751498638780==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/125641/">https://git.reviewboard.kde.org/r/125641/</a>
  </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>  <br />









<p>- Valentin Rusu</p>


<br />
<p>On October 16th, 2015, 4:52 p.m. UTC, Martin Klapetek wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks and Valentin Rusu.</div>
<div>By Martin Klapetek.</div>


<p style="color: grey;"><i>Updated Oct. 16, 2015, 4:52 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kwallet
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">A use-case: kwallet gets locked with lockscreen, eg. \
on Plasma Mobile, unlocking the screen would also unlock kwallet through PAM.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Another use-case: automatic login that shows lockscreen after booting, \
unlocking that session would also unlock kwallet through PAM.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This \
requires a small change in kwallet-pam.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Now to the patch \
itself. When a user authenticates via lockscreen, PAM can start the kwalletd process \
and pass the auth hash token to it. In case the kwalletd process is already running, \
this patch would check if the wallet is opened and if not, it would pass the PAM hash \
token over dbus to the running kwallet instance which would unlock the running \
wallet. If it is unlocked, nothing would happen.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
originally didn't want to pass it over dbus, but in the end it doesn't matter because \
as soon as the session is unlocked (at this point the hash is sent), the wallet would \
be unlocked and a possible attacker would have access to its data anyway. But I'm \
open to suggestions on improvements.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I've created a special PAM profile which has</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">auth   optional        pam_kwallet5.so lockscreen \
kwalletd=/opt/kde5/bin/kwalletd5</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">ran kcheckpass -c \
myprofile and kwallet5 got started and unlocked. Then I locked the wallet using \
kwalletmanager5, ran kcheckpass -c myprofile again and the running kwallet5 instance \
got unlocked.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/runtime/kwalletd/main.cpp <span style="color: grey">(fbab58d)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/125641/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============6527089751498638780==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic