diff --git a/object/application.go b/object/application.go index 70f947e1..5d28a2bd 100644 --- a/object/application.go +++ b/object/application.go @@ -57,6 +57,7 @@ type Application struct { EnableAutoSignin bool `json:"enableAutoSignin"` EnableCodeSignin bool `json:"enableCodeSignin"` EnableSamlCompress bool `json:"enableSamlCompress"` + EnableSamlC14n10 bool `json:"enableSamlC14n10"` EnableWebAuthn bool `json:"enableWebAuthn"` EnableLinkWithEmail bool `json:"enableLinkWithEmail"` OrgChoiceMode string `json:"orgChoiceMode"` diff --git a/object/saml_idp.go b/object/saml_idp.go index e2909607..4bfaea84 100644 --- a/object/saml_idp.go +++ b/object/saml_idp.go @@ -324,6 +324,11 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h } ctx := dsig.NewDefaultSigningContext(randomKeyStore) ctx.Hash = crypto.SHA1 + + if application.EnableSamlC14n10 { + ctx.Canonicalizer = dsig.MakeC14N10RecCanonicalizer() + } + //signedXML, err := ctx.SignEnvelopedLimix(samlResponse) //if err != nil { // return "", "", fmt.Errorf("err: %s", err.Error()) diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index d2c13821..049fb8ef 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -640,13 +640,23 @@ class ApplicationEditPage extends React.Component { }} /> + + + {Setting.getLabel(i18next.t("application:Enable SAML C14N10"), i18next.t("application:Enable SAML C14N10 - Tooltip"))} : + + + { + this.updateApplicationField("enableSamlC14n10", checked); + }} /> + + - {Setting.getLabel(i18next.t("general:SAML Attribute"), i18next.t("general:SAML Attribute - Tooltip"))} : + {Setting.getLabel(i18next.t("general:SAML attributes"), i18next.t("general:SAML attributes - Tooltip"))} : {this.updateApplicationField("samlAttributes", value);}}