Paw.app -> how to see what TLS settings were used? - https

I can easily see this in my browser:
I can also see the same with cURL's verbose flag:
curl -v https://rustymagnet3000.local/hello

Related

"go get" ignores GOPROXY when using http_proxy

I'm trying to get Go to use an internal enterprise Go-Proxy for module download - which requires an http_proxy to be accessible (enterprise firewall). However go get -u golang.org/x/lint/golint fails:
package golang.org/x/lint/golint: unrecognized import path "golang.org/x/lint/golint": https fetch: Get "https://golang.org/x/lint/golint?go-get=1": Forbidden
My setup:
http_proxy and https_proxy environment variables are set
no_proxy does not contain the IP or hostname of my Go-Proxy
GOPROXY is set (go env -w GOPROXY=https://artifactory.mycompany.com/api/go/myrepo-go-virtual)
I checked:
Using curl and directly querying the GOPROXY server works fine and I can download the file (so the https_proxy setting works)
Counter-check with curl and explicitly unsetting http/https_proxy: No connection, as expected
Using tcpdump, I discovered that running go get seems to ignore my GOPROXY and ask my http_proxy to connect directly to the original url on golang.org (Options/sequence and ack numbers omitted for brevity), which the proxy/firewall blocks.
06:52:53.926397 IP <my_ip.port> > <proxy.port>: Flags [S], length 0
06:52:53.927206 IP <proxy.port> > <my_ip.port>: Flags [S.], length 0
06:52:53.927232 IP <my_ip.port> > <proxy.port>: Flags [.], length 0
06:52:53.932003 IP <my_ip.port> > <proxy.port>: Flags [P.], length 89: HTTP: CONNECT golang.org:443 HTTP/1.1
06:52:53.932638 IP <proxy.port> > <my_ip.port>: Flags [.], length 0
06:52:53.933100 IP <proxy.port> > <my_ip.port>: Flags [P.], length 3939: HTTP: HTTP/1.1 403 Forbidden
Question: Why does Go ignore the GOPROXY? Did I not set something up correctly?
I'm using Go 1.15.3 in the golang:1.15.3 Docker container (with some added tools to check connectivity)
Try this: set GO111MODULE=on to use GOPROXY
Or run go mod init before you run go get

Error while trying to invoke Golang trace

The following command works fine serving up a web page with a profile and I am able to analyse it, very good.
go tool pprof -http=:8082 https://mytestserver.net:443/debug/pprof/profile?seconds=3
However if I try a trace, this happens
$ go tool pprof -http=:8082 https://mytestserver.net:443/debug/pprof/trace?seconds=3
Fetching profile over HTTP from https://mytestserver.net:443/debug/pprof/trace?seconds=3
https://mytestserver.net:443/debug/pprof/trace?seconds=3: server response: 404 Not Found - Unknown profile
failed to fetch any source profiles
This doesn't work either
$ go tool trace -http=:8082 https://mytestserver.net:443/debug/pprof/trace?seconds=3
2020/09/29 22:34:49 Parsing trace...
failed to open trace file: open https://mytestserver.net:443/debug/pprof/trace?seconds=3: The filename, directory name, or volume label syntax is incorrect.
Was following some examples from
https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/
Trace could be useful to visualize GC behaviour as well as Goroutine/Threads etc.
Is there another way to generate trace?
I run trace from a Windows machine and the following is the versioning info
$ go version
go version go1.15.2 windows/amd64
Did you tried using http instead of secure connection?
It seems it only works for http connections FYR.. https://golang.org/pkg/net/http/pprof/

How to submit wget jobs through a bash script to condor?

I have a problem submitting wget jobs to condor.
I can use wget to download a file from a url using command line.
$ wget https://wordpress.org/latest.zip
--2019-01-24 16:43:42-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11383968 (11M) [application/zip]
Saving to: “latest.zip”
100%[======================================>] 11,383,968 --.-K/s in 0.09s
2019-01-24 16:43:43 (117 MB/s) - “latest.zip” saved [11383968/11383968]
But if I save the command to a bash script file "test.sh", like this:
#!/bin/sh
wget https://wordpress.org/latest.zip
And then submit it to condor:
#!/usr/bin/env condor_submit
Executable = test.sh
Universe = vanilla
output = tmp.out
error = tmp.error
Log = tmp.log
Queue 1
It will have error as "Connection time out."
--2019-01-24 16:53:50-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... failed: Connection timed out
But test.sh works well from command line as follows:
$./test.sh
I changed "tesh.sh" to:
#!/bin/sh
wget --debug --verbose https://wordpress.org/latest.zip
And the output is:
Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.12 on linux-gnu.
--2019-01-24 17:25:58-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Caching wordpress.org => 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... Closed fd 3
failed: Connection timed out.
I suspect the problem is with "https": the SSL/TLS handshake is failing.
If you connect to an HTTPS site with a web browser, you use the browser's trust store (very often, this is one-in-the-same as your desktop's Windows trust store).
SUGGESTIONS:
Verify your "test.sh" works from the command line.
Modify your script to run wget --debug --trace ..., and check the output.
If only for troubleshooting purposes, try --no-check-certificate, too.
Look here for more details:
GNU Wget 1.18 Manual
ADDENDUM:
If you run wget --debug --verbose ..., you should see something like this:
$ wget --debug --verbose https://wordpress.org/latest.zip
Setting --verbose (verbose) to 1
Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.19.4 on linux-gnu.
Reading HSTS entries from /home/xxxxx/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'latest.zip' (UTF-8) -> 'latest.zip' (UTF-8)
--2019-01-24 15:49:12-- https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Caching wordpress.org => 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
Created socket 3.
Releasing 0x000055afcdc64650 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 3 to SSL handle 0x000055afcdc64750
certificate:
subject: CN=*.wordpress.org,OU=Domain Control Validated
issuer: CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\\, Inc.,L=Scottsdale,ST=Arizona,C=US
X509 certificate successfully verified and matches host wordpress.org
---request begin---
GET /latest.zip HTTP/1.1
User-Agent: Wget/1.19.4 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: wordpress.org
Connection: Keep-Alive
...
If you DON'T see ANY of this ... I'd contact your network administrator about a firewall or proxy that might be blocking your Condor app.

