WSO2 Identity Server 3.2.3. Missing Ability to Add External User Stores - wso2

What happened to the ability to add an external user store with custom tables in WSO2 Identity Server 3.2.3?
We are evaluating use of this IS and it appears an older version had this capability and the latest version does not.
Am I missing a configuration setting or has this capability been completely removed? Or is this a build configuration option?
Not having this feature is a show-stopper.

it's done through the config files - there is (seemingly) no ui component. I was able to connect to an external sql server user store via jdbc by manipulating the user-mgt.xml and master-datasource.xml files. Although next step would be to define a logical schema definition to map the id fields. e.g. running the mssql.sql script in /dbscripts on my sql server db will create the needed structure.

Related

Reading database connection configuration from a registry properties file in WSO2 EI

We are doing a POC in WSO2 EI and developing an API for service orchestration. As part of it, I want to insert some data into a database. In Integration Studio 8.0.0, I am using the DB report mediator to insert data. Everything works fine when I hardcode the values as shown in the below screenshot.
Now, I want to read the database configurations from a properties file I created in registry config folder instead of hardcoding them. How can we achieve this?
Below is the screenshot of the registry properties file.
AFAIK you can't read properties files from the registry as key/value pairs and use them in integrations without processing the content of the properties file with something like the ScriptMediator. But you can pass a properties file to the runtime and pick the values from there. Please have a look at this document.
We can inject DB connection parameters from a properties file stored in EI/MI product home folders but still need to find how we can inject parameters from registry.

Is there a command to require WSO2-Carbon to check all config files for errors before a service restart?

I made several modifications to my WSO2IS config files and wanted to see if there was a pre-built command to require Identity Server to run a self-check on all available config files for errors before performing a service restart and potentially breaking something.
AFAIK there is no such a functionality in the existing WSO2 products. Maybe you can create a GitHub issue for that as a feature request :)

Error Configuring WSO2 data analytics server

I'm currently experimenting/working on WSO2. What i'm trying to do is to have Data Analytics server configured. I started by following the below specified URL
https://docs.wso2.com/display/AM210/Configuring+APIM+Analytics#9d6747f5c0074928b18599abe472987d (Quick Steps)
After performing all the steps, i get the following issue on APIM cmd prompt
YES Its pretty evident from the error that no such table exists BUT that is exactly the issue i'm facing. What could really be the cause here?
Consider the following points:
I've not followed ALL the steps mentioned on
https://docs.wso2.com/display/DAS310/Getting+Started (BUT are they
required?)
In the installation prerequisites for DAS, JDBC-compliant Connector for Java is required which I've not yet installed (BUT its not mandatory at the same time)
Most of the QUICK STEPS for the configuration of DAS in the specified URL i.e. https://docs.wso2.com/display/AM210/Configuring+APIM+Analytics#9d6747f5c0074928b18599abe472987d where already in place and i only had to
Set Up JDK, ANT, Maven
enable the analytics section in the API-M_HOME/repository/conf/api-manager.xml
add log4j.rootLogger=, DAS_AGENT to API-M_HOME/repository/conf/log4j.properties
add snappy-java_1.1.1.7.jar to DAS_HOME\repository\components\lib
Yet the issue persists, Do let me know of what you think. Thank you
Since you are following quick start guide please extract the WSO2 API Manager and the WSO2 API-M Analytics distributions (zip files), to the same directory (preferably an empty directory).
Also, you need to generate some traffic to the published APIs in order to analytics server to create this table for the first time.

Migrating WSO2 api manager databases

