Skip to content

Commit

Permalink
feat!: rename and update package
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
  • Loading branch information
sagikazarmark committed Sep 26, 2023
1 parent 5b2c3cb commit 305bd47
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cerbos authorizer
# Cerbos

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/portward/cerbos-authorizer/ci.yaml?style=flat-square)](https://github.com/portward/cerbos-authorizer/actions/workflows/ci.yaml)
[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/portward/cerbos-authorizer)
Expand Down Expand Up @@ -33,13 +33,12 @@ golangci-lint run

To test changes made in [registry-auth](https://github.com/portward/registry-auth) and [registry-auth-config](https://github.com/portward/registry-auth-config):

Make sure [registry-auth](https://github.com/portward/registry-auth) and [registry-auth-config](https://github.com/portward/registry-auth-config) are checked out in the same directory:
Make sure [registry-auth](https://github.com/portward/registry-auth) is checked out in the same directory:

```shell
cd ..
git clone git@github.com:portward/registry-auth.git
git clone git@github.com:portward/registry-auth-config.git
cd cerbos-authorizer
cd cerbos
```

Set up a Go workspace:
Expand All @@ -48,7 +47,6 @@ Set up a Go workspace:
go work init
go work use .
go work use ../registry-auth
go work use ../registry-auth-config
go work sync
```

Expand Down
4 changes: 0 additions & 4 deletions authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ func (a Authorizer) Authorize(ctx context.Context, subject auth.Subject, request
for _, scope := range requestedScopes {
resource := cerbos.NewResource(scope.Type, scope.Name)

if scope.Class != "" {
resource = resource.WithAttr("class", scope.Class)
}

resourceBatch.Add(resource, scope.Actions...)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/portward/cerbos-authorizer
module github.com/portward/cerbos

go 1.21.0

require (
github.com/cerbos/cerbos-sdk-go v0.1.0
github.com/cerbos/cerbos/api/genpb v0.0.0-20230914104512-0d63f1e32f77
github.com/portward/registry-auth v0.0.1
github.com/portward/registry-auth v0.1.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/portward/registry-auth v0.0.1 h1:IZbu6Bz/9S0/1mA6GwWXrWDOLRef7iqMoNlk+3ecFWo=
github.com/portward/registry-auth v0.0.1/go.mod h1:rgGVzvUg/0JiVBtcXXQ68FNOb/vGSLZgZeDbi1DTBLI=
github.com/portward/registry-auth v0.1.0 h1:OHDwDRzzzW/4hbjcaL3/d9sIlBZw8q2ixp+2mCAhlmc=
github.com/portward/registry-auth v0.1.0/go.mod h1:rgGVzvUg/0JiVBtcXXQ68FNOb/vGSLZgZeDbi1DTBLI=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
Expand Down

0 comments on commit 305bd47

Please sign in to comment.