Commit 1f0ef7b7 authored by michael.simon's avatar michael.simon
Browse files

configuration possibility for aa entites

parent 61ddb344
......@@ -45,7 +45,8 @@ public class ShowSamlAAConfigurationBean implements Serializable {
private Long id;
private X509Certificate certificate;
private X509Certificate standbyCertificate;
public void preRenderView(ComponentSystemEvent ev) {
if (entity == null) {
entity = service.findByIdWithAttrs(id, "hostNameList");
......@@ -57,6 +58,15 @@ public class ShowSamlAAConfigurationBean implements Serializable {
certificate = null;
}
}
if (entity != null && entity.getStandbyCertificate() != null &&
(! entity.getStandbyCertificate().equals(""))) {
try {
standbyCertificate = cryptoHelper.getCertificate(entity.getStandbyCertificate());
} catch (IOException e) {
logger.info("No valid X509 Cert", e);
certificate = null;
}
}
}
}
......@@ -82,5 +92,13 @@ public class ShowSamlAAConfigurationBean implements Serializable {
public void setCertificate(X509Certificate certificate) {
this.certificate = certificate;
}
public X509Certificate getStandbyCertificate() {
return standbyCertificate;
}
public void setStandbyCertificate(X509Certificate standbyCertificate) {
this.standbyCertificate = standbyCertificate;
}
}
......@@ -69,6 +69,14 @@
<p:inputTextarea id="certificate" rows="12" cols="80" autoResize="false"
value="#{editSamlAAConfigurationBean.entity.certificate}"/>
<h:outputLabel for="sprivate_key" value="#{messages.private_key} (#{messages.standby}):"/>
<p:inputTextarea id="sprivate_key" rows="12" cols="80" autoResize="false"
value="#{editSamlAAConfigurationBean.entity.standbyPrivateKey}"/>
<h:outputLabel for="scertificate" value="#{messages.certificate} (#{messages.standby}):"/>
<p:inputTextarea id="scertificate" rows="12" cols="80" autoResize="false"
value="#{editSamlAAConfigurationBean.entity.standbyCertificate}"/>
</p:panelGrid>
<h:commandButton id="save" action="#{editSamlAAConfigurationBean.save}" value="#{messages.save}"/>
</p:panel>
......
......@@ -72,11 +72,11 @@
<p:inputTextarea id="certificate" rows="12" cols="80" autoResize="false"
value="#{editSamlSpConfigurationBean.entity.certificate}"/>
<h:outputLabel for="sprivate_key" value="#{messages.private_key}:"/>
<h:outputLabel for="sprivate_key" value="#{messages.private_key} (#{messages.standby}):"/>
<p:inputTextarea id="sprivate_key" rows="12" cols="80" autoResize="false"
value="#{editSamlSpConfigurationBean.entity.standbyPrivateKey}"/>
<h:outputLabel for="scertificate" value="#{messages.certificate}:"/>
<h:outputLabel for="scertificate" value="#{messages.certificate} (#{messages.standby}):"/>
<p:inputTextarea id="scertificate" rows="12" cols="80" autoResize="false"
value="#{editSamlSpConfigurationBean.entity.standbyCertificate}"/>
......
......@@ -61,6 +61,26 @@
<h:outputLabel for="private_key" value="#{messages.private_key}:"/>
<h:outputText id="private_key" styleClass="pretext"
value="#{showSamlAAConfigurationBean.entity.privateKey}"/>
<h:outputLabel for="certinfo5" value="#{messages.cert_dn} (#{messages.standby}):"/>
<h:outputText id="certinfo5" value="#{showSamlAAConfigurationBean.standbyCertificate.subjectDN}"/>
<h:outputLabel for="certinfo6" value="#{messages.cert_issuer} (#{messages.standby}):"/>
<h:outputText id="certinfo6" value="#{showSamlAAConfigurationBean.standbyCertificate.issuerDN}"/>
<h:outputLabel for="certinfo7" value="#{messages.valid_from} (#{messages.standby}):"/>
<h:outputText id="certinfo7" value="#{showSamlAAConfigurationBean.standbyCertificate.notBefore}"/>
<h:outputLabel for="certinfo8" value="#{messages.valid_to} (#{messages.standby}):"/>
<h:outputText id="certinfo8" value="#{showSamlAAConfigurationBean.standbyCertificate.notAfter}"/>
<h:outputLabel for="certificate9" value="#{messages.certificate} (#{messages.standby}):"/>
<h:outputText id="certificate9" styleClass="pretext"
value="#{showSamlAAConfigurationBean.entity.standbyCertificate}"/>
<h:outputLabel for="private_key2" value="#{messages.private_key} (#{messages.standby}):"/>
<h:outputText id="private_key2" styleClass="pretext"
value="#{showSamlAAConfigurationBean.entity.standbyPrivateKey}"/>
</p:panelGrid>
<h:link outcome="edit-aa-config.xhtml" value="#{messages.edit}">
<f:param name="id" value="#{showSamlAAConfigurationBean.entity.id}"/>
......
......@@ -65,23 +65,23 @@
<h:outputText id="private_key" styleClass="pretext"
value="#{showSamlSpConfigurationBean.entity.privateKey}"/>
<h:outputLabel for="certinfo5" value="#{messages.cert_dn}:"/>
<h:outputLabel for="certinfo5" value="#{messages.cert_dn} (#{messages.standby}):"/>
<h:outputText id="certinfo5" value="#{showSamlSpConfigurationBean.standbyCertificate.subjectDN}"/>
<h:outputLabel for="certinfo6" value="#{messages.cert_issuer}:"/>
<h:outputLabel for="certinfo6" value="#{messages.cert_issuer} (#{messages.standby}):"/>
<h:outputText id="certinfo6" value="#{showSamlSpConfigurationBean.standbyCertificate.issuerDN}"/>
<h:outputLabel for="certinfo7" value="#{messages.valid_from}:"/>
<h:outputLabel for="certinfo7" value="#{messages.valid_from} (#{messages.standby}):"/>
<h:outputText id="certinfo7" value="#{showSamlSpConfigurationBean.standbyCertificate.notBefore}"/>
<h:outputLabel for="certinfo8" value="#{messages.valid_to}:"/>
<h:outputLabel for="certinfo8" value="#{messages.valid_to} (#{messages.standby}):"/>
<h:outputText id="certinfo8" value="#{showSamlSpConfigurationBean.standbyCertificate.notAfter}"/>
<h:outputLabel for="certificate9" value="#{messages.certificate}:"/>
<h:outputLabel for="certificate9" value="#{messages.certificate} (#{messages.standby}):"/>
<h:outputText id="certificate9" styleClass="pretext"
value="#{showSamlSpConfigurationBean.entity.standbyCertificate}"/>
<h:outputLabel for="private_key2" value="#{messages.private_key}:"/>
<h:outputLabel for="private_key2" value="#{messages.private_key} (#{messages.standby}):"/>
<h:outputText id="private_key2" styleClass="pretext"
value="#{showSamlSpConfigurationBean.entity.standbyPrivateKey}"/>
</p:panelGrid>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment