Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
You searched this site for "jvm". 113 entries found.

You can also try this same search on Google.

Easy Windows Authentication with Tomcat 4.x

The original blog entry by Robert Rasmussen has disappeared from the Internet (cannot find server) so I'm reproducing it here via Google's caching feature. I've made a few changes to pretty up the formatting, but that's about it.


I've been pulled into a little internal project, and one of the requirements is that users should be able to authenticate with their Windows login and password. IIS may or may not be in the picture.

Since the server is a Windows 2000 machine, this turns out to be extremely simple to do thanks to Andy Armstrong's JAAS login modules.

Once you've downloaded the login modules, set your classpath accordingly and make sure that the directory holding NTSystem.dll is in your %PATH% variable. Next, in the "Sample config" folder you'll find a tagish.login file and a java.security.sample file. The last line in the .sample file is significant, and it needs to be in your $JAVA_HOME/jre/lib/security folder (in a file named java.security). You should copy the tagish.login file there as well. If your users will always be logging into the same domain (which is the case in my situation), just set the defaultDomain property in tagish.login, like this:

NTLogin
{
    com.tagish.auth.win32.NTSystemLogin required returnNames=true returnSIDs=false defaultDomain=YOUR_DOMAIN_HERE;
};

Now, all you need to do to use Windows authentication in your webapps is to make one addition to your server.xml file (or to your specific context's definition):

<Realm className="org.apache.catalina.realm.JAASRealm" debug="99"
       appName="NTLogin"
       userClassNames="com.tagish.auth.win32.NTPrincipal"
       roleClassNames="com.tagish.auth.win32.NTPrincipal" />

I'll admit this config is slightly hokey. If you look at the Catalina JAASCallbackHandler (which is hardwired to JAASRealm), the way that I have the realm configured above pretty much counts on the User principal (in effect, the user name) being the first principal returned. This is evil, but it works. It would be nice if either Catalina allowed a pluggable CallbackHandler so that I could take advantage of the NTPrincipal.getType() method or if Andy's code returned subclasses of NTPrincipal like UserPrincipal or GroupPrincipal that I could specify in server.xml.

Once you've got this all configured, the various groups your users belong to equate to role names (so if I belong to an administrators group, my authenticated user will be in role "administrators"), and you can configure security in your webapps using these roles.


Posted in Java at Feb 17 2003, 04:11:52 PM MST 19 Comments

[ANNOUNCE] Hibernate 1.2.2 Released

Matthew E. Porter provided us with a heads up that Hibernate 1.2.2 was released. I don't even think they posted this to the mailing list, as I'm a subscriber to hibernate-devel and never received an e-mail. Released yesterday, on my Mom's birthday.

Version 1.2.2 fixes an incompatibility with certain application servers and JVM implementations. [Download]

In other news, Julie did some worrying tonight and decided that I should prepare for our house burning down. The only real thing she wanted me to do was to make sure that all the pictures of Abbie were backed up at an off-site location. So I'm doing some disaster recovery planning. Yikes - 565 MB (after tar and gzip, 1.2 GB before!) - I guess I won't be backing this one up online! I think I'll burn a CD and send it to my folks.

Posted in Java at Jan 05 2003, 10:37:38 PM MST Add a Comment

Ant won't delete a file - any ideas?

I've been experiencing this problem for the last couple of days. Basically, when I run "ant clean" on my project, I get the following error:

file:d:/source/appfuse/build.xml:746: 
  Unable to delete file D:\source\appfuse\dist\appfuse-common.jar

I can delete the "dist" directory in Explorer, and also using "rm -r dist" in Cygwin. Any ideas why Ant is choking on this all of a sudden?

Posted in Java at Dec 26 2002, 05:05:32 PM MST 18 Comments