mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-23 22:17:14 +02:00
config: allow blank identity providers when loading sessions for service account support (#3709)
This commit is contained in:
parent
1b596115e9
commit
6a9d6e45e1
2 changed files with 25 additions and 7 deletions
|
@ -125,4 +125,20 @@ func TestSessionStore_LoadSessionState(t *testing.T) {
|
|||
assert.Error(t, err)
|
||||
assert.Nil(t, s)
|
||||
})
|
||||
t.Run("blank idp", func(t *testing.T) {
|
||||
rawJWS := makeJWS(t, &sessions.State{
|
||||
Issuer: "authenticate.example.com",
|
||||
ID: "example",
|
||||
})
|
||||
|
||||
r, err := http.NewRequest(http.MethodGet, "https://p2.example.com", nil)
|
||||
require.NoError(t, err)
|
||||
r.Header.Set(httputil.HeaderPomeriumAuthorization, rawJWS)
|
||||
s, err := store.LoadSessionState(r)
|
||||
assert.NoError(t, err)
|
||||
assert.Empty(t, cmp.Diff(&sessions.State{
|
||||
Issuer: "authenticate.example.com",
|
||||
ID: "example",
|
||||
}, s))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue