Skip to content

Commit

Permalink
upgrade go.mod & change docker hub user (#26)
Browse files Browse the repository at this point in the history
* fix

Signed-off-by: wfan <[email protected]>

* fix pr

Signed-off-by: wfan <[email protected]>

* fix function pointer check

Signed-off-by: wfan <[email protected]>

* change docker hub user

Signed-off-by: wfan <[email protected]>

* add comment

Signed-off-by: wfan <[email protected]>

* fix

Signed-off-by: wfan <[email protected]>

* 1.20

Signed-off-by: wfan <[email protected]>

* push nightly

Signed-off-by: wfan <[email protected]>

* revert push

Signed-off-by: wfan <[email protected]>

* latest

Signed-off-by: wfan <[email protected]>

---------

Signed-off-by: wfan <[email protected]>
  • Loading branch information
WindzCUHK committed Oct 16, 2023
1 parent c5b141a commit 164c248
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 133 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ _description_with_details_and_reasoning_
- [ ] Passed all pipeline checking

## Checklist for maintainer
- [ ] Use `Squash and merge`
- [ ] Double-confirm the merge message has prefix `[skip ci]`/`[ci skip]`/`[no ci]`/`[skip actions]`/`[actions skip]`
- [ ] Delete the branch after merge
- Use `Squash and merge`
- Double-confirm the merge message has prefix `[skip ci]`/`[ci skip]`/`[no ci]`/`[skip actions]`/`[actions skip]`
- Delete the branch after merge
27 changes: 8 additions & 19 deletions .github/workflows/docker-build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
env:
DOCKER_BUILDX_PLATFORM: linux/amd64
DOCKER_REGISTRY_OWNER: athenz
GOLANG_VERSION: ^1.19
DOCKER_REGISTRY_USER: abvaidya

jobs:
build:
Expand Down Expand Up @@ -84,23 +84,9 @@ jobs:
id: setup-go
# You may pin to the exact commit or the version.
# uses: https://github.com/actions/setup-go/tags
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ env.GOLANG_VERSION }}

# This action allows caching dependencies and build outputs to improve workflow execution time.
# https://github.com/actions/cache
-
name: Cache Go Modules
id: cache-go
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: "stable"

# A GitHub Action for golang tests
-
Expand Down Expand Up @@ -180,7 +166,7 @@ jobs:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ${{ env.DOCKER_REGISTRY_URL }} # optional
# Username used to log against the Docker registry
username: ${{ env.DOCKER_REGISTRY_OWNER }} # optional
username: ${{ env.DOCKER_REGISTRY_USER }} # optional
# Password or personal access token used to log against the Docker registry
password: ${{ env.DOCKER_REGISTRY_TOKEN }} # optional
# Log out from the Docker registry at the end of a job
Expand Down Expand Up @@ -211,12 +197,15 @@ jobs:
id: build_and_push
# You may pin to the exact commit or the version.
# uses: https://github.com/docker/build-push-action/tags
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# push: true
# load: false
# tags: ${{ env.DOCKER_REGISTRY_URL }}/${{ env.DOCKER_REGISTRY_OWNER }}/${{ env.DOCKER_REGISTRY_IMAGE }}:nightly
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.DOCKER_BUILDX_PLATFORM }}
build-args: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/github-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ jobs:
- uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
skipIfReleaseExists: true
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ make test

## Dependency management

The Authorization Proxy project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.19 or greater installed.
The Authorization Proxy project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.20 or greater installed.

To add or update a new dependency, use the `go get` command:

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS base
FROM golang:1.20-alpine AS base

RUN set -eux \
&& apk --no-cache add ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# sleep 3

deps:
rm ./go.sum
rm -f ./go.sum
cp ./go.mod.default ./go.mod
GO111MODULE=on go mod tidy

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

