I have a REST job. This job can be executed only by authorized users.
Is it possible to protect the job execution using Basic Authentication? If yes, how can I do it?
This is pretty straight forward. These are the high level steps.....
1) Build your Rest service using the tRestRequest and tRestResponse components. Click the "Use Authentication" tick box in the tRestRequest basic settings, and select "Basic HTTP".
2) You will need to run the service using the Runtime (Apache Karaf). To configure your users you will need to add them to the users.properties file in the Runtime_ESBSE\container\etc folder. Google this for details on how this works.
3) Build your service and save it as an OSGI Bundle for ESB. Save it to the Runtime_ESBSE\container\deploy folder.
4) Assuming default settings, you can see your service end by going to this URL (http://localhost:8040/services).
When you run your service it should require you to enter credentials.
As simple as that :-)
Thank you RH_ALL!
It works! Just one another question...
Is it possible to authorize the job using group or role? Example: job1 can be executed by user that have role usr1 and usr2, job2 can be executed by users with role usr3 only?
I'm not sure about this. It is not something that I have needed to do. I had a bit of a Google and didn't find anything that said you couldn't.....but also didn't find anything that said you could and how. I'd be interested in seeing how this could be implemented though
We have redirected your issue to ESB expert and then come back to you as soon as we can.
When you say executed by different user, do you mean actually the consumer of the service, or do you mean the actual service account under which the service is started?
Watch the recorded webinar!
Create systems and workflow to manage clean data ingestion and data transformation.
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.