mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-29 17:07:24 +02:00
authorize: use opa for policy engine (#474)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
111aa8f4d5
commit
2f13488598
45 changed files with 1022 additions and 872 deletions
|
@ -96,9 +96,9 @@ func TestProxy_UserDashboard(t *testing.T) {
|
|||
p.AuthorizeClient = tt.authorizer
|
||||
|
||||
r := httptest.NewRequest(tt.method, "/", nil)
|
||||
state, _ := tt.session.LoadSession(r)
|
||||
state, _, _ := tt.session.LoadSession(r)
|
||||
ctx := r.Context()
|
||||
ctx = sessions.NewContext(ctx, state, tt.ctxError)
|
||||
ctx = sessions.NewContext(ctx, state, "", tt.ctxError)
|
||||
r = r.WithContext(ctx)
|
||||
|
||||
r.Header.Set("Accept", "application/json")
|
||||
|
@ -159,9 +159,9 @@ func TestProxy_Impersonate(t *testing.T) {
|
|||
uri := &url.URL{Path: "/"}
|
||||
|
||||
r := httptest.NewRequest(tt.method, uri.String(), bytes.NewBufferString(postForm.Encode()))
|
||||
state, _ := tt.sessionStore.LoadSession(r)
|
||||
state, _, _ := tt.sessionStore.LoadSession(r)
|
||||
ctx := r.Context()
|
||||
ctx = sessions.NewContext(ctx, state, tt.ctxError)
|
||||
ctx = sessions.NewContext(ctx, state, "", tt.ctxError)
|
||||
r = r.WithContext(ctx)
|
||||
|
||||
r.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue