Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Securing a ESB Job

Hi!

 

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?

 

Thanks!

 

Luciano

Labels (3)
7 Replies
Anonymous
Not applicable
Author

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 🙂

Anonymous
Not applicable
Author

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?

 

Best regards!

 

Luciano

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Hello,

We have redirected your issue to ESB expert and then come back to you as soon as we can.

Best regards

Sabrina

Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

Hi,

I mean the service consumer. I would like to authorize the service by groups like an web application using JAAS. Is is possible?

I think it must have a service descriptor where I put the job and groups having access. What do you think about?

Luciano
Anonymous
Not applicable
Author

Hi,

I did not test it yet, but some research I did points me in the direction of configuring an new authentication realm for the specific endpoint and use spring to point to the new realm. In studio 6.4 you can edit and see the spring config.