Cloud Blog

All posts by Dmitry Sotnikov

Dmitry Sotnikov is Vice President of Cloud solutions at WSO2. Prior to WSO2, Dmitry worked at Quest Software (now part of Dell) as Director of Cloud Solutions, and later co-founded Jelastic PaaS and led Jelastic's sales, marketing, customer and partner relationships. Dmitry has been a featured speaker at multiple industry events including Microsoft TechEd, VMware VMWorld, Parallels Summit, Quest Innovate, and Technology Experts Conference (TEC).

API Cloud now also encrypts data at rest

Security is the cornerstone of successful cloud projects and API management is no exception.

We have for a long time implemented multiple layers of cloud security including among other things encryption of all data in motion, strict tenant separation, fully patched systems, extensive security training and policies for all WSO2 engineers running the cloud.

Today we are happy to announce that one more milestone has been reached in our security journey – data at rest (all the configuration data you create and store) in WSO2 API Cloud is now also encrypted.

What’s even better:

  • This includes not just the US, but also all the regional deployments of API Cloud,
  • There is no impact on your APIs performance (see the response times in our availability dashboard),
  • You don’t have to do anything or pay anything extra: the change is now live for all paying and trial customers.

This is just one of those examples of the service getting better and better all the time.

If you have any questions just contact us and we will be happy to help.

Move query parameters to REST path

Your API backend often does not match the desired frontend representation. For example, it might have extra parameters (such as API keys) that you do not want to expose and have some query parameters that you now want to just include in the REST path.

For example, you might want to do a transformation like shown in the picture below:

Today we will see how easy it is to do so with WSO2 API Cloud.

We will turn a pretty convoluted API from Marvel that looks like: gateway.marvel.com/v1/public/characters?nameStartsWith=name&ts=1
&apikey=d56d63913651985b837b45b4052abd28
&hash=be9591741a837962648744c3de21e4d8
into something like my.api/hero/name.

1. First, we go to API Cloud and start designing the new API.

We create the API as usual, but in URL Pattern field, provide the parameter names that we want to have in the REST path in curly brackets – for example, {name} instead of name:

2. On the second step of the API creation wizard, we paste the backend URL and substitute the parts that we want to be taken from the input parameters with {uri.var.name_of_the_path_parameter}.  So gateway.marvel.com/v1/public/characters?nameStartsWith=name&ts=1
&apikey=d56d63913651985b837b45b4052abd28
&hash=be9591741a837962648744c3de21e4d8
becomes gateway.marvel.com/v1/public/characters?nameStartsWith={uri.var.name}&ts=1
&apikey=d56d63913651985b837b45b4052abd28
&hash=be9591741a837962648744c3de21e4d8
:

3. Now API gateway will automatically insert our name parameter into the backend URL and keep the other parameters intact. However, by default, it will still be adding our path parameter to the end of the backend URL too. With that, we risk invoking something like gateway.marvel.com/v1/public/characters?nameStartsWith=name&ts=...&apikey=...&hash=.../name instead of the gateway.marvel.com/v1/public/characters?nameStartsWith=name&ts=...&apikey=...&hash=... that we need.

Removing that trailing part of the URI is easy. We just need to pass the corresponding command to the gateway transformation engine.

Create a text file with the following text and save it as xml:

<sequence xmlns="http://ws.apache.org/ns/synapse" name="drop_uri_sequence" >
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
</sequence>

To upload the file: select the Enable Message Mediation checkbox, click the Upload In Flow button, and upload the xml file:

4. Now you can finish the API creation wizard and publish the API.

5. In API Store (Developer Portal), you can now subscribe to the new API and invoke it. As you can see, we now get the same results as the original API produces but with a much nicer and shorter invocation URL (which you can make even shorter by setting it as the default API version and using the custom URL functionality):

WSO2 API Cloud (and open source WSO2 API Manager) give you a powerful solution to make your APIs look exactly the way you need them.

Faster ticket resolution through granting access to support team

We know that support experience can be frustrating when the engineer on the other side does not fully understand the exact issue that you are facing and you get into the long back and forth with questions, answers, and screenshots.

There is now a better way! When creating a support ticket, you can now simply select the Allow Access to WSO2 Support checkbox and the engineer that gets your ticket assigned will be able to securely access your WSO2 deployment and troubleshoot the issue:

This new feature radically shortens the resolution time and gets your going with your project faster. And once the ticket is resolved, you can simply go to the Organization screen (in the 9-dot menu) and revoke the access.

 

Display the latest or all versions of an API

By default, API Cloud‘s Developer Portal only displays the latest published version of each API.

So once version 2.0 of an API gets published, version 1.0 gets automatically hidden from the Developer Portal (existing subscriptions still work though until you block the API.)

This way you can make sure that all your new subscribers pick the latest and greatest of your APIs. You can see the video and read more about how API lifecycle works in this tutorial.

However, all API programs are different and you might decide that you want all published versions of your APIs shown to your subscribers. To do that, you need to set the DisplayMultipleVersions flag to true as described in API Cloud’s documentation.

Notes:

  • It might take about 15 minutes before the changes apply to your store and the older versions start showing up,
  • Even with this flag, deprecated versions are still hidden. If you want API Cloud to also show deprecated APIs set the DisplayAllAPIs to true too.

 

Uptime Dashboard now includes regional gateways, Integration, Identity, and Devices Clouds

We have extended our public uptime dashboard to go beyond just API Cloud and its default gateway. From now, on API Cloud’s indicators include:

  • Web interfaces (Publisher, Admin Dashboard, Developer Portal),
  • Key Manager,
  • Developer Portal (aka API Store),
  • Regional Gateways.

Even more importantly, we now have public dashboard indicators for the other WSO2 Cloud services:

  • WSO2 Integration Cloud,
  • WSO2 Identity Cloud,
  • WSO2 Device Cloud.

For all of these, you can see whether the service is up or down at the moment, how well it performed lately, and can even drill down into uptime and performance over the last few months and get a list of all disruptions we had during the selected period:

In addition to the uptime dashboard, all paying customers get incident notification and post-mortem emails as well as maintenance announcements.

WSO2 Cloud comes with financially backed uptime SLA and our public availability dashboards and incident notification processes help ensure transparency of our quality of service and processes.

New and Improved Live Log Viewer

Debugging APIs can be a challenge when things go wrong. A lot can go unexpectedly while the calls travel from a user application to the API gateway, through transformation engine, to the backend service, and back.  Luckily, WSO2 API Cloud comes with a live Log Viewer screen and we have just released its improved version.

Whenever you want to see what’s going on under the hood of API Gateway:

1. In API Cloud, on the Configure menu, click Admin Dashboard:

2. In the API Cloud Admin Dashboard, navigate to Log Analyzer / Live Log Viewer.

3. Invoke the API that you want to troubleshoot (for example, in the Developer Portal or curl or from your application.)

4. See the log in the Log Viewer:

The new Log Viewer:

  • Has a clear visual separation of information, warning, and error messages,
  • Works across all regional gateways around the globe.

Note:

  • API call tracing is off by default, so you will likely not be able to get the detailed information on the actual API and response URLs, headers, and body. To get those, enable tracing before making the calls. Then turn tracing off when you are done troubleshooting.

 

Adding request headers to published APIs

Suppose you have a REST API and besides parameters also want to prompt subscribers for custom HTTP headers. WSO2 API Cloud makes this easy.

In the example below, we will add a custom header called setName to an existing API and invoke it from the Developer Portal.

1. In API Cloud’s Publisher interface, open the API for editing, and on the second screen (Implement), select the Enable API based CORS Configuration checkbox:

2. In the Access Control Allow Headers edit box, type the name of the header that you would like to add (in our case setName) and press Enter. Then click the Save button.

3. Now, go back to the first step of API editing (Design), open the resource that you want to request that header as a parameter, add the parameter with the name of the header, and change the Parameter Type from query to header:

4. If the API has already been published, you can just click Save to make the change go into effect. If not, go to the last step of the wizard and click the Save & Publish button there.

