Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source code to origin v7.6.0 #54

Merged
merged 95 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
fc89630
Protect htpasswd user list from race condition
l-lafin Jul 10, 2024
be68c55
Set correct platform type for arm v8 docker images
l-lafin Jul 10, 2024
05b688e
Fix uninitialized user claim
l-lafin Jul 10, 2024
a4221a3
Fix PKCE code verifier generation to never use UTF-8 characters
l-lafin Jul 10, 2024
8693c9a
Remove unsupported special characters from the code verifier runes
l-lafin Jul 10, 2024
e33bb5e
Fix default scope settings for none oidc providers like GitHub
l-lafin Jul 10, 2024
5e0b2d6
feat: readiness check
l-lafin Jul 11, 2024
0c20afa
Chnages checkout version to v3
l-lafin Jul 11, 2024
4d0303e
Fill empty UserIDClaim before assigning it to other values
l-lafin Jul 11, 2024
734b148
Update formatting error in overview for custom-sign-in-logo
l-lafin Jul 11, 2024
1175b65
Issue 1878: Validate URL call does not correctly honor already set URL
l-lafin Jul 11, 2024
596f4aa
fix typo in comment for oidc/provider.go
l-lafin Jul 11, 2024
a8ad42e
Fix a typo in oauthproxy.go
l-lafin Jul 11, 2024
81b756a
Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is
l-lafin Jul 11, 2024
3e21a6a
Ensure sign-in page background is uniform throughout the page
l-lafin Jul 11, 2024
df0c641
Added documentation for the keycloak-oidc provider and the new Keyclo…
l-lafin Jul 11, 2024
bc02aed
Log the difference between invalid email and not authorized session
l-lafin Jul 11, 2024
f8345d2
Add documentation for --redis-insecure-skip-tls-verify flag
l-lafin Jul 11, 2024
b92604d
Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h
l-lafin Jul 11, 2024
03e49ae
Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS
l-lafin Jul 11, 2024
30751c7
Update stale bot to v8
l-lafin Jul 11, 2024
27dc4ce
update: use go install in build step
l-lafin Jul 11, 2024
e64f4d3
Fixed build status badge in README.md
l-lafin Jul 11, 2024
6d2cf6a
Session-Cookie Support
l-lafin Jul 11, 2024
ccf5bba
Update Dockerfile with qualified image names
l-lafin Jul 11, 2024
474f08f
Update oauthproxy.go - typos in comment
l-lafin Jul 11, 2024
ad8ba07
fix: use X-Forwarded-Uri if it exists for pathRegex match
l-lafin Jul 11, 2024
c3b846d
Bugfix/check json path
l-lafin Jul 11, 2024
6568c84
Embed static stylesheets and dependencies
l-lafin Jul 11, 2024
48305ec
documented default for errors-to-info-log
l-lafin Jul 11, 2024
7656a0a
Workload identity support
l-lafin Jul 11, 2024
f5ae9ad
Release v7.5.0
l-lafin Jul 11, 2024
ad81d2f
Fix for v7.5.0
l-lafin Jul 11, 2024
e645994
Fixing format for v7.5.0
l-lafin Jul 11, 2024
511552c
bugfix: move oidc scope logic to oidc provider
l-lafin Jul 11, 2024
7cf1624
Improved session documentation
l-lafin Jul 11, 2024
1013914
Fixed name for GoogleGroups env variable + unit tests
l-lafin Jul 11, 2024
cfd3c20
Added arch types to Docker and binary releases
l-lafin Jul 11, 2024
ae00d0c
Update alpine to 3.18
l-lafin Jul 11, 2024
ee7a439
bugfix: default scopes for OIDCProvider based providers
l-lafin Jul 12, 2024
9581a97
Docs: Add Search
l-lafin Jul 12, 2024
8b0632d
bugfix: gitea token validation
l-lafin Jul 12, 2024
565f3ed
Release v7.5.1
l-lafin Jul 12, 2024
4df1497
Missing closing quotes on api_routes example
l-lafin Jul 12, 2024
ee23b9f
Update dependencies
l-lafin Jul 12, 2024
9b93433
Upgrade golang.org/x/net to v0.17.0
l-lafin Jul 12, 2024
466e916
Updated linters
l-lafin Jul 12, 2024
443231f
update error middleware definition (for traefik)
l-lafin Jul 12, 2024
ec2b521
Fix oidc-issuer-url in example
l-lafin Jul 12, 2024
896c679
Fixed Google ADC functionality
l-lafin Jul 12, 2024
7ca3ec6
Feature: Allowing relative redirect url though an option
l-lafin Jul 12, 2024
6aa359a
Issue: 2236 - adds an option to append CA certificates
l-lafin Jul 12, 2024
ba306ce
Add support for unix socket as upstream
l-lafin Jul 12, 2024
8fdec4f
Refactored docs
l-lafin Jul 12, 2024
580d231
Use updated key names in oauth2-proxy-alpha-config.yaml
l-lafin Jul 12, 2024
d654f10
Updated oauth2-proxy tags to 7.5.1
l-lafin Jul 12, 2024
1396a26
add azure china support
l-lafin Jul 12, 2024
cecc63b
Improve the Nginx auth_request example
l-lafin Jul 12, 2024
fc4f7a0
add contribution guide to documentation
l-lafin Jul 12, 2024
d0bbe7f
add nightly build and push
l-lafin Jul 12, 2024
bcdb575
add nightly build and push
l-lafin Jul 12, 2024
91be581
Issue 978: Fix Custom cookie name breaks redis for session
l-lafin Jul 12, 2024
6b19c7d
bugfix: fix nightly date tagging
l-lafin Jul 12, 2024
b5a40ce
Support http.AllowQuerySemicolons
l-lafin Jul 12, 2024
eff95e3
Don't run the nightly build and push job in forked repositories
l-lafin Jul 12, 2024
bcd665c
bugfix: OIDCConfig based providers are not respecting flags and configs
l-lafin Jul 12, 2024
88b469b
Feature: Add GitHub groups (orgs/teams) support
l-lafin Jul 12, 2024
7d977cc
add breaking change notice for the new auth route regex matching beha…
l-lafin Jul 12, 2024
a16786a
fix: fix nginx setup
l-lafin Jul 12, 2024
02f26d6
Update ojg to latest release
l-lafin Jul 12, 2024
1fc5b5c
Update go-jose dependency as requested in #2350
l-lafin Jul 12, 2024
9473f31
enhancement: Change base image from alpine to distroless
l-lafin Jul 12, 2024
2434369
Add possibility to encode the state param as UrlEncodedBase64
l-lafin Jul 12, 2024
c6858c0
NGINX return 403 for sign_in (#2322)
l-lafin Jul 12, 2024
3d28f6a
chore: Create sha256sum for tar instead of binary
l-lafin Jul 12, 2024
a63b535
Log error details when failed loading CSRF cookie
l-lafin Jul 12, 2024
634fbe6
Feature - Add env variable support for alpha struct
l-lafin Jul 12, 2024
0fb3937
Remove nsswitch DNS resolution workaround
l-lafin Jul 12, 2024
822cfad
Feature/add option to skip loading claims from profile url
l-lafin Jul 12, 2024
c156c9f
Add ability to configure username for Redis cluster connections
l-lafin Jul 15, 2024
f1c5809
Improved dev environment
l-lafin Jul 15, 2024
8b86911
chore(deps): update module github.com/bsm/redislock to v0.9.4
l-lafin Jul 15, 2024
20624f1
chore(deps): update alpine docker tag to v3.19.0
l-lafin Jul 15, 2024
e684125
upgrading to go 1.21
l-lafin Jul 15, 2024
f072a89
chore(deps): update github.com/ghodss/yaml digest to d8423dc
l-lafin Jul 15, 2024
94dec38
chore(deps): update module k8s.io/apimachinery to v0.29.1
l-lafin Jul 15, 2024
6502eb2
chore(deps): update actions/checkout action to v4
l-lafin Jul 15, 2024
7a32e57
chore(deps): update actions/setup-go action to v5
l-lafin Jul 15, 2024
2d7a6b9
chore(deps): update module google.golang.org/api to v0.157.0
l-lafin Jul 15, 2024
b6842a9
docs: add code of conduct
l-lafin Jul 15, 2024
99bafcf
chore(deps): update mcr.microsoft.com/vscode/devcontainers/go docker …
l-lafin Jul 15, 2024
1b4c3d7
Session aware logout, backend logout url approach
l-lafin Jul 15, 2024
4ea0183
release v7.6.0
l-lafin Jul 15, 2024
4ddb75c
Update alpha config
l-lafin Jul 15, 2024
b8ba647
Fixing unit tests
l-lafin Jul 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .devcontainer/.devcontainer.json
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": {}
}
}
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
name: Lint - golangci-lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: false
Expand All @@ -46,16 +46,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Extract branch name
uses: vazco/github-actions-branch-name@v1
id: branch

