WAB and secure vector tile service

603
10
Jump to solution
02-27-2018 08:35 AM
Carlos_ArturoSarmiento_Royero
New Contributor II

Hi Robert Scheitlin, GISP

I have a secure Vector Tile service that is shared for the organization. I am consuming it from WAB deployed in an Apache. It has already configured proxy, the requests are by proxy but they keep asking me for credentials.

Thanks.

            username="username" password="password*" matchAll="true"/>     

"httpProxy": {
"useProxy": true,
"alwaysUseProxy": false,
"url": "",
"rules": [
{
"proxyUrl": "proxy.php"
}
]
},
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   Try adding that url to your proxy.config serverUrls then using the same username and password.

View solution in original post

10 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   You need to specify a true url to your proxy in the url and proxyUrl properties in the man config.json. So if I have deployed my add to my web server and the urls is http://esri.com/mayapp/ then the proxy url should be just that http://esri.com/maapp/proxy.php if the proxy is in the same application folder. If it is just in the root of my web server then it would be http://esri.com/proxy.php

The other thing I notice is that in your proxy.config you have the url with the https protocol but in your WAB config.json you have http protocol that is an issue.

Carlos_ArturoSarmiento_Royero
New Contributor II

Hi Robert thanks, but I already made the change but still requesting credentials. Greetings from Colombia

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
logFile="proxy_log.log"
mustMatch="true">
<serverUrls>
matchAll="true"/>
        <serverUrl url="https://companyt.maps.arcgis.com/sharing/rest"
            username="v" password="username" matchAll="true"/>      
</serverUrls>
</ProxyConfig>

"rules": [
{
"urlPrefix": "https:/company.arcgis.com/sharing/rest",
}
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   So it may just be a copy and paste issue but you have 

https://companyt.maps.arcgis.com/sharing/rest  in your proxy config.

but have https:/company.arcgis.com/sharing/rest in your WAB Config.json They need to match exactly

Also I would not expect to see a proxyUrl address like you have.

0 Kudos
Carlos_ArturoSarmiento_Royero
New Contributor II

What a shame Robert. These are the true data.

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
logFile="proxy_log.log"
mustMatch="true">
<serverUrls>
matchAll="true"/>
            username="usuario" password="password" matchAll="true"/>     
</serverUrls>
</ProxyConfig>

"httpProxy": {
"useProxy": true,
"alwaysUseProxy": false,
"url": "",
"rules": [
{
}
]
},
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   So now specify the url in your WAB config.json for your Proxy too.

"httpProxy": {
  "useProxy": true,
  "alwaysUseProxy": false,
  "url": "http://127.0.0.1/geoportal/proxy.php",
  "rules": [
    {
      "urlPrefix": "https://geoportal-igac.maps.arcgis.com/sharing/rest",
      "proxyUrl": "http://127.0.0.1/geoportal/proxy.php"
    }
  ]
},

Have you tested your proxy?

http://127.0.0.1/geoportal/proxy.php?ping

0 Kudos
Carlos_ArturoSarmiento_Royero
New Contributor II

Hi Robert, the proxy works perfect. I see that the petition does it well and returns a perfect answer but still requests the credentials. I do not know if the
problems is because it is a vector tile or because it is a service shared by another user of the organization.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Have you tried the proxy url without using the IP LoopBack url? I use the machine name always never localhost or 127.0.0.1.

0 Kudos
Carlos_ArturoSarmiento_Royero
New Contributor II

Hello, Robert. Thanks for your support. I use the proxy with the name of the team. As you can see, he makes the request and the service returns the data well. But it is asking for a second authentication to connect to https://tiles.arcgis.com/

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Carlos,

   Try adding that url to your proxy.config serverUrls then using the same username and password.