summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_firstfactor_test.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2021-12-03 11:04:11 +1100
committerGitHub <noreply@github.com>2021-12-03 11:04:11 +1100
commit255aaeb2ad4ab8bad95fac93707066ac01e11e0d (patch)
treeb56f690e124d2236188870759b2e20f8f7bc041f /internal/handlers/handler_firstfactor_test.go
parent104a61ecd68e8cf4270efa59f4c2ed2257b6496e (diff)
feat(storage): encrypt u2f key (#2664)
Adds encryption to the U2F public keys. While the public keys cannot be used to authenticate, only to validate someone is authenticated, if a rogue operator changed these in the database they may be able to bypass 2FA. This prevents that.
Diffstat (limited to 'internal/handlers/handler_firstfactor_test.go')
-rw-r--r--internal/handlers/handler_firstfactor_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/handlers/handler_firstfactor_test.go b/internal/handlers/handler_firstfactor_test.go
index bf332ba34..fe26016a7 100644
--- a/internal/handlers/handler_firstfactor_test.go
+++ b/internal/handlers/handler_firstfactor_test.go
@@ -65,7 +65,7 @@ func (s *FirstFactorSuite) TestShouldFailIfUserProviderCheckPasswordFail() {
Banned: false,
Time: s.mock.Clock.Now(),
Type: regulation.AuthType1FA,
- RemoteIP: models.NewIPAddressFromString("0.0.0.0"),
+ RemoteIP: models.NewNullIPFromString("0.0.0.0"),
}))
s.mock.Ctx.Request.SetBodyString(`{
@@ -93,7 +93,7 @@ func (s *FirstFactorSuite) TestShouldCheckAuthenticationIsNotMarkedWhenProviderC
Banned: false,
Time: s.mock.Clock.Now(),
Type: regulation.AuthType1FA,
- RemoteIP: models.NewIPAddressFromString("0.0.0.0"),
+ RemoteIP: models.NewNullIPFromString("0.0.0.0"),
}))
s.mock.Ctx.Request.SetBodyString(`{
@@ -119,7 +119,7 @@ func (s *FirstFactorSuite) TestShouldCheckAuthenticationIsMarkedWhenInvalidCrede
Banned: false,
Time: s.mock.Clock.Now(),
Type: regulation.AuthType1FA,
- RemoteIP: models.NewIPAddressFromString("0.0.0.0"),
+ RemoteIP: models.NewNullIPFromString("0.0.0.0"),
}))
s.mock.Ctx.Request.SetBodyString(`{