Question

FME Job Submitter token


Badge

How to use FME Jobsubmitter with one token without username and password ? thx


14 replies

Userlevel 5

I don't think that's possible. You will probably have to use the transformations/commands/submit/<repository>/<workspace> API instead, e.g. using the HTTPCaller. The token is then sent in the http request header:

See also the documentation: https://docs.safe.com/fme/html/FME_REST/v2/apidoc/

Badge

FME desktop calls /fmerest/v2/info so i tried to add a token in the url but it doesn't work :(

Userlevel 5

Here's an example on how to submit a workspace to FME Server using the HTTPCaller, I've highlighted the important bits:

0684Q00000ArLaNQAV.png

The upload body looks like this (see the API doc for details):

{
  "FMEDirectives": {},
  "NMDirectives": {
    "failureTopics": [],
    "successTopics": []
  },
  "TMDirectives": {
    "rtc": false,
    "description": "",
    "priority": 100,
    "tag": ""
  },
  "publishedParameters": [
  ],
  "subsection": "REST_SERVICE"
}

The response will be a JSON block with a job id, e.g.

{"id":6}
Badge

Here's an example on how to submit a workspace to FME Server using the HTTPCaller, I've highlighted the important bits:

0684Q00000ArLaNQAV.png

The upload body looks like this (see the API doc for details):

{
  "FMEDirectives": {},
  "NMDirectives": {
    "failureTopics": [],
    "successTopics": []
  },
  "TMDirectives": {
    "rtc": false,
    "description": "",
    "priority": 100,
    "tag": ""
  },
  "publishedParameters": [
  ],
  "subsection": "REST_SERVICE"
}

The response will be a JSON block with a job id, e.g.

{"id":6}
Thank you for your help.

 

But it's not an issue for me to launch a workspace with a token.

 

I would like to use the FME Job Submitter with a Token without Username and Password. I don't want to show to the developers the credentials connection. I just want to expose a token with this transformer.

 

 

Userlevel 5
Thank you for your help.

 

But it's not an issue for me to launch a workspace with a token.

 

I would like to use the FME Job Submitter with a Token without Username and Password. I don't want to show to the developers the credentials connection. I just want to expose a token with this transformer.

 

 

I don't think it's possible to use tokens with the FMEServerJobSubmitter, unfortunately.

 

You can easily convert the token to a published parameter using the above method, however.

 

Userlevel 5
Thank you for your help.

 

But it's not an issue for me to launch a workspace with a token.

 

I would like to use the FME Job Submitter with a Token without Username and Password. I don't want to show to the developers the credentials connection. I just want to expose a token with this transformer.

 

 

One more thing, the password that you type into the FMEServerJobSubmitter dialog isn't readable to the naked eye by anyone with access to the workspace file. The protection isn't world-class, but it would be beyond most users to try and find the password from having access to the fmw file.
Badge
One more thing, the password that you type into the FMEServerJobSubmitter dialog isn't readable to the naked eye by anyone with access to the workspace file. The protection isn't world-class, but it would be beyond most users to try and find the password from having access to the fmw file.
Wrong... https://knowledge.safe.com/questions/4499/pass-password-get-plaintext.html

 

It's very easy to decrypt the password with FME

 

 

Userlevel 5
Wrong... https://knowledge.safe.com/questions/4499/pass-password-get-plaintext.html

 

It's very easy to decrypt the password with FME

 

 

Yes, I know. That's why I said it wasn't world-class ;-) But you still cannot see the password with the bare eye, so it's better than nothing.

 

If security is essential to you, you should of course not rely on that.

 

Userlevel 4
Badge +26
I think that should definitely be possible. I'm just looking for info now. But it seems pointless to have a service to generate tokens if you couldn't use them in a transformation service.

 

 

Userlevel 4
Badge +26
Oh, btw, what security are you using? Is it active directory?

 

 

Badge
Oh, btw, what security are you using? Is it active directory?

 

 

Yes Active Directory

 

 

Userlevel 4
Badge +26
And are you calling the job submitter from a different machine? Because that could have CORS implications.

 

 

Badge
And are you calling the job submitter from a different machine? Because that could have CORS implications.

 

 

Yes, exactly and the CORS allows all hosts.

 

http://FMESERVER/fmerest/v2/info?token=blablablabla

 

 

Badge +2

Here's an example on how to submit a workspace to FME Server using the HTTPCaller, I've highlighted the important bits:

0684Q00000ArLaNQAV.png

The upload body looks like this (see the API doc for details):

{
  "FMEDirectives": {},
  "NMDirectives": {
    "failureTopics": [],
    "successTopics": []
  },
  "TMDirectives": {
    "rtc": false,
    "description": "",
    "priority": 100,
    "tag": ""
  },
  "publishedParameters": [
  ],
  "subsection": "REST_SERVICE"
}

The response will be a JSON block with a job id, e.g.

{"id":6}
@Gistack Apologies, I know this response is a bit late! 

 

Another option you could do here is wrapping up the HTTPCaller into a custom transformer, that way it would be repeatable and users wouldn't have to see and edit a HTTPCaller every time. That would also allow you to control which parameters a user can enter (such as token). @david_r is correct that currently you can only authorise with username/password. 

 

You could always suggest this to the ideas exchange, for an updated/optional authorisation option within the FMESJS.

Reply