Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K0zFM-0003Ai-MD for mharc-grub-devel@gnu.org; Tue, 27 May 2008 09:29:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0zFK-0003Aa-VJ for grub-devel@gnu.org; Tue, 27 May 2008 09:29:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0zFK-0003AO-E4 for grub-devel@gnu.org; Tue, 27 May 2008 09:29:46 -0400 Received: from [199.232.76.173] (port=51928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0zFK-0003AL-8k for grub-devel@gnu.org; Tue, 27 May 2008 09:29:46 -0400 Received: from wa-out-1112.google.com ([209.85.146.181]:52747) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0zFJ-0002QD-V4 for grub-devel@gnu.org; Tue, 27 May 2008 09:29:46 -0400 Received: by wa-out-1112.google.com with SMTP id m34so3171238wag.10 for ; Tue, 27 May 2008 06:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=35OXWAC+T7z4s/8KUA1S+KgMCIm6wP6hisZqgfT5jWU=; b=i+ZdrkWwFJ7NxmFZb2NpeChaSCZe4LPgCpDjTcTh3hHePDtlCwMtnYRV14ZKTSGoaQVNhLnzBaX9cRlnadEACf2FR6MpwrsOhLOIwzFvSxB/4u568hti9fGOwCncKA0Qvvu+dP1OzhO0C5HSG2dBN1Yd7IPGEZC+jrjFySt9Dv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lVW7MNbeNSF++pBY/l3ffqTfrNB2lLrr3+icD6IiRC1uqQhmBjNo2YJfwrKaRkHAWsWSSQpj6B0AMBaAtNWDyRJqK6o7IhufpmHPeWQdXuY8p/z5Mg6e+p7tNXCzmq7CPkT7I715vuLn3/rwNkHg8DBi6U6VY5SucWVI9iMwCws= Received: by 10.114.79.18 with SMTP id c18mr1300631wab.86.1211894983515; Tue, 27 May 2008 06:29:43 -0700 (PDT) Received: by 10.114.124.7 with HTTP; Tue, 27 May 2008 06:29:43 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 15:29:43 +0200 From: "Julien Ranc" To: "The development of GRUB 2" In-Reply-To: <48372C9C.9070005@nic.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <48372C9C.9070005@nic.fi> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [RFC] Grub2 lock and password implementation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 13:29:47 -0000 Here's an attempt to answer briefly your questions. I hope it will help you and others to have a better understanding of what I'm proposing. I'm looking for opinions on these examples : what is acceptable, what could be better supported, what needs changing, and so on. 1) smartcards This is a point I'd like to implement, once password/lock feature will be completed and USB support added. I was thinking of a module that would handle ISO 7816 compliant cards. This module could defer some work, if needed, to a card-specific driver, for example for PIN entry, etc. (like openSC for example uses multiple drivers for different cards) This module would require to specify, in case of RSA use: -=09the card ID -=09a reference to the key to be used for authentication -=09a reference to the public key, stored on hard drive This would lead to something like that: lock =96type iso7816 =96driver cardmodel =96cardname "my card" =96key_id 49 =96pubkey (hd0,0)/boot/key.pub The pseudo code for authentication function being something like that: Function authenticate_user =09While ( ! is_card_present( card_name ) ) { =09=09Ask_for_card( card_name ) =09} =09challenge =3D generate_random_text() =09sig =3D card_sign_data( challenge, key_id ) =09auth_result =3D check_signature( sig, public_key, challenge) } As for biometric sensors, I have no idea how it works, so I cannot plot a way to support it at that time. c) RFID verification I think this is about the same as for smartcards, identify user with the ID of his RFID dongle as read from RFID reader instead of smartcard name, and check simple password instead of cryptographic challenge. lock -type rfid -driver rfid_reader -rfid_tag 123456 -MD5password XXXXXX e) multiple users The implementation I proposed does not cop very well with multiple user/groups needs. However, it could be handled by a "multiuser" module, which would in turn defer authentication work to other specialized modules (like md5 for example). It assumes that ALL users log in with the same method=85. which is quite plausible I think. The multiuser module would need, as arguments: -=09a file that contains authentication data for several users -=09who is allowed (list of users and/or groups) -=09what type of authentication to defer work to=85 The file with auth data would contain user login, user group and user auth data taht would be passed to the module which we defer work to. For example: #Start of file password.txt #login group user_authentication_data root admin =96password md5hashofrootpassword john bsd_user =96password md5hashofjohnpassword paul linux_user =96password md5hashofpaulpassword #End of file The command would be Lock =96type multiuser =96authtype md5 =96datas (hd0,0)/password.txt =96allow_users john =96allow_groups admin This would allow root and john to log in, but not paul The auth function would be like that: Function authenticate_user { auth_method =3D load_method( authtype) login =3D prompt_user_login() auth_data =3D get_data_from_file( pwd_file, login ) group =3D get_group_from_file( pwd_file, login ) if (auth_data =3D=3D null ) return FAIL if ! auth_method.authenticate( auth_data ) return FAIL if ( login not_in authorized_logins AND group not_in authorized_groups = ) return FAIL return OK } f) network authentication This would I think be quite straightforward (though it requires not so easy things such as network support, LDAP protocol, etc) : ask user login and password, build a DN based of these info + some in the grub config file: DN : dc=3Dcompany,dc=3Dcom,user=3Dlogin,pass=3Dpassword And last, check the DN existence in LDAP 2008/5/23 Vesa J=E4=E4skel=E4inen : > Julien Ranc wrote: >> >> What is needed / wanted ? > > First of all, I do not ask that you code following. They are just to test > out flexibility of your proposal. > > So how would following scenarios work with your proposal? > > a) smartcard + ext pin > > There is smartcard reader on system with integrated keypad. Smartcard > accessing software is developed as plugin. > > b) smartcard + pc pin > > There is smartcard reader on system without integrated keypad. User is > requested about PIN code on screen and then validated on the card. Smartc= ard > accessing software is developed as plugin. PIN code reading can be a plug= in > or generic implementation for password query. > > c) RFID verification > > There is RFID reader on system. User swipes dongle and gets a code. Optio= nal > password defined on grub config for user with some hash algo. If password > would be asked, generic implementation would be used for asking it. > Verification can be done by custom plugin if needed. > > d) smartcard + biometric sensor > > There is smartcard and biometric readers on system. User enters his > smartcard on the reader and gives proper biometric identification to sens= or. > Verification can be done by custom plugin if needed. > > e) multiple users > > There are group of users that can be allowed to higher access. Authentica= ted > with password or user & password pair. > > f) network authentication > > Authentication by LDAP server. User id and password will be asked. Networ= k > will be connected if no local authentication information available. If LD= AP > server cannot be contacted access is denied or only local sources availab= le. > Or alternative some other method like RADIUS or so. > > Thanks, > Vesa J=E4=E4skel=E4inen > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Julien RANC julien.ranc@gmail.com