Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo not accessible via given credentials #7

Open
a13ph opened this issue Dec 6, 2024 · 5 comments
Open

Demo not accessible via given credentials #7

a13ph opened this issue Dec 6, 2024 · 5 comments

Comments

@a13ph
Copy link

a13ph commented Dec 6, 2024

No description provided.

@elsbrock
Copy link

elsbrock commented Dec 6, 2024

Works for me.

@blobinabottle
Copy link

Not working here (401, no much info in the console)

@ignatz
Copy link
Contributor

ignatz commented Dec 6, 2024

Thank you for raising this. You're probably all correct, there are two straightforward reasons why it may not work:

  1. The working-as-implemented: The instance gets wiped every 60min, which also wipes the private keys used for signing the authentication tokens. Means, if you happen to hit that window or come back later, your existing token will be rejected.
  2. The more malevolent case: once logged in there's nothing preventing you from dropping system tables like users or deleting existing users.

Maybe there's other reasons but these are the ones that pop to mind. Fortunately, these are non issues for private instances but these issues can be improved on nonetheless.

For one, we should carry over the private key between wipes. #2 is a bit harder to tackle, since one can run arbitrary SQL queries. That said, we should better protect against accidents like deleting the last admin or deleting oneself. TrailBase does parse the SQL queries into an AST, so we could best-effort protect against schema changes of system tables.

@ignatz
Copy link
Contributor

ignatz commented Dec 6, 2024

Looking into this a bit more, I had already fixed the key persistence issue in the past. It's likely just #2 or even simpler: folks logging in and changing the password.

I started to wipe the instance more often now. Not a solution but should at least make the impact less severe.

@rrrodzilla
Copy link

The more malevolent case: once logged in there's nothing preventing you from dropping system tables like users or deleting existing users.

...and this is why we can't have nice things. ☹️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants