Select to view content in your preferred language

ArcGIS Enterprise Analysis with System Log Parser: Understanding Anonymous Entries for the User Name (Beginner)

464
0
04-22-2024 05:31 PM
AaronLopez
Esri Contributor
6 0 464

System Log Parser's Statistics By User Reports: the Anonymous Value

For evaluating Site performance and quantifying service popularity, System Log Parser (SLP) has several report offerings to conduct ArcGIS Enterprise log analysis. When selecting Analysis Types such as Simple, WithOverviewCharts or Complete, there is an
option called "Add Statistics By User to Report" which will include an additional worksheet called Statistics By User into the generated output. The information on this worksheet includes a statistical summary
of successful Portal member requests (as reported by ArcGIS Enterprise). This can be quite helpful for GIS administrators to understanding who is asking for what.
Sometimes however, the listed User on this worksheet may show the unexpected value of "anonymous". For a Site with secured services, this might be a puzzling username to observe.

Is an Anonymous User Sending Successful Queries to a Secured Service?

The short answer: no, they are not.
The long answer: no, they are still not, but some background is needed to provide the proper context on "anonymous" entries for the User Name value in the logs.

Portal Member Log Entry Identity

When System Log Parser queries the ArcGIS Enterprise (e.g., ArcGIS Server) logs, it reads the "User Name" field to determine the member identity for each log entry of a successful request.
This value is only read from very specific log entries (e.g., where the log Code=100004). Such entries also have the final elapsed time duration of the work performed (e.g., how long the request took from the ArcGIS Server's ArcSOC.exe point of view). These resources are some of best places to look for quantification analysis of the Site.
For many service request log entries, this lists the authenticated Portal member username value...as expected.
But, there are log entry cases when a member has just authenticated to the Site and the recorded value of "anonymous" is listed instead, but anonymous (e.g., a non-authenticated user) was not actually reading the service.

If log queries are executed manually (for the same window of time) through Manager or the REST Admin API, additional details are revealed which can help explain this initial user impersonation by the entity  called "anonymous".
By using the Request ID field in the logs, one can correlate multiple entries together (since all of the same Request IDs belong to the same request...which is really awesome).
So, while the Code=100004 entry shows the user as "anonymous", the Code=9029 entry actually lists the requesting user's Portal member identity. In this case, "admin".
Subsequent queries by that user are listed as the expected name (e.g., and not "anonymous").

SystemLogParser_NamedUser_SecuredService.png

Note: In the log entry screenshot above, "NaturalEarth/NaturalEarth_SQLServer.MapServer" was a service shared only to specific Portal members.

Note: System Log Parser does not currently present this additional user impersonation detail. Whatever value is recorded under User Name is what SLP uses for the Statistics By User worksheet.

Note: There can also be a separate Code=8522 log entry which lists the recorded member value under the User Name column.

Actual Anonymous Requests to Services Shared to the Public

There are also log entries where the value for the "User Name" field can list "anonymous" as the member, but this where it is truly representing anonymous.
In this situation, the logs are identifying a successful request made by someone for a publicly available service where the connecting client was not challenged to authenticate. In other words, the service was intentionally shared to Everyone (e.g., the public).
By performing another manual, in-depth log query (for the same window of time) for these types of requests, more details can be derived which show that associated Code=9029 entry. This helps highlight that the request was actually made on behalf of the "Anonymous user".

SystemLogParser_Anonymous_PublicService.png

Note: In the log entry screenshot above, "SampleWorldCities.MapServer" was a service shared to Everyone.

Note: System Log Parser does not currently present this additional user impersonation detail. Whatever value is recorded under User Name is what SLP uses for the Statistics By User worksheet.

Are There Anonymous User Log Entries for Secured Services?

No.

Requests issued for any non-publicly shared resource will be prompted to authenticate (even if what is requested does not exist).
Therefore, Code=100004 entries will not exist for the "Anonymous user" user against secured services.

SystemLogParser_Anonymous_SecuredService.png

Note: In the log entry screenshot above, "NaturalEarth/NaturalEarth_SQLServer.MapServer" was a service shared only to specific Portal members.

Note: ArcGIS Enterprise will still acknowledge an "Anonymous user" request for a secured service (existing or not) with a Code=9029 entry (and potentially a Code=8522 entry as well).

What Release is this User Name Log Entry Information Based On?

This article is based on ArcGIS Enterprise 11.2/11.3, but the User Name information has been available in the ArcGIS Server logs for many releases.

Variability

The purpose of this Community Article is to offer guidance and help explain several of the situations where "anonymous" is listed as the User Name in the ArcGIS Enterprise (e.g., ArcGIS Server) logs. Expect some variability of this behavior (over the years and) across the releases. Additionally, since there are many ArcGIS Server service capabilities, each may handle the persistence of the User Name value slightly differently within the framework's internal logging logic.