juice-shop / multi-juicer

Host and manage multiple Juice Shop instances for security trainings and Capture The Flags
Apache License 2.0
269 stars 123 forks source link

Add "reset team passcodes" button to admin page #98

Open skandix opened 2 years ago

skandix commented 2 years ago

It would be nice if the token for a team on multi-juicer, could be stored in the metadata regarding the pod. So if everyone in the team forgot their team pincode, they could ask admins of the cluster to recover it by checking the metadata for the team pod.

Like one can for the admin password, as seen in the attached picture. But have the option to attach team pincode to its pod.

image

J12934 commented 2 years ago

Hi 👋

I understand the problem, I don't really like the proposed solution. Passcodes are currently hashed (bcrypt and stored in the annoations of the teams deployments), also storing them in plain text would make the hashing worthless and would be something I try to avoid in a plattform used to teach security best practices 😅 (yes the admin passcode is currently also stored in the cluster unhashed, we might also want to at least provide the option to pass in a bcrypt hash of the password instead of the plain text value)

As alternative solutions to the problem I'd sugegst:

  1. Add a "Reset Passcode" button to the admin page, to generate a new passcode for a team. Passcode resetting already exist but is only available to the teams themself (which requires at least one logged in team member)
  2. Automatically store the passcodes of the teams in their browsers local / session storage and automatically allow them to join teams where they have the tokens stored.

Would these alternatives also solve your problem?

skandix commented 2 years ago
  1. Would probably be the best solution