Class Config
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
org.jenkinsci.plugins.cortexcloud.global.Config
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
Global configuration for the Cortex Cloud Jenkins plugin.
This mirrors the role of the legacy Prisma Cloud Compute plugin's Config (a
singleton GlobalConfiguration shown under Manage Jenkins -> System), but the
authentication model is different to match the verified Cortex CLI contract:
- Legacy console address -> Cortex API base URL (CORTEX_API_BASE_URL)
- Legacy username/password -> Cortex API key (CORTEX_API_KEY) + API key ID
(CORTEX_API_KEY_ID)
The API key is stored as a Secret so it is encrypted at rest and never
rendered back to the UI in plain text.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested 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 TypeMethodDescriptiondoCheckApiBaseUrl(String value) doCheckApiKey(String value) doCheckApiKeyId(String value) doTestConnection(String apiBaseUrl, String apiKey, String apiKeyId) Validates connectivity to the tenant API using the supplied credentials.static Configget()Convenience accessor for the singleton instance.booleanisDebug()voidsetApiBaseUrl(String apiBaseUrl) voidvoidsetApiKeyId(String apiKeyId) voidsetCliPath(String cliPath) voidsetDebug(boolean debug) Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, 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
-
Config
public Config()
-
-
Method Details
-
get
Convenience accessor for the singleton instance. -
getApiBaseUrl
-
getApiKey
- Returns:
- the API key as a Secret (for binding the password field), or null.
-
getApiKeyPlainText
- Returns:
- the plain-text API key for passing to the CLI/REST call, or null.
-
getApiKeyId
-
getCliPath
-
isDebug
public boolean isDebug() -
setApiBaseUrl
-
setApiKey
-
setApiKeyId
-
setCliPath
-
setDebug
@DataBoundSetter public void setDebug(boolean debug) -
doCheckApiBaseUrl
-
doCheckApiKey
-
doCheckApiKeyId
-
doTestConnection
@POST public FormValidation doTestConnection(@QueryParameter("apiBaseUrl") String apiBaseUrl, @QueryParameter("apiKey") String apiKey, @QueryParameter("apiKeyId") String apiKeyId) Validates connectivity to the tenant API using the supplied credentials. Annotated @POST and gated on Jenkins.ADMINISTER so the stored/entered secret cannot be probed via a crafted GET request - this is the modern, CSRF-safe equivalent of the legacy plugin's Test Connection.
-