Search code examples
authenticationwso2apache-axiswso2-identity-server

Unable to access AuthenticationAdmin service of WSO2 Identity server


I have a new WSO2 Identity server. I need to access an axis web service AuthenticationAdmin of WSO2 3.2.3 to authenticate a user. I tried to follow several tutorials but none helped.

Issuing https://localhost:9443/services/AuthenticationAdmin gives following error on browser:

message: Access to service metadata for service: AuthenticationAdmin has been forbidden

description: Access to the specified resource (Access to service metadata for service: AuthenticationAdmin has been forbidden) has been forbidden.

And on console I get the error for the service not being found, as:

ERROR {org.apache.axis2.engine.AxisEngine} - The endpoint reference (EPR) for the Operation not found is /services/AuthenticationAdmin and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator..

Please guide me..


Solution

    1. Change the,

      <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>

    elements value to 'true'. That will give you the access to the Admin service WSDLs.

    1. start the carbon server, log-in and access the URL, https://localhost:9443/services/AuthenticationAdmin?wsdl

    2. you should see the wsdl of the admin service.

    3. Use that wsdl to code-generate the client stub or use already created jar at [1]

    Once you obtain the adminCookie through this service you can use that cookie for all subsequent admin operations.

    [1] http://dist.wso2.org/maven2/org/wso2/carbon/org.wso2.carbon.authenticator.stub/3.2.0/

    HTH