generated from coop-cloud/example
SECRET_KEY is generated with incorrect length #12
Open
opened 2023-04-22 22:19:34 +00:00 by 3wordchant
·
8 comments
No Branch/Tag Specified
main
authentik-groupsync
renovate/configure
edits
deploy-timeout
simon-add-local-storage-support
pg15
old-database
smtp
3.0.2+1.9.2
3.0.1+1.9.1
3.0.0+1.9.0
2.21.1+1.8.1
2.21.0+1.8.1
2.20.0+1.7.1
2.19.1+1.6.1
2.19.0+1.6.0
2.18.0+1.6.0
2.17.0+1.5.0
2.16.0+1.4.0
2.15.1+1.3.0
2.15.0+1.3.0
2.14.0+1.2.0
2.13.0+1.1.0
2.12.1+0.87.4
2.12.0+0.87.3
2.11.0+0.86.1
2.10.0+0.84.0
2.9.1+0.82.0
2.9.0+0.82.0
2.8.2+0.81.1
2.8.1+0.81.1
2.8.0+0.81.1
2.7.2+0.80.2
2.7.1+0.80.2
2.7.0+0.80.2
2.6.1+0.79.1
2.6.0+0.79.1
2.5.0+0.78.0
2.4.2+0.77.3
2.4.1+0.77.2
2.4.0+0.77.1
2.3.0+0.76.1
2.2.0+0.75.2
2.1.0+0.75.0
2.0.1+0.74.0
2.0.0+0.74.0
1.1.0+0.73.1
1.0.1+0.72.2
1.0.0+0.72.1
0.13.0+0.71.0
0.12.0+0.70.2
0.11.0+0.69.2
0.10.0+0.69.2
0.9.0+0.69.2
0.8.0+0.69.2
0.7.0+0.69.0
0.6.0+0.67.2
0.5.0+0.67.2
0.5.0+0.66.3
0.4.1+0.64.4
0.4.0+0.64.3
0.3.0+0.62.0
0.2.0+0.60.3
0.1.0+0.60.3
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
appletalk
arjan
basebuilder
BornDeleuze
Brooke
carla
cas (Cassowary)
codegod100
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
flancian
Frando
iexos
jade (Jade Ambrose)
javielico (Javielico)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
marlon (marlon)
mayel
mirsal
moosemower
moritz
nicksellen (Nick Sellen)
notplants
oxaliq (sorrel)
p4u1
pau
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
PhiNatalie
renovate-bot (Comrade Renovate Bot)
ripclap
rix
rscmbbng
sef (sef)
simon
sixsmith (Sixsmith)
stevensting
tobias
trav (Trav Fryer)
val (val (he/him))
vaznasty
virtualboys
wolcen (Chris Thompson)
wykwit
xynosis
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/outline#12
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce:
abra app new outlineabra app deploy outlineExpected:
Actual:
�2023-04-22T00:11:09.611179000Z {"error":"Invalid key length","stack":"UnauthorizedError: Invalid key length\n at AuthenticationError (/opt/outline/build/server/errors.js:38:34)\n at accountProvisioner (/opt/outline/build/server/commands/accountProvisioner.js:118:43)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)","level":"error","message":"Error during authentication"}This seems to be because SECRET_KEY should be 32 characters, but abra generates a 64-character secret. Maybe changing to
length=32is enough?Changing
secret_keyto length 32 doesn't solve the problem for me, I still get the exact same error msg.I also tried length=16, then I got:
So I guess the length of secret_key is not the issue.
@iexos maybe you tried already, but you'd need to regenerate secrets (
abra app secret rm ...,abra app secret generate ...) after changing this, and possibly also drop volumes (abra app volume rm -A ...).Are you able to check what the current length of the secret key is, e.g.
abra app run <domain> app cat /run/secrets/secret_key | wc -c?Yes i did remove and regenerate with different key sizes, and also completely removed the app. Just tried now again:
Also tried reducing the utils_secret to 32 chars and upgrading to newest image
outlinewiki/outline:0.69.2, no change.I'm using Authentik, maybe this is about some key that is returned? I also tried changing the key sizes within Authentik provider, no change.
Got it to work now.
SECRET_KEYhas to be in hex format, i.e. likeopenssl rand -hex 32. Canabrado that?Ah great call, yes, that rings a bell. No, I think abra's current secret generation only does alphanumeric secrets - race you to a feature request in coop-cloud/organising
Looks like this is implemented now, shall we try it out? toolshed/organising#614
I followed the issue thread here and it looks like according to the documentation commit here:
2950d56c32that this feature still doesn't support hex charset. If so, it still doesn't solve the need for Outline (or the Garage recipe, which is why I ended up here)toolshed/abra#695