Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#120] FIX don't have KeyInfo Tag: allow includeCert in saml2 signature #686

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static Response sendAssertionIDRequest(
samlAuthorityEntityID, role, realm, binding, location);

if (binding.equalsIgnoreCase(SAML2Constants.SOAP)) {
signAssertionIDRequest(assertionIDRequest, realm, false);
signAssertionIDRequest(assertionIDRequest, realm, true);
return sendAssertionIDRequestBySOAP(assertionIDRequest,
location.toString(), realm, samlAuthorityEntityID, role, roled);
} else {
Expand Down Expand Up @@ -479,7 +479,7 @@ public static Response processAssertionIDRequest(
respIssuer.setValue(samlAuthorityEntityID);
samlResp.setIssuer(respIssuer);

signResponse(samlResp, samlAuthorityEntityID, role, realm, false);
signResponse(samlResp, samlAuthorityEntityID, role, realm, true);

return samlResp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static Response sendAttributeQuery(AttributeQuery attrQuery,
}

if (binding.equalsIgnoreCase(SAML2Constants.SOAP)) {
signAttributeQuery(attrQuery, realm, false);
signAttributeQuery(attrQuery, realm, true);
return sendAttributeQuerySOAP(attrQuery, location,
attrAuthorityEntityID, aad);
} else {
Expand Down Expand Up @@ -372,7 +372,7 @@ public static Response processAttributeQuery(AttributeQuery attrQuery,
if (encryptedID != null) {
EncryptedAssertion encryptedAssertion = null;
try {
signAssertion(assertion, realm, attrAuthorityEntityID, false);
signAssertion(assertion, realm, attrAuthorityEntityID, true);
encryptedAssertion = encryptAssertion(assertion,
encryptedID, attrAuthorityEntityID, requesterEntityID,
realm, attrQueryProfileAlias);
Expand Down Expand Up @@ -407,7 +407,7 @@ public static Response processAttributeQuery(AttributeQuery attrQuery,
respIssuer.setValue(attrAuthorityEntityID);
samlResp.setIssuer(respIssuer);

signResponse(samlResp, attrAuthorityEntityID, realm, false);
signResponse(samlResp, attrAuthorityEntityID, realm, true);

return samlResp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static Response sendAuthnQuery(AuthnQuery authnQuery,
}

if (binding.equalsIgnoreCase(SAML2Constants.SOAP)) {
signAuthnQuery(authnQuery, realm, false);
signAuthnQuery(authnQuery, realm, true);
return sendAuthnQuerySOAP(authnQuery, location,
authnAuthorityEntityID, realm, aad);
} else {
Expand Down Expand Up @@ -342,7 +342,7 @@ public static Response processAuthnQuery(AuthnQuery authnQuery,
respIssuer.setValue(authnAuthorityEntityID);
samlResp.setIssuer(respIssuer);

signResponse(samlResp, authnAuthorityEntityID, realm, false);
signResponse(samlResp, authnAuthorityEntityID, realm, true);

return samlResp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private static void signMNIRequest(ManageNameIDRequest mniRequest,
String hostEntityRole, String remoteEntity)
throws SAML2Exception {
signMNIRequest(mniRequest, realm, hostEntity,
hostEntityRole, remoteEntity, false);
hostEntityRole, remoteEntity, true);
}

private static void signMNIRequest(ManageNameIDRequest mniRequest,
Expand Down Expand Up @@ -503,7 +503,7 @@ private static void signMNIResponse(ManageNameIDResponse mniResponse,
String hostEntityRole, String remoteEntity)
throws SAML2Exception {
signMNIResponse(mniResponse, realm, hostEntity,
hostEntityRole, remoteEntity, false);
hostEntityRole, remoteEntity, true);
}

private static void signMNIResponse(ManageNameIDResponse mniResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public static void signSLORequest(LogoutRequest sloRequest,
String hostEntityRole, String remoteEntity)
throws SAML2Exception {
signSLORequest(sloRequest, realm, hostEntity,
hostEntityRole, remoteEntity, false);
hostEntityRole, remoteEntity, true);
}

static void signSLORequest(LogoutRequest sloRequest,
Expand Down Expand Up @@ -926,7 +926,7 @@ public static void signSLOResponse(LogoutResponse sloResponse,
String hostEntityRole, String remoteEntity)
throws SAML2Exception {
signSLOResponse(sloResponse, realm, hostEntity,
hostEntityRole, remoteEntity, false);
hostEntityRole, remoteEntity, true);
}

static void signSLOResponse(LogoutResponse sloResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static NameIDMappingResponse initiateNameIDMappingRequest(
userID, realm, spEntityID, idpEntityID, nimURL,
targetSPEntityID, targetNameIDFormat);

signNIMRequest(nimRequest, realm, spEntityID, false);
signNIMRequest(nimRequest, realm, spEntityID, true);

BaseConfigType config = metaManager.getIDPSSOConfig(realm,
idpEntityID);
Expand Down Expand Up @@ -304,7 +304,7 @@ public static NameIDMappingResponse processNameIDMappingRequest(
}

nimResponse.setStatus(status);
signNIMResponse(nimResponse, realm, idpEntityID, false);
signNIMResponse(nimResponse, realm, idpEntityID, true);

return nimResponse;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static Response processXACMLQuery(RequestAbstract request,
"wantXACMLAuthzDecisionQuerySigned");
if (wantQuerySigned != null &&
wantQuerySigned.equals("true")) {
signAttributeQuery(xacmlQuery,realm,pepEntityID, false);
signAttributeQuery(xacmlQuery,realm,pepEntityID, true);
}
}

Expand Down