I'm trying to migarte my API from one environment to another environment by copying H2 databases from wso2am-2.1.0/repository/database.
I know there is an utility for import/export but I have a lot of API and this utility is only processing by one API.
After copying databases , my APIs and tags are not shown in the store/publisher dashboard.
But if I check applications-->subscriptions, I can see theses API.
Any explication about this behaviour please?
Basically, WSO2 does not recommend to run production in H2 database. I hope this is a testing/ try out scenario. When you are running in production please use a production-ready databases such as oracle, mysql, mssql, etc.
The issue here is things you have listed as missing comes from the indexing. In your case, if there are lots of APIs, it would take time to index. WSO2 uses solr to index resources. If you copy the solr directory which resides in the WSO2 server folder to the new environment would work. Before replacing the folder please delete the complete folder in the new environment.
If this is not working you can re-index resources by following - https://stackoverflow.com/a/42646742/3176125.
When you are moving from one environment to another you need to copy the content which resides in the /repository/deployment/server/ folder. It contains synapse configs of the APIs, custom sequences, etc.

WSO2 ESB - Data Services Server Feature - How to use Data Sources to swap data source on fly

I am using WSO2 ESB 4.0.3. I have installed WSO2 Data Services Feature on it and I have created DS.
There is feature in the ESB under "Configure" tab under admin UI where you can define the "Data Source".
My question is while creating new Data Service I am not able to use this "Data Source" which I have configured in ESB. We have different environments DEV / TEST / UAT / PROD. Each environment has different data base for same data service.
Currently I have manually change the DS XML file to point to new DB and then deploy.
Is there a way to point to the DB configured in ESB and change the DB for DS on the fly?
thanks
ABhijit
07/01/2012 -
Any update on this please ? This is Apple POC in their big group. If suceedded WSO2 will have Apple implementation?
If you've installed the dataservices features in to the same ESB instance that you've already been using, then it should be possible for you to use the datasources created via "Configure > Data Sources" menu. Because, when you create a particular datasource via the aforesaid option, it is visible to all the other installed features (that use datasources). But if you're having ESB and DSS in two boxes, the datasources defined in let's say ESB are not visible the DSS node unless you're having those nodes mounted to the same registry. However, this functionality too will be there in the next immediate upcoming release.
However, I'd suggest you the following pattern to get your requirement done. I;m assuming you're having DataServices features installed into ESBs in all your environments DEV / TEST / UAT / PROD. If so, you can create datasources using the "same name" (for eg: assume you have a datasource named "ds1" created in all 4 environments) via the "Configure > DataSources" menu pointing to different database configurations that you'll be using in each of those environments. Then you can point to the created datasource inside the DBS (dataservice discripters) as shown below.
<data name="TestDataService">
<config id="default">
<property name="carbon_datasource_name">ds1</property>
</config>
.....
</data>
Once you're done with those steps, whenever you deploy your dataservice in any of your environments, it will point to the relevant datasource without requiring you to reconfigure the database configurations manually and the relevant database configurations specific to each environment will be loaded dynamically at the runtime.
Hope the above explanation helps!
Regards,
Prabath
#----- Start of the configuration -----
synapse.datasources=TestDS,TestDS1
synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
synapse.datasources.providerPort=2199
#TestDS Configuration
synapse.datasources.TestDS.registry=JNDI
synapse.datasources.TestDS.type=BasicDataSource
synapse.datasources.TestDS.driverClassName=com.mysql.jdbc.Driver
synapse.datasources.TestDS.url=jdbc:mysql://localhost:3306/testDB
synapse.datasources.TestDS.username=dummy_username
synapse.datasources.TestDS.password=dummy_password
synapse.datasources.TestDS.dsName=TestDS
synapse.datasources.TestDS.maxActive=100
synapse.datasources.TestDS.maxIdle=20
synapse.datasources.TestDS.maxWait=10000
#TestDS1 configuration
synapse.datasources.TestDS1.registry=JNDI
synapse.datasources.TestDS1.type=BasicDataSource
synapse.datasources.TestDS1.driverClassName=com.mysql.jdbc.Driver
synapse.datasources.TestDS1.url=jdbc:mysql://localhost:3306/testDB1
synapse.datasources.TestDS1.username=dummy_username
synapse.datasources.TestDS1.password=dummy_password
synapse.datasources.TestDS1.dsName=TestDS1
synapse.datasources.TestDS1.maxActive=100
synapse.datasources.TestDS1.maxIdle=20
synapse.datasources.TestDS1.maxWait=10000
#----- End of the configuration -----