/** * <p>Adds to the deployment the {@link org.wildfly.extension.undertow.security.jaspi.JASPICAuthenticationMechanism}, if necessary. The handler will be added if the security domain * is configured with JASPI authentication.</p> * * @param deploymentInfo */ private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) { ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain); if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInstance(applicationPolicy.getAuthenticationInfo())) { String authMethod = null; LoginConfig loginConfig = deploymentInfo.getLoginConfig(); if (loginConfig != null && loginConfig.getAuthMethods().size() > 0) { authMethod = loginConfig.getAuthMethods().get(0).getName(); } deploymentInfo.setJaspiAuthenticationMechanism(new JASPICAuthenticationMechanism(securityDomain, authMethod)); deploymentInfo.setSecurityContextFactory(new JASPICSecurityContextFactory(this.securityDomain)); deploymentInfo.addOuterHandlerChainWrapper(next -> new JASPICSecureResponseHandler(next)); } }
/** * Method that returns the parsed AuthenticationInfo needed by the JASPI framework until a seperate Configuration * mechanism for JASPI is established * * @return the parsed AuthenticationInfo object */ public BaseAuthenticationInfo getAuthenticationInfo(String domainName) { ApplicationPolicy aPolicy = getApplicationPolicy(domainName); return aPolicy != null ? aPolicy.getAuthenticationInfo() : null; }
/** * Method that returns the parsed AuthenticationInfo needed by the JASPI framework until a seperate Configuration * mechanism for JASPI is established * * @return the parsed AuthenticationInfo object */ public BaseAuthenticationInfo getAuthenticationInfo(String domainName) { ApplicationPolicy aPolicy = getApplicationPolicy(domainName); return aPolicy != null ? aPolicy.getAuthenticationInfo() : null; }
public BaseAuthenticationInfo getAuthenticationInfo() { BaseAuthenticationInfo bai = null; ApplicationPolicy ap = this.getBaseApplicationPolicy(); if (ap != null) bai = ap.getAuthenticationInfo(); if (bai != null && authenticationInfo == null) return bai; else if (bai != null) return (BaseAuthenticationInfo) authenticationInfo.merge(bai); else return authenticationInfo; }
public BaseAuthenticationInfo getAuthenticationInfo() { BaseAuthenticationInfo bai = null; ApplicationPolicy ap = this.getBaseApplicationPolicy(); if (ap != null) bai = ap.getAuthenticationInfo(); if (bai != null && authenticationInfo == null) return bai; else if (bai != null) return (BaseAuthenticationInfo) authenticationInfo.merge(bai); else return authenticationInfo; }
BaseAuthenticationInfo authInfo = null; if (aPolicy != null) authInfo = aPolicy.getAuthenticationInfo(); authInfo = defPolicy != null ? (AuthenticationInfo) defPolicy.getAuthenticationInfo() : null;
private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { xmlConfig.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }
/** * Handle the case when JASPI Info may have login module stack holder which delegates to a login module stack * * @param aPolicy */ private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { this.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }
/** * Handle the case when JASPI Info may have login module stack holder which delegates to a login module stack * * @param aPolicy */ private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { this.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }
BaseAuthenticationInfo authInfo = null; if (aPolicy != null) authInfo = aPolicy.getAuthenticationInfo(); authInfo = defPolicy != null ? (AuthenticationInfo) defPolicy.getAuthenticationInfo() : null;
/** * <p>Adds to the deployment the {@link org.wildfly.extension.undertow.security.jaspi.JASPICAuthenticationMechanism}, if necessary. The handler will be added if the security domain * is configured with JASPI authentication.</p> * * @param deploymentInfo */ private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) { ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain); if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInstance(applicationPolicy.getAuthenticationInfo())) { String authMethod = null; LoginConfig loginConfig = deploymentInfo.getLoginConfig(); if (loginConfig != null && loginConfig.getAuthMethods().size() > 0) { authMethod = loginConfig.getAuthMethods().get(0).getName(); } deploymentInfo.setJaspiAuthenticationMechanism(new JASPICAuthenticationMechanism(securityDomain, authMethod)); deploymentInfo.setSecurityContextFactory(new JASPICSecurityContextFactory(this.securityDomain)); deploymentInfo.addOuterHandlerChainWrapper(next -> new JASPICSecureResponseHandler(next)); } }
/** * <p>Adds to the deployment the {@link org.wildfly.extension.undertow.security.jaspi.JASPICAuthenticationMechanism}, if necessary. The handler will be added if the security domain * is configured with JASPI authentication.</p> * * @param deploymentInfo */ private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) { ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain); if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInstance(applicationPolicy.getAuthenticationInfo())) { String authMethod = null; LoginConfig loginConfig = deploymentInfo.getLoginConfig(); if (loginConfig != null && loginConfig.getAuthMethods().size() > 0) { authMethod = loginConfig.getAuthMethods().get(0).getName(); } deploymentInfo.setJaspiAuthenticationMechanism(new JASPICAuthenticationMechanism(securityDomain, authMethod)); deploymentInfo.setSecurityContextFactory(new JASPICSecurityContextFactory(this.securityDomain)); deploymentInfo.addOuterHandlerChainWrapper(next -> new JASPICSecureResponseHandler(next)); } }
BaseAuthenticationInfo bai = ap.getAuthenticationInfo(); if(bai == null) throw new IllegalStateException("Authentication Info not set in security domain="+ secDomain
return false; BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo(); if (bai == null || bai instanceof AuthenticationInfo)
return false; BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo(); if (bai == null || bai instanceof AuthenticationInfo)
BaseAuthenticationInfo authInfo = null; if (aPolicy != null) authInfo = aPolicy.getAuthenticationInfo(); authInfo = defPolicy != null ? (AuthenticationInfo) defPolicy.getAuthenticationInfo() : null;
BaseAuthenticationInfo bai = ap.getAuthenticationInfo(); if(bai == null) throw PicketBoxMessages.MESSAGES.failedToObtainAuthenticationInfo(secDomain);
return false; BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo(); if (bai == null || bai instanceof AuthenticationInfo)
if(theAppPolicy != null) BaseAuthenticationInfo authInfo = theAppPolicy.getAuthenticationInfo(); List<String> jbossModuleNames = authInfo.getJBossModuleNames(); if(!jbossModuleNames.isEmpty())