Class NegotiateSSO
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.github.farmgeek4life.jenkins.negotiatesso.NegotiateSSO
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
The core of this Plugin. Handles the configuration of the Waffle
NegotiateSecurityFilter It also starts / stops the filter at the user's
request and data-binds to config.groovy.
- Author:
- Bryson Gibbons;
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) When submit is pressed on the global config page and any settings for this plugin are changed, this method is called.Used by groovy for data-binding.Used by groovy for data-binding.Used by groovy for data-binding: provides a name and java classpath for an HTML 'select' element Suppressed warnings (for security scans): * permission check: the configuration page is restricted to 'ADMINISTER' permissions, but this function is only providing the potential choices, not changing settings * csrf: We do not provide routable URLs, only a text name (with spaces) and a java classpath reference for internal useUsed by groovy for data-binding.Get the proper category for the settings locationThe Plugin Display nameboolean
Used by groovy for data-binding.static NegotiateSSO
Fetches the singleton instance of this plugin.Used by groovy for data-binding.Used by groovy for data-binding.Used by groovy for data-binding.Used by groovy for data-binding.Used by groovy for data-binding.boolean
Used by groovy for data-binding.boolean
Used by groovy for data-binding.boolean
Used by groovy for data-binding.void
setPrincipalFormat
(String format) Used by groovy for data-binding.void
setProtocols
(String protocol) Used by groovy for data-binding.void
setProviders
(String provider) Used by groovy for data-binding.void
setRedirect
(String redirect) Used by groovy for data-binding.void
setRoleFormat
(String format) Used by groovy for data-binding.void
start()
Starts the plugin.Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
NegotiateSSO
public NegotiateSSO()Initializes and starts the filter, if enabled.
-
-
Method Details
-
getInstance
Fetches the singleton instance of this plugin.- Returns:
- the instance.
-
getCategory
Get the proper category for the settings location- Overrides:
getCategory
in classDescriptor<GlobalConfiguration>
- Returns:
- GlobalConfigurationCategory.Security
-
getDisplayName
The Plugin Display name- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
- Returns:
- Display name
-
start
public void start() throws jakarta.servlet.ServletExceptionStarts the plugin. Loads previous configuration if such exists.- Throws:
jakarta.servlet.ServletException
- if the Waffle NTLM/Kerberos filter cannot be added to Jenkins.
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) throws Descriptor.FormException When submit is pressed on the global config page and any settings for this plugin are changed, this method is called. It updates all the fields, restarts or stops the filter depending on configuration and saves the configuration to disk.- Overrides:
configure
in classGlobalConfiguration
- Parameters:
req
- the Stapler Request to serve.formData
- the JSON data containing the new configuration.- Returns:
- true if configuration successful; false otherwise
- Throws:
Descriptor.FormException
- if any data in the form is wrong.
-
getEnabled
public boolean getEnabled()Used by groovy for data-binding.- Returns:
- whether the Filter is currently enabled or not.
-
getRoleFormat
Used by groovy for data-binding.- Returns:
- the current role format
-
setRoleFormat
Used by groovy for data-binding.- Parameters:
format
- set the role format
-
getPrincipalFormat
Used by groovy for data-binding.- Returns:
- the current principal format
-
setPrincipalFormat
Used by groovy for data-binding.- Parameters:
format
- set the principal format
-
getProtocols
Used by groovy for data-binding.- Returns:
- the current protocols
-
setProtocols
Used by groovy for data-binding.- Parameters:
protocol
- set the principal format
-
getProviders
Used by groovy for data-binding.- Returns:
- the current providers
-
setProviders
Used by groovy for data-binding.- Parameters:
provider
- set the principal format
-
isAllowImpersonate
public boolean isAllowImpersonate()Used by groovy for data-binding.- Returns:
- whether servlet delegation should be used.
-
isAllowLocalhost
public boolean isAllowLocalhost()Used by groovy for data-binding.- Returns:
- whether localhost is allowed without authentication.
-
isRedirectEnabled
public boolean isRedirectEnabled()Used by groovy for data-binding.- Returns:
- whether unauthenticated requests should be redirected
-
getRedirect
Used by groovy for data-binding.- Returns:
- the site to redirect to
-
setRedirect
Used by groovy for data-binding.- Parameters:
redirect
- the site to redirect to
-
doFillRoleFormatItems
Used by groovy for data-binding.- Returns:
- the allowed role format strings
-
doFillPrincipalFormatItems
Used by groovy for data-binding.- Returns:
- the allowed principal format strings
-
doFillProtocolsItems
Used by groovy for data-binding.- Returns:
- the allowed protocol strings
-
doFillProvidersItems
Used by groovy for data-binding: provides a name and java classpath for an HTML 'select' element Suppressed warnings (for security scans): * permission check: the configuration page is restricted to 'ADMINISTER' permissions, but this function is only providing the potential choices, not changing settings * csrf: We do not provide routable URLs, only a text name (with spaces) and a java classpath reference for internal use- Returns:
- the allowed provider strings
-