Forum Discussion

Roberto_Pulvire's avatar
Roberto_Pulvire
Icon for Nimbostratus rankNimbostratus
Nov 11, 2021

APM Single Sign-On: Forms - Client Initiated j_security_check issue

Hi,

I'm trying to use "Single Sign-On: Forms - Client Initiated" to pass the Okta credentials to a web application running on Tomcat.

 

The web application is returning the following form:

 

        <form data-empty-path="/APG/empty.html" id="login-form" method="post" action="j_security_check" >

<input type="text" id="username" name="j_username" value="" tabindex="1" placeholder="User Name"/>

<input type="password" id="password" name="j_password" value="" tabindex="2" placeholder="Password"/>

<span class="error-message">

</span>

<button type="submit" tabindex="3" class="ui-button ui-widget ui-state-default ui-state-disabled ui-corner-all ui-button-text-only"><span class="ui-button-text">Login</span></button>

</form>

 

My Form Definition settings are the following:

- name = insightful_java

- Detect request for form by: "URI" with Request URI: "/APG"

- Identify Form by: Form Parameters with j_username=%{session.sso.token.last.username} and j_password=%{session.sso.token.last.password}

- Disable Auto detect submit = No

- Detect Login by = None

- Javascript Injection = Auto

 

Under these conditions I see that the form is not automatically filled in the /APG/j_security_check?f5-sso-form: insightful_java sent by my browser.

Or better, I can see that the request is sent with query string parameter = "f5-sso-form: insightful_java", but the "Form Data" is empty

 

My understanding is that the auto generated javascript code used with this setup is the following:

 

<script>

document.body.onkeydown=function(e){return false;};

document.body.style.visibility='hidden';

document.body.style.display='none';

function __f5submit() {

  var __f5form = document.forms[0];

  __f5form.setAttribute('autocomplete', 'off');

  __f5form['j_username'].value='giv';

  __f5form['j_password'].value='f5-sso-token';

  ;

  var __f5action = __f5form.action;

  var __f5qsep = (__f5action.indexOf('?') == -1) ? '?' : '&';

  __f5form.action = __f5action + __f5qsep + 'f5-sso-form=insightful_java';

  ;

  __f5form.submit();

}

if (window.addEventListener) {

 window.addEventListener('load',__f5submit,false);

} else if (window.attachEvent) {

 window.attachEvent('onload',__f5submit);

} else {

 window.onload=__f5submit;

}

</script>

 

Can you please help me to address this issue?

Thanks.

Roberto

 

No RepliesBe the first to reply