droolsjbpm-contributed-experiments icon indicating copy to clipboard operation
droolsjbpm-contributed-experiments copied to clipboard

[JBPM-9132] Support authentication token for the Seldon prediction API example

Open ruivieira opened this issue 4 years ago • 3 comments

Add authorization token to requests.

ruivieira avatar May 12 '20 12:05 ruivieira

@gmunozfe ptal. thanks!

ruivieira avatar May 12 '20 12:05 ruivieira

Hi @ruivieira I don't know the scope and background of this feature/example, but here you're assuming that the token is injected to the service as a system property, which, IMHO, it's not a good practice. How the token is obtained (through an OAuth2 scenario) is probably out of the scope to be implemented here, but perhaps in the client filter, we could inject a SecurityContext and obtain from it the token (something similar to Keycloak clients do, but without coupling it to Keycloak in this case). Wdyt?

@gmunozfe The OAuth client id and secret are now used in order to request an authorization token from the Seldon server. ptal, thank you!

ruivieira avatar May 28 '20 09:05 ruivieira

@gmunozfe well spotted. I pushed the changes, ptal. Thank you!

ruivieira avatar Jun 01 '20 15:06 ruivieira