forked from oauth2-proxy/oauth2-proxy
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update source code to origin v7.6.0 (#54)
## Description We are updating the fork source code from origin `v7.4.0` to `v7.6.0` while keeping the customizations. ## How was it tested? Created a local container image of the oauth-proxy from this PR and integrated it with Reporting locally. The following flows were checked: - Login - User introspect - Audit logs - Logout - Auto logout
- Loading branch information
Showing
216 changed files
with
20,689 additions
and
19,008 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "oauth2-proxy Dev", | ||
"context": "..", | ||
"dockerFile": "./Dockerfile", | ||
"postCreateCommand": "pre-commit install && go mod download", | ||
"containerEnv": { "DEVCONTAINER": "1" }, | ||
"appPort": ["4180:4180"], | ||
"runArgs": ["-e", "GIT_EDITOR=code --wait"], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"golang.go", | ||
"ms-vscode.makefile-tools", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"redhat.vscode-yaml", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github" | ||
], | ||
"settings": { | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true, | ||
"yaml.customTags": [ | ||
"!input scalar", | ||
"!secret scalar", | ||
"!include_dir_named scalar", | ||
"!include_dir_list scalar", | ||
"!include_dir_merge_list scalar", | ||
"!include_dir_merge_named scalar" | ||
] | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker": {}, | ||
"ghcr.io/devcontainers/features/common-utils": { | ||
"configureZshAsDefaultShell": true, | ||
"username": "vscode", | ||
"userUid": 1000, | ||
"userGid": 1000 | ||
}, | ||
"ghcr.io/devcontainers/features/kubectl-helm-minikube": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/go:1-1.21 | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
pre-commit \ | ||
vim \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /go/pkg \ | ||
&& chmod -R a+w /go/pkg | ||
|
||
WORKDIR /workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,63 +9,64 @@ on: | |
paths: ['docs/**'] | ||
|
||
jobs: | ||
checks: | ||
if: github.event_name != 'push' | ||
pull-request-check: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '17.x' | ||
node-version: 18 | ||
|
||
- name: Test Build | ||
working-directory: ./docs | ||
env: | ||
NODE_OPTIONS: --openssl-legacy-provider | ||
run: | | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
npm run build | ||
gh-release: | ||
if: github.event_name != 'pull_request' | ||
gh-pages-release: | ||
if: github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
node-version: '17.x' | ||
- name: Add key to allow access to repository | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
NODE_OPTIONS: --openssl-legacy-provider | ||
path: master | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Build docusaurus | ||
working-directory: master/docs | ||
id: build | ||
run: | | ||
mkdir -p ~/.ssh | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
cat <<EOT >> ~/.ssh/config | ||
Host github.com | ||
HostName github.com | ||
IdentityFile ~/.ssh/id_rsa | ||
EOT | ||
- name: Release to GitHub Pages | ||
working-directory: ./docs | ||
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
npm ci | ||
npm run build | ||
- name: Release to github pages | ||
env: | ||
USE_SSH: true | ||
GIT_USER: git | ||
NODE_OPTIONS: --openssl-legacy-provider | ||
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: gh-pages | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "gh-actions" | ||
if [ -e yarn.lock ]; then | ||
yarn install --frozen-lockfile | ||
elif [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
npx docusaurus deploy | ||
git config --local user.name "github-actions[bot]" | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
# Remove all files except .git | ||
git rm -r * | ||
# Copy the build files from master/docs/build to gh-pages | ||
cp -r ../master/docs/build/* . | ||
# Commit and push | ||
git add . | ||
git commit -m "Update documentation based on ${{ steps.build.outputs.sha }}" | ||
git push origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Nightly builds | ||
|
||
on: | ||
schedule: # Run every day at 03:00 UTC | ||
- cron: '0 3 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# only run this build in the main repository, not in forks | ||
if: github.repository == 'oauth2-proxy/oauth2-proxy' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to quay.io | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io/oauth2-proxy | ||
username: ${{ secrets.REGISTRY_USERNAME_NIGHTLY }} | ||
password: ${{ secrets.REGISTRY_PASSWORD_NIGHTLY }} | ||
|
||
- name: Build images | ||
run: | | ||
make docker-nightly-build | ||
- name: Push images | ||
run: | | ||
make docker-nightly-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
name: Publish to docker repository | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker registry login | ||
uses: docker/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: golangci-lint | ||
- id: go-build |
Oops, something went wrong.