This is a sample IDP for posting SAML Assertion to SP to trigger an IDP-initialed Single-Sign-On with OpenSAML2 and SpringBoot.
You will need to generate a private and public key to use for sign saml assertions. The following steps are used for creating the keys:
#create the keypair
openssl req -new -x509 -days 3652 -nodes -out certificate.crt -keyout privateKey.pem
#convert the private key to pkcs8 format
openssl pkcs8 -topk8 -inform PEM -outform DER -in privateKey.pem -out privateKey.pkcs8 -nocrypt
$ curl "http://localhost:8080/samlpost?username=a@sample.com&spEntity=urn:auth0:XX:IDP-Init-Test&spURL=https://XX.auth0.com/login/callback?connection=IDP-Init-Test"
Output:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>POST data</title>
</head>
<body >
<noscript>
<p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the button below once to
proceed.</p>
</noscript>
<form method="post" action="https://XX.auth0.com/login/callback?connection=IDP-Init-Test">
<input type="hidden" name="SAMLResponse" value="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9YWC5hdXRoMC5jb20vbG9naW4vY2FsbGJhY2s/Y29ubmVjdGlvbj1JRFAtSW5pdC1UZXN0IiBJRD0iNGRlM2QzNzUtNmRjYy00ZDA2LThjNjUtMzZlNGFkZjY0NjNlIiBJc3N1ZUluc3RhbnQ9IjIwMTktMTAtMDJUMDI6MDk6NDguMjMwWiIgVmVyc2lvbj0iMi4wIiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiPjxzYW1sMjpJc3N1ZXIg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