Skip to content

Account security and OWASP ASVS 5.0.0 ​

This lists the authentication and session controls GamePanel implements, the OWASP ASVS 5.0.0 requirement each one was checked against, and the test that covers it. Requirement IDs use the version-qualified form v5.0.0-<chapter>.<section>.<requirement>.

This is not an ASVS assessment of the whole application. It covers the account controls only, and even there some Level 2 requirements are not met yet (see Known gaps).

Controls ​

ControlASVS 5.0.0LevelWhereTest
Passwords 12 to 256 characters, counted in characters, no composition rulesv5.0.0-6.2.1, v5.0.0-6.2.5, v5.0.0-6.2.9L1, L1, L2store.ValidatePasswordstore.TestValidatePassword
Passwords checked against ~30,000 common and leaked passwordsv5.0.0-6.2.4, v5.0.0-6.2.12L1, L2store/commonpw.gostore.TestCommonPasswordListLoaded, api.TestCommonPasswordRefused
Passwords built from the account's email or the site name are refusedv5.0.0-6.2.11L2store.ValidatePasswordstore.TestValidatePassword
Changing the password needs the current onev5.0.0-6.2.3L1POST /auth/passwordapi.TestChangePasswordRevokesOtherSessions
Changing the password, two-factor settings or creating an API key needs the password again, plus a code when two-factor is onv5.0.0-7.5.1L2api/auth.go, api/mfa.goapi.TestPasswordChangeNeedsSecondFactor, api.TestAPIKeyNeedsSecondFactor
Other sessions are signed out after a password change or turning two-factor offv5.0.0-7.4.3L2store.ChangePassword, totpDisableapi.TestChangePasswordRevokesOtherSessions, api.TestPasswordChangeNeedsSecondFactor
Two factors can be required for administrators or everyone (GAMEPANEL_REQUIRE_MFA). A session that signed in with one factor can only set up a second; one whose account already has a second factor can only sign out; API keys of accounts without a second factor stop working; the last second factor cannot be removedv5.0.0-6.3.3L2api/mfapolicy.goapi.TestRequireMFAHoldsSessionsToEnrolment, api.TestRequireMFAForAdminsOnly, api.TestRequireMFABlocksKeysWithoutSecondFactor, api.TestRequireMFAEnrolledAccountMustUseItsFactor, store.TestSessionMFAMigration
Strict-Transport-Security with includeSubDomains (and optionally preload) when GAMEPANEL_HSTS is subdomains or preloadv5.0.0-3.4.1L2api.middlewareapi.TestHSTSSetting
Login rate-limited per IP and per account; wrong authenticator codes add a doubling delay (up to 24 h) that is kept in the database and checked atomicallyv5.0.0-6.3.1L1api/limiter.go, store.verifyTOTPAttemptapi.TestSecondFactorLockoutSurvivesRestart, store.TestTOTPLockoutHoldsUnderConcurrency, store.TestMFALockSchedule
Authenticator codes and recovery codes work oncev5.0.0-6.5.1L2store.verifyTOTPAttempt, store.VerifySecondFactorstore.TestVerifyTOTPWindowAndReplay, store.TestTOTPLockoutHoldsUnderConcurrency, store.TestRecoveryCodesAreSingleUse
TOTP secrets and recovery codes come from a CSPRNGv5.0.0-6.5.3L2store.BeginTOTP, store.NewRecoveryCodesstore.TestRecoveryCodeStrength
Recovery codes have 120 bits, so a SHA-256 hash is enough to store them. Codes from before 120 bits still work once each, and the account page asks their owner to replace themv5.0.0-6.5.2L2store.NewRecoveryCodes, migration 00115store.TestRecoveryCodeStrength, store.TestLegacyRecoveryCodes, api.TestRecoveryCodesThroughTheAPI
TOTP uses 30-second stepsv5.0.0-6.5.5L2store.verifyTOTPstore.TestTOTPRFC6238Vectors, store.TestVerifyTOTPWindowAndReplay
Passwords stored with Argon2id (t=3, m=64 MiB, p=4); a bcrypt hash imported from Pterodactyl is only checked, and replaced at the first sign-inv5.0.0-11.4.2L2store/models.gostore.TestImportedBcryptSignInUpgradesTheHash
Session tokens: 256 random bits, stored only as a hash, checked on the serverv5.0.0-7.2.1, v5.0.0-7.2.3L1store.NewToken—
A new session token at each sign-inv5.0.0-7.2.4L1store.NewSession—
Signing out ends the session on the serverv5.0.0-7.4.1L1logoutapi.TestCookieAndHeaderHardening
Users can see their live sessions (device, address it signed in from and was last used from, sign-in time and method, last activity) and sign out any one of them, or all but the current one. Only a browser session can do this, not an API keyv5.0.0-7.5.2L2api/sessions.go, store/sessions.goapi.TestSessionListAndRevoke, api.TestSessionListNeedsBrowserSession, store.TestSessionListIsPerUserAndSkipsDeadSessions, store.TestSessionDetailsMigration
Sessions end after 30 minutes without use, and 12 hours after sign-in however busy. Sessions from before the 12-hour limit were cut to at most 12 hours from the upgradev5.0.0-7.3.1, v5.0.0-7.3.2, v5.0.0-7.1.1L2store.UserBySession, migration 00010api.TestSessionIdleAndAbsoluteTimeout, store.TestSessionUpgradeMigration
Over HTTPS the session cookie is __Host-gp_session, Secure, HttpOnly, SameSite=Lax; the old gp_session name works over HTTPS only once, for sessions from before the upgradev5.0.0-3.3.1, v5.0.0-3.3.2, v5.0.0-3.3.3, v5.0.0-3.3.4L1–L2api/cookie.goapi.TestCookieAndHeaderHardening, api.TestLegacyCookieMigration
API answers are sent with Cache-Control: no-storev5.0.0-14.3.2L2api.middlewareapi.TestCookieAndHeaderHardening

The session limits follow the NIST SP 800-63B (revision 3) AAL2 reauthentication limits: 12 hours absolute, 30 minutes of inactivity. Both can be changed with GAMEPANEL_SESSION_MAX and GAMEPANEL_SESSION_IDLE.

Known gaps ​

These Level 2 requirements are not met yet, or not by default:

  • v5.0.0-3.4.1 (HSTS), by default: without GAMEPANEL_HSTS=subdomains, Strict-Transport-Security covers only the panel's own host, because includeSubDomains affects every subdomain of its domain.
  • v5.0.0-6.3.3 (multi-factor required), by default: two factors are only required with GAMEPANEL_REQUIRE_MFA. Single sign-on counts as one factor unless the account's authenticator code is also given, since the panel cannot see how the provider checked the person. An account with no second factor yet can set one up with its password alone, the usual bootstrapping gap of required enrolment.
  • v5.0.0-6.5.2 (lookup secrets), for old codes: recovery codes made before the upgrade to 120 bits have 80 bits and keep working until they are used or replaced. Their owners see a request to replace them on the account page.

Released under the AGPL-3.0 license.