Skip to content

Instantly share code, notes, and snippets.

View Gourds's full-sized avatar
🏍️
di~di~di

Guo YaFeng Gourds

🏍️
di~di~di
View GitHub Profile
@Gourds
Gourds / nginx-access-log
Created January 28, 2021 03:10
nginx-access-log
1.2.3.4 - - [28/Jan/2021:03:04:34 +0000] "GET / HTTP/1.1" 302 145 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" "-"
1.2.3.4 - - [28/Jan/2021:03:04:34 +0000] "GET /login?url=http://test_sso_nginx_b.taiheops.com:8080/&vouch-failcount=&X-Vouch-Token=&error= HTTP/1.1" 302 277 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" "-"
1.2.3.4 - - [28/Jan/2021:03:05:28 +0000] "GET /auth?code=6QwTH0&state=C4QWxviTYKl5bcjTIr1qCg13DrN0YBUw HTTP/1.1" 302 117 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" "-"
1.2.3.4 - - [28/Jan/2021:03:05:28 +0000] "GET /auth/C4QWxviTYKl5bcjTIr1qCg13DrN0YBUw/?code=6QwTH0&state=C4QWxviTYKl5bcjTIr1qCg13DrN0YBUw HTTP/1.1" 302 65 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" "-"
1.2.3.4 - - [28/Jan/2021:03:05:28 +0000] "GET / HTTP/1.1" 200 598 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0"
@Gourds
Gourds / vp-log-5.log
Last active January 28, 2021 03:08
[vp-log-5]
{"level":"info","ts":1611803016.8885143,"msg":"jwt.secret read from /root/config/secret"}
{"level":"warn","ts":1611803016.888577,"msg":"generating random session.key"}
{"level":"info","ts":1611803016.8886733,"msg":"configuring alibaba OAuth with Endpoint https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize"}
{"level":"debug","ts":1611803016.8886814,"msg":"cfg.RootDir: /root"}
{"level":"debug","ts":1611803016.8888674,"msg":"viper settings map[oauth:map[auth_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize callback_urls:[http://vouch.taiheops.com:2081/auth] client_id:xxxx client_secret:xxxx preferreddomain:taiheops.com provider:alibaba scopes:[read] token_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/token user_info_url:https://ynfyvjwiaw.login.aliyunidaas.com/api/bff/v1.2/oauth2/userinfo] vouch:map[allowallusers:true cookie:map[domain:taiheops.com maxage:240 name:VouchCookie samesite:lax secure:false] headers:map[jwt:X-Vouch-Token querystring:access_token redirect:X-Vouch-Requested-URI] jw
@Gourds
Gourds / vp-config-4
Last active January 28, 2021 03:00
[vp-config-4]
vouch:
logLevel: debug
testing: false
listen: 0.0.0.0 # VOUCH_LISTEN
port: 9090 # VOUCH_PORT
cookie:
name: VouchCookie
domain: taiheops.com
secure: false
sameSite: lax
@Gourds
Gourds / vp-log-3
Created January 22, 2021 01:56
[vp-log-3]
{"level":"info","ts":1611280349.9010384,"msg":"jwt.secret read from /config/secret"}
{"level":"warn","ts":1611280349.901045,"msg":"generating random session.key"}
{"level":"info","ts":1611280349.9011402,"msg":"configuring oidc OAuth with Endpoint https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize"}
{"level":"debug","ts":1611280349.901146,"msg":"cfg.RootDir: /"}
{"level":"debug","ts":1611280349.9012957,"msg":"viper settings map[oauth:map[auth_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize callback_urls:[http://vouch.taiheops.com:2081/auth] client_id:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx client_secret:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx preferreddomain:taiheops.com provider:oidc scopes:[read] token_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/token user_info_url:https://ynfyvjwiaw.login.aliyunidaas.com/api/bff/v1.2/oauth2/userinfo] vouch:map[allowallusers:true cookie:map[domain:taiheops.com maxage:14400 name:VouchCookie samesite:lax secure:false] headers:map[jwt:X-Vouch-T
@Gourds
Gourds / 2021-vp-log-2
Created January 15, 2021 02:54
[2021-vp-log-2]
{"level":"warn","ts":1610679081.2924669,"msg":"setting `vouch.cookie.maxage` to `vouch.jwt.maxage` value of 240 minutes (curently set to 14400 minutes)"}
{"level":"info","ts":1610679081.2925816,"msg":"jwt.secret read from /config/secret"}
{"level":"warn","ts":1610679081.2925868,"msg":"generating random session.key"}
{"level":"info","ts":1610679081.2926939,"msg":"configuring oidc OAuth with Endpoint https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize"}
{"level":"debug","ts":1610679081.2927024,"msg":"cfg.RootDir: /"}
{"level":"debug","ts":1610679081.2928448,"msg":"viper settings map[oauth:map[auth_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize callback_urls:[http://vouch.taiheops.com:2081/auth] client_id:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx client_secret:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx preferreddomain:taiheops.com provider:oidc scopes:[openid email] token_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/token user_info_url:https://ynfyvjwiaw.login.aliyunidaas.com/api/bff/
@Gourds
Gourds / vp-config-1
Created January 15, 2021 02:38
[2021-vp-config]
{"level":"warn","ts":1610677826.4281592,"msg":"setting `vouch.cookie.maxage` to `vouch.jwt.maxage` value of 240 minutes (curently set to 14400 minutes)"}
{"level":"info","ts":1610677826.428241,"msg":"jwt.secret read from /config/secret"}
{"level":"warn","ts":1610677826.4282463,"msg":"generating random session.key"}
{"level":"info","ts":1610677826.428365,"msg":"configuring oidc OAuth with Endpoint https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize"}
2021-01-15T02:30:26.428Z INFO testing: true, using development console logger
{"level":"debug","ts":1610677826.4283721,"msg":"cfg.RootDir: /"}
2021-01-15T02:30:26.428Z DEBUG vouch.jwt.secret is 44 characters long
2021-01-15T02:30:26.428Z DEBUG vouch.session.key is 44 characters long
2021-01-15T02:30:26.428Z INFO jwtcache: the returned headers for a valid jwt will be cached for 20 minutes
2021-01-15T02:30:26.428Z DEBUG responses.Configure() attempting to parse templates with cfg.RootDir: /
@Gourds
Gourds / vouch_log_2.log
Created December 21, 2020 06:43
[vouch_log_2]
{"level":"warn","ts":1608532572.0704455,"msg":"setting `vouch.cookie.maxage` to `vouch.jwt.maxage` value of 240 minutes (curently set to 14400 minutes)"}
{"level":"info","ts":1608532572.07052,"msg":"jwt.secret read from /config/secret"}
{"level":"warn","ts":1608532572.0705264,"msg":"generating random session.key"}
{"level":"info","ts":1608532572.0706384,"msg":"configuring oidc OAuth with Endpoint https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize"}
{"level":"debug","ts":1608532572.070646,"msg":"cfg.RootDir: /"}
{"level":"debug","ts":1608532572.070789,"msg":"viper settings map[oauth:map[auth_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/authorize callback_urls:[http://vouch.taiheops.com:2081/auth] client_id:xxxxxxxxxxxxxxxxx client_secret:xxxxxxxxxxxxxxxxx preferreddomain:taiheops.com provider:oidc scopes:[read] token_url:https://ynfyvjwiaw.login.aliyunidaas.com/oauth/token user_info_url:https://ynfyvjwiaw.login.aliyunidaas.com/api/bff/v1.2/oauth2/userinfo] vouch:map[allowallusers:true cookie:map[do
@Gourds
Gourds / new-vouch-proxy.log
Created December 17, 2020 02:00
[new-vouch-proxy_log]
2020-12-17T01:57:00.975Z DEBUG /validate
2020-12-17T01:57:00.976Z ERROR no jwt found in request
2020-12-17T01:57:00.976Z DEBUG removing port from test_sso_nginx_a.taiheops.com:2081 to test domain test_sso_nginx_a.taiheops.com
2020-12-17T01:57:00.976Z DEBUG setting the cookie domain to taiheops.com
2020-12-17T01:57:00.976Z DEBUG CaptureWriter.Write set w.StatusCode 401
2020-12-17T01:57:00.976Z INFO |401| 111.697µs /validate {"statusCode": 401, "request": 1078, "latency": "111.697µs", "avgLatency": "1.251588ms", "ipPort": "172.17.0.1:47078", "method": "GET", "host": "test_sso_nginx_a.taiheops.com:2081", "path": "/validate", "referer": ""}
2020-12-17T01:57:01.083Z DEBUG /login
2020-12-17T01:57:01.083Z DEBUG setting the cookie domain to taiheops.com
2020-12-17T01:57:01.083Z DEBUG session state set to E30t480xUFvW7gPofvLWCg7f9p0e0hH
2020-12-17T01:57:01.083Z DEBUG Login url param normalized to 'http://test_sso_nginx_a.taiheops.com:2081/'