SAML Request and Sign request before sending in java

855 views Asked by At

Hi I am new to SAML and I want to create a sample request using Java but not Spring. then take that request and sign it and send it to IdP and after that receive the request and be able to read its content.I have tried to make Coveo this work but I didn't know how to create a proper meta data. Is there any simple library or project to do that.

2

There are 2 answers

0
rbrayb On

You need a client side SAML stack.

You can find Java source examples in the open source ones.

4
Bernhard Thalmayr On

Meta data is not mandatory, but it helps a lot as many IdP / SP implementation can directly use it.

You could use https://www.samltool.com/idp_metadata.php to generate IdP meta data. As the SAML response is typically digitally signed (when using front-channel binding) you need to input the certificate of the IdP althouth this is not mandatory. So you may just provide some certificate and remove it later on from the meta data if it's not needed.