1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-27 00:51:33 +02:00
Files
oauth2-proxy/assets/js/735cb06c.b49f114b.js
2023-11-13 10:29:28 +00:00

1 line
7.7 KiB
JavaScript

"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[9834],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return f}});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=o.createContext({}),l=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||a;return n?o.createElement(f,i(i({ref:t},s),{},{components:n})):o.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var u={};for(var c in t)hasOwnProperty.call(t,c)&&(u[c]=t[c]);u.originalType=e,u[p]="string"==typeof e?e:r,i[1]=u;for(var l=2;l<a;l++)i[l]=n[l];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}m.displayName="MDXCreateElement"},4107:function(e,t,n){n.r(t),n.d(t,{assets:function(){return s},contentTitle:function(){return c},default:function(){return f},frontMatter:function(){return u},metadata:function(){return l},toc:function(){return p}});var o=n(7462),r=n(3366),a=(n(7294),n(3905)),i=["components"],u={id:"contribution",title:"Contribution Guide"},c=void 0,l={unversionedId:"community/contribution",id:"community/contribution",title:"Contribution Guide",description:"We track bugs and issues using Github.",source:"@site/docs/community/contribution.md",sourceDirName:"community",slug:"/community/contribution",permalink:"/oauth2-proxy/docs/next/community/contribution",draft:!1,editUrl:"https://github.com/oauth2-proxy/oauth2-proxy/edit/master/docs/docs/community/contribution.md",tags:[],version:"current",frontMatter:{id:"contribution",title:"Contribution Guide"},sidebar:"docs",previous:{title:"Security",permalink:"/oauth2-proxy/docs/next/community/security"},next:{title:"Security",permalink:"/oauth2-proxy/docs/next/community/security"}},s={},p=[],d={toc:p},m="wrapper";function f(e){var t=e.components,u=(0,r.Z)(e,i);return(0,a.kt)(m,(0,o.Z)({},d,u,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"We track bugs and issues using Github."),(0,a.kt)("p",null,"If you find a bug, please open an Issue. When opening an Issue or Pull Request please follow the preconfigured template and take special note of the checkboxes."),(0,a.kt)("p",null,"If you want to fix a bug, add a new feature or extend existing functionality, please create a fork, create a feature branch and open a PR back to this repo.\nPlease mention open bug issue number(s) within your PR if applicable."),(0,a.kt)("p",null,"We suggest using ",(0,a.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/docs/languages/go"},"Visual Studio Code")," with the official ",(0,a.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=golang.go"},"Go for Visual Studio Code")," extension."),(0,a.kt)("h1",{id:"go-version"},"Go version"),(0,a.kt)("p",null,"This project is currently still using go 1.19. You can follow the installation guide for go ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/doc/install"},"here.")," And you can find go version 1.19 in the archived section ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/dl/"},"here.")),(0,a.kt)("h1",{id:"preparing-your-fork"},"Preparing your fork"),(0,a.kt)("p",null,"Clone your fork, create a feature branch and update the depedencies to get started."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"git clone git@github.com:<YOUR_FORK>/oauth2-proxy\ncd oauth2-proxy\ngit branch feature/<BRANCH_NAME>\ngit push --set-upstream origin feature/<BRANCH_NAME>\ngo mod download\n")),(0,a.kt)("h1",{id:"testing--debugging"},"Testing / Debugging"),(0,a.kt)("p",null,"For starting oauth2-proxy locally open the debugging tab and create the ",(0,a.kt)("inlineCode",{parentName:"p"},"launch.json")," and select ",(0,a.kt)("inlineCode",{parentName:"p"},"Go: Launch Package"),"."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Debugging Tab",src:n(8561).Z,width:"351",height:"273"})),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "version": "0.2.0",\n "configurations": [\n {\n "name": "Launch OAuth2-Proxy with Dex",\n "type": "go",\n "request": "launch",\n "mode": "auto",\n "program": "${workspaceFolder}",\n "args": [\n "--config",\n // The following configuration contains settings for a locally deployed \n // upstream and dex as an idetity provider\n "contrib/local-environment/oauth2-proxy.cfg"\n ]\n },\n {\n "name": "Launch OAuth2-Proxy with Keycloak",\n "type": "go",\n "request": "launch",\n "mode": "auto",\n "program": "${workspaceFolder}",\n "args": [\n "--config",\n // The following configuration contains settings for a locally deployed \n // upstream and keycloak as an idetity provider\n "contrib/local-environment/oauth2-proxy-keycloak.cfg"\n ]\n }\n ]\n}\n')),(0,a.kt)("p",null,"Before you can start your local version of oauth2-proxy, you will have to use the provided docker compose files to start a local upstream service and identity provider. We suggest using ",(0,a.kt)("a",{parentName:"p",href:"https://hub.docker.com/r/kennethreitz/httpbin"},"httpbin")," as your upstream for testing as it allows for request and response introspection of all things HTTP."),(0,a.kt)("p",null,"Open a terminal and switch to the ",(0,a.kt)("inlineCode",{parentName:"p"},"contrib/local-environment")," directory."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Dex as your IdP: ",(0,a.kt)("inlineCode",{parentName:"li"},"docker compose -f docker-compose.yaml up dex etcd httpbin")),(0,a.kt)("li",{parentName:"ul"},"Keycloak as your IdP: ",(0,a.kt)("inlineCode",{parentName:"li"},"docker compose -f docker-compose-keycloak.yaml up keycloak httpbin"))),(0,a.kt)("p",null,"The username for both is ",(0,a.kt)("inlineCode",{parentName:"p"},"admin@example.com")," and password is ",(0,a.kt)("inlineCode",{parentName:"p"},"password"),"."),(0,a.kt)("p",null,"Start oauth2-proxy from the debug tab and open ",(0,a.kt)("a",{parentName:"p",href:"http://oauth2-proxy.localtest.me:4180/"},"http://oauth2-proxy.localtest.me:4180/")," for testing."))}f.isMDXComponent=!0},8561:function(e,t,n){t.Z=n.p+"assets/images/debug-tab-030a951c9fa8eda4e570e8663f1bbc6d.png"}}]);