Posts

WSO2 APIM Changing the hostname for web portals

Image
  Hello WSO2 guys! In this post, I'll show how can you customise the hostname of the respective web portals of API Manager viz. devportal, publisher portal, carbon console and the admin console. Below environment I am using for this demonstration- WSO2APIM 3.2.0 Ubuntu Linux 18.x Do hostfile entry in VM by editing the hostfile as vi /etc/hosts 127.0.0.1       api.mydomain.com First download the WSO2 API Manager from here  (I am using v3.2.0)  Unzip the package as unzip wso2am-3.2.0.zip Navigate to the bin directory <APIM_HOME>/bin Start API Manager as ./wso2server.sh Open the browser and go to https://api.mydomain:9443/carbon & login with default credentials as admin/admin (it works because of hostfile entry)   Navigate to the Service providers If you don't see any provider in the list, then just open two URLs https://localhost:9443/publisher & https://localhost:9443/devportal respectively and refresh the carbon console service provider page. Now you'll see

Installing Docker CE on RHEL 7.7

Image
Installing Docker CE on RHEL 7.7 Configure the Docker Repo This is the scenario where we don't have yum facility to directly pull the packages, rather manually needs to add the repository and then apply yum command to install docker    sudo yum-config-manager - -add-repo   https://download.docker.com/linux/centos/docker-ce.repo Linux Package Requirement Download Link container-selinux-2.74-1.el7.noarch.rpm  http://ftp.riken.jp/Linux

WSO2 API Manager Token API with Password Grant

Image
WSO2 API Manager Token API with Password Grant Recently I came across a situation where I have to use the 'Password' grant type for accessing the token API for WSO2 API Manager.  Problem Statement The default token API access using cURL is available in developer portal as shown in the below screenshot- The corresponding cURL command is-  curl -k -X POST https://localhost:8243/token \ -d " grant_type=password&username=Username&password=Password " \ -H " Authorization: Basic ZmIzOUxXVXRJbm5LcElzRHVFU3RkblRqeGJzYTpxUjMyUmpPNkpZenJFRVZzN1NnbzRyeXo2WHNh " Even, in postman all the parameters are supplied in URL itself. However, this request is more URL centric towards passing the grant type, username& password. In this way the credentials are exposed in the URL itself. So how can we prevent the same to be passed but not in URL i.e. typically in header or body. Solution WSO2 token API facilitates to pass the parameters url-encoded by attaching an extra

WSO2 APIM 3.0.0 publisher and devportal UI not opening | HTTP 500 Error

Image
Problem Statement Recently I have come across a problem when I have an all-in-one deployment of WSO2 APIM 3.0.0 and I procured a signed SSL certificate. However, post-installation of SSL certificate as per the hostname requirement, the Publisher portal & DevPortal Web UI is not opening and causing HTTP 500 error. Issue Log Below logs captured in carbon console- Caused by: org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: javax.net.ssl.SSLPeerUnverifiedException: SSL peer failed hostname validation for name: localhost (<<http>>/META-INF/scripts/http.js#220) Solution Changes in following files to replace localhost with actual hostname (mywebsite.com) carbon.xml api-server.xml axis2.xml /repository/deployment/server/jaggeryapps/<PUBLISHER/DEVPORTAL>/site/public/theme/settings.js file, /repository/deployment/server/jaggeryapps/<PUBLISHER/DEVPORTAL>/site/public/theme/settings.js file Service Provider Changes v

RingCentral- A new era of fast messaging implementation

Image
RingCentral SMS Functionality Experience Hi folks, in this blog I'll share my experience with RingCentral for sending the sms via a java code.  As a prerequisite, you must have your developer account created at developers.ringcentral.com 1. Login to the portal and go to apps section shown below 2. Now create an app by providing the details as suggested in the wizard. I've used java class to send the sms so password grant type has been selected automatically, you can choose yours based on your app/ requirement 3. You must select the 'App Permissions' to at 'Read Accounts' to facilitate SMS functionality 4. Get credentials 5. Set app permissions whatever applicable in your case- 6. Get all the access details of your app. 7. Pls try the OOTB feature via dev portal itself for sending the sms directly- Next, We'll create a sample Gradle java project and will use the following sample code:  build.gradle plugins {     id 'java-library' } dependencies {  

WSO2 APIM- Store APIs get specific one based on multiple attributes

Image
  Problem Statement I am using wso2 APIM 2.6.0 store APIs to get specific API details. The problem is that I have 3 APIs with the same name but different versions ( pizzashackapi with version 1.0.0, pizzashackapi with version 1.1.0 and pizzashackapi with version 1.1.1 ) and I need to pass multiple parameters in the query section of the API to get more fine-grained result, however, it's not working as expected- WSO2 Documentation  It says Supported attribute modifiers are [version, context, status, description, subcontext, doc, provider, tag] but I am not able to pass the multiple attributes in the query section (Ref-  https://docs.wso2.com/display/AM260/apidocs/store/#!/operations#APICollection#apisGet) curl https://localhost:9443/api/am/store/v0.14/apis I tried using the following  Store API:  https:/localhost:9443/api/am/store/v0.14/apis?query=pizzashackapi&version=1.1.0 https:/localhost:9443/api/am/store/v0.14/apis?query=name:pizzashackapi&version=1.1.0 https:/localhost:

Oracle SOA Suite 12c- Using preferences via config plan and enterprise manager

Image
                                                                        Recently I got engagement with Oracle SOA Suite where I need to use some variables that needs to be changed during the deployment time. Oracle SOA Suite provides a great feature of using preferences in bpel process as bpel.preference.<Variable>. This blog will show how can you use this feature via config plan and enterprise manager- The current composite has property as- <property name="bpel.preference.url">http://hostname:port</property> Now, this property has to be replaced with some actual value. Method 1- Via SOA config plan:  Below are the steps to set BPEL preference values during deployment time via a configuration plan: 1)  From JDeveloper, right-click on the associated composite.xml file and generate a deployment configuration plan for your composite. When you open the file, you will find a search/replace construction for the preference. <component name="ApprovalBpelProc

WhatsApp New Policy Impact

Image
WhatsApp New Privacy Policy Impact About WhatsApp WhatsApp sounds like "what's up" is a way to ask someone “what’s going on”. This was a revolutionary application founded by Brian Acton and Jan Koum back in 2009 with the aim to provide free communication (text/voice) via the mobile app over the internet without Ads and maintaining the high degree of data privacy of the users through data encryption. Later, Facebook acquired WhatsApp in Feb 2014. The New Privacy Policy The new policy essentially takes away the choice users had until now to not share their data with other Facebook-owned and third-party apps. WhatsApp users need to provide their consent, failing which they will not be able to use this social messaging app after that. After accepting the terms by a user, Facebook will now use such data for commercial activities to grow their business. Data Security Issues Below are some of the data security issues as per the new privacy policy- 1.The contact details of a use