How to limit LTPA cookies to SSL only using jacl/jython

When I am using the websphere console, and navigate to the Secure Administration -> SSO I have a checkbox called: 'Require SSL'. How do I enable/disable this using jacl/jython ?
I have even used the command assistance from the console. But when I checked the logs, I can see almost every other command being issues apart from this setting.
Using Jython:
AdminTask.configureSingleSignon('-requiresSSL true')
Other available options for the configureSingleSignon command:
-enable [true|false]
-domainName [String]
-interoperable [true|false]
-attributePropagation [true|false]
Reference: SecurityConfigurationCommands command group for the AdminTask object.

Call to undefined function curl_init() for Magento TAF

I'm trying to get Selenium to work with Magento TAF in Netbeans off a Wamp Server. When I run the test I get the following error:
Call to undefined function curl_init() in
C:\wamp\bin\php\php5.4.3\pear\PHPUnit\Extensions\SeleniumTestCase\Driver.php
on line 995
When I try and do a google search I keep getting results saying to enable curl, which is pointless for me because I do have it enabled. Have had it enabled for quite some time. The information in from the phpinfo for the curl section is as follows:
curl
cURL support: enabled
cURL Information: 7.24.0
Age: 3
Features
AsynchDNS: Yes
Debug: No
GSS-Negotiate: Yes
IDN: No
IPv6: Yes
Largefile: Yes
NTLM: Yes
SPNEGO: No
SSL: Yes
SSPI: Yes
krb4: No
libz: Yes
CharConv: No
Protocols: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host: i386-pc-win32
SSL Version: OpenSSL/0.9.8u
ZLib Version: 1.2.5
libSSH Version: libssh2/1.3.0
On line 995 of the file I have the following line:
$curl = curl_init();
When I ctrl+click the function in phpstorm I get taken to:
C:\Program Files (x86)\JetBrains\PhpStorm
5.0.4\plugins\php\lib\php.jar!\com\jetbrains\php\lang\psi\stubs\data\curl.php
and on that line i have
function curl_init ($url = null) {}
Any ideas what's going on?
It appears that your IDE is referencing one php.ini, whilst when you run your tests on your WAMP server, it is referencing another.
Either:
a) Make sure you are using the same pho.ini file between the IDE and the WAMP server, or;
b) Make sure all php.ini files have extension=php_curl.dll uncommented.

Resources