-
Notifications
You must be signed in to change notification settings - Fork 365
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
Error 500 on OpenShift/okd.io with MariaDB related to passphrase field #2811
Comments
Hello @Grommingen, thanks for contributing to the Password Pusher community! We will respond as soon as possible. |
Hi @Grommingen, This is most likely a problem in the encryption area. I see two possibilities:
Also - which DB backend are you using?
Unrelated - this is just a wrapper that sets the language for the page to be displayed. Also v1.40.x is old. There have been some CVE's filed against older releases. Could you try latest v1.49.0? |
Thanks for the reply!
The database backend is mysql. Our production pwpush is running on the same backend, albeit a different database. My version is now running 1.49.0 and the error shows:
So the new version now also mentions lockbox as a cause. The keys, both PWPUSH_MASTER_KEY and SECRET_KEY_BASE are created and base64 encoded before put into a secret in the namespace. I can also clearly see it in the pod when i do the |
Hrm that's an odd one. Open an app console and paste in this:
That will tell us if the booted application has the right master key. |
Verified its the key that i've used in my secrets. I should also mention that the API works. i can send a POST to the endpoint |
And you retrieve the payload without issue? Then it's something with the Could you try a POST with this payload?
|
Generates a password and the passphrase to unlock it = asdf works. |
Logs from the api POST incase its relevant:
|
Honestly I have no idea at the moment why it would throw that error only on UI page rendering - and only with the Give me a bit to think about it - I'll post back soon. |
I've tried spinning up an ephemeral deployment and that works. Just for the record. |
So then I would suspect it has something to do with the MySQL database but then the JSON API works...which doesn't make sense. Have you enabled file and URL pushes? Could you try these paths to see if you get the same error?
|
After enabling:
|
😂 Twilight zone! Those other paths do the exact same thing... Thanks for the confirmation I'll keep digging. |
I'll throw this out there because I don't have many ideas right now. It's a long shot but you could drop the db and recreate the database. Open an app console again and run:
You might have to use This of course will delete all data (and logins) that you created. Again this is a hail mary until I figure out what's happening. I've never seen this and never had another report of this. Thanks for being patient! |
I have done the ./bin/rails commands which deleted and created the database again however it did not help. I've also created another mariadb instance with the newest stable version(11.4) and that did not help either. Thanks for looking into this @pglombardo br |
Hi again! I've tried with a postgres backend now and it works. So the issue may only affect mysql/mariadb. br Grommingen |
Great find! It crossed my mind that this might be a MySQL related issue as I've had other MySQL oddities a couple years back. I'll launch a fresh MySQL deploy hopefully today to figure out what's different. |
In fact, this was it. I put in a special handler for This is the code. Not sure why it wouldn't affect file based pushes though. What version of MySQL are you running? |
mysql and mariadb are interchangeable? I've tried with both mariadb 10.7 and 11.4(our latest stable version). I can spin up a mysql instance and see if there is any difference but i want it to run on mariadb because thats what our current prod pwpush instance is using. |
Spun up a mysql db instance and it works, got the message from the code you pasted as well. |
Apologies - I was AFK. So that means it's only a MariaDB thing? I'll test with that and see if I can find the cause. It has to be something with that |
Yeah, my assumption is that this only affects MariaDB. When i did a migrate just now the messages about passphrase says:
|
I just booted docker-compose-mariadb.yml but first I updated the image to mariadb:11.4 And it works - including pushing a payload with a passphrase: I had a pre-existing MySQL/MariaDB database so I opened the container console and ran and it still worked. You could try and re-fetch the latest hashes for your images but I think you already did this... docker pull pglombardo/pwpush:latest
docker pull mariadb:11.4 Not sure what could be different locally for you. Just wanted to post this for now until I get an idea. |
I am not doing this locally, its all on openshift(okd4). I can try it locally as well, i only tested ephemeral locally before. But i've tested latest docker image and mariadb 11.4 instance on openshift. I can't test anymore today but i'l look into it when i have spare time. |
Understood - when you have more time here's one more brute force test. Get a shell into the container and add the following line of code to
Here's a screenshot of the modified file: That may fix it and if it works I'll put out a special fix just for this issue. |
I've added the line but it does not seem to help. I did a ./bin/update and ./bin/setup as well to see if it helped. same message.
|
Good monday @pglombardo ! I am sorry to say that my previous statement is not correct. I implemented this fix on version 1.37.0 first, this did not work. So your proposed solution/fix will probably work in my case. br Grommingen |
The latest version 1.49.3 implemented the wanted solution. The fix is a success and our production instance with mariadb as a backend is now running. Thanks for your assistance @pglombardo and have a nice Christmas Holiday! |
reopening :( More to come. |
Hi @Grommingen - try v1.49.4 which is building now. It should be done in about 45 minutes. |
thanks, il try that one too. It says E, [2024-12-13T10:53:24.498556 #22] ERROR -- : [272bdfce-5e4a-4618-a8eb-9bb1348b1bd1] now but i dont know why yet. |
@pglombardo False alarm. I've mounted /tmp as a volume in okd. I saw a permission denied on /opt/passwordpusher/tmp and changed the mount to that instead and then it worked. I am guessing this is a change from long ago that we've yet to correct on our installation. Its all running now again. |
I saw from the code that you can have a The issue was with the livenessProbe (touching |
No I haven't added that to the OSS version yet but it a good feature request. Filed in #2886. |
Checklist
issues
.discussions
.❓ Question
I filed this as a question as i don't know yet if its a bug or not.
I have deployed pwpush(i want to run on v.1.37.10) in our okd4 stage environment. When i goto the URL exposed by my ingress i get a 500 error.
The pod logs say:
I've generated PWPUSH_MASTER_KEY and SECRET_KEY_BASE and they are in encoded format as a secret. I've also tried it without these secrets but that did not help either. What does this
custom_set_locale_from_url
mean? Does it have anything to do with the master and secret keys?I've tried to bump the versions we use but it does not help.
Bumped versions to 1.40.0 and 1.42.0.
br Bjørn-Ivar Høibye - Redpill Linpro
The text was updated successfully, but these errors were encountered: