ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportAdd Validation to RESTFul Service Main Flow

Post new topicReply to topic
Add Validation to RESTFul Service Main Flow View previous topic :: View next topic
Author Message
diamondiona
PostPosted: Wed Jan 15, 2020 2:57 pm Post subject: Add Validation to RESTFul Service Main Flow Reply with quote

Acolyte

Joined: 19 Jun 2014
Posts: 50

Hello,

The default RESTFul Service main flow generated by MessageBroker toolkit is:
HTTP Input -> Router to Label

I need to add validation steps to the main flow:
HTTP Input ->FileRead(get username/password from files)->ComputeNode(validation) -> Router to Label.

My question is since Main Flow is generated by MessageBroker and should not be edited. How can I implement this?
Back to top
View user's profile Send private message
timber
PostPosted: Thu Jan 16, 2020 2:09 am Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1120

That sounds like authenticaction, not validation.

You do not have to use the automatically-generate stubs. You can easily implement a flow using the HTTPInput node to do the same thing, and then you can add your authentication code into that flow. Or you could look into using an off-the-shelf authentication mechanism instead of rolling your own (but that decision is probably not in your hands).
Back to top
View user's profile Send private message
diamondiona
PostPosted: Thu Jan 16, 2020 6:27 am Post subject: Reply with quote

Acolyte

Joined: 19 Jun 2014
Posts: 50

Do I need to check in auto-generated stub message flow to source code repository or it will be generated automatically after I imported project into workspace?

If I define "REST API base URL" in RESTFUL description as "/demo". Then HTTPInput URL in auto-generate sub message flow will use '/demo". If I added my own message flow, it's going to use different URL, like '/testdemo' which is inconsistent with "REST API BASE URL" in Service Descirption, right?

Anyway, we can disable messagebroker to automatically generate stub message flow.

Any example for off shelf authentication alternatives?
Back to top
View user's profile Send private message
timber
PostPosted: Thu Jan 16, 2020 7:41 am Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1120

If you decide to 'roll your own' main flow then you will not need the auto-generated one. But yes, it will be harder to maintain consistent naming standards and consistent look and feel. It's a design trade-off.

re: authentication mechanisms...the most common way to protect a REST API in IIB is to put an API gateway (e.g. IBM API Connect) in front of IIB. The API gateway performs authentication (usually OAuth) and also allows monitoring and control of the API in various ways.
Back to top
View user's profile Send private message
mehta10987
PostPosted: Fri Jan 17, 2020 8:47 am Post subject: Add Validation to RESTFul Service Main Flow Reply with quote

Novice

Joined: 12 Oct 2019
Posts: 12
Location: USA

If the ask is to validate the credentials of Users..

Are the details stored anywhere for lookup?
For e.g. a DB call?
Any other API exists which would provide valid User (if details are provided to that API)

Your solution will be driven by what call to be made
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportAdd Validation to RESTFul Service Main Flow
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.