authorize: add support for cidr lookups (#3277)

This commit is contained in:
Caleb Doxsey 2022-04-19 22:18:34 +00:00 committed by GitHub
parent 9dbe12fe99
commit c19048649a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 372 additions and 89 deletions

View file

@ -16,6 +16,7 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"github.com/pomerium/pomerium/authorize/evaluator"
"github.com/pomerium/pomerium/authorize/internal/store"
"github.com/pomerium/pomerium/config"
"github.com/pomerium/pomerium/internal/encoding/jws"
"github.com/pomerium/pomerium/internal/testutil"
@ -39,7 +40,7 @@ func TestAuthorize_okResponse(t *testing.T) {
encoder, _ := jws.NewHS256Signer([]byte{0, 0, 0, 0})
a.state.Load().encoder = encoder
a.currentOptions.Store(opt)
a.store = evaluator.NewStoreFromProtos(0,
a.store = store.NewFromProtos(0,
&session.Session{
Id: "SESSION_ID",
UserId: "USER_ID",