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:
- Go to <ServiceDesk>/webapps/ROOT/WEB-INF/security/
- Edit Security-esm.xml file
- Add/Edit the the following param values that's below this line: <param name="selectedPortal" type="long"/>
<param name="username" type="String"/>
<param name="password" type="String" max-len="2000"/>
- Restart SDP services for the changes to take place
This change will be lost after a service pack upgrade. Kindly make the changes again after SDP upgrade.
Login flow:
- Make a GET call to <sdp>/api/v3/app_resources/properties
- Get the public_key from the JSON's result.login_props.password_encryption.public_key
- 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
- Base64Url encode this encrypted password to be able to send in query param
- Now call <sdp>/ESM.do?type=portal&username=USERNAME&password=ENCRYPTED_PASSWORD in the browser
- The user will be logged in via local authentication and the target page /ESM.do?type=portal will be displayed.
New to ADSelfService Plus?