git.iko.soy/typeable/oauth2-proxy
on master help sign in
Multiarch builds (#1147)

* extract email from id_token for azure provider (#914) * extract email from id_token for azure provider this change fixes a bug when --resource is specified with non-Graph api and the access token destined to --resource is used to call Graph api * fixed typo * refactor GetEmailAddress to EnrichSessionState * make getting email from idtoken best effort and fall back to previous behavior when it's absent * refactor to use jwt package to extract claims * fix lint * refactor unit tests to use test table refactor the get email logic from profile api * addressing feedback * added oidc verifier to azure provider and extract email from id_token if present * fix lint and codeclimate * refactor to use oidc verifier to verify id_token if oidc is configured * fixed UT * addressed comments * minor refactor * addressed feedback * extract email from id_token first and fallback to access token * fallback to access token as well when id_token doesn't have email claim * address feedbacks * updated change log! * switch to docker buildx for multiarch builds * add setup docker buildx action * update docker push to push the multiarch image * make multiarch image have parity with currently produced images by adding linux/armv6 * triaging issue with arm v6 * incorporating feedback * fixing rebase disaster * reset Makefile to blessed state Co-authored-by: Weinong Wang <weinong@outlook.com>

commit05a4e77c4c177335b3988d486944cc84ba6abb92 authorRyan Hartje <hartjepc@gmail.com> dateTue 21 Sep 2021, 08:17 (5 years ago) parentee7c405
3 files changed+14−5
.github/workflows/ci.yaml+7 CHANGELOG.md+2−1 Makefile+5−4
.github/workflows/ci.yaml+7
@@ -57,6 +57,13 @@ jobs:
5757 - name: Check out code
5858 uses: actions/checkout@v2
5959
60+ - name: Set up Docker Buildx
61+ id: buildx
62+ uses: crazy-max/ghaction-docker-buildx@v3
63+ with:
64+ buildx-version: latest
65+ qemu-version: latest
66+
6067 - name: Docker Build
6168 run: |
6269 make docker
CHANGELOG.md+2−1
@@ -8,7 +8,7 @@
88 deserialization from v6.0.0 (only) has been removed to improve performance. If you are on v6.0.0, either upgrade
99 to a version before this first and allow legacy sessions to expire gracefully or change your `cookie-secret`
1010 value and force all sessions to reauthenticate.
11−
11+
1212- [#1210](https://github.com/oauth2-proxy/oauth2-proxy/pull/1210) A new `keycloak-oidc` provider has been added with support for role based authentication. The existing keycloak auth provider will eventually be deprecated and removed. Please switch to the new provider `keycloak-oidc`.
1313
1414## Breaking Changes
@@ -36,6 +36,7 @@
3636- [#1330](https://github.com/oauth2-proxy/oauth2-proxy/pull/1330) Allow specifying URL as input for custom sign in logo (@MaikuMori)
3737- [#1357](https://github.com/oauth2-proxy/oauth2-proxy/pull/1357) Fix unsafe access to session variable (@harzallah)
3838- [#997](https://github.com/oauth2-proxy/oauth2-proxy/pull/997) Allow passing the raw url path when proxying upstream requests - e.g. /%2F/ (@FStelzer)
39+- [#1147](https://github.com/oauth2-proxy/oauth2-proxy/pull/1147) Multiarch support for docker image (@goshlanguage)
3940
4041# V7.1.3
4142
Makefile+5−4
@@ -13,8 +13,6 @@ MINIMUM_SUPPORTED_GO_MAJOR_VERSION = 1
1313MINIMUM_SUPPORTED_GO_MINOR_VERSION = 15
1414GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
1515
16−DOCKER_BUILD := docker build --build-arg VERSION=${VERSION}
17−
1816ifeq ($(COVER),true)
1917TESTCOVER ?= -coverprofile c.out
2018endif
@@ -41,9 +39,12 @@ build: validate-go-version clean $(BINARY)
4139$(BINARY):
4240 GO111MODULE=on CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -ldflags="-X main.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
4341
42+DOCKER_BUILD := docker build --build-arg VERSION=${VERSION}
43+DOCKER_BUILDX := docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6 --build-arg VERSION=${VERSION}
44+
4445.PHONY: docker
4546docker:
46− $(DOCKER_BUILD) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
47+ $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
4748
4849.PHONY: docker-all
4950docker-all: docker
@@ -57,7 +58,7 @@ docker-all: docker
5758
5859.PHONY: docker-push
5960docker-push:
60− docker push $(REGISTRY)/oauth2-proxy:latest
61+ docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:latest .
6162
6263.PHONY: docker-push-all
6364docker-push-all: docker-push