Skip to content

Commit

Permalink
skip Dockerfile checking & update go.mod (#2)
Browse files Browse the repository at this point in the history
* update mod

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

* fix comment

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

* use authorizer latest

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

Signed-off-by: wfan <[email protected]>
  • Loading branch information
WindzCUHK authored Nov 15, 2022
1 parent 71d9677 commit 6a88d28
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 325 deletions.
269 changes: 0 additions & 269 deletions .circleci/config.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/docker-build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,15 @@ jobs:

# The Github action runs CIS Dockerfile benchmark against dockerfiles in repository (CIS 4.1, 4.2, 4.3, 4.6, 4.7, 4.9, 4.10)
# https://github.com/sysdiglabs/benchmark-dockerfile
# TODO: Skipping CIS 4.1 check until https://github.com/yahoojapan/authorization-proxy/pull/95 is fixed.
-
name: Post Sysdig Benchmark Dockerfile
id: postsysdig
run: |
echo ${{ toJSON(steps.sysdig.outputs.violation_report) }} | \
jq -r .
echo ${{ toJSON(steps.sysdig.outputs.violation_report) }} | \
jq -r .cis_docker_benchmark_violation_report[].violations[] | \
jq -r '.cis_docker_benchmark_violation_report[] | select(.rule!="CIS 4.1 Create a user for the container") | .violations[]' | \
wc -l | \
xargs -I% test 0 -eq %
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strings"
"time"

authorizerd "github.com/AthenZ/athenz-authorizer/v5"
"github.com/pkg/errors"
authorizerd "github.com/yahoojapan/athenz-authorizer/v5"
yaml "gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"testing"
"time"

authorizerd "github.com/AthenZ/athenz-authorizer/v5"
"github.com/kpango/glg"
authorizerd "github.com/yahoojapan/athenz-authorizer/v5"
)

func TestNew(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions docs/grpc-design-brief.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ When the user uses the legacy provider sidecar configuration file with the new v

File changes:

https://github.com/yahoojapan/authorization-proxy/pull/83/files
https://github.com/AthenZ/authorization-proxy/commit/79614ab05d4becffb48e1ed89f493a13b1f8791e

We have updated/changed the implementation in the following layers:

Expand All @@ -31,7 +31,7 @@ We have updated/changed the implementation in the following layers:

In this layer, we create gRPC handler and pass it to service layer.

[Reference](https://github.com/yahoojapan/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/usecase/authz_proxyd.go#L71-L84)
[Reference](https://github.com/AthenZ/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/usecase/authz_proxyd.go#L71-L84)

#### Service layer

Expand All @@ -43,11 +43,11 @@ In this layer, we implemented gRPC reverse proxy handler.

When the value of the configuration `proxy.scheme` is set to `grpc`, the gRPC handler will be created, and the server will start with gRPC mode.

[Reference](https://github.com/yahoojapan/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/config/config.go#L133)
[Reference](https://github.com/AthenZ/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/config/config.go#L133)

If it is not `grpc`, nil will be returned, and the service layer will start with HTTP mode.

[Reference](https://github.com/yahoojapan/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/handler/grpc.go)
[Reference](https://github.com/AthenZ/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/handler/grpc.go)

It retrieves the role token from the gRPC metadata, and authorize it using the athenz-authorizer.

Expand Down Expand Up @@ -143,7 +143,7 @@ Due to the limitation of gRPC, each RPC endpoint support only 1 resource, a sepa

For the reasons above, currently Vald team decided to hardcode `grpc` in the action field and use the when performing authentication and authorization check.

[Reference](https://github.com/yahoojapan/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/handler/grpc.go#L67)
[Reference](https://github.com/AthenZ/authorization-proxy/blob/1e14186eb1dd959e246a18be98c92d40a677a56e/handler/grpc.go#L67)

#### Policy Resources

Expand Down
Loading

0 comments on commit 6a88d28

Please sign in to comment.