wso2wso2-api-managerwso2-streaming-integrator

Cannot change credentials for wso2 api manager Analytics


I have a API Manager 2.6.0 deployment within 3 nodes i.e. 3 VMs. Abbreviations:

  1. GW - Gateway
  2. AIO - Traffic Manager, Key Manager, Dev portal, Publisher
  3. Analytucs - Api M Analytics 2.6.0
  4. DB - PostgreSQL.

I've set everything working between components, till I changed the default admin password, username stood the same. As per manual I did

  1. Changed the admin password from UI, sice I did a tests already with default credentials
  2. Changed password in api-manager.xml on AIO and GW
  3. Changed password in user-mgt.xml on AIO and GW
  4. Changed password in jndi.properties on AIO and GW

Above 4 points as noted in manual- https://docs.wso2.com/display/AM260/Maintaining+Logins+and+Passwords This manual does not tell how to make distributed analytics node to accept that password.

The Analytics Install manual told to install WSO2 API-M Analytics and WSO2 API-M(which as I understand is meant if both are on same machine). Again, this manual does not tell much about user configuring on Analytics server.

I tried to look from DAS and SP manual, but the Analytics does not have auth.configs: in YAML files and nor adding them manually from SP source code helps.

Error returned on GW and AIO:

2019-02-21 15:13:52,090 [-] [DataBridge-ConnectionService-tcp://192.168.102.39:7612-pool-11-thread-1] ERROR DataEndpointConnectionWorker Error while trying to connect to the endpoint. Cannot borrow client for ssl://192.168.102.39:7712. org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Cannot borrow client for ssl://192.168.102.39:7712.

Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Error while trying to login to the data receiver.

Caused by: ThriftAuthenticationException(message:wrong userName or password)

On Analytics obvious:

[2019-02-21 15:16:49,016] ERROR {org.wso2.carbon.databridge.core.internal.authentication.CarbonAuthenticationHandler} - Authentication failed for username 'admin'. Error : 'Invalid_Credentials'. Error Description : 'The login credential used for login are invalid, username : 'admin'.' [2019-02-21 15:16:49,016] ERROR {org.wso2.carbon.databridge.core.internal.authentication.Authenticator} - wrong userName or password

The question is, how to make WSO2 APIM Analytics(2.6.0) node, which is separated from API Manager, to accept the changed credentials.

Last tought is do I need to connect Analytics to Carbon DB?


Solution

  • You have to add the auth.configs element to the conf/worker/deployment.yaml file, (Please note the password has to be The Base64(UTF-8) encrypted)

    auth.configs: 
      type: 'local'
      userManager:
        adminRole: admin
        userStore:
          users:
           -
             user:
               username: admin
               password: YWRtaW4=
               roles: 1
          roles:
           -    
             role:
               id: 1
               displayName: admin