Class GlobalSecurityConfiguration
- java.lang.Object
-
- hudson.model.ManagementLink
-
- hudson.security.GlobalSecurityConfiguration
-
- All Implemented Interfaces:
ExtensionPoint,Action,Describable<GlobalSecurityConfiguration>,ModelObject
@Extension(ordinal=2.147483437E9) @Symbol("securityConfig") public class GlobalSecurityConfiguration extends ManagementLink implements Describable<GlobalSecurityConfiguration>
Security configuration. For historical reasons, most of the actual configuration values are stored inJenkins.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalSecurityConfiguration.DescriptorImpl-
Nested classes/interfaces inherited from class hudson.model.ManagementLink
ManagementLink.Category
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static Predicate<Descriptor>FILTER-
Fields inherited from class hudson.model.ManagementLink
LIST
-
-
Constructor Summary
Constructors Constructor Description GlobalSecurityConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)voiddoConfigure(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Set<String>getAgentProtocols()AuthorizationStrategygetAuthorizationStrategy()ManagementLink.CategorygetCategory()Category for management link, usesStringso it can be done with core dependency pre-dating the version this feature was added.StringgetDescription()Returns a short description of what this link does.Descriptor<GlobalSecurityConfiguration>getDescriptor()Gets the descriptor for this instance.StringgetDisplayName()Gets the string to be displayed.StringgetIconFileName()Mostly works likeAction.getIconFileName(), except that the expected icon format is SVG.MarkupFormattergetMarkupFormatter()PermissiongetRequiredPermission()Returns the permission required for user to see this management link on the "Manage Jenkins" page (ManageJenkinsAction).SecurityRealmgetSecurityRealm()intgetSlaveAgentPort()StringgetUrlName()Gets the URL path name.booleanisDisableRememberMe()booleanisSlaveAgentPortEnforced()-
Methods inherited from class hudson.model.ManagementLink
all, getBadge, getCategoryName, getRequiresConfirmation, getRequiresPOST
-
-
-
-
Field Detail
-
FILTER
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("2.222") public static final Predicate<Descriptor> FILTER
-
-
Method Detail
-
getSecurityRealm
public SecurityRealm getSecurityRealm()
-
getAuthorizationStrategy
public AuthorizationStrategy getAuthorizationStrategy()
-
getMarkupFormatter
public MarkupFormatter getMarkupFormatter()
-
getSlaveAgentPort
public int getSlaveAgentPort()
-
isSlaveAgentPortEnforced
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isSlaveAgentPortEnforced()
- Returns:
- true if the inbound agent port is enforced on this instance.
- Since:
- 2.24
-
isDisableRememberMe
public boolean isDisableRememberMe()
-
getCategory
@NonNull public ManagementLink.Category getCategory()
Description copied from class:ManagementLinkCategory for management link, usesStringso it can be done with core dependency pre-dating the version this feature was added.- Overrides:
getCategoryin classManagementLink- Returns:
- An enum value of
ManagementLink.Category.
-
doConfigure
@POST public void doConfigure(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException- Throws:
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException- Throws:
Descriptor.FormException
-
getDisplayName
public String getDisplayName()
Description copied from interface:ActionGets the string to be displayed. The convention is to capitalize the first letter of each word, such as "Test Result".- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject- Returns:
- Can be null in case the action is hidden.
-
getDescription
public String getDescription()
Description copied from class:ManagementLinkReturns a short description of what this link does. This text is the one that's displayed in grey. This can include HTML, although the use of block tags is highly discouraged. Optional.- Overrides:
getDescriptionin classManagementLink
-
getIconFileName
public String getIconFileName()
Description copied from class:ManagementLinkMostly works likeAction.getIconFileName(), except that the expected icon format is SVG. So if you give just a file name, "/images/svgs" will be assumed.- Specified by:
getIconFileNamein interfaceAction- Specified by:
getIconFileNamein classManagementLink- Returns:
- As a special case, return null to exclude this object from the management link.
This is useful for defining
ManagementLinkthat only shows up under certain circumstances. - See Also:
- Jenkins Symbols,
Functions.isAnonymous(),Functions.getIconFilePath(Action)
-
getUrlName
public String getUrlName()
Description copied from class:ManagementLinkGets the URL path name.For example, if this method returns "xyz", and if the parent object (that this action is associated with) is bound to /foo/bar/zot, then this action object will be exposed to /foo/bar/zot/xyz.
This method should return a string that's unique among other
Actions.The returned string can be an absolute URL, like "http://www.sun.com/", which is useful for directly connecting to external systems.
If the returned string starts with '/', like '/foo', then it's assumed to be relative to the context path of the Jenkins webapp.
In case of
ManagementLink, this value is put straight into the href attribute, so relative paths are interpreted against the rootJenkinsobject.- Specified by:
getUrlNamein interfaceAction- Specified by:
getUrlNamein classManagementLink- Returns:
- null if this action object doesn't need to be bound to web
(when you do that, be sure to also return null from
Action.getIconFileName(). - See Also:
Functions.getActionUrl(String, Action)
-
getRequiredPermission
public Permission getRequiredPermission()
Description copied from class:ManagementLinkReturns the permission required for user to see this management link on the "Manage Jenkins" page (ManageJenkinsAction). Historically, this returned null, which amounted to the same behavior, asJenkins.ADMINISTERwas required to access the page.- Overrides:
getRequiredPermissionin classManagementLink- Returns:
- the permission required for the link to be shown on "Manage Jenkins".
-
getDescriptor
public Descriptor<GlobalSecurityConfiguration> getDescriptor()
Description copied from interface:DescribableGets the descriptor for this instance.Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptorin interfaceDescribable<GlobalSecurityConfiguration>- See Also:
Describable.getDescriptor()
-
-