-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Feedback] OpenID and multi-user #4029
Comments
Thanks @lelemm for this amazing feature! I'm having some trouble setting this up with Authelia. I'm getting the following error after trying to sign in with OpenId:
When I look at the logs for Actual I see the following:
Anyone know what I might be doing wrong? |
I'm not on the PC right now, but maybe authelia does not implement openid, but oauth2. If that's the case, you have to setup it using the config.json on the server specifying the authMethod to oauth2 instead of openid
|
Thanks, I'll dig around! I think Authelia has OpenID based on this, but I'll try the config.json. |
I tried with the config.json and set the authMethod to "oauth2" but still got the same error. |
To use the configuration in the file, you need to run the commands. This script will take the configuration from the file into the database |
Ah thanks, I didn't realize I had to run that command for it to use the config. That worked! I had to switch my docker container from edge-alpine to just edge to have npm in it. |
Actually, that seemed like it fixed the issue but I don't think it did. After I run those commands I'm able to sign in (with account A) and assign a budget file to myself as admin. However, if I try to sign in through a different user account (with account B) in incognito mode I get the same |
You have to give access to the second user in the user directory |
Got it, it's working as expected. I thought that new users would be added to that automatically at sign in. Thanks for all of your help! |
it is possible to use multi-user without need to login with openID ? |
Nope. They are tied together for now. One can expand for internal user management |
HI! Thank you for this future! Amazing! But could you write some documentation about it? For example: what is the redirect URL for OAuth2? |
just added via authentik. worked flawless so far. Enabling was quiet easy as well. The fact that it deletes the url in case you change auth-provider in setup is a little confusing though - or rather the fact that it accepts invalid url and does not tell you (it resetted to placeholders but i did not notice and hit ok again - and i was not able to see error on first sight) |
I noticed that arbitrary users seem to be able to access budget files of other users as long as they log in from the same device. Consider the following situation - I got two users in my IAM solution (Authentik), one is called Daniel Bodky and is Admin in Actualbudget, the other is called John Doe and got added to the user directory of Actualbudget manually: There is only one budget file available on the server, called Daniel. It has been created by the admin user and is configured to be accessible only by him: However, if I log in to Actualbudget with the second user John Doe, I am offered to open the budget file. It even states that the supposedly unprivileged user is the file owner. Consequently, I can open and edit the budget with the unprivileged user (note the username in the top right): If I login as John Doe from a private browser window, the behavior is as expected: The user doesn't have a budget file yet, so none is displayed; the budget file(s) of other users don't show either. I guess this is due to the offline capabilities of Actualbudget, and the fact that all local files are available in the device/browser? So once a budget file has been downloaded to a device/browser, it's accessible to all users that might log in on that device/browser? |
You are completely right. That's how its working atm |
Are there plans to mitigate this behavior in the future? Maybe by 'disabling' offline mode when enabling OIDC auth/multi-user support? |
AFAIK, not planned, but I guess with enough feedback for it will probably be mitigated |
Working well here with Pocket ID. Thanks for implementing! |
Would be nice if someone is using a different OpenID provider, give some information like this: {
label: 'Microsoft Entra',
value: 'microsoft',
issuer: 'https://login.microsoftonline.com/{tenant-id}',
clientIdRequired: true,
clientSecretRequired: true,
tip: (
<Link
variant="external"
to="https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols-oidc"
>
<Trans>OpenID Connect on the Microsoft identity platform</Trans>
</Link>
),
} So the list of validated providers can be increased for future users |
Where would I find that? |
That would be built by you, if you have the knowledge |
Firstly, thanks for this great features ! 😍 Quick question regarding claims used to retrieve user information.Actually, at least for Entra ID, the username seems to be mapped to the display name? Is it correct? Maybe it can be interesting to be customized to use the UPN (which is unique in Entra ID - not sure it's the case for display name), for example? This question aside, authentication process works perfectly. |
The username saved is a little clunky honestly. |
To test this, I:
|
based on this topic, I asked chatgpt to summarize what was discussed here: Consolidated Feedback on OpenID and Multi-User Support for Actual BudgetGeneral OverviewThis discussion tracks feedback, bug reports, and improvement suggestions related to the OpenID and multi-user support feature in Actual Budget. Below is a consolidated summary of reported issues, solutions, and requested improvements. 1. Setup Issues & TroubleshootingCommon Errors Reported:
2. User Experience (UX) & Documentation ImprovementsProposed UX Enhancements:
3. Feature Requests & EnhancementsFeature Requests:
4. User Experiences & Success StoriesUsers Who Successfully Set Up OpenID
Users Who Faced Challenges
5. Summary of Next StepsFixes & Enhancements Required:⏳ Clarify in documentation that OpenID does not auto-create users. Final ThoughtsThe OpenID and multi-user feature in Actual is highly appreciated but still requires refinements, particularly in automatic user creation, improved UX, and better support for multiple budgets. |
Is there a specific reason there's not an environment variable for auth type and it has to be set manually in the config? Seems like it'll be a pain to set up Github/other OAuth2 mechanisms on hosts like fly.io and pika pods. Presumably you'd need to extend the released docker image to customize the config I'd tinker with the change myself, but I don't have a ton of auth experience so don't want to mess around with that too much. |
I'm very busy at work lately. I will do changes on this when I'm more available. |
No rush of course, appreciate your contributions. |
Hi @lelemm I would like to add a feature request here. I do not expose actual budget's web interface to public for security reasons and it sits behind the Authelia Login page. I have configured open id and right now, I have to login twice to get to the AB dashboard. Would you consider adding a flag to auto redirect user to the open id login page if open id is configured when the user opens the AB website ? Auto redirect in combination with pre configured consent would mean that I can have a better login flow where people have to login just once to Authelia. After which, They'll come to AB login page which redirects them to the open id page. Then, We have pre configured consent so they are immediately sent back to AB with the login token. This'll result in a better login flow without compromising on security in any way |
This feature is working great, just one suggestion: |
I'd like to get some clarity on what type of OpenID this feature targets. Based on a tiny number of references in comments, and the release notes, it looks like OpenID Connect, which is based on the OAuth 2 standard. If that is the case, what is the difference between the |
this is for OIDC, it serves as authentication and identity. |
I'm running into some issues where when I go to the user directory page and it makes a get call to get the user list, it's giving me a 'Too many requests, please try again later' error. This is then preventing me from creating a new user as well when it tries to make the new user post. Sometimes it seems to log me out too. It seems to be hitting the server over and over making the get user list request, interestingly, after a little bit of this the requests start to run just fine, but the POST to create the new user is still broke. Running in docker on linux and accessing on a mac. Only local network, use authentik as the provider. I'm happy to help troubleshoot with any more info that might be needed. I will try and get a video of it happening in the next day or so. Otherwise, very appreciative of everyone working on this feature. Edit to add, it's definitely hammering the server with the get users request, over 2000 of them while I wrote up that comment, was able to copy the POST to create a user as curl from the network tab and sent it from the hosting server and it worked just fine to create the new user. |
I noticed that too. I'm investigating |
Tell me you haven't read the discussion without telling me you haven't read the discussion 😛. Auto redirect to the IDP has already been called out. |
Ah okay. I did read it but I must have missed it. Thanks for the correction |
Auto redirect is already developed for my branch, I just need to implement the OIDC Provider logout to avoid login again after a logout |
@lelemm Wondering if there has been any thought to separating the data synced back to local devices from the server when multi-user is enabled. If a single server is used to host budgets of multiple people who have no connection to each other it seems like all their data would sync to all of their individual devices. Is that how it works? Is there any documentation or link to a discussion about how this works from a security and privacy perspective? With ElectricSQL (Sqlite in browser and PostgreSQL on Server) it uses DDLX rules and Shapes to control what each device receives from the cloud (I.e. from potential other users). ref: https://legacy.electric-sql.com/docs/intro/sync-controls |
5. Summary of Next StepsFixes & Enhancements Required:⏳ Clarify in documentation that OpenID does not auto-create users. |
I was just teasing, hope it didn't come off as anything else. I just wanted to make sure you saw that it was already in the works at the time. |
5. Summary of Next StepsFixes & Enhancements Required:⏳ Enhance docs with the many OpenID changes. |
I also am running into this exact issue. Just want to make sure I'm not missing anything, is there a diagnosis/solution to this? |
There is a fix for this on next release |
Are there any plans to be able to migrate or merge existing actual budget instances into one with multi-user support? |
Not sure I get it: aren’t existing instances natively Multi-user? I just
upgraded the container to the latest version and that’s it
|
I mean multiple separate instances that were create before there was an (experimental) multi-user support, e.g. when hosting separate instances for family members. So will it be possible to migrate / merge them into one instance facilitating the integrated multi-user feature. |
Just export the budget and import in the final instance |
Heyo, first -- thank you for doing this! Second, I might be doing something wrong (or hopping on this before it's ready), but I'm having a bit of trouble with the new This might be intentional (in case SSO is misconfigured maybe?) but, if so, "enforce" might be a bit misleading. |
Is there a way to disable the login with password option after OIDC is configured? I setup the app/provider in Authentik, setup OIDC in Actual using the UI, it took me back to the login and I chose login with OpenID and it authenticated me through Authentik correctly and seems to be working fine. But if I logout, the login screen gives me the option to login with either Open ID or Password. I was hoping to disable the password option from the login screen before exposing my Actual URL so that I can make transaction entries while out from my phone. |
its not intentional. probably not triggering the filter when you hit back |
its being added next release: #4423 |
At "User Directory" page something crazy is going on, it's trying to fetch I use the latest UPD. My guess problem is related to Traefik: https://community.traefik.io/t/http-router-removes-upstream-content-type-under-specific-conditions/25539 |
There is a bug fix ready for next release |
Thanks to @lelemm, OpenID and multi-user support was added to Actual in #3878 as an experimental feature. This issue is to track feedback/bugs/issues/requests related specifically to that feature.
The text was updated successfully, but these errors were encountered: