Velocity - Consume webservice with AWS authentication

Questions and answers on developing, deploying and using plugins and JavaBeans

Velocity - Consume webservice with AWS authentication

Postby jdbruijn » Sat Jan 16, 2016 3:09 am

Is it possible to use Velocity Services to consume a webservice that has its authentication system based on the AWS request signing process (http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html)
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Velocity - Consume webservice with AWS authentication

Postby ptalbot » Sat Jan 16, 2016 5:38 am

Velocity services are API agnostic, meaning the plugin knows nothing of the underlying constraints of authentication of the API you want to use (there are tons of API out there each with their own flavor of authentication).

Meaning that to build signed requests, you would have to create the whole signing out of Velocity and then add the Authorization header to the service request.

The process is not a simple one though because it happens in many steps of encoding and needs a precise knowledge of the content (including headers, body and encoded parameters) of the request as well as your API Key and Secret Key.

Best do that in a dedicated plugin really, one that would leverage the AWS SDK and wrap the needed services call.
I've done such a plugin for a limited number of services (s3 file API and SQS messaging) for one of my client.
Let me know your requirements and I can probably build something for your needs.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Velocity - Consume webservice with AWS authentication

Postby david » Mon Jan 18, 2016 7:53 pm

You want the AWS Java SDK wrapped in a Servoy plugin.

An alternative option would be to create a small NodeJS application with the AWS Javascript SDK and proxy your requests through it. Some advantages: you're coding in Javascript like you're used to, you can add features without rebuilding a plugin, you can keep up-to-date with SDK releases, as a dedicated service it scales and can serve more than one app, etc.

One of the current trends that is hot right now and which I really like is micro-services. It's trivial to spin up a server/app (in any language) that does one thing really well. Communicating via REST/JSON between services is super easy. The main downside is that you're are increasing your devops load. Getting up to speed with tools for imaging/installing, monitoring, load balancing, scaling, etc becomes increasingly important as you add services in this fashion.

As Servoy continues to fall behind the tech curve I think this approach is going to be important for keeping current Servoy installations running.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 1 guest

cron