Skip to main content

How to keep AGS services secure?

Comments

8 comments

  • Tom Neer
    Are you running secure services on HTTP?
    0
  • Permanently deleted user
    HTTP or HTTPS, it doesn't matter.  Using Fiddler if you install Fiddler's Root Certificate - it will decrypt HTTPS traffic.  I just tried it again now (switched between http and https) and the requests can still be captured by Fiddler and resent using the Composer tab.
    0
  • Tom Neer
    This is for everyone not Peter, but please do not use secured services with HTTP. We consider this to be negligent in todays security environments and recommend that all environments that use ANY authentication require HTTPS and just assume that you will need authentication. Just use HTTPS.

     

    Yes, SSL only protects the query parameters in transit but not from the endpoints. So if you have a public service that is using secured services, the user will be able to decrypt the token whether in the URL or in the header using Fiddler.

     

    There is also the potential that the URL and token might get logged. For example, if you are using Analytics (Google or Geocortex) or any other 3rd-party logging, the URL is sent in the Referer header, so you would be sending the token to that 3rd-party also. 

     

    I don't know how much this is a Geocortex vs Esri issue. The token is being sent to authenticate against an Esri server, I don't think LG has much say in this. LG? I personally believe that the token should not be sent in the URL but rather as part of the header, but that can get messy with proxies as custom headers tend to get stripped. We went through this discussion of sending API keys in header vs url and decided that we would use the X-API-KEY and if folks are using proxies, they will need to configure them correctly.

     

    I would ask that if a service is so sensitive, should it be available publicly? For example, we have a public map service that allows any user to create data. This is stored in a secured feature service and a second public map service. However, the web user has no direct access to the feature service. Editing is done through a Workflow on the server with credentials the end user has no access to. This was done because of data validation reasons more than security though.

     

    Regardless, with the proposed changes to Workflows, this will become an issue as the workflows move from server- to client-side. Additionally, I have yet to see any JavaScript signing implemented yet by either Esri or LG. Web security is changing really fast and is a horrendously complex topic. LG is taking good steps with implementing CORS but I think it is a good discussion topic for next week's Partner Conference Technical Track.
    0
  • Permanently deleted user
    Good points Tom.  Thanks for your feedback on this issue.

     

    I only see this as a Geocortex issue in that if you put permissions (Guest user) on the layer it actually reduces the AGS security by eliminating the token timeout (since it's constantly renewing it behind the scenes).  At least with a straight call to the AGS service the token is only good for a few minutes.  Routing through Essentials and having it proxy to the AGS service allows access indefinitely.

     

    The parcel data we show in our maps has a license agreement that only allows us to show it in map images - the raw data should not be accessible to the end user.  One thing I did learn while playing around with the service - if you add it as a Feature Layer, no image requests are made - it returns the geometry in JSON and it gets rendered (I assume) by the client.  If you add it as a map service it will make export requests to AGS.
    0
  • Permanently deleted user
    This is a great discussion. I definitely want to re-iterate that we recommend using SSL at all times. For token-secured services, tokens are often passed as a URL parameter, especially for short queries and image requests. As Tom has said, using SSL will protect the requests while in transit. Using Essentials' layer security in the site will prevent access to tokens on the client (i.e., viewer) by routing all requests through Essentials and ensuring that the tokens themselves are only ever passed between ArcGIS and Essentials (see the Essentials admin guide for more on this).

     

    Diagram on layer security from the Essentials administrator guide.

     

    Peter, your point about Essentials effectively being a proxy for a secured map service is a valid concern. It is possible to use Essentials to make map services less secure, or even bypass their security entirely. This is something that we ultimately leave in the hands of the Essentials administrator. Like the philosopher Stan Lee once wrote, with great power comes great responsibility.
    0
  • Permanently deleted user
    Jordan, you last comment gets my Spidey senses tingling ;)

     

    I'll say that that classic Stan Lee quote should be directed to Latitude, not the users of Essentials.  I don't see how Latitude can wash their hands completely on this issue and say it's up to the administrator to take responsibility - we can only work within the confines of what the software was made to do - Latitude drives what Essentials is capable of doing.  What that says to me is that Latitude is okay with 1) the fact that their product can effectively allow AGS security to be bypassed, and 2) allowing people to think that they are increasing security by using layer permissions (and hiding tokens) without highlighting the fact (I don't see any mention of this issue in the admin guide) that they may actually be reducing security of that layer.

     

    I know security is a tough issue and trying to keep services accessible while still being able to control access is a tricky thing.  I'd love to see this topic get addressed in greater detail at a User Conference or at least addressed in one of the monthly update webinars so we know what Latitude's stand is on the issue and where they might be headed.

     

    Keep the feedback coming!

     

    Peter.
    0
  • Permanently deleted user
    If you have a computer running a webserver, and you have credentials for a secured map service, you don't need to install Essentials to completely obviate the security on that service; a simple proxy will do quite nicely. Given that a server admin has the ability to do Very Bad Things, either intentionally or unwittingly, with or without our help, it falls to the admin to ensure that they aren't, say, exposing private data publicly, before Essentials even enters the picture.

     

    With that said, once our products are installed, I agree that we bear the responsibility to ensure that our software doesn't provide additional holes that can be used to compromise data or systems. I also think it's on us to provide documentation that provides clear instructions, recommendations, and best practices, and identifies potential pitfalls or less-than-ideal configurations to avoid. To your second point, it sounds like we should review our security documentation. I'll follow that up with our support and Essentials teams. As always, I'm very happy -- and grateful -- for any feedback that you (or others) could offer.
    0
  • Permanently deleted user
    Absolutely, it is up to the sys admin to ensure that they aren't exposing secure services (AGS or any other service) through general web server configuration.   I'm wondering whether Essentials could use something like a hashed session id and/or timestamp that couldn't be easily unencrypted and updated that could be sent with every request (for services that have layer permissions set, thus sending the requests through Essentials rather than direct to AGS).  By incorporating a short-lived hashed timestamp and/or other unique value along with the request it might be easier to detect a spoofed request.  Or..... could requests be handled more like a workflow request which seems to send the entire request as a hashed packet of data so the user never really sees what parameters were sent in the request.  Just a couple thoughts off the top of my head, since you don't mind the feedback :)
    0

Please sign in to leave a comment.