You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxy to allow multitenant sharing of GitHub and Azure DevOps credentials in Kubernetes.
5
+
Proxy to allow multi-tenant sharing of GitHub and Azure DevOps credentials in Kubernetes.
6
6
7
-
Most Git providers offer mutliple ways of authenticating when cloning repositories and communicating with their API. These authentication methods are usually tied to a specific user and in the best
8
-
case offer the ability to scope the permissions. The lack of organization API keys leads to solutions like GitHubs soltution to [create a machine user](https://docs.github.com/en/developers/overview/managing-deploy-keys#machine-users)
7
+
Most Git providers offer multiple ways of authenticating when cloning repositories and communicating with their API. These authentication methods are usually tied to a specific user and in the best
8
+
case offer the ability to scope the permissions. The lack of organization API keys leads to solutions like GitHubs solution to [create a machine user](https://docs.github.com/en/developers/overview/managing-deploy-keys#machine-users)
9
9
that has limited permissions. The need for machine user accounts is especially important for GitOps deployment flows with projects like [Flux](https://docs.github.com/en/developers/overview/managing-deploy-keys#machine-users)
10
10
and [ArgoCD](https://github.com/argoproj/argo-cd). These tools need an authentication method that supports accessing multiple repositories, without sharing the global credentials with all users.
11
11
12
12
<palign="center">
13
13
<imgsrc="./assets/architecture.png">
14
14
</p>
15
15
16
-
Git Auth Proxy attemps to solve this problem by implementing its own authentication and authorization layer inbetween the client and the Git provider. It works by generating static tokens that are
16
+
Git Auth Proxy attempts to solve this problem by implementing its own authentication and authorization layer in between the client and the Git provider. It works by generating static tokens that are
17
17
specific to a Git repository. These tokens are then written to a Kubernetes secret in the Kubernetes namespaces which should have access to the repositories. When a repository is cloned through the
18
-
proxy, the token will be checked agains the repository cloned, and if valid it will be replaced with the correct credentials. The request will be denied if a token is used to clone any other
18
+
proxy, the token will be checked against the repository cloned, and if valid it will be replaced with the correct credentials. The request will be denied if a token is used to clone any other
19
19
repository which is does not have access to.
20
20
21
21
## How To
@@ -50,7 +50,7 @@ configured for Git Auth Proxy to append to authorized requests. Note that organi
50
50
}
51
51
```
52
52
53
-
When using GitHub a [GitHub Application](https://docs.github.com/en/developers/apps) has to be created and installed. The PEM key needs to be extracted and passed as a base64 endoded string in the
53
+
When using GitHub a [GitHub Application](https://docs.github.com/en/developers/apps) has to be created and installed. The PEM key needs to be extracted and passed as a base64 encoded string in the
54
54
configuration file. Note that the project field is not required when using GitHub as projects do not exists in GitHub.
55
55
56
56
```json
@@ -60,8 +60,8 @@ configuration file. Note that the project field is not required when using GitHu
60
60
"provider": "github",
61
61
"github": {
62
62
"appID": 123,
63
-
"installationID: 123,
64
-
"privateKey: "<BASE64>"
63
+
"installationID": 123,
64
+
"privateKey": "<BASE64>"
65
65
},
66
66
"host": "github.com",
67
67
"name": "xenitab",
@@ -83,15 +83,15 @@ Add the Helm repository and install the chart, be sure to set the config content
There should now be a `git-auth-proxy` Deployment and Service in the cluster, ready to proxy traffic.
90
90
91
91
### Git
92
92
93
93
Cloning a repository through the proxy is not too different from doing so directly from GitHub or Azure DevOps. The only limitation is that it is not possible to clone through ssh, as Git Auth Proxy
94
-
only proxies HTTP traffic. To clone the repository `repo-1`[get the clone URL from the repository page](https://docs.microsoft.com/en-us/azure/devops/repos/git/clone?view=azure-devops&tabs=visual-studio#get-the-clone-url-to-your-repo).
94
+
only proxies HTTP(S) traffic. To clone the repository `repo-1`[get the clone URL from the repository page](https://docs.microsoft.com/en-us/azure/devops/repos/git/clone?view=azure-devops&tabs=visual-studio#get-the-clone-url-to-your-repo).
95
95
Then replace the host part of the URL with `git-auth-proxy` and add the token as a basic auth parameter. The result should be similar to below.
96
96
97
97
```shell
@@ -113,7 +113,7 @@ to the host `api.github.com`.
113
113
Execute the following command to list all pull requests in the repository `repo-1` using the local token to authenticate to the proxy.
0 commit comments