Skip to content

Commit

Permalink
fix: Adjust account secret length to go-jose requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
hlubek committed Oct 22, 2024
1 parent 1399d0b commit ebf2b01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/domain/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
security_helper "myvendor.mytld/myproject/backend/security/helper"
)

const accountSecretLength = 16
const accountSecretLength = 32

type Account struct {
construct.Table `table_name:"accounts"`
Expand Down
2 changes: 1 addition & 1 deletion backend/test/auth/fixed_login_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
fixedOrganisationAdminAccountID = uuid.Must(uuid.FromString("3ad082c7-cbda-49e1-a707-c53e1962be65"))
fixedOrganisationID = uuid.Must(uuid.FromString("6330de58-2761-411e-a243-bec6d0c53876"))

fixedTokenSecret = "f71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36f6266e4a505bf9cd362206bfd39665c69330e038f96ba72bbbc1f4a522564410" //nolint:gosec
fixedTokenSecret = "f71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36" //nolint:gosec
)

type ApplyAuthValuesFunc func(t *testing.T, timeSource domain.TimeSource, req *http.Request) FixedAuthTokenData
Expand Down
8 changes: 4 additions & 4 deletions backend/test/fixtures/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ INSERT INTO
accounts (account_id, role_identifier, secret, email_address, password_hash)
VALUES ('d7037ad0-d4bb-4dcc-8759-d82fbb3354e8',
'SystemAdministrator',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36f6266e4a505bf9cd362206bfd39665c69330e038f96ba72bbbc1f4a522564410',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36',
'[email protected]',
'\x24326124303424664b4263675349637966474f6f4571534b5a566c6c4f6d4f347461395161623162545a65556c556e6b4962455269764a645930624f');

Expand All @@ -35,7 +35,7 @@ INSERT INTO
accounts (account_id, role_identifier, secret, email_address, password_hash, organisation_id)
VALUES ('3ad082c7-cbda-49e1-a707-c53e1962be65',
'OrganisationAdministrator',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36f6266e4a505bf9cd362206bfd39665c69330e038f96ba72bbbc1f4a522564410',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36',
'[email protected]',
'\x24326124303424664b4263675349637966474f6f4571534b5a566c6c4f6d4f347461395161623162545a65556c556e6b4962455269764a645930624f',
-- Acme Inc.
Expand All @@ -50,7 +50,7 @@ INSERT INTO
accounts (account_id, role_identifier, secret, email_address, password_hash, organisation_id)
VALUES ('f045e5d1-cdad-4964-a7e2-139c8a87346c',
'OrganisationAdministrator',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36f6266e4a505bf9cd362206bfd39665c69330e038f96ba72bbbc1f4a522564410',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36',
'[email protected]',
'\x24326124303424664b4263675349637966474f6f4571534b5a566c6c4f6d4f347461395161623162545a65556c556e6b4962455269764a645930624f',
-- Acme Inc.
Expand All @@ -65,7 +65,7 @@ INSERT INTO
accounts (account_id, role_identifier, secret, email_address, password_hash, organisation_id)
VALUES ('2035f4da-f385-42c4-a609-02d9aa7290e5',
'OrganisationAdministrator',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36f6266e4a505bf9cd362206bfd39665c69330e038f96ba72bbbc1f4a522564410',
'\xf71ab8929ad747915e135b8e9a5e01403329cc6b202c8e540e74920a78394e36',
'[email protected]',
'\x2424326124303424664b4263675349637966474f6f4571534b5a566c6c4f6d4f347461395161623162545a65556c556e6b4962455269764a645930624f',
-- Other Corp
Expand Down

0 comments on commit ebf2b01

Please sign in to comment.