Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

JettyCachingLdapLoginModule throws exception when port not set

#186

If you're using providerUrl, the port option is redundant, but if you don't set it you get an exception on startup:

2011-01-27 11:48:16.579::WARN:
javax.security.auth.login.LoginException:
java.lang.NumberFormatException: null
       at java.lang.Integer.parseInt(Integer.java:417)
       at java.lang.Integer.parseInt(Integer.java:499)
       at com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule.initialize(JettyCachingLdapLoginModule.java:572)
...

A (completely untested) fix would seem to be something like:

diff --git a/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java b/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
index 292a1fa..6a66b9d 100644
--- a/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
+++ b/rundeckapp/src/java/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
@@ -568,9 +568,11 @@ public class JettyCachingLdapLoginModule extends AbstractLoginModule {
             Map options) {
         super.initialize(subject, callbackHandler, sharedState, options);
 
-        _hostname = (String) options.get("hostname");
-        _port = Integer.parseInt((String) options.get("port"));
         _providerUrl = (String) options.get("providerUrl");
+        if (_providerUrl == null) {
+            _hostname = (String) options.get("hostname");
+            _port = Integer.parseInt((String) options.get("port"));
+        }
         _contextFactory = (String) options.get("contextFactory");
         _bindDn = (String) options.get("bindDn");
         _bindPassword = (String) options.get("bindPassword");

Reported by Alex Kiernan · January 27th, 2011 @ 07:46 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Deleted User
    Deleted User
    • State changed from new to resolved
    • Milestone set to Rundeck 1.2
    • Assigned user set to Deleted User
    • Milestone order changed from 10 to 0

    March 7th, 2011 @ 03:30 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.