{"id":9289,"date":"2022-08-26T11:38:25","date_gmt":"2022-08-26T16:38:25","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=9289"},"modified":"2022-08-26T15:19:28","modified_gmt":"2022-08-26T20:19:28","slug":"building-vouch-oauth-proxy","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=9289","title":{"rendered":"Building Vouch Oauth Proxy"},"content":{"rendered":"<p>I am using an NGINX container which is based on Debian 11 &#8212; following the <a href=\"https:\/\/github.com\/vouch\/vouch-proxy#compiling-from-source-and-running-the-binary\" target=\"_blank\" rel=\"noopener\">vouch-proxy build instructions<\/a> failed spectacularly on the first step, reporting that &#8220;package embed is not in GOROOT&#8221;. It appears that Debian package installation gets you go 1.15 &#8212; and &#8217;embed&#8217; wasn&#8217;t added until 1.16. So &#8230; that&#8217;s not great.<\/p>\n<p>As a note to myself &#8212; here are the additional packages I install to the base container:<\/p>\n<p><tt>apt-get update<\/tt><br \/>\n<tt>apt-get upgrade<\/tt><br \/>\n<tt>apt-get install vim wget net-tools procps git make gcc g++<\/tt><\/p>\n<p>To manually install golang on Debian:<\/p>\n<ul>\n<li>Find the version you want to run on https:\/\/golang.org\/dl\/ and wget <em>that<\/em> tar.gz file\n<ul>\n<li><tt>wget https:\/\/go.dev\/dl\/go1.19.linux-amd64.tar.gz<\/tt><\/li>\n<\/ul>\n<\/li>\n<li><tt>tar -vxf go1.19.linux-amd64.tar.gz<\/tt><\/li>\n<li><tt>mv go \/usr\/local\/<\/tt><\/li>\n<li><tt>vi \/etc\/bash.bashrc<\/tt> and append the following lines:<br \/>\nexport GOROOT=\/usr\/local\/go<br \/>\nexport PATH=$GOROOT\/bin:$PATH<\/li>\n<li>Log out and log back in. Test the go installation by running:\n<ul>\n<li><tt>go version<\/tt><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><em>Now<\/em> I am able to run their shell script to build the vouch-proxy binary:<\/p>\n<ul>\n<li><tt>cd \/opt<\/tt><\/li>\n<li><tt>git clone https:\/\/github.com\/vouch\/vouch-proxy.git<\/tt><\/li>\n<li><tt>cd vouch-proxy<\/tt><\/li>\n<li><tt>.\/do.sh goget<\/tt><\/li>\n<li><tt>.\/do.sh build<\/tt><\/li>\n<li><tt>cd configure<\/tt><\/li>\n<li><tt>cp config.yml_example_oidc config.yml<\/tt><\/li>\n<li><tt>.\/vouch-proxy<\/tt><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am using an NGINX container which is based on Debian 11 &#8212; following the vouch-proxy build instructions failed spectacularly on the first step, reporting that &#8220;package embed is not in GOROOT&#8221;. It appears that Debian package installation gets you go 1.15 &#8212; and &#8217;embed&#8217; wasn&#8217;t added until 1.16. So &#8230; that&#8217;s not great. As &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1722,1720,1721],"class_list":["post-9289","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-debian","tag-go","tag-golang"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9289"}],"version-history":[{"count":7,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9289\/revisions"}],"predecessor-version":[{"id":9296,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9289\/revisions\/9296"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}