Extending Plugin is a bit legacy, try implementing a GlobalConfiguration
instead http://javadoc.jenkins-ci.org/jenkins/model/GlobalConfiguration.html
maybe that could work.

/B

On Tue, Nov 25, 2014 at 6:57 AM, Bryson Gibbons <[email protected]> wrote:

>   Are there any good examples of a main class extending Plugin and having
> a descriptor that works that you can refer me to? I have tried looking, and
> haven’t seen anything yet; I’ve tried what I can think of based on the what
> I have been able to see, and all I ever get when trying to load the
> configuration page is “java.lang.IllegalStateException: class
> jenkins.model.GlobalPluginConfiguration doesn't have the
> doFillPrincipalFormatItems method for filling a drop-down list”, the same
> thing I was getting when I didn’t have any sort of Descriptor.
>
> What I currently have:
> public class PluginImpl extends Plugin implements Describable<PluginImpl> {
>   ... all other necessary functions...
>
>    @Override
>   public final Descriptor<PluginImpl> getDescriptor() {
>     return descriptor;
>   }
>
>   private static final PluginImplDescriptor descriptor = new
> PluginImplDescriptor();
>
>   public static final class PluginImplDescriptor extends
> Descriptor<PluginImpl> {
>     public PluginImplDescriptor() {
>       super(self());
>     }
>
>     @Override
>        public String getDisplayName() {
>          return “”;
>        }
>
>        public ListBoxModel doFillPluginImplFieldNameItems() {
>           return new ListBoxModel() {contents...};
>        }
>   }
> }
>
> Thank you again,
>
> Bryson
>
>  *From:* Robert Sandell <[email protected]>
> *Sent:* Monday, November 24, 2014 1:53 AM
> *To:* [email protected]
> *Subject:* Re: New SSO plugin for Jenkins on Windows, based on
> KerberosSSO, using Waffle...
>
>  We needed to do advertise headers in order for CLI to work.
>
> doFillxyzItems should be declared in the descriptor and replace xyz with
> the name of the field, the f:select tag takes care of the data binding.
>
> On Mon, Nov 24, 2014 at 7:41 AM, Bryson Gibbons <[email protected]>
> wrote:
>
>> Well, I found one possible way around the licensing issues: if I extend
>> the Windows authentication implementation that Waffle uses with the
>> NegotiateSecurityFilter, I can override the necessary functions so that
>> they call the original function, and then call an additional function to
>> provide authentication information to Jenkins. I can set the
>> NegotiateSecurityFilter to use the extended class. Also, I extended the
>> NegotiateSecurityFilter class specifically to call the advertiseHeaders
>> function, but I don't know if that is really necessary.
>>
>> Besides that, I am trying to figure out the process in the groovy file to
>> show a select box to the user in the configuration, since there are two
>> configurable properties that deal with how the user information is handled
>> in Waffle. I just haven't figured out how to have the groovy script look in
>> the right spot for the "doFillxyzItems()" function, or where the function
>> is supposed to be to be discovered.
>>
>> On a quick side note, I wonder if this
>> <http://support.microsoft.com/kb/308339> might be part of the problem
>> with using Kerberos SSO plugin on Windows.
>>
>> Thank you for any help,
>>
>> Bryson
>>
>>
>> On Saturday, November 15, 2014 1:09:18 PM UTC-8, Bryson Gibbons wrote:
>>>
>>> A few ideas that I haven't been able to fully look into:
>>> If I can implement an "IAuthWindowsProvider" that provides the necessary
>>> functionality (tying into an existing security realm), could that allow
>>> this to be released under the MIT license, provided I do not just copy the
>>> provided implementation and add the necessary code (since the EPL license
>>> allows distribution of the program, if it is not distributed in source code
>>> format)? My understanding of that clause is that as long as I am only using
>>> the "binary", and have not copied code from Waffle, it can be released
>>> under a license other than the EPL.
>>>
>>> Also, I do wonder if this might be better situated (outside of the
>>> licensing issues) as part of the Active Directory plugin, since it already
>>> has a configuration that is only usable on Windows, with an alternate
>>> configuration allowing it to be used on Linux. There are also active Jira
>>> tickets concerning the desire to allow single sign on with the Active
>>> Directory plugin.
>>>
>>> Anyway, I would like to get rid of the copy of the class from Waffle,
>>> since the changes I made involved adding a function to trigger the Jenkins
>>> authentication, as well as modifying the logging calls since Waffle uses a
>>> different logger. I would prefer to have a more abstract implementation
>>> that will be easier to maintain and extend, rather than what I currently
>>> have. Waffle is also designed to do full authentication by itself, so it
>>> may be better if I changed to implementation to be a security plugin (and
>>> that may remove all licensing issues, if I could have Waffle function as
>>> the security provider... but I don't even know where to start).
>>>
>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/ea3fb967-3993-4434-beeb-d64eba474867%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/ea3fb967-3993-4434-beeb-d64eba474867%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>  Robert Sandell
> *Software Engineer*
> *CloudBees Inc.*
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/ywCwlY569dI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS35Buq26gsHp3rPx8ir7ChLq3bV4PBN0VL11S0NMNXYDw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS35Buq26gsHp3rPx8ir7ChLq3bV4PBN0VL11S0NMNXYDw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/B664635968C741C696D9CFF7BFD1A635%40HAFBeast
> <https://groups.google.com/d/msgid/jenkinsci-dev/B664635968C741C696D9CFF7BFD1A635%40HAFBeast?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3p6fK%2B_Me24ravXf4FL0tc9G8wi2yrJyW3HPBwXk3hRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to