[Geoserver-users] Unauthorized Service

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com

Hi,
you should provide more details, like, the exact message you get, any error that might pop up
in the geoserver.log file when the request is made, and so on

Cheers
Andrea

···

On Thu, Dec 1, 2016 at 3:28 PM, Obrecht, Joshua D [DSN] <jobrecht@anonymised.com> wrote:

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com



Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Below are the entries in the log file. I don’t get any message that pops up. The pdf is created with a footnote that contains the second entry from the log file. Could this be a permissions issue? Is there a way to pass user name and password with the call?

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

2016-12-09 08:11:53,971 ERROR [print.PDFCustomBlocks] - Error while adding a PDF elementjava.io.IOException: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…

···

Hi,

you should provide more details, like, the exact message you get, any error that might pop up

in the geoserver.log file when the request is made, and so on

Cheers

Andrea

On Thu, Dec 1, 2016 at 3:28 PM, Obrecht, Joshua D [DSN] <jobrecht@…662…> wrote:

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi Josh,
What happens if you try and access that URL from within the web-browser, does it work? Does it work if you request it from the geoserver box itself via a browser/CuRL/wget to your xxxxx domain? Does it work if you change the domain to localhost?
If the error is different between them, then you probably have a network configuration problem.
Cheers,
Jonathan

···

On 09/12/2016 14:17, Obrecht, Joshua D [DSN] wrote:

Below are the entries in the log file. I don’t get any message that pops up. The pdf is created with a footnote that contains the second entry from the log file. Could this be a permissions issue? Is there a way to pass user name and password with the call?

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

2016-12-09 08:11:53,971 ERROR [print.PDFCustomBlocks] - Error while adding a PDF elementjava.io.IOException: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com

From: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: Friday, December 09, 2016 5:02 AM
To: Obrecht, Joshua D [DSN] jobrecht@anonymised.com
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Unauthorized Service

Hi,

you should provide more details, like, the exact message you get, any error that might pop up

in the geoserver.log file when the request is made, and so on

Cheers

Andrea

On Thu, Dec 1, 2016 at 3:28 PM, Obrecht, Joshua D [DSN] <jobrecht@anonymised.com> wrote:

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)

Hi,
it looks like the printing system is trying to access a secured resource, and it cannot do that because it’s not authorized to do so
by a security subsystem.
Are you trying to print a layer served from the same GeoServer, or another WMS?
I’m wondering if the print subsystem can pass on the user credentials when making requests, it may be that’s not the case… but
I don’t know how it works well enough. Mauro (cc’ed), do you have any clue?

Regards
Andrea

···

On Fri, Dec 9, 2016 at 3:17 PM, Obrecht, Joshua D [DSN] <jobrecht@anonymised.com> wrote:

Below are the entries in the log file. I don’t get any message that pops up. The pdf is created with a footnote that contains the second entry from the log file. Could this be a permissions issue? Is there a way to pass user name and password with the call?

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

2016-12-09 08:11:53,971 ERROR [print.PDFCustomBlocks] - Error while adding a PDF elementjava.io.IOException: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com

From: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: Friday, December 09, 2016 5:02 AM
To: Obrecht, Joshua D [DSN] <jobrecht@anonymised.com>
Cc: geoserver-users@anonymised.comsourceforge.net
Subject: Re: [Geoserver-users] Unauthorized Service

Hi,

you should provide more details, like, the exact message you get, any error that might pop up

in the geoserver.log file when the request is made, and so on

Cheers

Andrea

On Thu, Dec 1, 2016 at 3:28 PM, Obrecht, Joshua D [DSN] <jobrecht@anonymised.com.662…> wrote:

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com



Geoserver-users mailing list
Geoserver-users@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


It is from another WMS that is open and doesn’t need credentials.

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…

···

Hi,

it looks like the printing system is trying to access a secured resource, and it cannot do that because it’s not authorized to do so

by a security subsystem.

Are you trying to print a layer served from the same GeoServer, or another WMS?

I’m wondering if the print subsystem can pass on the user credentials when making requests, it may be that’s not the case… but

I don’t know how it works well enough. Mauro (cc’ed), do you have any clue?

Regards

Andrea

On Fri, Dec 9, 2016 at 3:17 PM, Obrecht, Joshua D [DSN] <jobrecht@…662…> wrote:

Below are the entries in the log file. I don’t get any message that pops up. The pdf is created with a footnote that contains the second entry from the log file. Could this be a permissions issue? Is there a way to pass user name and password with the call?

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

2016-12-09 08:11:53,971 ERROR [print.PDFCustomBlocks] - Error while adding a PDF elementjava.io.IOException: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…

From: andrea.aime@…84… [mailto:andrea.aime@…84…] On Behalf Of Andrea Aime
Sent: Friday, December 09, 2016 5:02 AM
To: Obrecht, Joshua D [DSN] <jobrecht@…662…>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Unauthorized Service

Hi,

you should provide more details, like, the exact message you get, any error that might pop up

in the geoserver.log file when the request is made, and so on

Cheers

Andrea

On Thu, Dec 1, 2016 at 3:28 PM, Obrecht, Joshua D [DSN] <jobrecht@…662…> wrote:

I am trying to print a pdf through GeoServer. When I pass a layer from a service on the same server, the pdf populates with a message saying that the link is unauthorized. I have placed the localMatch dummy line into my yaml. I have also passed a valid user name and password when prompted. Is there something else that is needed in the yaml?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Dec 28, 2016 at 6:28 PM, Obrecht, Joshua D [DSN] <
jobrecht@anonymised.com> wrote:

It is from another WMS that is open and doesn’t need credentials.

That does not seem to be the case, the other sever seems to be returning a
HTTP 401, Unauthorized:

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
GeoSolutions Enterprise Support Services for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

There are no credentials set for that server. Can you explain why on other servers, the service can be called without credentials but is needed in GeoServer?

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@…662…

···

On Wed, Dec 28, 2016 at 6:28 PM, Obrecht, Joshua D [DSN] <jobrecht@…662…> wrote:

It is from another WMS that is open and doesn’t need credentials.

That does not seem to be the case, the other sever seems to be returning a HTTP 401, Unauthorized:

https://httpstatuses.com/401

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Wed, Dec 28, 2016 at 7:01 PM, Obrecht, Joshua D [DSN] <
jobrecht@anonymised.com> wrote:

There are no credentials set for that server. Can you explain why on other
servers, the service can be called without credentials but is needed in
GeoServer?

Oh no, I have no clue, it's just what I'm reading from the logs you posted,
GeoServer seems to think it made a request and got back a 401 here:

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error
for
https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS=
iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: *Error
(status=401) while reading the image from https:// xxxxx
/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS=
iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized*

As far as I can tell the message is logged here:

https://github.com/mapfish/mapfish-print/blob/1.2.x/src/main/java/org/mapfish/print/PDFUtils.java#L283

By the looks of the code, it's making the HTTP request to get the image,
and logs and fails if the status code returned is not a 200.

But I cannot tell you why it's happening, that would require knowledge of
the server you're making the request to :slight_smile:

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
GeoSolutions Enterprise Support Services for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Just a thought: Can the service be called with http:// in stead of https://? 

/julian

<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

On Wed, Dec 28, 2016 at 7:01 PM, Obrecht, Joshua D [DSN] <[jobrecht@anonymised.com](mailto:jobrecht@anonymised.com)> wrote:

> There are no credentials set for that server. Can you explain why on other servers, the service can be called without credentials but is needed in GeoServer?

Oh no, I have no clue, it's just what I'm reading from the logs you posted, GeoServer seems to think it made a request and got back a 401 here:

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for [https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS=](https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS=) iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: **Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized**

As far as I can tell the message is logged here:

[https://github.com/mapfish/mapfish-print/blob/1.2.x/src/main/java/org/mapfish/print/PDFUtils.java#L283](https://github.com/mapfish/mapfish-print/blob/1.2.x/src/main/java/org/mapfish/print/PDFUtils.java#L283)

By the looks of the code, it's making the HTTP request to get the image, and logs and fails if the status code returned is not a 200.

But I cannot tell you why it's happening, that would require knowledge of the server you're making the request to :-)

Cheers
Andrea

--

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_it](http://twitter.com/geosolutions_it)

**AVVERTENZE AI SENSI DEL D.Lgs. 196/2003**

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

-------------------------------------------------------

</details>

That is not an option

···

Josh Obrecht, GISP

GIS Support and Research Facility

Iowa State University

213 Durham Center

613 Morrill Rd

Ames, IA 50011

515-294-6990

jobrecht@anonymised.com

From: Julian Hollingbery [mailto:julian@anonymised.com]
Sent: Wednesday, December 28, 2016 12:47 PM
To: Andrea Aime andrea.aime@anonymised.com; Obrecht, Joshua D [DSN] jobrecht@anonymised.com
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Unauthorized Service

Just a thought: Can the service be called with http:// in stead of [https://](https://)? 

/julian 

 Andrea Aime <[andrea.aime@anonymised.com107...](mailto:andrea.aime@anonymised.com)> wrote:

On Wed, Dec 28, 2016 at 7:01 PM, Obrecht, Joshua D [DSN] <jobrecht@anonymised.com…662…> wrote:

There are no credentials set for that server. Can you explain why on other servers, the service can be called without credentials but is needed in GeoServer?

Oh no, I have no clue, it’s just what I’m reading from the logs you posted, GeoServer seems to think it made a request and got back a 401 here:

2016-12-09 08:11:53,971 ERROR [print.PDFUtils] - Server returned an error for https://xxxxx/wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Error (status=401) while reading the image from https:// xxxxx /wms?BBOX=93.59662362617522%2C-42.08234015699224%2C93.6671763738248%2C-41.97925984300776&HEIGHT=2375&WIDTH=1626&map_resolution=190&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A190&LAYERS= iowasections&REQUEST=GetMap&STYLES=&DPI=190&SRS=EPSG%3A4326: Unauthorized

As far as I can tell the message is logged here:

https://github.com/mapfish/mapfish-print/blob/1.2.x/src/main/java/org/mapfish/print/PDFUtils.java#L283

By the looks of the code, it’s making the HTTP request to get the image, and logs and fails if the status code returned is not a 200.

But I cannot tell you why it’s happening, that would require knowledge of the server you’re making the request to :slight_smile:

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.