5. Now, you can go to the Developer Portal (also known as API Store), subscribe to the API if you have not done so yet, and expand the method that we have just modified – you will see that our new header setName is there, listed as one of the parameters:

6. When you invoke the method, you can see that the new header is indeed getting added to the API call and passed to your backend. Notice that the generated curl command example also has the new header:

That is it! WSO2 API Cloud makes it easy to design your APIs the way you want them and have them published for your consumers in a way that is intuitive and easy to understand.

Integrating OAuth API Gateway with SAML Identity Provider

OAuth2 is the modern standard of providing security for REST and SOAP APIs. However, a lot of enterprises have existing SAML Identity Providers (IdP) and that they use as their internal authentication standard. They would like their web and mobile applications to have end-users authenticate with these existing providers and then translate that to OAuth, enforce access and policies, and pass the calls to the backend.

Today we will talk about how this works in case of WSO2 API Cloud:

Configuration:

  • Configure the cloud to trust the IdP.
  • In the Developer Portal (API Store), create your application and get its OAuth consumer secret and consumer key.

Now, let’s look at the way the actual authentication and API usage happens in the diagram above:

  1. Your web or mobile app asks the end-user to log in as it normally would.
  2. Your corporate Identity Provider (IdP) checks credentials and issues the SAML2 token.
  3. Now the application needs to generate the personalized OAuth2 token for that end-user and that app. For that, it invokes the API gateway’s Token API and passes consumer secret, consumer key, and the SAML2 token.
  4. API gateway validates the SAML assertions with the IdP. If particular API Scopes are requested, the gateway also checks to see if the roles with which the scopes are associated match the roles in the SAML assertions.
  5. If validation is successful, API gateway returns the OAuth token and refresh token. The refresh token can be used to renew the OAuth token when it expires.
  6. Now the application has the OAuth token it needs and can use it to invoke the actual APIs.
  7. API gateway uses the OAuth token to identify the end-user, apply security and throttling policies, collect analytics data, and pass the calls to the backend. When the backend is invoked, end-user and application information is passed as JWT token.

That is it. See our documentation page for the specific configuration steps and token API calls, and use API Cloud’s Support menu if you need any help.

 

WSO2Con Europe: Call for Presentations and Early Discounts

November 6-8 in London we will be holding our biggest European event of the year – WSO2Con Europe 2017. I will personally be there as well as our other key leaders, architects, and engineers, and many of our customers.

My personal request to all our cloud customers is to go ahead and submit a session proposal!

Conference talks are a great way to increase your own visibility and boost your career. And you also get perks including free airfare, hotel, and conference pass! There is a deadline of July 28 – so please try to meet it. If you cannot – please let me know so I can apply some lobbying for you. 🙂

If submitting your talks is not your thing (yet) go ahead and buy your conference pass today while the early bird discount is still in place.

Plus, the website also has lots of great recordings from earlier conferences.

I hope to see you in London in November!

Device Cloud available commercially

After 4 months of beta and continuous improvements based on customer feedback, we have made WSO2 Device Cloud commercially available.

Pricing starts at just $2/device/month and goes down with volume.

Device Cloud is a SaaS solution for mobile device management. Administrators can add their corporate or employee-based smartphones and tablets, apply various policies, push applications, locate the devices, check for compliance and perform other management tasks.

This is a cost-effective solution that is:

  • Easy to use – the administration and management are entirely web-based and maintained by WSO2,
  • Secure – maintains corporate security standards,
  • Makes employees more productive – by pushing the applications and policies they need,
  • Saves money – by preventing device lost and empowering administrators and employees.

In the future, we will extend the scope of WSO2 Device Cloud even more by both adding more advanced enterprise mobility management (EMM) / mobile device management (MDM) features, and extending the scope to custom devices and internet of things (IoT) scenarios.

There is a free 2-week trial and ability to start small and grow as you need.

Give WSO2 Device Cloud a try and let us know what you think.

Categories

Recent Posts

Most Popular Posts