mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-19 09:38:03 +02:00
authorize: use query instead of sync for databroker data (#3377)
This commit is contained in:
parent
fd82cc7870
commit
f61e7efe73
24 changed files with 661 additions and 1008 deletions
|
@ -20,8 +20,6 @@ import (
|
|||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/encoding/jws"
|
||||
"github.com/pomerium/pomerium/internal/testutil"
|
||||
"github.com/pomerium/pomerium/pkg/grpc/session"
|
||||
"github.com/pomerium/pomerium/pkg/grpc/user"
|
||||
)
|
||||
|
||||
func TestAuthorize_okResponse(t *testing.T) {
|
||||
|
@ -40,17 +38,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 = store.NewFromProtos(0,
|
||||
&session.Session{
|
||||
Id: "SESSION_ID",
|
||||
UserId: "USER_ID",
|
||||
},
|
||||
&user.User{
|
||||
Id: "USER_ID",
|
||||
Name: "foo",
|
||||
Email: "foo@example.com",
|
||||
},
|
||||
)
|
||||
a.store = store.New()
|
||||
pe, err := newPolicyEvaluator(opt, a.store)
|
||||
require.NoError(t, err)
|
||||
a.state.Load().evaluator = pe
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue