This documentation is for WSO2 API Manager 2.6.0. View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCUMENTATION-8525

...

  1. Change the user credentials in the following files.

    • The <UserName> and <Password> values in <API-M_HOME>/repository/conf/user-mgt.xml file.

      Code Block
      languagexml
      <UserManager>
         <Realm>
            <Configuration>
                ...
                <AdminUser>
                   <UserName>admin</UserName>                  
                   <Password>admin</Password>
                </AdminUser>
            ...
         </Realm>
      </UserManager>
      Note

      Note that the password in the  user-mgt.xml  file is written to the primary user store when the server starts for the first time. Thereafter, the password will be validated from the primary user store and not from the  user-mgt.xml  file. Therefore, if you need to change the admin password stored in the user store, you cannot simply change the value in the  user-mgt.xml  file. To change the super admin password, you must use the  Change Password option from the management console.

      To change the password from Management Console (https://localhost:9443/carbon), follow the steps in Changing a Password corresponding to API Manager.

    • The <API-M_HOME>/repository/conf/jndi.properties file.

      Code Block
      connectionfactory.TopicConnectionFactory = amqp://admin:[email protected]/carbon?brokerlist='tcp://localhost:5672'
      connectionfactory.QueueConnectionFactory = amqp://admin:[email protected]/test?brokerlist='tcp://localhost:5672'
  2. If you have Configured API Manager Analytics when changing the super admin credentials you have to change credentials in <API-M_HOME>/repository/conf/api-manager.xml and <API-M_HOME>/repository/conf/log4j.properties as well. 

    The <API-M_HOME>/repository/conf/api-manager.xml

     file.

    Code Block
    <Analytics>
            <!-- Enable Analytics for API Manager -->
            <Enabled>true</Enabled>
            ....
    
            <StreamProcessorServerURL>{tcp://localhost:7612}</StreamProcessorServerURL>
            <!--StreamProcessorAuthServerURL>{ssl://localhost:7712}</StreamProcessorAuthServerURL-->
            <!-- Administrator username to login to the remote Stream Processor server. -->
            <StreamProcessorUsername>${admin.username}</StreamProcessorUsername>
            <!-- Administrator password to login to the remote Stream Processor server. -->
            <StreamProcessorPassword>${admin.password}</StreamProcessorPassword>
    
            ....
    
            <StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl</StatsProviderImpl>
    
            ...
    
            <StreamProcessorRestApiURL>https://localhost:9444</StreamProcessorRestApiURL>
            <StreamProcessorRestApiUsername>${admin.username}</StreamProcessorRestApiUsername>
            <StreamProcessorRestApiPassword>${admin.password}</StreamProcessorRestApiPassword>
    
            .....
    
        </Analytics>

    The <API-M_HOME>/repository/conf/log4j.properties file.

    Code Blocklog4j.appender.DAS_AGENT.userName=admin log4j.appender.DAS_AGENT.password=admin log4j.appender.LOGEVENT.userName=admin log4j.appender.LOGEVENT.password=admin       
Note

Do you have any special characters in passwords?

  • If you specify passwords inside XML files, take care when giving special characters in the user names and passwords. According to XML specification (http://www.w3.org/TR/xml/), some special characters can disrupt the configuration. For example, the ampersand character (&) must not appear in the literal form in XML files. It can cause a Java Null Pointer exception. You must wrap it with CDATA (http://www.w3schools.com/xml/xml_cdata.asp) as shown below or remove the character:

    Code Block
    languagexml
    <Password>
        <![CDATA[[email protected]?qZ%Jv855&A4a,%M8B]]>
    </Password>
  • Note the following if you have special characters in the passwords on your jndi.properties file:

    • It is not possible to use the @ symbol in the username or password.
    • It is also not possible to use the percentage (%) sign in the password. When building the connection URL, the URL is parsed. This parsing exception happens because the percentage (%) sign acts as the escape character in URL parsing. If using the percentage (%) sign in the connection string is required, use the respective encoding character for the percentage (%) sign in the connection string. For example, if you need to pass adm%in as the password, then the % symbol should be encoded with its respective URL encoding character. Therefore, you have to send it as adm%25in.

      For a list of possible URL parsing patterns, see URL encoding reference.

...

Login in via multiple user attributes in API Store

For information, see Authentication using multiple Attributes in the WSO2 IS documentation.

Setting up an e-mail login 
Anchor
emaillogin
emaillogin

For information, see Email Authentication in the WSO2 IS documentation.

...

Note

Note that auto-provision users based on a social network login is not supported in a multi-tenant environment

Info

In a multi-tenant environment, the system cannot identify the tenant domain in the login request that comes to the API Manager's Publisher/Store. Therefore, the service provider is registered as a SaaS application within the super tenant's space. Configuring user provisioning is part of creating the service provider. In order to authenticate the user through a third party identity provider such as a social network login, you must enable identity federation. As the service provider is created in the super tenant's space, the provisioned user is also created within the super tenant's space. As a result, it is not possible to provision the user in the tenant's space. 

To overcome this limitation, you can write a custom authenticator to retrieve the tenant domain of the user and write a custom login page where the user can enter the tenant domain, which is then added to the authenticator context. Then, write a custom provisioning handler to provision the user in the tenant domain that is maintained in the context.