server.go
runs a HTTP/HTTPS server on the port 9090.- It gives you 4 endpoints
/
/healthz
/unprotected
/protected
/protected
requires username and password that is sourced from a file calledcreds.txt
/unprotected
will give you back some data, to test in wireshark- You can run this server in TLS and non-TLS mode to test the connection.
go run server.go
- If the application is running in
server.go
assrv.ListenAndServeTLS
then you can access it viahttps
- Open wireshark and try to access the
Authorization: Basic <base64>
request for/protected
handler a. With non-TLS you can decode the header byecho <base64> | base64 -d
b. For TLS you will not be able to do that