mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-24 14:37:12 +02:00
hpke: move published public keys to a new endpoint (#4044)
This commit is contained in:
parent
74463c5468
commit
0f295d4a63
13 changed files with 136 additions and 71 deletions
|
@ -30,13 +30,10 @@ func TestAuthorize_handleResult(t *testing.T) {
|
|||
opt.DataBrokerURLString = "https://databroker.example.com"
|
||||
opt.SharedKey = "E8wWIMnihUx+AUfRegAQDNs8eRb3UrB5G3zlJW9XJDM="
|
||||
|
||||
htpkePrivateKey, err := opt.GetHPKEPrivateKey()
|
||||
hpkePrivateKey, err := opt.GetHPKEPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
signingKey, err := opt.GetSigningKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
authnSrv := httptest.NewServer(handlers.JWKSHandler(signingKey, htpkePrivateKey.PublicKey()))
|
||||
authnSrv := httptest.NewServer(handlers.HPKEPublicKeyHandler(hpkePrivateKey.PublicKey()))
|
||||
t.Cleanup(authnSrv.Close)
|
||||
opt.AuthenticateURLString = authnSrv.URL
|
||||
|
||||
|
@ -228,13 +225,10 @@ func TestRequireLogin(t *testing.T) {
|
|||
opt.SharedKey = "E8wWIMnihUx+AUfRegAQDNs8eRb3UrB5G3zlJW9XJDM="
|
||||
opt.SigningKey = "LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUJlMFRxbXJkSXBZWE03c3pSRERWYndXOS83RWJHVWhTdFFJalhsVHNXM1BvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFb0xaRDI2bEdYREhRQmhhZkdlbEVmRDdlNmYzaURjWVJPVjdUbFlIdHF1Y1BFL2hId2dmYQpNY3FBUEZsRmpueUpySXJhYTFlQ2xZRTJ6UktTQk5kNXBRPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo="
|
||||
|
||||
htpkePrivateKey, err := opt.GetHPKEPrivateKey()
|
||||
hpkePrivateKey, err := opt.GetHPKEPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
signingKey, err := opt.GetSigningKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
authnSrv := httptest.NewServer(handlers.JWKSHandler(signingKey, htpkePrivateKey.PublicKey()))
|
||||
authnSrv := httptest.NewServer(handlers.HPKEPublicKeyHandler(hpkePrivateKey.PublicKey()))
|
||||
t.Cleanup(authnSrv.Close)
|
||||
opt.AuthenticateURLString = authnSrv.URL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue