Skip to content

Commit

Permalink
Make refresh JWT expiration longer
Browse files Browse the repository at this point in the history
  • Loading branch information
radazen committed Aug 29, 2023
1 parent a5bda14 commit cd0ec2a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions secrets/dev/backend-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV: ENC[AES256_GCM,data:BlCMzXTTXaTUBhs=,iv:KJBDHX7b4CqLr+ZM+o9eONcJL7SJREy1ATJ
ALLOWED_ORIGINS: ENC[AES256_GCM,data:2XT4xhyFBcccjqFZtzWeZCq7TogjN/80GmWLO4f6ZxkWyosUPWdzo809uBexAqkw1uZLdg69l/Y4xsviCxN5Bj/HYl4J4Yg=,iv:ZO9CTIhPFGBhFpclrWDpjkkxfAva/q8rZjW0gsGtP70=,tag:qcfM8UWp5b3wwpf1kDgKLg==,type:str]
REDIS_URL: ENC[AES256_GCM,data:Y7TxzAMCJQ/6IA9x1V9Z/A==,iv:xjmc+J79hgutX20zZBpfC4bbZf4eSCJca5LLKHhhJcI=,tag:yiQjeRgQY41QqHXEIVNRrA==,type:str]
REFRESH_JWT_SECRET: ENC[AES256_GCM,data:jQLBV4Ll9wy0G+Rcjx5X7iDWUIvD4pQatriAtRNcMDo=,iv:obO3I8zlhunPXFPd/jXvAKsy1gfNSzsrf2kkVs6/YHk=,tag:+CbaDe6bmT5e3DwF7lzS4Q==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:gwucCuiX8A==,iv:eSmwN0pJ40s0QJITa79I5vl94Di82xid1S1WSQDE/XA=,tag:gTwbFo9lShMa0MCQSU8dqA==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:fP1uE+ZzPQ==,iv:/NASlX/lyA/azRKh8vjxiGFfLXJBLCE7ShEraNTcSHk=,tag:s/EReBguMT8+9qTOuONYTw==,type:str]
AUTH_JWT_SECRET: ENC[AES256_GCM,data:rbnV8+q2aufONhmLTCMSILOlnrN/vURKiyeypXII5gk=,iv:bVgLwCeyGf/On2Y0HA4PNpuMph5mLYczTcCXSLTGmPY=,tag:HIBC5vuJ9CY74QJ2dhqPwQ==,type:str]
AUTH_JWT_TTL: ENC[AES256_GCM,data:lx4t,iv:vr+gbH/odGS6HIBD9nzibnHPC1AYk3KLbfCmvWFhHa0=,tag:1WQBRGh24cFczP86YO0j+g==,type:str]
ONE_TIME_LOGIN_JWT_SECRET: ENC[AES256_GCM,data:lRIFaqqw3Z8ceWNy4yS2gsGSimVjBiHCA+UgLDAMbco=,iv:Jcg3AmO9h+rSc/zXRKTLTixHWjmcLus0Rthm9n1V3iI=,tag:VTvP8K0AMu+4Vjg6FRLjBQ==,type:str]
Expand Down Expand Up @@ -80,8 +80,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2023-08-03T19:03:42Z"
mac: ENC[AES256_GCM,data:5oZwONcDJ9LjOtTVtT/vO3jIjzpWmPYbRhLhdOyn6vijHithxVf1lqnbJCl1HlvvPtFZNvJfzTOgZBrkMa96wGDRVGPSeUfVXxHzkvpUUJaiFkn8RcXlPvy9ptOCiz4UIVE7M7AeADfEYm2bbaos3b23vvsvjgFJZgH69U4rU4Y=,iv:+unbckTxxoIrlkejvmtR7LeguvnsUULmn6Hqvvp0B+A=,tag:8/ZV4dMX+ZKf8GhG9UNjLw==,type:str]
lastmodified: "2023-08-29T13:34:09Z"
mac: ENC[AES256_GCM,data:ddP1ik7rS612znr5ZoS5af11w86SWJQEkLo8dJg/RQU8yBIs3fSNf2F4qJeV/qflfubReohA7UAFizMmSUS+ur/QPvZb/NqPDTCceocctaJSoRfE+8sc5Y6u0eOfe30hwIy9MVwrqINurupJ/dB3bbNsWahOA6aKa5Bk91QfcQo=,iv:6oJCFiMohYAVy1mn4ChZjNbEanfbTtIJVFSuII0809o=,tag:cgrBUFi1fjsFBghv392pOg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
6 changes: 3 additions & 3 deletions secrets/dev/backend-sandbox-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV: ENC[AES256_GCM,data:jHq2V2rjrg==,iv:mlI4mBfk0J4Qmang6l5mnV6EWEivpY9jqg4ONH3
ALLOWED_ORIGINS: ENC[AES256_GCM,data:IYFklnQhwGsxnkPh0qEAjvsXiavq1HCWC3YiajaYe67TNeP4YC14CTl3qVmz0aW4wOTba/0X3JNiX59nywGR4fgac+8aqWy2zoB1+htDJFOm3SEd+DZS9Dk=,iv:cpeSnEwPL5fYkQd2R6nsnwrs1UHRpqtqCDJlhOsYaJY=,tag:DPfXowscQSBTQVgn1kYhBA==,type:str]
REDIS_URL: ENC[AES256_GCM,data:Es3UaGqFiARAVYVLGfu75w==,iv:rXFVheA4Z1ZWCfEHOcb0OtxkuY3wMuQR8wREA0LDdvc=,tag:gKCBe05g2W2NZCLPbmeudA==,type:str]
REFRESH_JWT_SECRET: ENC[AES256_GCM,data:5AzpVfMKowNLVh1O4c0LGm7ZQQ8XqICSjZCGwKiaE1M=,iv:DENUS0RZxuLZrGlHRxYk1d/aEd+w6gDF3euU6p0v2FE=,tag:Dw0TnBXkt6cVzwuRiEM9/Q==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:zcRIrUVJpQ==,iv:51XwiVzYLH/1bsgvxwlM8Xbcz5mitXljhgDZbPobGXw=,tag:2SAu8vifKk9Ta1hsPTf4aw==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:7hJaLz9DQw==,iv:1+0RTWNKWmjXAiP9ystjXi7ZYXCYilIJpdDt6V3/hwg=,tag:X1DriwQzmVj72mAH/TG5DA==,type:str]
AUTH_JWT_SECRET: ENC[AES256_GCM,data:vCPBJqn8B2wF9cActPhDxzIQ+61qCFKub5iQONi5+cA=,iv:JS9bh9v1zFEmWHpNtxBPoE6EK8ulT6ER4K2MwRS8u5I=,tag:/ACERSZj4bK4WfMmLleBOg==,type:str]
AUTH_JWT_TTL: ENC[AES256_GCM,data:vq9d,iv:ptypk95+oqRiQi2Q7hPDZIcc5fD5Fj/jrLvgxphupBI=,tag:oQpZsqRmLOitrZdCtHk97g==,type:str]
ONE_TIME_LOGIN_JWT_SECRET: ENC[AES256_GCM,data:BHg/5gMUZm3NhfuBgUA1vcU+mwr3fWNmdO9djmT31IE=,iv:Q941no92ey2hc9qnB4yJf4y7kkdBwc2RuJMsZLZpdh4=,tag:W7ktyzuI5WWB1R9reA7Tqw==,type:str]
Expand Down Expand Up @@ -77,8 +77,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2023-08-03T19:04:27Z"
mac: ENC[AES256_GCM,data:1snoccwMixOEMg7m9Vq6aMSEcXmarXzwtXY06ELh5nByhMZNxE7NqPmiz+G0UxyVMc7DBLU7n5JNJf7E1bsQss2UpEBiUHL74nqIzv+hAr7BNyNRLnLq6TpMZ3LLIYoFQ460dEGLSA2wSRNu7O4J3sMIroL7z5q4Ap9MJoX0x8c=,iv:f0c4c7pPhlcH6NnMv3FXn8dOzBWfa8yuYuMm81fOV2c=,tag:YJ64JJfndQ09sF4k3yuk0A==,type:str]
lastmodified: "2023-08-29T13:35:40Z"
mac: ENC[AES256_GCM,data:rhoUljK/FAjqiYNhbmvEqol77YIzUH5/zTv3p4Z0VzbDx0u2CnWYy+oyn1Anu5HveZdruKP1dYcNrE61uC4luREM/pMdxn+e9kfbpF+SpYcJa0fKnZfLxMW6ak357vuuFxE2JvaR4UUYw78avbeoR71HYoD/EwkTnaKfGwKYrUQ=,iv:fpngHczWQfG36O/1VC+XPza7hb5ho0KB5vRiyB+Pd8M=,tag:8wKVmylEEAkrt9U8qTDZrg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
6 changes: 3 additions & 3 deletions secrets/prod/backend-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV: ENC[AES256_GCM,data:k8JWA2ylFV67rw==,iv:U325LE6D9qQyeLrzsUSuS2RfuvC0Cs7uOPM
ALLOWED_ORIGINS: ENC[AES256_GCM,data:AXSXYiGK4Qbdesp5MZWdOjP2XLtfAGqX+5dqC6OwBO0yOIj84egT6mtm8kqA5ipSgb/Y3J8zxuACT1eIFQBgOk+9gPARHB6f2azi5P0WhbqzuQ0dKgGu8P6bme+qWccqjvi1U877XTkXNKw=,iv:bVxlvHgIODlWsoig3QRoq90WEjPWsykQYSsJucVLkJE=,tag:NGyMnSdb9QKn9aHsv/DcDQ==,type:str]
REDIS_URL: ENC[AES256_GCM,data:6jzt2e62Q+n9+3uRL1s2gIynoA==,iv:DxMf4XlnULYkNTvqXD0IbjCLGqdRIy7FP0NvxWMxWSg=,tag:8WiJV2DQlYsBhGi3TgkAZw==,type:str]
REFRESH_JWT_SECRET: ENC[AES256_GCM,data:P+Lt0IZdXgmz65n4vv5jgYTVUnY7GqMhFT2UMKHKeyA=,iv:lbHNA3W2hT5PCvCKHGg4gHI+tctK/TQ1So5Affl49GA=,tag:rb9qevlaSLQmgxjHnF9t8w==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:3Yud8qVzog==,iv:tLQpKjkfHpB2/HK3JzjaIhbSf6Vao/cWyfupkkLXQeo=,tag:rfxFdFDb0aKOMrO6mYwEdg==,type:str]
REFRESH_JWT_TTL: ENC[AES256_GCM,data:aRKzOZAHHw==,iv:izTY6MeguvlFRS66/+YYW27XZe5jx353yikylpQohWw=,tag:bUdRbDyO8cLgDKHelW98sw==,type:str]
AUTH_JWT_SECRET: ENC[AES256_GCM,data:+sTEYxAQi7+F13XOo3tPCJTERCrplCm0dfwbYhAbwGs=,iv:BoN76+lnGUzyqWyvGA9oIPyJLHUtB7Q+tLdnMReUM+s=,tag:JCHjR3BLaB/2vfs7nfB/YQ==,type:str]
AUTH_JWT_TTL: ENC[AES256_GCM,data:TnS5,iv:CSZEnBEuV4EcmXMQEncwuoUu/7Ov/839zWpOzDt9hSk=,tag:G2261a9mSNYOLcagJi4d+Q==,type:str]
ONE_TIME_LOGIN_JWT_SECRET: ENC[AES256_GCM,data:uKXWSnHJlh4+jG/9ph+BL6li7hsQo0sNpbXfT7HLMmE=,iv:ooy4BFlthMEjpo5vf1T8lfbxqOTtp+C9PpjtCqPIHa0=,tag:UCZOL9arA12h9dCrEs1ukg==,type:str]
Expand Down Expand Up @@ -80,8 +80,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2023-08-03T19:04:47Z"
mac: ENC[AES256_GCM,data:uq4ZeA6a1y3O0r3NGQT04kS2hbBKdavn6mpDkiakh1au05NDZqnWp+AfBNuKO4/AmbDk3Ka+UutdmOd3yAdD0ZN9g4hGIgTiaW99wknw9kr9/3v+nkOySYOjdPMLz5CI/58LKl+WCvLOV5nxYKqjWX5+N0rjWdYlthDOQRJKet0=,iv:qLwTInyrfeB0VBOUaUHkdiEf51UXhC3rCxy+ln1mtT0=,tag:lLUe2b8PEvClykAH/ICiaw==,type:str]
lastmodified: "2023-08-29T13:33:53Z"
mac: ENC[AES256_GCM,data:wKMjZ19+5GDg84tW25dKF1PAVrlSdVSv9nz9JI40yrEbh7SDL22/0Zhm43kyG2IozurNiS5i1kJ2LWQSgLLONN99xqI9Cw4MKwZsELcCagWxZfAo8a3bLMvs25Ki53MBaWQn6Taq+kbN4tBwXcDmKVTEZ7hDf+rD6n2uw5Yy2a4=,iv:u882GpXAxG1CtpbjuEHnt27H4oAU2IupAFaMcIGIY4s=,tag:4frw1qwKfRdCsAVekS/Y4A==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func SetDefaults() {
viper.SetDefault("ENV", "local")
viper.SetDefault("ALLOWED_ORIGINS", "http://localhost:3000")
viper.SetDefault("REFRESH_JWT_SECRET", "Refresh-Test-Secret")
viper.SetDefault("REFRESH_JWT_TTL", 60*60*24*7*4)
viper.SetDefault("REFRESH_JWT_TTL", 60*60*24*90)
viper.SetDefault("AUTH_JWT_SECRET", "Test-Secret")
viper.SetDefault("AUTH_JWT_TTL", 60*5)
viper.SetDefault("ONE_TIME_LOGIN_JWT_SECRET", "One-Time-Login-Test-Secret")
Expand Down

0 comments on commit cd0ec2a

Please sign in to comment.