use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CoreWsSecuritySecurityTokenServiceConfiguration method transportService.
@RefreshScope
@Bean
public StaticService transportService() {
final StaticService s = new StaticService();
s.setEndpoints(CollectionUtils.wrap(".*"));
return s;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class CoreWsSecuritySecurityTokenServiceConfiguration method transportSTSProperties.
@RefreshScope
@ConditionalOnMissingBean(name = "transportSTSProperties")
@Bean
public STSPropertiesMBean transportSTSProperties() {
final WsFederationProperties.SecurityTokenService wsfed = casProperties.getAuthn().getWsfedIdp().getSts();
final WsFederationProperties.IdentityProvider idp = casProperties.getAuthn().getWsfedIdp().getIdp();
final StaticSTSProperties s = new StaticSTSProperties();
s.setIssuer(getClass().getSimpleName());
s.setRealmParser(new UriRealmParser(realms()));
s.setSignatureCryptoProperties(CryptoUtils.getSecurityProperties(wsfed.getSigningKeystoreFile(), wsfed.getSigningKeystorePassword()));
s.setEncryptionCryptoProperties(CryptoUtils.getSecurityProperties(wsfed.getEncryptionKeystoreFile(), wsfed.getEncryptionKeystorePassword()));
final Relationship rel = new Relationship();
rel.setType(Relationship.FED_TYPE_IDENTITY);
rel.setSourceRealm(idp.getRealmName());
rel.setTargetRealm(idp.getRealmName());
s.setRelationships(CollectionUtils.wrap(rel));
return s;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class WsFederationAuthenticationConfiguration method wsFederationHelper.
@Bean
@RefreshScope
public WsFederationHelper wsFederationHelper() {
final WsFederationHelper h = new WsFederationHelper();
h.setConfigBean(this.configBean);
return h;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class WsFedAuthenticationEventExecutionPlanConfiguration method wsFedConfig.
@Bean
@RefreshScope
public WsFederationConfiguration wsFedConfig() {
final WsFederationConfiguration config = new WsFederationConfiguration();
final WsFederationDelegationProperties wsfed = casProperties.getAuthn().getWsfed();
config.setAttributesType(WsFederationConfiguration.WsFedPrincipalResolutionAttributesType.valueOf(wsfed.getAttributesType()));
config.setIdentityAttribute(wsfed.getIdentityAttribute());
config.setIdentityProviderIdentifier(wsfed.getIdentityProviderIdentifier());
config.setIdentityProviderUrl(wsfed.getIdentityProviderUrl());
config.setTolerance(wsfed.getTolerance());
config.setRelyingPartyIdentifier(wsfed.getRelyingPartyIdentifier());
org.springframework.util.StringUtils.commaDelimitedListToSet(wsfed.getSigningCertificateResources()).forEach(s -> config.getSigningCertificateResources().add(this.resourceLoader.getResource(s)));
org.springframework.util.StringUtils.commaDelimitedListToSet(wsfed.getEncryptionPrivateKey()).forEach(s -> config.setEncryptionPrivateKey(this.resourceLoader.getResource(s)));
org.springframework.util.StringUtils.commaDelimitedListToSet(wsfed.getEncryptionCertificate()).forEach(s -> config.setEncryptionCertificate(this.resourceLoader.getResource(s)));
config.setEncryptionPrivateKeyPassword(wsfed.getEncryptionPrivateKeyPassword());
config.setAttributeMutator(this.attributeMutator);
return config;
}
use of org.springframework.cloud.context.config.annotation.RefreshScope in project cas by apereo.
the class ElectronicFenceConfiguration method multifactorAuthenticationContingencyPlan.
@ConditionalOnMissingBean(name = "multifactorAuthenticationContingencyPlan")
@Bean
@RefreshScope
public AuthenticationRiskContingencyPlan multifactorAuthenticationContingencyPlan() {
final MultifactorAuthenticationContingencyPlan b = new MultifactorAuthenticationContingencyPlan();
configureContingencyPlan(b);
return b;
}
Aggregations