Thursday, October 25, 2007

Local DNS Modifications on Windows

Original Location: http://blog.kowalczyk.info/kb/local-dns-modifications-on-windows---etc-hosts-equivalent-.html

On Unix, /etc/hosts file contains mappings between an IP address and a name of the host. It overrides mappings from DNS. Windows has an equivalent of this file: c:\WINDOWS\system32\drivers\etc\hosts (at least that's the name on Windows XP).

Here's the simplest mapping from 127.0.0.1 to localhost and a.test.cc names:

127.0.0.1 localhost a.test.cc

Friday, August 24, 2007

Dump:GSSAPI with kerberos/spnego

1. Look in the HttpServletRequest for an "Authorization: Negotiate (lots of Base64)" header.
2. If there isn't one, send an HTTP 401 response with a "WWW-Authenticate: Negotiate" challenge, and return.
3. Create a GSSAPI acceptor context for SPNEGO/GSSAPI/Kerberos, Base64 decode the token, and pass it to GSSContext.acceptSecContext().
4. If GSSContext.acceptSecContext() returns an output token (for mutual authentication), Base64 encode it, generate a "WWW-Authenticate: Negotiate (a little Base64)" HTTP header, and add it to the HTTP 200 response.
5. If GSSContext.isEstablished() isn't true, complain bitterly and abort.
6. Otherwise, use GSSContext.getPeerName() to discover who the (now authenticated) client is, use that information to populate the Subject, throw away the GSSContext, and declare victory for validateRequest()

Friday, March 16, 2007

Programmatic Web Login in JBoss

Sometime ago there was a question on whether there was support for Programmatic Web Login in JBoss. We did not have it.

Security Forum Question

Starting JBoss 4.2.0.GA, this feature is available:
http://wiki.jboss.org/wiki/Wiki.jsp?page=WebAuthentication