-
Notifications
You must be signed in to change notification settings - Fork 404
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
inconsistent use of env vars #3098
Comments
I wanted to ask what the reasoning is behind this inconsistency. Maybe I just misunderstood something. @jkowalski sorry for pinging you here. let me know if it is better to start a topic on the forum instead. |
Here's is what I have figured out so far. For the server component, there are 2 users and there is also the repository password that was used to create the repository on the server (no username). When starting the server, the following env vars are used:
see When doing a server refresh, the server control password is needed, but the env var used is the one for the server password:
see This is clearly an inconsistency and extremly confusing. But maybe I am missing something. |
I remember having some kind of confusion regarding that which is probably why I have a specific line saying "Add |
IMO, all the names are a bit off. e.g. KOPIA_PASSWORD is used for the repository password. afaik this password is only used when creating a repo and changing the password of the repo (this password is used to do the encryption). Thus this should be called KOPIA_REPOSITORY_PASSWORD Then the KOPIA_SERVER_* passwords are actually credentials that are used when using a client to authehticate against the server. These are the ones that were created when doing And last but not least we have user and password credentials that are used for administering the server ( Kopia is still 0.y.z thus according to semver, breaking changes can still be done w/o having to raise the major version. IMO this could need a serious cleanup to make it consistent and more logical. |
Environment variables are not used consistently.
I start my kopia repository server with
KOPIA_SERVER_CONTROL_PASSWORD=control
andKOPIA_SERVER_PASSWORD=kopia
.Then I want to run
kopia server status
, but get an error messageERROR unable to list sources: 401 Unauthorized
.Turns out that the command needs the control password, but the password is read from the wrong env var
KOPIA_SERVER_PASSWORD
. Even the help shows the wrong info:This is very confusing and unexpected. This means after starting the server, people have to change the
KOPIA_SERVER_PASSWORD
env var to the same value asKOPIA_SERVER_CONTROL_PASSWORD
. Hmmm. Rather strange, isn't it?The text was updated successfully, but these errors were encountered: