droolsjbpm-contributed-experiments
droolsjbpm-contributed-experiments copied to clipboard
[JBPM-9132] Support authentication token for the Seldon prediction API example
Add authorization token to requests.
@gmunozfe ptal. thanks!
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!
@gmunozfe well spotted. I pushed the changes, ptal. Thank you!