Login | Login with username and password in URL param

Login | Login with username and password in URL param

Requirement

To be able to log in to SDP without displaying login page when the user's username and password are known.

Setup:

  1. Go to <ServiceDesk>/webapps/ROOT/WEB-INF/security/
  2. Edit Security-esm.xml file
  3. Add/Edit the the following param values that's below this line: <param name="selectedPortal" type="long"/>
Info
                        <param name="username" type="String"/>
                        <param name="password" type="String" max-len="2000"/>
  1. Restart SDP services for the changes to take place
Warning
This change will be lost after a service pack upgrade. Kindly make the changes again after SDP upgrade. 

Login flow:

  1. Make a GET call to <sdp>/api/v3/app_resources/properties
  2. Get the public_key from the JSON's result.login_props.password_encryption.public_key
  3. Use this RSA public key in PEM format to encrypt the user password using RSA-OAEP padding with SHA-256 for both the main hash and the MGF1 hash
  4. Base64Url encode this encrypted password to be able to send in query param
  5. Now call <sdp>/ESM.do?type=portal&username=USERNAME&password=ENCRYPTED_PASSWORD in the browser
  6. The user will be logged in via local authentication and the target page /ESM.do?type=portal will be displayed.

                  New to ADSelfService Plus?