- [What is Authorization Proxy](#what-is-authorization-proxy)
- [Use case](#use-case)
- [Authorization and Authorization request](#authorization-and-authorization-request)
- [Athenz authorizer](#athenz-authorizer)
- [Authorization success](#authorization-success)
- [Authorization failed](#authorization-failed)
- [Mapping rules](#mapping-rules)
- [HTTP request headers](#http-request-headers)
- [Authorization and Authorization request](#authorization-and-authorization-request)
- [Athenz authorizer](#athenz-authorizer)
- [Authorization success](#authorization-success)
- [Authorization failed](#authorization-failed)
- [Mapping rules](#mapping-rules)
- [HTTP request headers](#http-request-headers)
- [Features to Debug](#features-to-debug)
- [Configuration](#configuration)
- [Contributor License Agreement](#contributor-license-agreement)
Expand All @@ -35,7 +35,7 @@ Client request can be authenticated and authorized by:
1. Role token in the HTTP/HTTPS request header
1. Role certificate on mTLS

Requires go 1.19 or later.
Requires go 1.20 or later.

## Use case

Expand Down
88 changes: 44 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
module github.com/AthenZ/authorization-proxy/v4

go 1.19
go 1.20

replace (
cloud.google.com/go => cloud.google.com/go v0.110.0
cloud.google.com/go => cloud.google.com/go v0.110.8
github.com/golang/mock => github.com/golang/mock v1.6.0
github.com/golang/protobuf => github.com/golang/protobuf v1.5.2
github.com/google/go-cmp => github.com/google/go-cmp v0.5.9
github.com/google/pprof => github.com/google/pprof v0.0.0-20230222194610-99052d3372e7
github.com/golang/protobuf => github.com/golang/protobuf v1.5.3
github.com/google/go-cmp => github.com/google/go-cmp v0.6.0
github.com/google/pprof => github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98
github.com/mwitkow/grpc-proxy => github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76
golang.org/x/crypto => golang.org/x/crypto v0.6.0
golang.org/x/exp => golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2
golang.org/x/image => golang.org/x/image v0.5.0
golang.org/x/crypto => golang.org/x/crypto v0.14.0
golang.org/x/exp => golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/image => golang.org/x/image v0.13.0
golang.org/x/lint => golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/mobile => golang.org/x/mobile v0.0.0-20221110043201-43a038452099
golang.org/x/mod => golang.org/x/mod v0.8.0
golang.org/x/net => golang.org/x/net v0.7.0
golang.org/x/oauth2 => golang.org/x/oauth2 v0.5.0
golang.org/x/sync => golang.org/x/sync v0.1.0
golang.org/x/sys => golang.org/x/sys v0.5.0
golang.org/x/term => golang.org/x/term v0.5.0
golang.org/x/text => golang.org/x/text v0.7.0
golang.org/x/mobile => golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe
golang.org/x/mod => golang.org/x/mod v0.13.0
golang.org/x/net => golang.org/x/net v0.17.0
golang.org/x/oauth2 => golang.org/x/oauth2 v0.13.0
golang.org/x/sync => golang.org/x/sync v0.4.0
golang.org/x/sys => golang.org/x/sys v0.13.0
golang.org/x/term => golang.org/x/term v0.13.0
golang.org/x/text => golang.org/x/text v0.13.0
golang.org/x/time => golang.org/x/time v0.3.0
golang.org/x/tools => golang.org/x/tools v0.6.0
golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
google.golang.org/api => google.golang.org/api v0.110.0
google.golang.org/appengine => google.golang.org/appengine v1.6.7
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
google.golang.org/grpc => google.golang.org/grpc v1.53.0
google.golang.org/protobuf => google.golang.org/protobuf v1.28.1
golang.org/x/tools => golang.org/x/tools v0.14.0
golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
google.golang.org/api => google.golang.org/api v0.147.0
google.golang.org/appengine => google.golang.org/appengine v1.6.8
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a
google.golang.org/grpc => google.golang.org/grpc v1.58.3
google.golang.org/protobuf => google.golang.org/protobuf v1.31.0
)

require (
github.com/AthenZ/athenz-authorizer/v5 v5.5.1
github.com/kpango/glg v1.6.13
github.com/AthenZ/athenz-authorizer/v5 v5.5.2
github.com/kpango/glg v1.6.15
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76
github.com/pkg/errors v0.9.1
golang.org/x/sync v0.1.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
golang.org/x/sync v0.4.0
google.golang.org/grpc v1.58.2
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/AthenZ/athenz v1.11.14 // indirect
github.com/AthenZ/athenz v1.11.43 // indirect
github.com/ardielle/ardielle-go v1.5.2 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/kpango/fastime v1.1.4 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kpango/fastime v1.1.9 // indirect
github.com/kpango/gache v1.2.8 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/iter v1.0.1 // indirect
github.com/lestrrat-go/jwx v1.2.25 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx v1.2.26 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
)
2 changes: 1 addition & 1 deletion go.mod.default
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/AthenZ/authorization-proxy/v4

go 1.19
go 1.20

replace (
cloud.google.com/go => cloud.google.com/go latest
Expand Down
Loading

0 comments on commit 164c248

Please sign in to comment.