Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

[closed] Login to RTC using server-side Java API

I would like to login to RTC with some specified credentials using server-side Java API.
I need to insert this code in an Event Handler in order to perform an action with a different user from the one who has caused the plugin to run.
I have already done such a thing using client-side plain Java API; is this possible using server-side classes (from RTC SDK) as well?
I am working with RTC 5.0.2.

0 votes


The question has been closed for the following reason: "Problem is not reproducible or outdated" by lumar Aug 17 '18, 4:27 p.m.


One answer

Permanent link
Luca,
working on server side you are already connected to RTC. I think you want to CHANGE your credential as event handler work as "admin" user that could not be inserted in any roles. If this is what you want you have to use IImpersonationService to change credentials when you perform actions like save work item or other.

1 vote

Comments

Michele,
this is what I actually did.
The impersonation works fine, but it has one limitation: you can only "impersonate" somebody else only if you have JazzAdmins privileges.
This makes it unusable in most cases.
It would be nice to find a way to programmatically login to the RTC server using the SDK.

Yes, I know. But if you work with event handler you already have it as the class is triggered by admin user. The problem is with pre-conditions and follow-up action. I think it would be really useful if impersonation will be extended to other privileged users, but by now I've seen no progress on this. I don't think another login makes sense because in this case you are already connected: it would only brings to further problems.

The impersonation works fine, but it has one limitation: you can only "impersonate" somebody else only if you have JazzAdmins privileges. 

Well, on server side exists a "trick" to impersonate ADMIN user, which of course has JazzAdmins privileges: TeamServiceContext#runAsAdmin ;)

Cheers.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,930

Question asked: Dec 10 '15, 6:14 a.m.

Question was seen: 3,811 times

Last updated: Apr 12 '19, 5:11 a.m.

Confirmation Cancel Confirm