Configure > Users and Roles --> Change my P" /> Configure > Users and Roles --> Change my P" /> Configure > Users and Roles --> Change my P"/>

wso2 BAM: Authentication failed! admin-bam

335 views Asked by At

When I change admin-bam password from Web Console ( the default password for admin-bam is "admin"),

Home > Configure > Users and Roles --> Change my Password.

Then I recive the following log errors:

TID: [0] [BAM] [2015-11-04 08:36:07,718] INFO
{org.wso2.carbon.databridge.core.DataBridge} - user admin-bam connected {org.wso2.carbon.databridge.core.DataBridge}

TID: [0] [BAM] [2015-11-04 08:36:07,733] ERROR
{org.wso2.carbon.databridge.core.internal.authentication.Authenticator} - Authentication failed! admin-bam. This user is not permitted to publish events. {org.wso2.carbon.databridge.core.internal.authentication.Authenticator}

I also change my usr-mgt.xml and restart BAM, but I receive the same error:

<Realm>
<Configuration>
<AddAdmin>true</AddAdmin>
<AdminRole>admin-bam</AdminRole>
<AdminUser>
<UserName>admin-bam</UserName>
<Password>NEW_PASSWORD_HERE</Password>
</AdminUser>
<EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users       in      this role sees the registry root -->
Property name="dataSource">jdbc/USER_LST</Property>
</Configuration>
-.........

If I set again admin-bam/admin, those logs disappear.

Where is the error?

2

There are 2 answers

1
Abimaran Kugathasan On

You have to use in the following way

Configure > Users and Roles > Users > Change Password
3
channae On

You need to change the BAMUsername and BAMPassword to match the new username and passowrd which you defined. Configuration is given below,

<APIUsageTracking>
<!-- Enable/Disable the API usage tracker. -->
<Enabled>true</Enabled>   
<PublisherClass>org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher</PublisherClass>
<ThriftPort>7614</ThriftPort> 
<BAMServerURL>tcp://<BAM host IP>:7614/</BAMServerURL>
<BAMUsername>admin</BAMUsername>
<BAMPassword>admin</BAMPassword>
<!-- JNDI name of the data source to be used for getting BAM statistics. This data source should
    be defined in the master-datasources.xml file in conf/datasources directory. -->
<DataSourceName>jdbc/WSO2AM_STATS_DB</DataSourceName>
</APIUsageTracking>

You can find this file in following location: API Manager/repository/conf/api-manager.xml

If you are in a clustered environment, it is sufficient to only change the above settings in the Gateway node.