Skip to content

getService, getLayer should automatically retry failed requests sans authentication #920

Open
@drewdaemon

Description

@drewdaemon

Background

ArcGIS Server tries to validate any token passed in a request whether or not authentication is needed for that request. This can lead to a scenario such as the following:

Bob creates a Feature Service item on ArcGIS Enterprise for a public feature service on AGOL. The consuming application sends an ArcGIS Enterprise authentication token in requests to the AGOL service. The service tries to validate the token with AGOL and fails, preventing the request from succeeding. If a token is not sent, the request is successful since the service is public.

Solution

A simple and bullet-proof approach to solving this would be to

  • Make the request with authentication
  • If it fails with an ArcGIS Auth Error, make it again without authentication

cc @rgwozdz @tomwayson

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions