if (node == null) { return false; } JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain); Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>(); if(node.hasDefined(LOGIN_MODULE_STACK)){ authenticationInfo.add(holder); if (stackNode.hasDefined(LOGIN_MODULE)) { processLoginModules(context, stackNode.get(LOGIN_MODULE), authenticationInfo, new LoginModuleContainer() { authenticationInfo.add(entry); authenticationInfo.addJBossModuleName(moduleName.asString()); } else { authenticationInfo.addJBossModuleName(DEFAULT_MODULE);
JASPIAuthenticationInfo authInfo = new JASPIAuthenticationInfo(); Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>(); while (xmlEventReader.hasNext()) LoginModuleStackHolder holder = new LoginModuleStackHolder(nameAttributeValue, null); holders.put(nameAttributeValue, holder); authInfo.add(holder); entry.setLoginModuleStackHolder(holders.get(stackHolderRefName)); authInfo.add(entry);
if (node == null) { return false; } JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain); Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>(); List<Property> stacks = node.get(LOGIN_MODULE_STACK).asPropertyList(); authenticationInfo.add(holder); if (stackNode.hasDefined(LOGIN_MODULE)) { processLoginModules(context, stackNode.get(LOGIN_MODULE), authenticationInfo, new LoginModuleContainer() { authenticationInfo.add(entry); authenticationInfo.setJBossModuleName(moduleName.asString());
@Override protected BaseSecurityInfo<Object> create(String name) { return new JASPIAuthenticationInfo(name); }
/** * <p> * Overriden to include the stacks of login modules in the merged object. * </p> */ @Override public BaseSecurityInfo<Object> merge(BaseSecurityInfo<Object> bi) { if (bi instanceof JASPIAuthenticationInfo == false) throw new IllegalArgumentException("Base policy does not contain a JASPI authentication configuration"); // merge the auth modules JASPIAuthenticationInfo merged = (JASPIAuthenticationInfo) super.merge(bi); // merge the stacks of login modules JASPIAuthenticationInfo parent = (JASPIAuthenticationInfo) bi; for (LoginModuleStackHolder holder : parent.getLoginModuleStackHolder()) merged.add(holder); for (LoginModuleStackHolder holder : this.getLoginModuleStackHolder()) merged.add(holder); return merged; }
public void addChild(JASPIAuthenticationInfo authInfo, AuthModuleEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName) { authInfo.add(entry); }
AuthModuleEntry[] amearr = jai.getAuthModuleEntry(); String jbossModule = jai.getJBossModuleName(); if (jbossModule != null && !jbossModule.isEmpty())
AuthModuleEntry[] amearr = jai.getAuthModuleEntry(); List<String> jbossModuleNames = jai.getJBossModuleNames(); if (!jbossModuleNames.isEmpty())
AuthModuleEntry[] amearr = jai.getAuthModuleEntry(); for(AuthModuleEntry ame: amearr)
public Object newChild(JASPIAuthenticationInfo info, UnmarshallingContext navigator, String namespaceUri, String localName, Attributes attrs) { Object child = null; if (trace) log.trace("newChild.AuthenticationJaspiInfo, localName: " + localName); if ("login-module-stack".equals(localName)) { String lmsName = attrs.getValue("name"); lmsName = StringPropertyReplacer.replaceProperties(lmsName.trim()); child = new LoginModuleStackHolder(lmsName, null); if (trace) log.trace("newChild.AuthenticationInfo, login-module-stack: " + lmsName); } else if ("auth-module".equals(localName)) { String code = attrs.getValue("code"); AuthModuleEntry authModuleEntry = new AuthModuleEntry(code, null, null); String flag = attrs.getValue("flag"); authModuleEntry.setControlFlag(getControlFlag(flag)); String lmsRef = attrs.getValue("login-module-stack-ref"); if (lmsRef != null) authModuleEntry.setLoginModuleStackHolder(info.getLoginModuleStackHolder(lmsRef)); child = authModuleEntry; } return child; }
/** * <p> * Overridden to copy the entries that have been configured in the login-module-stack. If more than one stack * has been configured, then the entries corresponding to the first stack will be copied and returned. * </p> */ @Override public AppConfigurationEntry[] copyAppConfigurationEntry() { List<Object> entries = new ArrayList<Object>(); for(AppConfigurationEntry entry : this.getAppConfigurationEntry()) entries.add(entry); return super.copyAppConfigurationEntry(entries); }
JASPIAuthenticationInfo authInfo = new JASPIAuthenticationInfo(); Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>(); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) holder = new LoginModuleStackHolder(name, null); holders.put(name, holder); authInfo.add(holder); break; entry.setLoginModuleStackHolder(holders.get(stackHolderRefName)); authInfo.add(entry); break;
if (node == null) { return false; } JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain); Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>(); List<Property> stacks = node.get(LOGIN_MODULE_STACK).asPropertyList(); authenticationInfo.add(holder); if (stackNode.hasDefined(LOGIN_MODULE)) { processLoginModules(context, stackNode.get(LOGIN_MODULE), authenticationInfo, new LoginModuleContainer() { authenticationInfo.add(entry); authenticationInfo.setJBossModuleName(moduleName.asString());
@Override protected BaseSecurityInfo<Object> create(String name) { return new JASPIAuthenticationInfo(name); }
/** * <p> * Overriden to include the stacks of login modules in the merged object. * </p> */ @Override public BaseSecurityInfo<Object> merge(BaseSecurityInfo<Object> bi) { if (bi instanceof JASPIAuthenticationInfo == false) throw PicketBoxMessages.MESSAGES.invalidType(JASPIAuthenticationInfo.class.getName()); // merge the auth modules JASPIAuthenticationInfo merged = (JASPIAuthenticationInfo) super.merge(bi); // merge the stacks of login modules JASPIAuthenticationInfo parent = (JASPIAuthenticationInfo) bi; for (LoginModuleStackHolder holder : parent.getLoginModuleStackHolder()) merged.add(holder); for (LoginModuleStackHolder holder : this.getLoginModuleStackHolder()) merged.add(holder); return merged; }
public void addChild(JASPIAuthenticationInfo authInfo, LoginModuleStackHolder lmsHolder, UnmarshallingContext navigator, String namespaceURI, String localName) { authInfo.add(lmsHolder); }
AuthModuleEntry[] amearr = jai.getAuthModuleEntry(); String jbossModule = jai.getJBossModuleName(); if (jbossModule != null && !jbossModule.isEmpty())
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()); } } }
/** * <p> * Overridden to copy the entries that have been configured in the login-module-stack. If more than one stack * has been configured, then the entries corresponding to the first stack will be copied and returned. * </p> */ @Override public AppConfigurationEntry[] copyAppConfigurationEntry() { List<Object> entries = new ArrayList<Object>(); for(AppConfigurationEntry entry : this.getAppConfigurationEntry()) entries.add(entry); return super.copyAppConfigurationEntry(entries); }
JASPIAuthenticationInfo jaspiInfo = new JASPIAuthenticationInfo(authName); SecurityActions.addModules(jaspiInfo, authenticationModuleEntries); for (LoginModuleStackHolder holder : this.loginModuleStackMap.values()) jaspiInfo.add(holder); info.setAuthenticationInfo(jaspiInfo);