Search code examples
httpssingle-sign-on

How to download file from server (sso and https)


It is possible to download a file from a server that use HTTPS + SSO (Single Sign ON) by means command line (of course using linux)?

The Single Sign On system run with shibbolet process


Solution

  • SOLVED!!

    wget  --save-cookies sso.cookie --keep-session-cookies --header="Referer: https://serverCheckPoint/" 'https://serverCheckPoint/Shibboleth.sso/Login?target=https://ServerCheckPoint/path_Of_The_File_To_Read'
    
    curl -b sso.cookie -c 2sso.cookie -L -k -f -s -S https://IDP_SERVER/PATH_of_loginPAge --data "USER=yourUser&password=YOURPASSWORD" -o localfile.html
    
    wget -v --load-cookies 2sso.cookie --save-cookies auth2.cookie --keep-session-cookies https://CheckPointServer/Path_of_data/DATA_to_DOWNLOAD
    

    the file sso.cookie, 2sso.cookie, auth.cookie are used in order to store the session and the SAML token. In case there are problem with certificates you should to disable the check for the TLS certificates