[Mono-devel-list] Login application
spouliot at videotron.ca
Thu Aug 12 13:55:44 EDT 2004
Lots of pieces exists today but I don't think anyone did exactly what your
Mono's WindowsPrincipal/Identity works exactly like MS's
WindowsPrincipal/Identity on Windows. However on POSIX systems
WindowsPrincipal/Identity works, as much as possible, "like" their MS's
counterparts (by using POSIX calls). So they "work-like" but aren't
compatible with Windows authentication. For more details, and samples, you
can have a look at my blog: http://pages.infinit.net/ctech/poupou.html
Mono.Security.dll has some classes to handle NTLM (both client and server
side). This is currently used to allow web clients to use NTLM
authentication (to a Windows' server) and to allow "integrated-security"
connections to SQL Server (again the server being on Windows).
However it should be possible to create (using the existing classes) a
server, or authentication module, using NTLM as it's authentication
mechanism. The server could work using it's own (hashed-)password database
or as a proxy to a "Windows" server (either a real one or Samba).
As NTLM (or at least NTLM version 1) isn't very secure, nor very open, I
would recommend anyone to have a good look to existing solutions (like
digest authentication) before starting such a project ;-).
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Rafael
Sent: 12 août 2004 13:32
To: Jurandy Martins Soares Junior
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-devel-list] Login application
Yeah you are right, we already have many things implemented in managed
code to deal with such concerns. I think that we have some code in
place, that uses PAM to give us a "WindowsPrincipal" but I'm not sure
if the necessary plumbing in XSP/Mod_Mono is in place to use it to do
the Windows Authentication bit.
Our security guru, Sebastien Spouliot, and the XSP's creator Gonzalo,
probably have more to say. Also you can take a look at the sources to
see how class WindowsPrincipal is implemented in Mono, and the XSP
Also we have classes to access LDAP repositories so you can try to
integrate with LDAP-based, or at least LDAP-compatible, mechanisms
when dealing with authentication/ authorization.
On Thu, 12 Aug 2004 13:41:17 -0300, Jurandy Martins Soares Junior
<jurandy at lsd.ic.unicamp.br> wrote:
> Hi Rafael,
> And what about Windows authentication via Mono?
> Is it possible?
> With ASP.NET we can use authentication=["windows"|"form"|"none"]. Does it
work similarly in Mono?
> On Tue, Aug 10, 2004 at 04:51:53PM -0300, Rafael Teixeira wrote:
> > Oi Jurandy,
> > Some Posix functionality is available in the Mono.Posix assembly
> > (overview here http://www.nullenvoid.com/mono/wiki/index.php/MonoPosix).
> > It looks like there is not much of PAM integration classes there, so
> > you my need to write some code yourself to P/Invoke in the correct
> > libraries (because probably your code won't have direct access to the
> > passwords file in /etc, and may need to be more useful than this
> > Python example that doesn't work well with shadow passwords).
> > <brazilian-portuguese-plug>
> > Você conhece o MonoBrasil
> > </brazilian-portuguese-plug>
> > Sorry for not being able to really help you with this...
> > Fun,
> > On Tue, 10 Aug 2004 11:15:47 -0300, Jurandy Martins Soares Junior
> > <jurandy at lsd.ic.unicamp.br> wrote:
> > > Hi, all!
> > >
> > > I'm new in the list (but not in C#).
> > >
> > > Does anyone know how to write in C# a sample application for login?
> > >
> > > Something similar to the one below, written in Python.
> > >
> > > Regards,
> > > Jurandy Martins
> > >
> > > ----------------------------
> > > #!/usr/bin/python
> > > import crypt, getpass, pwd
> > >
> > > def login():
> > > username = raw_input('Python login:')
> > > cryptedpasswd = pwd.getpwnam(username)
> > > if cryptedpasswd:
> > > if cryptedpasswd == 'x' or cryptedpasswd == '*':
> > > raise "Sorry, currently no support for shadow passwords"
> > > cleartext = getpass.getpass()
> > > if crypt.crypt(cleartext, cryptedpasswd[:2]) == cryptedpasswd:
> > > print "Authentication succeed!"
> > > else:
> > > print "Failure login!"
> > >
> > > login()
> > --
> > Rafael "Monoman" Teixeira
> > ---------------------------------------
> > Cognition is not a representation of an objectively existing world
> > but is a bringing forth of a world in the process of living.
> > -- Fritjof Capra, citing
> > Humberto Maturana and Francisco Varella's "Santiago Theory of
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Rafael "Monoman" Teixeira
Cognition is not a representation of an objectively existing world
but is a bringing forth of a world in the process of living.
-- Fritjof Capra, citing
Humberto Maturana and Francisco Varella's "Santiago Theory of Cognition"
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list