mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #5651] [bug]: InfraConfig MICROSOFT_CLIENT_SECRET is never updated from ENV #2190
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @muellerst-hg on GitHub (Dec 3, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5651
Originally assigned to: @mirarifhasan on GitHub.
Is there an existing issue for this?
Platform
Web App
Browser
Chrome
Operating System
Linux
Bug Description
We use containerized self-hosted instance with Microsoft OAuth. Our ENV variable MICROSOFT_CLIENT_SECRET is automatically rotated on a regular basis, because the secret has a limited lifetime.
After upgrading from 2025.6.1 to 2025.7.0, changes to ENV variable have no more effect. (a similar issue happened before, see #4116). Upgrading to 2025.11.0 does not help.
Login to admin UI is not possible anymore because the secret reached the end of lifetime.
What do we expect?
When you set a new value for ENV variable
MICROSOFT_CLIENT_SECRETand restart the backend, then the corresponding value in DB tableInfraConfigwill be updated to the value from the ENV variable. That's the behavior until 2025.6.1What happens instead?
MICROSOFT_CLIENT_SECRET is not updated in DB table
InfraConfig. When secret reached end of lifetime, it becomes invalid and cannot be updated.Steps to reproduce
docker compose -f compose.yml up, wait until initial setup is completed..envdocker compose -f compose.yml up, wait until initial setup is completed..envimage: hoppscotch/hoppscotch:2025.7.0docker compose -f compose.yml up, wait until initial setup is completed.Deployment Type
Self-hosted (on-prem deployment)
Version
2025.11.0
@ambouh1 commented on GitHub (Dec 4, 2025):
We Have the same issue, hoppscotch installed on EKS with many versions even the latest one.
@jmarquez84 commented on GitHub (Dec 5, 2025):
We have the same issue.
@mirarifhasan commented on GitHub (Dec 7, 2025):
Hello @muellerst-hg, @ambouh1, @jmarquez84,
Thank you for reporting this issue and providing detailed reproduction steps.
From version 2025.7.0 onwards, we have reduced the number of environment variables to make configuration less troublesome for our users. Previously, there were too many variables that made the setup process cumbersome.
All auth-related secrets can now be set up and modified from the Admin UI. This decision was made to keep user onboarding frictionless, so that users don't need to juggle with the .env file too much.
You can find the currently supported environment variables here:
https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#configuring-the-environment
Since you mentioned:
In your situation, you can do one of the following:
(Option 1) Reset the onboarding flag
From the InfraConfig table in the Database, find the row where
name='ONBOARDING_COMPLETED', and set thevalue='false'. This will allow you to go through the onboarding process (in Admin UI) and set up your authentication provider.(Option 2) Hard reset the configuration
Follow the hard reset instructions in our documentation:
https://docs.hoppscotch.io/documentation/self-host/community-edition/admin-dashboard#hard-reset-configurations
After performing either option, you'll be able to configure your Microsoft OAuth settings (including the client secret) through the Admin UI, which will persist the changes to the database properly.
Thank you for your patience and understanding!
@muellerst-hg commented on GitHub (Dec 8, 2025):
This generally removed the ability to automatically rotate the token and also to prevent human users from reading the token.
Security- and automation-wise this is a step backward.
I wonder if improving the documention for .env would help onboarding, so that you could reintroduce the env variables? I would be happy to contribute documentation.
Beside that, could you please make .env optional, so that users have the choice to use admin UI or .env?
@Breee commented on GitHub (Dec 8, 2025):
Your software requires us to hack and is not automation friendly. We want to rotate secrets often and fast without db hacks.
We will NOT do ClickOps and we will NOT hack around in the postgres database.
I find it unbelievable that your proposed solution is to truncate a DB table. (Especially because we had this bug fixed before https://github.com/hoppscotch/hoppscotch/issues/4116)
Modern containerized applications should be always configurable via the environment or some sort of configfile at least.
@jmarquez84 commented on GitHub (Dec 9, 2025):
I tried to insert the new configuration in Admin UI, but when I click on "Save Auth Config" I got an error.
This is the configuration:
@mirarifhasan commented on GitHub (Dec 10, 2025):
@jmarquez84 Could you please share the backend container logs that are generated when you perform the “Save Auth Config” action?
@jmarquez84 commented on GitHub (Dec 10, 2025):
Hi @mirarifhasan the problem was the SMTP URL., but the problem didn't show in the front.
@mirarifhasan commented on GitHub (Dec 10, 2025):
@jmarquez84 Could you let us know which format you were using for the
SMTP URL? This will help us improve the UX on our side.Also, hope you were able to enter the
SMTP URLcorrectly and get the setup working.Thanks.
@krystalcode commented on GitHub (Dec 16, 2025):
I don't think there would be a problem with having both the ability to configure settings via the admin UI and allow overriding those via environment variables. I now find myself logged out and can't log in because I need to update the SMTP settings, which I can't until I log in and set them via the UI.
@muellerst-hg commented on GitHub (Feb 23, 2026):
I would really like to avoid workarounds and use ENV variables straightforward as this is the most common pattern in system design, see twelve-factor app).
Please reintroduce ENV variables to enable automated operations . It does not harm ClickOps approach.
@cha0s22 commented on GitHub (Feb 23, 2026):
Luckily I stumbled upon this issue after our microsoft secret expired today... Introducing a breaking change like that, that gives no other option than to manually edit the database is really not a good move ... especially as the previous behavior was completely fine and we had a fully automated secret rotation up and running.
I highly support the authors proposal to reintroduce ENV variables.
@mmiftach commented on GitHub (Mar 3, 2026):
Thank you, this solved my problem.