Calling Registry REST APIs With WSO2 Identity Server

Tharindu B. Hewage
Identity Unlocked
Published in
2 min readFeb 11, 2019

The Registry in WSO2 products is a store for various configurations including runtime data, metadata, template files etc. WSO2 documents provide a good description of what the Registry is and it’s structure. The following is quoted from the WSO2 official documentation[1].

A registry is a content store and a metadata repository for various artifacts such as services, WSDLs and configuration files. These artifacts are keyed by unique paths where a path is similar to a Unix file path. In WSO2 products, all configurations pertaining to modules, logging, security, data sources and other service groups are stored inTenant keystoreTenant keystore the registry by default.

You can browse the Registry in the WSO2 Identity Server via the management console by clicking the Browse button under the Registry.

Tree view of the Registry in WSO2 Identity Server

By default in WSO2 Identity Server, Registry is used to store many of its configurations including,

  • There is a known fix to Handle Browser Back Button/Login Page Bookmarking after Successful Authentication[2]. In order for this to work, a registry resource is used to store the required redirect URLs. If this fix is used then the registry resource is required.
  • OIDC scopes
  • Challenge questions
  • ReCaptcha
  • E-mail templates
  • XACML templates
  • Encrypted passwords

CRUD operation related to the Registry resources can be easily achieved via the management console of the Identity Server. However, sometimes it’s required to interact with the Registry using an API. In order to address this, WSO2 products provide a REST API for its Registry[3].

The Registry REST API does not come pre-packed with the Identity Server. You need to apply the Registry REST service web app before calling the REST API.

  1. Download the WSO2 Governance Registry to your local machine.

https://wso2.com/products/governance-registry/

2. Extract the downloaded compressed file.

3. Go to the <EXTRACTED_FLDER>/repository/deployment/server/webapps folder and copy resource.war file into your, <IS_HOME>/repository/deployment/server/webapps folder.

Now we have copied the Registry REST service web app to our WSO2 Identity Server Instance. Start the server.

Now you can use the Registry REST APIs defined in the WSO2 official documentation[3] with the WSO2 Identity Server.

--

--