Message Boards Message Boards

0
|
7260 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

PermissionKey does not Seem to make a difference in result?

Posted 8 years ago

I am trying out the PermissionsKey feature and it doesn't seem to be doing what I expect. Using the example from the documentation I created the following APIFunction and expected it not to return and answer when the wrong key is sent.

In[3] below seems like it should not return the result. Am I misunderstanding what the PermissionsKey should be doing?

In[1]:= obj =  CloudDeploy[APIFunction[{"n" -> Integer}, #n^2 &],  Permissions -> {PermissionsKey["thekey"] -> "Execute"}]
Out[1]= CloudObject["https://www.wolframcloud.com/objects/166e0320-8df8-4860-be3c-12eff233d6e7"]

In[2]:= URLExecute[obj, {"n" -> 123}, Authentication -> PermissionsKey["thekey"]]
Out[2]= 15129

In[3]:= URLExecute[obj, {"n" -> 123}, Authentication -> PermissionsKey["wrongkey"]]
Out[3]= 15129
POSTED BY: John Stewart
2 Replies
Posted 8 years ago

Thanks Ilian.

POSTED BY: John Stewart

The permissions of the object created are

In[2]:= Options[obj, Permissions]

Out[2]= {Permissions -> {"Owner" -> {"Read", "Write", "Execute"}, 
            PermissionsKey["thekey"] -> {"Execute"}}}

so the owner always has access.

POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract