opengeospatial / ets-security-client10

Public Repo for D112 Secure Client Tests
Other
1 stars 1 forks source link

Added configuration of context path. #23

Open keshavnangare opened 3 years ago

keshavnangare commented 3 years ago

Fixed #22

dstenger commented 3 years ago

Local test with Docker was not successful.

Setup of test suite was done with mvn clean install docker:run -Pdocker.

After starting the test and requesting the generated URL (e.g. https://localhost:8081/teamengine/TY1NTgyODAyNDE4N) with Firefox, following exception is thrown by the test suite:

0b22b0> Feb 12, 2021 4:59:29 PM org.apache.coyote.http11.AbstractHttp11Processor process
0b22b0> INFO: Error parsing HTTP request header
0b22b0>  Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
0b22b0> java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
0b22b0>     at org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:186)
0b22b0>     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1050)
0b22b0>     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
0b22b0>     at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2512)
0b22b0>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
0b22b0>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
0b22b0>     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
0b22b0>     at java.lang.Thread.run(Thread.java:748)

@keshav-nangare Can you please take a look at this problem?

keshavnangare commented 3 years ago

I am able to reproduce the issue.

Below is my workaround:

  1. If we give another port than the teamengine port, the requested generated URL sent successfully.
  2. The problem might be because of the same port using for both of them.
dstenger commented 3 years ago

I tested the PR by using port 8080 with Docker.

However, I am getting following error in the HTML report, now:

Test INPUT:
class java.io.IOException : Failed to bind to /0.0.0.0:8080

Thus, I conclude that the test service must be bound to a different port than the TEAM Engine application uses. So, this pull request will not work on any environment as the port must be configured to a different port than the one used by TEAM Engine.

dstenger commented 3 years ago

@keshav-nangare Can you please make the port configurable again? The previous value 10080 can be used as default again.

keshavnangare commented 3 years ago

@dstenger I have reverted port changes.

dstenger commented 3 years ago

Unfortunately, it is not possible to retrieve a capabilities document when endpoint is generated by TEAM Engine:

stenger@elsbeere:~/git/ets-security-client10$ wget --no-check-certificate "https://localhost:10080/teamengine/jc5ODQxNDI5MTgwM?service=WMS&request=GetCapabilities"
--2021-05-28 13:50:03--  https://localhost:10080/teamengine/jc5ODQxNDI5MTgwM?service=WMS&request=GetCapabilities
Auflösen des Hostnamens localhost (localhost) … 127.0.0.1
Verbindungsaufbau zu localhost (localhost)|127.0.0.1|:10080 … verbunden.
WARNUNG: Das Zertifikat von localhost kann nicht geprüft werden, ausgestellt von »CN=ETS Test Operator,OU=None,O=None,C=us«:.
  Ein selbst-signiertes Zertifikat wurde gefunden.
    WARNUNG: Der Common Name »ETS Test Operator« des Zertifikates entspricht nicht dem angeforderten Hostnamen »localhost«.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 500 Server Error
2021-05-28 13:50:33 FEHLER 500: Server Error.

Further investigations have to be done.