mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4116] [bug]: Infra config does not reload anymore #1471
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#1471
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 @Breee on GitHub (Jun 12, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4116
Originally assigned to: @balub on GitHub.
Is there an existing issue for this?
Current behavior
Setup:
I set Microsoft authentication as follows:
My client secret rotates every 90 days, that means the secret will change at some point.
if i then change the config it is NOT changed in the DB
Steps to reproduce
Set ENV variables
start your hoppscotch
then change it
it will not be updated in the DB!
Current workaround (ugly af):
Environment
Production
Version
Self-hosted
@liyasthomas commented on GitHub (Jun 12, 2024):
@balub can you look into this?
@Breee commented on GitHub (Jun 12, 2024):
Related to #3868 btw
@balub commented on GitHub (Jun 13, 2024):
Hey, @Breee so the way the InfraConfig works is that when the Hoppscotch instance is up for the first time we essentially read the env values and save them in the DB. Every subsequent time when the instance is spun up we check to see if any new env variable/s have been added and if yes we add them to the table. For the most part, once the values are loaded into the table, we do not check to see if values have changed to update their values to their new ones in the DB from the env file.
Instead, we recommend users update values from the admin dashboard. In your case, the recommended approach is to update the client secrets from the admin dashboard itself. Now one more thing to note is that just changing the values in the DB will not result in them being used in the Hoppscotch instance. To do that you will have to restart the instance so that all the modules can re-initialize themselves.
Updating values from the admin dashboard does all this so that once a value for a property has been updated, its new value is saved in the DB and the Hoppscotch instance uses the new values.
@Breee commented on GitHub (Jun 13, 2024):
We rely on fully automated updates with automated tests and rotate secrets frequently, so clicking in the UI is not a solution for us.
In my opinion cloud native applications should be fully configurable via ENV variables, config files or via API, everything else is broken by design.
A possible solution could be to calculate a delta of the ENV variables to what is in the DB and set them on startup. That is just a Single loop that solves my Problem. wdyt?
@muellerst-hg commented on GitHub (Jun 13, 2024):
If the client secret changes on openid provider side, you couldn't login to admin dashboard to change the client secret on hoppscotch side.
@Christophecab commented on GitHub (Aug 28, 2024):
This must be written in the doc (in bold)... lost many hours trying to find why my auth configuartion didn't work (until I found this issue).
@Breee commented on GitHub (Aug 28, 2024):
This feature is broken by design @liyasthomas @balub
My workaround by writing directly into the DB is NOT a valid solution for me longterm
@muellerst-hg commented on GitHub (Dec 12, 2024):
looks like 2024.11.0 has fixed this issue via #4545
@Breee commented on GitHub (Dec 12, 2024):
++