<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="693108">
  <date_last_updated>2011-03-12 16:29:54.445567+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/693108</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~olafvdspek</bug_owner_link>
    <milestone_link></milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/693108/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/693108/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/693108</bug_web_link>
  <owner>Olaf van der Spek</owner>
  <assignee>Sergei</assignee>
  <milestone_title></milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Authenticate by Linux system account</title>
  <status>Fix Released</status>
  <importance>Wishlist</importance>
  <created>2010-12-21 17:37:03.877648+00:00</created>
  <description>
<![CDATA[Could you add an option where the MySQL server does authentication by the Linux system
account of the other end of the (local) connection?

This will only work for local connections, but is very handy. Passwords would no longer
be needed, making it both more secure and easier.

In addition to user name/password, the privilege tables should contain a unix_account
column.

http://bugs.mysql.com/bug.php?id=49940]]>  </description>
  <activities>
    <activity datechanged="2010-12-21T17:37:03.877648+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Olaf van der Spek</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2010-12-21T18:06:31.439347+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[http://bugs.mysql.com/bug.php?id=49940]]>      </newvalue>
      <whatchanged>bug watch added</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2010-12-22T12:08:19.870903+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2010-12-22T12:08:25.288287+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Wishlist]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2010-12-23T23:02:00.084865+00:00">
      <oldvalue>
<![CDATA[Fix Released]]>      </oldvalue>
      <newvalue>
<![CDATA[New]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Olaf van der Spek</person>
      <message></message>
    </activity>
    <activity datechanged="2011-01-10T20:37:17.773921+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-01-10T20:37:26.236759+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Sergei (sergii)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-01-13T13:55:32.349215+00:00">
      <oldvalue>
<![CDATA[Fix Released]]>      </oldvalue>
      <newvalue>
<![CDATA[New]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Olaf van der Spek</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-09T10:07:22.681944+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-12T15:28:58.726100+00:00">
      <oldvalue>
<![CDATA[Fix Released]]>      </oldvalue>
      <newvalue>
<![CDATA[New]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Olaf van der Spek</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-12T15:29:30.824920+00:00">
      <oldvalue>
<![CDATA[Authenticate by Linux system account]]>      </oldvalue>
      <newvalue>
<![CDATA[System -> DB account mapping]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>Olaf van der Spek</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-12T16:17:09.203564+00:00">
      <oldvalue>
<![CDATA[System -> DB account mapping]]>      </oldvalue>
      <newvalue>
<![CDATA[Authenticate by Linux system account]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-03-12T16:17:14.389509+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/1" datecreated="2010-12-21T18:05:50+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: [Bug 693108] [NEW] Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[Hi, Olaf!

On Dec 21, Olaf van der Spek wrote:
> Could you add an option where the MySQL server does authentication by the Linux system
> account of the other end of the (local) connection?
> 
> This will only work for local connections, but is very handy. Passwords would no longer
> be needed, making it both more secure and easier.
> 
> In addition to user name/password, the privilege tables should contain a unix_account
> column.
> 
> http://bugs.mysql.com/bug.php?id=49940
> 

This is already implemented in 5.2.
See http://kb.askmonty.org/v/development-pluggable-authentication
and socket_peercred plugin therein

Regards,
Sergei

P.S. I see you really started moving feature requests from mysql bugdb
to mariadb. First update select, now this :)]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/2" datecreated="2010-12-21T18:41:12+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Tue, Dec 21, 2010 at 7:05 PM, Sergei <693108@bugs.launchpad.net> wrote:
> This is already implemented in 5.2.
> See http://kb.askmonty.org/v/development-pluggable-authentication
> and socket_peercred plugin therein

Where are the socket_peercred docs?

> P.S. I see you really started moving feature requests from mysql bugdb
> to mariadb. First update select, now this :)

Hehe. Makes sense, doesn't it?

Olaf]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/3" datecreated="2010-12-22T12:07:22+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[Hi, Olaf!

On Dec 21, Olaf van der Spek wrote:
> On Tue, Dec 21, 2010 at 7:05 PM, Sergei <693108@bugs.launchpad.net> wrote:
> > This is already implemented in 5.2.
> > See http://kb.askmonty.org/v/development-pluggable-authentication
> > and socket_peercred plugin therein
> 
> Where are the socket_peercred docs?

Same page. Did you look at it at all, or you just asking to keep the
thread going? :)

Regards,
Sergei]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/4" datecreated="2010-12-22T19:19:24+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Wed, Dec 22, 2010 at 1:07 PM, Sergei <693108@bugs.launchpad.net> wrote:
> Hi, Olaf!
>
> On Dec 21, Olaf van der Spek wrote:
>> On Tue, Dec 21, 2010 at 7:05 PM, Sergei <693108@bugs.launchpad.net> wrote:
>> > This is already implemented in 5.2.
>> > See http://kb.askmonty.org/v/development-pluggable-authentication
>> > and socket_peercred plugin therein
>>
>> Where are the socket_peercred docs?
>
> Same page. Did you look at it at all, or you just asking to keep the
> thread going? :)

I had seen the page before I submitted the feature request.
I expected a page or at least a section dedicated to the plugin.
For example, I have no idea how to install the plugin.
I also don't see how to setup system account -> db account mapping,
but it seems this isn't possible.

The bit about socket_peercred seemed just an example of the auth
plugin system to me, not as documentation of socket_peercred itself.

Olaf]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/5" datecreated="2010-12-27T18:56:41+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[Hi, Olaf!

On Dec 22, Olaf van der Spek wrote:
> On Wed, Dec 22, 2010 at 1:07 PM, Sergei <693108@bugs.launchpad.net> wrote:
> > Hi, Olaf!
> >
> > On Dec 21, Olaf van der Spek wrote:
> >> On Tue, Dec 21, 2010 at 7:05 PM, Sergei <693108@bugs.launchpad.net> wrote:
> >> > This is already implemented in 5.2.
> >> > See http://kb.askmonty.org/v/development-pluggable-authentication
> >> > and socket_peercred plugin therein
> >>
> >> Where are the socket_peercred docs?
> >
> > Same page. Did you look at it at all, or you just asking to keep the
> > thread going? :)
> 
> I had seen the page before I submitted the feature request.
> I expected a page or at least a section dedicated to the plugin.
> For example, I have no idea how to install the plugin.
> I also don't see how to setup system account -> db account mapping,
> but it seems this isn't possible.
> 
> The bit about socket_peercred seemed just an example of the auth
> plugin system to me, not as documentation of socket_peercred itself.

