Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Change the user credentials in the following files.

    • The <UserName> and <Password> values in the <APIM_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. If you have started the server already, to change the admin password in the userstore do the following:

      1. Modify admin password in the user-mgt.xml file

      2. Configure the password through the management console.To change the super admin password, you must use the Change Password option from the management console.

      3. Edit the files following all the steps given below.

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

    • The  <APIM_HOME>/repository/conf/jndi.properties file.

      Code Block
      connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://localhost:5672'
      connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5672'



      If you have Configured configured API Manager Analytics,
         change the credentials in the following files when changing the super admin credentials you have to change credentials in <APIM_HOME>/repository/conf/api-manager.xml and <APIM_HOME>/repository/conf/log4j.properties as well. The as shown below.

      • <APIM_HOME>/repository/conf/api-manager.

      xml file.
      • xml 

        Code Block
        <Analytics>
                <!-- Enable Analytics for API Manager -->
                <Enabled>true</Enabled>
                ....
        
                <DASServerURL>{tcp://localhost:7612}</DASServerURL>
                <!--DASAuthServerURL>{ssl://localhost:7712}</DASAuthServerURL-->
                <!-- Administrator username to login to the remote DAS server. -->
                <DASUsername>${admin.username}</DASUsername>
                <!-- Administrator password to login to the remote DAS server. -->
                <DASPassword>${admin.password}</DASPassword>
        
                ....
      • 
        
              <StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl</StatsProviderImpl>
        
                ...
        
                <DASRestApiURL>https://localhost:9444</DASRestApiURL>
                <DASRestApiUsername>${admin.username}</DASRestApiUsername>
                <DASRestApiPassword>${admin.password}</DASRestApiPassword>
        
                .....
        
            </Analytics>
      The 
      • <APIM_HOME>/repository/conf/log4j.

      properties file.
      • properties 

        Code Block
        log4j.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[xnvYh?@VHAkc?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.

...

Tip
  • When setting up email login, specify the complete username with tenant domain. If you are in the super tenant mode the username should be as follows. <username>@<email>@carbon.super
    Example:admin@wso2.com@carbon.super.
  • When configuring the <DataPublisher> section under <ThrottlingConfiguration> section in the <PRODUCT_HOME>/repository/conf/api-manager.xml file, specify the fully qualified username with tenant domain.
    Example : <Username>admin@wso2.com@carbon.super</Username>
  • When

    The "@" character is a reserved character in the WSO2 messaging component. Therefore, when specifing username in JMS Connection URL, under <JMSConnectionParameters> section in the <PRODUCT_HOME>/repository/conf/api-manager.xml file, "@" characters should be replaced by "!" character

    .
    Example URL :

    . An example is shown below.

    Code Block
    <connectionfactory.TopicConnectionFactory><![CDATA[amqp://admin!wso2.com!carbon.super:admin@clientid/carbon?failover='roundrobin'&cyclecount='2'&brokerlist='tcp://10.100.0.3:5682?retries='5'&connectdelay='50';tcp://10.100.0.3:5692?retries='5'&connectdelay='50'']]></connectionfactory.TopicConnectionFactory>


Setting up a social media login

...