- name: Set up Go 1.19
uses: actions/setup-go@v4
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.21.x
id: go

- name: Downloads golang mods
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
oauth2proxyCITag: ${{ steps.setVariables.outputs.betaTag }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Docker image
uses: docker/build-push-action@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [master]
schedule:
- cron: '0 15 * * 2'

jobs:
CodeQL-Build:

Expand All @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -33,14 +33,14 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: go

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -54,4 +54,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
93 changes: 47 additions & 46 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 40 additions & 0 deletions .github/workflows/nightly.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.'
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ c.out
_obj
_test
.idea/
.vscode/
.vscode/*
!/.vscode/tasks.json

# Architecture specific extensions/prefixes
*.[568vq]
Expand All @@ -42,4 +43,4 @@ _testmain.go
# docker build -f Dockerfile.dev .
Dockerfile.dev

obj
obj
13 changes: 8 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,25 @@ run:
linters:
enable:
- govet
- golint
- ineffassign
- goconst
- deadcode
- gofmt
- goimports
- gosec
- gosimple
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- bodyclose
- dogsled
- goprintffuncname
- misspell
- prealloc
- scopelint
- exportloopref
- stylecheck
- unconvert
- gocritic
- revive
disable-all: true
issues:
exclude-rules:
Expand All @@ -35,9 +32,15 @@ issues:
- unconvert
- gocritic
- gosec
- goconst
- path: _test\.go
linters:
- revive
text: "dot-imports:"
# If we have tests in shared test folders, these can be less strictly linted
- path: tests/.*_tests\.go
linters:
- revive
- golint
- bodyclose
- stylecheck
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
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
Loading
Loading