Hmm, I see.
I could add a page dedicated to socket_peercred, yes.

But it won't explain how to install it - it's documented here:
http://dev.mysql.com/doc/refman/5.5/en/install-plugin.html
And it won't talk about mapping, because socket_peercred cannot do that
in particular, and authentication plugins should not do that in general -
mapping is completely unrelated to authentication.

Still, if it is considered useful, I can copy the relevant part of the
http://kb.askmonty.org/v/development-pluggable-authentication page to
a special socket_peercred dedicated page.

Regards,
Sergei]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/6" datecreated="2010-12-28T17:36:27+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Mon, Dec 27, 2010 at 7:56 PM, Sergei <693108@bugs.launchpad.net> wrote:
> I could add a page dedicated to socket_peercred, yes.
>
> But it won't explain how to install it - it's documented here:
> http://dev.mysql.com/doc/refman/5.5/en/install-plugin.html

A link to that page would be nice. Although peercred is so useful that
it should be installed by default.

> And it won't talk about mapping, because socket_peercred cannot do that
> in particular, and authentication plugins should not do that in general -
> mapping is completely unrelated to authentication.

Why?
Normally, I can supply any user/pass I want. With peercred, I would
suddenly be restricted to a single MySQL user? That doesn't make
sense.
IMO mapping system -> MySQL account would be very useful.

>
> http://kb.askmonty.org/v/development-pluggable-authentication page to
> a special socket_peercred dedicated page.

I think that should be done.

