Making anonymous requests to the host

21 views
Skip to first unread message

Richard Simko

unread,
Feb 23, 2017, 5:29:42 AM2/23/17
to Atlassian Connect Dev
Is it possible, using Atlassian Connect Express, to make requests as the anonymous user back to the host? We're using some middleware to verify the user's access to certain resources by calling out to Confluence and checking that user's permissions. This works fine for all authenticated users, however when it comes to anonymous users req.context.userId is null and as such can't be passed to the httpClient as it requires userKey to not be null. Is there some specific key I can pass to impersonate the anonymous user?

Einar Pehrson

unread,
Feb 23, 2017, 5:58:39 AM2/23/17
to atlassian-...@googlegroups.com
Hey Richard,

please don't cross-post between the mailing list and the Developer Technical Support service desk.

You say "make requests as the anonymous user" and "impersonate the anonymous user", but what I think you're looking for is to just use the request module directly, instead of ACE's HostClient wrapper.

Cheers!
Einar

On Thu, Feb 23, 2017 at 11:29 AM, Richard Simko <ric...@refinedwiki.com> wrote:
Is it possible, using Atlassian Connect Express, to make requests as the anonymous user back to the host? We're using some middleware to verify the user's access to certain resources by calling out to Confluence and checking that user's permissions. This works fine for all authenticated users, however when it comes to anonymous users req.context.userId is null and as such can't be passed to the httpClient as it requires userKey to not be null. Is there some specific key I can pass to impersonate the anonymous user?

--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connect-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Simko

unread,
Feb 23, 2017, 6:03:07 AM2/23/17
to atlassian-...@googlegroups.com
I've had some poor experiences with the response time on the Dev Tech Support so I figured I might get better responses here since other plugin devs might have run in to the same issue. I simply forgot to close the DEVHELP ticket afterwards.

Using request on its own could probably work, I initially thought that some type of special JWT or Bearer token was required to be anonymous but it would make sense that a request with no auth is anonymous ;) Thanks!


Best Regards,
Richard Simko
Cloud Tech Lead


You received this message because you are subscribed to a topic in the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/atlassian-connect-dev/PONtJeFK2Y4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to atlassian-connec...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages