Credential configuration in the server

Hi everyone,

I have created a component that has a Credential Configuration Node. I have checked to use the KNIME Server login when it runs on the server. However, it seems that there not happening, as I seem to get an unauthorised response when I make use of the credential. Any ideas why?

image

image

Post request showing the 401 (Unauthorised).
image

Hi @toscanomatheus , I am not sure I understand what you are trying to do here.

What are these credentials for? Is it to access the folder path? If so, can you show you how are connecting these credentials to the path? What do you have in your component?

Hi Bruno, thanks for reacting on the topic. Let me give you a more elaborated description.

I have created a component in which I call a KNIME Server API. The Credentials Configuration is used to authenticate the API calls. That works fine when I run the component in the KNIME Analytics Platform.

Later on, I have created a workflow to be deployed in the server, that uses this component. By flagging the “User KNIME Server Login” option, I would expect the credentials variable to be populated automatically as the workflow will be run in the server. That does not seem to be the case (which is the reason I get error 401 - Unauthorized when the API is actually called).

I hope that clarifies. Any help is welcome.

Hi @toscanomatheus , thanks for the explanation.

Could it be that you are not passing the credentials from the Component? This is usually a common mistake where we forget that, components do not automatically output variables from the components by default.

You have to configure the Component Output and allow the variable to go out:
image

Hi Bruno,

Thanks for the idea. That is all setup correctly. That is the reason why it does work perfectly when running in the Platform (where the credentials are entered). The variable is floing to the POST Request. The issue is only in the server, so I suspect that the content of the credentials are not filled when it runs in the Server (which is the behaviour I sould expect from flagging the option).

Regards,
Matheus

Hi @toscanomatheus , is the workflow run by a user, or scheduled and run by Knime?

Edit: when run on the server that is

An user (admin), in this case myself.

hi @toscanomatheus , unfortunately I don’t have access to a Knime server at this moment to test this. I was asking you if it was a scheduled task, because the workflow would have most probably run by the service account. But you confirmed it’s run by a user, so I can’t think of any other factors here

1 Like