Olaf]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/7" datecreated="2011-01-10T20:41:11.270078+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[done.
http://kb.askmonty.org/v/socket_peercred-authentication-plugin]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/8" datecreated="2011-01-10T20:54:27+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Mon, Jan 10, 2011 at 9:41 PM, Sergei <693108@bugs.launchpad.net> wrote:
> done.

Don't forget #6.
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/9" datecreated="2011-01-10T21:45:32.513980+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[what do you mean? add a link to how to use it?
there's link to pluggable auth page, it's enough, I think.

install by default? probably not just yet, may be later.

mapping? no, it's not part of the plugin, it does not belong to that layer.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/10" datecreated="2011-01-10T22:01:54+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Mon, Jan 10, 2011 at 10:45 PM, Sergei <693108@bugs.launchpad.net> wrote:
> what do you mean? add a link to how to use it?

A link to install-plugin.html

> there's link to pluggable auth page, it's enough, I think.
>
> install by default? probably not just yet, may be later.
>
> mapping? no, it's not part of the plugin, it does not belong to that
> layer.

What layer does it belong to?

Olaf
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/11" datecreated="2011-01-12T10:43:45+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[Hi, Olaf!

On Jan 10, Olaf van der Spek wrote:
> On Mon, Jan 10, 2011 at 10:45 PM, Sergei <693108@bugs.launchpad.net> wrote:
> > what do you mean? add a link to how to use it?
> 
> A link to install-plugin.html

done.

> > mapping? no, it's not part of the plugin, it does not belong to that
> > layer.
> 
> What layer does it belong to?

To the server. Mapping should happen after the plugin has authenticated
he user. If we'd start implementing mapping *in the plugins* (like
Oracle started doing), we'd have to implement it in *every* plugin
(again, like Oracle has to do now). And if something has to be done in
every plugin - it's a sign that this functionality belongs to no plugin
in particular, it's not a plugin specific feature. It should be done
in the server.

Regards,
Sergei
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/12" datecreated="2011-01-12T16:27:53+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Wed, Jan 12, 2011 at 11:43 AM, Sergei <693108@bugs.launchpad.net> wrote:
>> > mapping? no, it's not part of the plugin, it does not belong to that
>> > layer.
>>
>> What layer does it belong to?
>
> To the server. Mapping should happen after the plugin has authenticated
> he user. If we'd start implementing mapping *in the plugins* (like
> Oracle started doing), we'd have to implement it in *every* plugin
> (again, like Oracle has to do now). And if something has to be done in
> every plugin - it's a sign that this functionality belongs to no plugin
> in particular, it's not a plugin specific feature. It should be done
> in the server.

The output of authentication is a MySQL user (from mysql.users). The
input varies and depends on the plugin.
Given that the server doesn't know about peercred details, how can it
do the mapping?

At the moment you assume a 1:1 mapping from system accounts to MySQL
accounts. An assumption that quite restricting and IMO invalid.

Olaf
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/13" datecreated="2011-03-09T10:19:29+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Wed, Mar 9, 2011 at 11:07 AM, Sergei <693108@bugs.launchpad.net> wrote:
> ** Changed in: maria
>       Status: New => Fix Released

Could you include a link?
And/or respond to the mapping issue?


-- 
Olaf
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/14" datecreated="2011-03-09T18:03:01.948993+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[you misunderstood :(
nothing else was implemented, besides what's already done.
I was simply going over old tickets, looking where we forgot to update the status.

The link was mentioned here:
https://bugs.launchpad.net/maria/+bug/693108/comments/7

To the mapping issue I responded here: 
https://bugs.launchpad.net/maria/+bug/693108/comments/11]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/15" datecreated="2011-03-09T18:13:44+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: [Bug 693108] Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[On Wed, Mar 9, 2011 at 7:03 PM, Sergei <693108@bugs.launchpad.net> wrote:
> you misunderstood :(
> nothing else was implemented, besides what's already done.
> I was simply going over old tickets, looking where we forgot to update the status.
>
> The link was mentioned here:
> https://bugs.launchpad.net/maria/+bug/693108/comments/7
>
> To the mapping issue I responded here:

https://bugs.launchpad.net/maria/+bug/693108/comments/12

Olaf
]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/16" datecreated="2011-03-12T16:18:47.756375+00:00">
      <person>Sergei</person>
      <subject>
<![CDATA[Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[No Olaf, please, let's not use one bug report for different things, renaming the synopsis.

I also want the mapping (although, I think it should be done on a different layer), but please, create a new bug report or, better, WL entry, instead of hijacking an existing one.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/693108/comments/17" datecreated="2011-03-12T16:29:53.831853+00:00">
      <person>Olaf van der Spek</person>
      <subject>
<![CDATA[Re: Authenticate by Linux system account]]>      </subject>
      <content>
<![CDATA[Sure: https://bugs.launchpad.net/maria/+bug/733893
Where do I create WL entries?]]>      </content>
    </comment>
  </comments>
</launchpad-bug>
