This RESTful web service request can be used to authenticate WebFOCUS sign-on requests. The XML response that is returned indicates whether the authentication was successful or unsuccessful. The web service response also includes a jsessionid, which exists within the HTTP header. All subsequent WebFOCUS RESTful web services requests must have the jsessionid in the HTTP header. If an application is required to interact with specific WebFOCUS components (for example, WebFOCUS InfoAssist), then the jsessionid is also used when sending the HTTP request to open the component. This eliminates the need to reauthenticate to WebFOCUS. In addition, if you are already signed on to the WebFOCUS BI Portal, you are not required to run this sign-on request. The jsessionid is returned in the HTTP header after a successful sign on.
Note: By default, when using RESTful web services with Central Authentication Service (CAS) or Security Assertion Markup Language (SAML), pre-authentication attempts to access protected resources from a user who has not yet signed in to CAS or SAML will redirect the request to the CAS or SAML sign-in pages, which is an undesirable response. To change this response to an HTTP 401 (Unauthorized) status code and allow the application to initiate the authentication, you must configure a setting within the securitysettings.xml file to disable anonymous access, and create an HTTP request header within the RESTful application to indicate an HTTP 401 response instead of a redirect.
anonymousAuthEnabled=false
disallowSignInRedirect=true
HTTP Method: POST
REST URL Format:
http://host:port/ibi_apps/rs/ibfs
where:
Is the name of the system where WebFOCUS is installed.
Is the port number used by WebFOCUS.
Body Format:
IBIRS_action=signOn&IBIRS_userName=Userid&IBIRS_password=Password
where:
Is the user ID that is required to authenticate to WebFOCUS Managed Reporting.
Is the password that is required to authenticate to WebFOCUS Managed Reporting.
Example:
In the following example, a sign-on attempt is made to WebFOCUS Managed Reporting with a user ID value of admin and a password value of admin.
Post Request URL:
http://localhost:8080/ibi_apps/rs/ibfs
Body:
IBIRS_action=signOn&IBIRS_userName=admin&IBIRS_password=admin
Response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ibfsrpc _jt="IBFSResponseObject" language="EN" name="IBIRS_action"
returncode="10000"
returndesc="SUCCESS" subreturncode="0" subsystem="SSYS" type="simple">
<ibfsparams size="0"/>
<rootObject _jt="IBFSUserObject" description="" dummy="false" email=""
fullPath="IBFS:/SSYS/USERS/admin" name="admin" password="" type="User">
<status _jt="IBSSUserStatus" name="UNDEFINED"/>
<groups _jt="ArrayList" size="0"/>
</rootObject>
</ibfsrpc>
If the value for the returncode attribute in the XML response is 10000, then the sign-on attempt to WebFOCUS Managed Reporting was successful.
The following is a sample- response trace from an authentication request:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-XSS-protection: 0 Set-Cookie: JSESSIONID=BD61C838569C30474977ACDE3DAD8F54; Path=/ibi_apps/; HttpOnly Expires: Mon, 24 Sep 2012 09:12:48 GMT Cache-Control: private Set-Cookie: WF_SESSIONID=1932062683094412614; Path=/ IBI_Messages: 2 IBI_Message1: (IBFS10000) SUCCESS IBI_Message2: <IBIWF_SES_AUTH_TOKEN>=<null> Content-Type: text/xml;charset=iso-8859-1 Transfer-Encoding: chunked Date: Mon, 24 Sep 2012 09:07:48 GMT 205 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <ibfsrpc_jt="IBFSResponseObject" language="EN" name="signOn" returncode="10000" returndesc="SUCCESS" subreturncode="0" subsystem="SSYS" type="simple"> <ibfsparams size="0"/> <rootObject _jt="IBFSUserObject" description="" dummy="false" email="" fullPath="IBFS:/SSYS/USERS/admin" name="admin" password="" rsPath="/ibi_apps/rs/ibfs/SSYS/USERS/admin" type="User"> <status _jt="IBSSUserStatus" name="UNDEFINED"/> <groups_jt="ArrayList" size="0"/> </rootObject> </ibfsrpc>
The following is a sample trace of a subsequent request:
GET http://localhost:8080/ibi_apps/rs/ibfs/WFC/Repository?IBIRS_action=get HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Cookie: JSESSIONID=BD61C838569C30474977ACDE3DAD8F54; wcNewPreference=1963156A6FD0D3C6EE81F2C992ED527D; WF_SESSIONID=1932062683094412614
Information Builders |