[git-bridge] Add support for Oauth2 Personal Access Tokens (#12795)

* [git-bridge] Add support for Oauth2 Personal Access Tokens

Adds support for Personal Access Tokens by sending a Bearer
token authentication when the username is `git`.
The feature is controlled by `GIT_BRIDGE_ACCESS_TOKEN_ENABLED`

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 5553b0b68574158ede86ceec6c618cf4c4b09c92
This commit is contained in:
Miguel Serrano
2023-05-02 11:37:55 +02:00
committed by Copybot
parent 1da76f0a8d
commit 0564532f92
6 changed files with 55 additions and 29 deletions

View File

@@ -11,6 +11,7 @@
"oauth2ClientSecret": "${GIT_BRIDGE_OAUTH2_CLIENT_SECRET}",
"oauth2Server": "${GIT_BRIDGE_OAUTH2_SERVER:-https://localhost}"
},
"userPasswordEnabled": ${GIT_BRIDGE_USER_PASSWORD_ENABLED:-true},
"repoStore": {
"maxFileNum": ${GIT_BRIDGE_REPOSTORE_MAX_FILE_NUM:-2000},
"maxFileSize": ${GIT_BRIDGE_REPOSTORE_MAX_FILE_SIZE:-52428800}