setAttribute(model, RECOVERY_PASSWORD, recoveryCredential.getPassword()); if (recoveryCredential instanceof org.jboss.as.connector.metadata.api.common.Credential && ((org.jboss.as.connector.metadata.api.common.Credential) recoveryCredential).isElytronEnabled()) { setAttribute(model, RECOVERY_ELYTRON_ENABLED, true); setAttribute(model, RECOVERY_AUTHENTICATION_CONTEXT, recoveryCredential.getSecurityDomain()); } else { setAttribute(model, RECOVERY_SECURITY_DOMAIN, recoveryCredential.getSecurityDomain()); setAttribute(model, RECOVERY_USERNAME, recoveryCredential.getUserName());
return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getUserName()); } else if (attributeName.equals(Constants.RECOVERY_PASSWORD.getName())) { return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getSecurityDomain()); return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getSecurityDomain());
if (security != null && security.getUserName() != null && !security.getUserName().trim().equals("")) security.getUserName())); if (security != null && security.getPassword() != null && !security.getPassword().trim().equals("")) security.getPassword()));
final String securityDomain = credential.getSecurityDomain(); if (((Credential) credential).isElytronEnabled()) { try {
return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getUserName()); } else if (attributeName.equals(Constants.RECOVERY_PASSWORD.getName())) { return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getSecurityDomain());
if (cd.getRecovery() != null && cd.getRecovery().getCredential() != null && cd.getRecovery().getCredential().getSecurityDomain() != null) { if (!elytronEnabled) { builder.requires(SecurityDomainService.SERVICE_NAME.append(cd.getRecovery().getCredential().getSecurityDomain())); } else { builder.requires(context.getCapabilityServiceName(AUTHENTICATION_CONTEXT_CAPABILITY, cd.getRecovery().getCredential().getSecurityDomain(), AuthenticationContext.class));
if (credential.getUserName() != null) sb.append(credential.getUserName()); sb.append("</").append(Credential.Tag.USER_NAME).append(">"); sb.append(credential.getPassword()); sb.append("</").append(Credential.Tag.PASSWORD).append(">"); sb.append(credential.getSecurityDomain()); sb.append("</").append(Credential.Tag.SECURITY_DOMAIN).append(">");
return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getUserName()); } else if (attributeName.equals(Constants.RECOVERY_PASSWORD.getName())) { return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getSecurityDomain()); return; setStringIfNotNull(context, dataSource.getRecovery().getCredential().getSecurityDomain());
final Credential credential = dataSourceConfig.getRecovery().getCredential(); if (credential != null) { final String securityDomainName = credential.getSecurityDomain(); if (!RECOVERY_ELYTRON_ENABLED.resolveModelAttribute(context, model).asBoolean() && securityDomainName != null) { builder.requires(SecurityDomainService.SERVICE_NAME.append(securityDomainName));
setAttribute(model, RECOVERY_PASSWORD, recoveryCredential.getPassword()); setAttribute(model, RECOVERY_SECURITY_DOMAIN, recoveryCredential.getSecurityDomain()); setAttribute(model, RECOVERY_USERNAME, recoveryCredential.getUserName());
@Override protected SubjectFactory getSubjectFactory(Credential credential, String jndiName) throws org.jboss.jca.deployers.common.DeployException { log.tracef("getSubjectFactory(%s)", credential); if (credential == null || credential.getSecurityDomain() == null || credential.getSecurityDomain().trim().equals("")) return null; try { return kernel.getBean(credential.getSecurityDomain(), SubjectFactory.class); } catch (Throwable t) { throw new org.jboss.jca.deployers.common.DeployException("Error during loookup of security domain: " + credential.getSecurityDomain(), t); } }
setAttribute(model, RECOVERY_PASSWORD, recoveryCredential.getPassword()); if (recoveryCredential instanceof org.jboss.as.connector.metadata.api.common.Credential && ((org.jboss.as.connector.metadata.api.common.Credential) recoveryCredential).isElytronEnabled()) { setAttribute(model, RECOVERY_ELYTRON_ENABLED, true); setAttribute(model, RECOVERY_AUTHENTICATION_CONTEXT, recoveryCredential.getSecurityDomain()); } else { setAttribute(model, RECOVERY_SECURITY_DOMAIN, recoveryCredential.getSecurityDomain()); setAttribute(model, RECOVERY_USERNAME, recoveryCredential.getUserName());
final String securityDomain = credential.getSecurityDomain(); if (((Credential) credential).isElytronEnabled()) { try {
if (cd.getRecovery() != null && cd.getRecovery().getCredential() != null && cd.getRecovery().getCredential().getSecurityDomain() != null) { if (!elytronEnabled) { builder.addDependency(SecurityDomainService.SERVICE_NAME.append(cd.getRecovery().getCredential().getSecurityDomain())); } else { builder.addDependency(context.getCapabilityServiceName(AUTHENTICATION_CONTEXT_CAPABILITY, cd.getRecovery().getCredential().getSecurityDomain(), AuthenticationContext.class));
final Credential credential = dataSourceConfig.getRecovery().getCredential(); if (credential != null) { final String securityDomainName = credential.getSecurityDomain(); if (!RECOVERY_ELYTRON_ENABLED.resolveModelAttribute(context, model).asBoolean() && securityDomainName != null) { builder.addDependency(SecurityDomainService.SERVICE_NAME.append(securityDomainName));