Package org.miniorange.saml
Class MoSAMLAddIdp
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<SecurityRealm>
-
- hudson.security.SecurityRealm
-
- org.miniorange.saml.MoSAMLAddIdp
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<SecurityRealm>
public class MoSAMLAddIdp extends SecurityRealm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MoSAMLAddIdp.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
SecurityRealm.SecurityComponents
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static MoSAMLAddIdp.DescriptorImpl
DESCRIPTOR
static String
MO_SAML_JENKINS_LOGIN_ACTION
static String
MO_SAML_SP_AUTH_URL
static String
MO_SAML_SSO_FORCE_STOP
-
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, AUTHENTICATED_AUTHORITY2, LIST, NO_AUTHENTICATION
-
-
Constructor Summary
Constructors Constructor Description MoSAMLAddIdp(String idpEntityId, String ssoUrl, String metadataUrl, String metadataFilePath, String publicx509Certificate, String usernameCaseConversion, String usernameAttribute, String emailAttribute, String fullnameAttribute, String nameIDFormat, String sslUrl, String loginType, String regexPattern, Boolean enableRegexPattern, Boolean signedRequest, Boolean splitnameAttribute, Boolean userCreate, Boolean forceAuthn, String ssoBindingType, String sloBindingType, List<MoAttributeEntry> samlCustomAttributes, Boolean userAttributeUpdate, String newUserGroup, String authnContextClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attributeUpdate(MoSAMLPluginSettings settings, User user, MoSAMLResponse moSAMLResponse, String loginType)
static List<String>
configureFromMetadata(String metadata)
SecurityRealm.SecurityComponents
createSecurityComponents()
org.kohsuke.stapler.HttpResponse
createSessionAndLoginUser(User user, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, Boolean newUserCreated, MoSAMLPluginSettings settings, String redirectUrl)
void
doDownloadCertificate(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
void
doLogout(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
org.kohsuke.stapler.HttpResponse
doMoLogin(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, String errorMessage)
void
doMoLoginAction(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
org.kohsuke.stapler.HttpResponse
doMoSamlAuth(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
void
doMoSamlLogin(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, String referer)
void
doMoSAMLSingleSignOnForceStop(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
void
doMospmetadata(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
String
getAuthnContextClass()
String
getBaseUrl()
String
getEmailAttribute()
Boolean
getEnableRegexPattern()
Boolean
getForceAuthn()
String
getIdpEntityId()
String
getLoginUrl()
String
getMetadata(MoSAMLPluginSettings settings)
String
getMetadataFilePath()
static String
getMetadataFromFile(String path)
String
getMetadataUrl()
String
getNameIDFormat()
String
getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req, org.springframework.security.core.Authentication auth)
String
getPublicx509Certificate()
String
getRegexPattern()
List<MoAttributeEntry>
getSamlCustomAttributes()
String
getSsoBindingType()
String
getSsoUrl()
Boolean
getUserCreate()
String
getUsernameAttribute()
String
getUsernameCaseConversion()
String
toString()
-
Methods inherited from class hudson.security.SecurityRealm
all, allowsSignup, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, createFilter, doCaptcha, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getPostLogOutUrl, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, loadGroupByGroupname, loadGroupByGroupname2, loadUserByUsername, loadUserByUsername2, setCaptchaSupport, validateCaptcha
-
-
-
-
Field Detail
-
MO_SAML_SP_AUTH_URL
public static final String MO_SAML_SP_AUTH_URL
- See Also:
- Constant Field Values
-
MO_SAML_JENKINS_LOGIN_ACTION
public static final String MO_SAML_JENKINS_LOGIN_ACTION
- See Also:
- Constant Field Values
-
MO_SAML_SSO_FORCE_STOP
public static final String MO_SAML_SSO_FORCE_STOP
- See Also:
- Constant Field Values
-
DESCRIPTOR
public static final MoSAMLAddIdp.DescriptorImpl DESCRIPTOR
-
-
Constructor Detail
-
MoSAMLAddIdp
@DataBoundConstructor public MoSAMLAddIdp(String idpEntityId, String ssoUrl, String metadataUrl, String metadataFilePath, String publicx509Certificate, String usernameCaseConversion, String usernameAttribute, String emailAttribute, String fullnameAttribute, String nameIDFormat, String sslUrl, String loginType, String regexPattern, Boolean enableRegexPattern, Boolean signedRequest, Boolean splitnameAttribute, Boolean userCreate, Boolean forceAuthn, String ssoBindingType, String sloBindingType, List<MoAttributeEntry> samlCustomAttributes, Boolean userAttributeUpdate, String newUserGroup, String authnContextClass) throws Exception
- Throws:
Exception
-
-
Method Detail
-
getLoginUrl
public String getLoginUrl()
- Overrides:
getLoginUrl
in classSecurityRealm
-
doLogout
public void doLogout(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
- Overrides:
doLogout
in classSecurityRealm
-
getPostLogOutUrl2
public String getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req, org.springframework.security.core.Authentication auth)
- Overrides:
getPostLogOutUrl2
in classSecurityRealm
-
doMoLogin
public org.kohsuke.stapler.HttpResponse doMoLogin(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, String errorMessage)
-
doMoLoginAction
public void doMoLoginAction(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
-
doMoSamlLogin
public void doMoSamlLogin(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, @Header("Referer") String referer)
-
getBaseUrl
public String getBaseUrl()
-
doMoSAMLSingleSignOnForceStop
public void doMoSAMLSingleSignOnForceStop(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
-
doMospmetadata
public void doMospmetadata(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
-
doDownloadCertificate
public void doDownloadCertificate(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
-
getMetadata
public String getMetadata(MoSAMLPluginSettings settings)
-
configureFromMetadata
public static List<String> configureFromMetadata(String metadata) throws Exception
- Throws:
Exception
-
doMoSamlAuth
public org.kohsuke.stapler.HttpResponse doMoSamlAuth(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
- Throws:
IOException
-
attributeUpdate
public void attributeUpdate(MoSAMLPluginSettings settings, User user, MoSAMLResponse moSAMLResponse, String loginType)
-
createSecurityComponents
public SecurityRealm.SecurityComponents createSecurityComponents()
- Specified by:
createSecurityComponents
in classSecurityRealm
-
createSessionAndLoginUser
public org.kohsuke.stapler.HttpResponse createSessionAndLoginUser(User user, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, Boolean newUserCreated, MoSAMLPluginSettings settings, String redirectUrl)
-
getMetadataUrl
public String getMetadataUrl()
-
getMetadataFilePath
public String getMetadataFilePath()
-
getIdpEntityId
public String getIdpEntityId()
-
getSsoUrl
public String getSsoUrl()
-
getPublicx509Certificate
public String getPublicx509Certificate()
-
getUsernameAttribute
public String getUsernameAttribute()
-
getEmailAttribute
public String getEmailAttribute()
-
getNameIDFormat
public String getNameIDFormat()
-
getUserCreate
public Boolean getUserCreate()
-
getForceAuthn
public Boolean getForceAuthn()
-
getRegexPattern
public String getRegexPattern()
-
getEnableRegexPattern
public Boolean getEnableRegexPattern()
-
getSsoBindingType
public String getSsoBindingType()
-
getUsernameCaseConversion
public String getUsernameCaseConversion()
-
getAuthnContextClass
public String getAuthnContextClass()
-
getSamlCustomAttributes
@NonNull public List<MoAttributeEntry> getSamlCustomAttributes()
-
-