Output file using Export Web map - Security concerns

508
3
Jump to solution
03-12-2013 12:51 PM
MichaelRobb
Occasional Contributor III
Hi everyone,

My concern is when passing the JSON to a customized Export Print GP Service (created and running on ArcServer), the output Param given is always the same overall file name.
In this case: _ags_0e39f550422945438fa0de5c6e211bae

e.g. :
h ttp://xxxx/arcgis/rest/directories/arcgisoutput/xxxxx/ExportWebMap_GPServer/_ags_0e39f550422945438fa0de5c6e211bae.pdf

If you let the 10min clean up to occur, the next time the service is called, the SAME AGS file name is created and returned.
If you send JSON to the service again.. it simply increments.

e.g.
h ttp://xxxx/arcgis/rest/directories/arcgisoutput/xxxxx/ExportWebMap_GPServer/_ags_0e39f550422945438fa0de5c6e211bae1.pdf

If you change format... same thing again.

e.g.
h ttp://xxxx/arcgis/rest/directories/arcgisoutput/xxxxx/ExportWebMap_GPServer/_ags_0e39f550422945438fa0de5c6e211bae.jpg


Is there any way to ensure these file names are unique? (e.g. random generated)

There would be nothing stopping a user from entering the same value and watch the various maps being exported as the name is not a random generated file name.
I dont understand why the file names are not unique, other than ease for cleanup on server side.

Any option to change this is welcome!
thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MichaelRobb
Occasional Contributor III
Just answered my own question...

The difference is Synchronous vs Asynchronous.
(Execute task vs Submit Job)

Syncrhonous is nice because it returns the output when done, async gives you a UID job number, requires to check the job...check if Job Status = esriJobSucceeded then get the URL output file.
Which will be in a UID url directory as stated above (scratch).
Not sure why both would not do this...

View solution in original post

0 Kudos
3 Replies
SrinivasVinnakota
Esri Contributor
Even though the output file is the same, the path to this file also contains jobId that is unique every time a print job is submitted.

http://.../customexportwebmap_gpserver/jf7b76c7368ab42399f804e0e0f33c3af/scratch/87b62442e49f416698a619818e2ab9fa.png
0 Kudos
MichaelRobb
Occasional Contributor III
Even though the output file is the same, the path to this file also contains jobId that is unique every time a print job is submitted.

http://.../customexportwebmap_gpserver/jf7b76c7368ab42399f804e0e0f33c3af/scratch/87b62442e49f416698a619818e2ab9fa.png


This is what I would expect, but it is not what is occurring. Is there some setting somewhere, or something I am missing?
I do not get a /scratch directory as the RETURN value when executing the JSON (Execute Service). I get what is exactly provided in my original post, from executing the JSON of the service.

Execution is Synchronous.

I see the Scratch folder, but they are under the Arcgisjobs dir and only gdbs exist in there.  There are no output pdfs or jpgs there, they go to the gisoutput, this is where the returned value points to as well.

I execute(GET) Or (POST) and it returns the following:


[ATTACH=CONFIG]22714[/ATTACH]

Notice the URL return value and then the directory of where the output is saved to.
You will notice, when you run and run within the 10 mins, it will increment with a digit at the end.
There is nothing Unique about this.

Thoughts?
0 Kudos
MichaelRobb
Occasional Contributor III
Just answered my own question...

The difference is Synchronous vs Asynchronous.
(Execute task vs Submit Job)

Syncrhonous is nice because it returns the output when done, async gives you a UID job number, requires to check the job...check if Job Status = esriJobSucceeded then get the URL output file.
Which will be in a UID url directory as stated above (scratch).
Not sure why both would not do this...
0 Kudos