Where does WSO2 Greg stores custom RXTs created - wso2

Where does WSO2 Greg store custom RXTs that are created? They can be edited/added through admin console. I can see the default RXTs under wso2 greg home/repository/resources/rxts but do not see here the custom RXTs
Also let me know
How does WSo2 Greg generate reg_UUID for the resources added? I want to implement the UUID generation script outside so that i can add the resource entries in the respective tables directly from DB?

If you create it using mgt console it will be only stored in DB. However, users can add soft copies of rxt to <GREG_HOME>/repository/resources/rxts/ location. This is a one-time addition and will not reflect any changes that we do to the rxt softcopy afterward. Please find last words of this article.
UUID is created in registry PUT operation and please find the sample code here which we used to generate UUIDs for Swaggers. As per your fix you need to create a registry handler for your assets and remove any existing handler then link your UUID creation logic. Please find this article on how to create a custom handler.

Related

WSO2 claim extention using custom claim handler

How can we add custom claims to the ID token of WSo2.(claims which are stored in the different tables of WSO2 database)?
explanation:
The requirement is to add some additional claim values which are specific to the organizational information of the user(which will be stored in other tables and not in the user attribute table).
how do we write a custom claim handler to do the same?
You can write a custom claim handler and inject the values from the claim handler. Please follow this documentation to know how to deploy a custom claim handler.
You can find a sample source code here.

Add new user into Wso2 CEP into H2 database

I need to add new user in Wso2 CEP (3.1.0) and I know that is possible by "clicking" few steps in console (example from documentation). I wonder if it possible to add new user without login into console, but connect to H2 database and insert user there?
I know that new user is save into "UM_USER" table.
Maybe someone knows what class write user into H2, how passowrd is enrcypted and what is "UM_SALT_VALUE" and why I need it?
If all you want is to manage users programmatically, a better way rather than trying to modify H2 DB is to do it through the relevant admin service. This way you don't have to bother about the underlying user-store or the salt values used for hashing passwords etc.
In Carbon-based products, most of the configurations done through the web console can be done programmatically by calling the relevant admin web service, such as user management, adding/managing deployment artifacts etc.
So for you use case, you can use the User Management admin service at:
https://localhost:9443/services/UserAdmin?wsdl
Note that in order to access this wsdl, you should make these admin service wsdl's visible by editing <CEP>/repository/conf/carbon.xml and restart the server.
<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>

Claims management in wso2 is troubleshoot

I am experiencing a problem with wso2 identity server (version 4.5.0) regarding some new claims (attributes) i have added. Specifically, i have added new attributes in http://wso2.org/claims but when i try to populate the corresponding fields to the user profiles, the following message appears:
Error while updating user profile of User. Error is: One or more attributes you are trying to add/update are not supported by underlying LDAP.
Any ideas?
Thank you in advance.
M
This can be due that, you have add a claim mapping which is not supported by under line user store (LDAP). When you are adding a claim, we need to provide claim mapping attribute. It is the map attribute with your LDAP user store. If there is no such attribute in the LDAP user store, this error can be occur. (Please note claim management component would not add new attribute to user store. It would map with the existing attributes in the LDAP user store)
I just would like to piggyback off of Aslea and Maria answer and add onto them. If you'd like to know what mapped claims you can use, you can find about them in this link. And if you'd like to add custom attributes directly to the LDAP server, please refer to this link.

WSO2 IS cannot add new profile from User Profile Management

When I go to "My Identity -> My Profiles", it does not give me the option to Add New Profile (as seen on the documentation for User Profile Management), but I can only edit the default profile.
I am using an external MySQL server as the JDBC user store, and creation and editing of users works fine.
I did not find any parameter in the xml files to enable this multiple profile feature. How should I proceed?
Thanks.
Yes. I also find the same. Adding multiple profile for user has been removed from UI. But with JDBC user store, I guess, we can add this using the web service API. Following is the API
https://{ip}:{port}/services/UserProfileMgtService?wsdl

enabling new LDAP claims on WSO2 IS from XML file

I added a new user attribute to my LDAP schema, and configured user-mgt.xml to support the new custom ObjectClass.
Then I used the Claim Management UI, and managed to succesfully set the new attribute to be displayed and Supported by default.
Now it all works: I checked that the new claim is correctly setup in the registry db, and whenever I edit a user profile I can view and edit the new custom attribute.
The question is: Can I set this straight up from some xml configuration file?
My problem is that even I edit claim-config.xml and change the parameters to the corresponding claim in the http://wso2.org/claims dialect to be Supported, and give it a DisplayOrder, it has no effect.
I would like not to depend much on the GUI and registry status, but rather rely on configuration files.
Thanks
You can not edit claim-config.xml file add new claims, if the server has been started once. Only 1st startup, it would populate all claims in to the database (you can delete the database and edit the file and start, then also it would populate). Then you can only edit or add them through management console UI. However, if you know about Identity Server, all these UI functions have been exposed via web service API. If you does not like UI, you can do it using automating web service call... Basically SOAPUI can be used for this purpose.